<?php
$bt ="影像-片刻的感动";
include("../conn.php");
include("../head.php");
include_once("../function.php");
$sid = sqlstr($_COOKIE['dl']);
$uin=mysql_fetch_array(mysql_query("select * from user where sid='$sid'"));
$id=$uin['id'];
if(!$uin){
header("Location:../login.php");
exit;//跳转到登录页面
}
$date_jt=date("d M Y");
$jt=strtotime($date_jt);
$uinfo=mysql_fetch_array(mysql_query("select * from pic where piczzid='$id' ORDER BY pictime DESC"));
$picdate=$uinfo['pictime'];
if($picdate>$jt){
echo "<br/><br/><div id='main'>你今天已经记录了一张图片，每天只能记录一张图片哦。<a href='index.php'>返回>></a></div><br/><br/>";
}else{

echo '<div id="main"><p class="hl">图像，文字不能表达的感动</p>
<form action="add_file.php" method="post"
enctype="multipart/form-data">
<label for="file">选择一张图片:</label><br/>
<input type="file" name="file" id="file" />　<br /><p>这张图片的故事:</p><p><textarea name="pictxt" wrap="virtual" style="width:95%;height:100px;"></textarea></p><br/>
<input class="libbtn" type="submit" name="submit" value="下一步" />　　<a href="index.php">返回>></a>
</form><br/><font color=red>*</font>图片须小于3MB，每天只能发表一次图片，保留一天中最感动你的影像。<br/><br/></div>';
}
?>

<?php include("../footer.php"); ?>