标题: php问题求教❨已解决❩
时间: 2015-08-06
<?php
$bt="日记查看";
include("../conn.php");
include("../top.php");
include_once("../function.php");
$sid = sqlstr($_COOKIE['dl']);
$uin=mysql_fetch_array(mysql_query("select * from user where sid='$sid'"));
$id=$uin['id'];
$page= $_GET['page'];
$tid=sqlstr($_GET['tid']);
echo <<<htm
<div class="hui"><div class="zuo">日记本本</div><div class="you"><a href="diary.php">我的日记</a> | <a href="diandi.php">点滴</a></div></div>
<div class="wz"><p><span>记得每天写下一篇日记</span></p> <p>某天回阅;那些依然是最美的回忆</p></div>
htm;
$uinfo=mysql_fetch_array(mysql_query("select * from tie where tid='$tid'"));
$zt=$uinfo["tzzt"];
$nr=$uinfo["tznr"];
$time=ctime($uinfo['ftime']);
$uid=$uinfo["uid"];
$user=mysql_fetch_array(mysql_query("select * from user where id='$uid'"));
$tx=$user["tx"];
$qm=$user["qm"];
$nick=$user["nick"];
$ip="UPDATE tie SET ip=ip+1 WHERE tid='$tid'";
mysql_query($ip,$conn);
echo '<div class="article">
日记主题:'.$zt.'
日记主人:<a href="../user/index.php?id='.$uid.'">'.$nick.'</a>(id:'.$uid.')<a href="../user/addatt.php?id='.$uid.'">+关注作者</a>
发布时间:'.$time.'
</div>
'.$nr.'<hr/>';
echo '『回复列表』
';
$hfmax=mysql_num_rows(mysql_query("SELECT * FROM hf WHERE tid='$tid'"));
$rs=mysql_query("SELECT * FROM tie WHERE tid='$tid' ORDER BY ftime DESC LIMIT 3");
while($uinfo=mysql_fetch_array($rs)){
$uid=$uinfo['uid'];
$hftxt=$uinfo['hftxt'];
$hid=$uinfo['hid'];
$time=ctime($uinfo['hftime']);
$vvv=mysql_fetch_array(mysql_query("SELECT * FROM user WHERE id='$uid'"));
$nick=$vvv['nick'];
echo '
'.$hid.'楼:'.$hftxt.'(<a href="../user/user.php?id='.$uid.'">'.$nick.'</a>/'.$time.')<hr/>
';
if(empty($huimax)){
echo '没有回复,快抢沙发哦……';
}
if($huimax>3){
echo '<a href="./hflist.php?tid='.$tid.'">>>查看更多回复('.$huimax.')</a><hr>';
}
echo '
<form action="hf.php?tid='.$tid.'" method="POST">
<p><textarea name="hftxt" wrap="virtual" style="width:90%;height:60px;" class="kuang"></textarea></p>
<input class="libbtn" name="libreg" type="submit" value="回复" /> <a href="index.php">返回>></a></form>
';
?>
<?php
include('../foot.php');
foot_staring();
?>
『回复列表(25|显示机器人聊天)』