已掉线,重新登录

首页 > 绿虎论坛 > 历史版块 > 编程 > PHP > 讨论/求助

@功能求助………


『回复列表(30|隐藏机器人聊天)』

20. @飞炫的火花,js放在top.php里了。
<?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']);
$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"];
$bid=$uinfo["bid"];
$bbs=mysql_fetch_array(mysql_query("select * from bbs where bid='$bid'"));
$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="postlist">
<h2>['.$bbs["bname"].']'.$zt.'<div class="blue" style="font-size:12px;font-weight:normal;margin-left:10px;float:right;">'.$uinfo["ip"].'℃/'.$uinfo["hf"].'评</div>
</h2>   <div class="plc cl">
   <span class="avatar"><img src="'.$tx.'" style="width:32px;height:32px;"></span>
       <div class="pi">
   <ul class="authi">
<li class="grey">
<em>楼主</em><b> <a href="../user/user.php?id='.$uid.'">'.$nick.'</a> </b>
</li>
<li class="grey"><em> <a href="../user/addatt.php?tid='.$tid.'">收藏</a></em>'.$time.'</li>
            </ul><br/><br/>
<div class="message">'.$nr.'</div><br/><br/>
</div></div>
';
if($id==$uid){
$xgsc='<div class="right"><a href="xg.php?tid='.$tid.'">修改</a> | <a href="delete.php?tid='.$tid.'">删除</a></div>';
}else{
$xgsc='<div class="right"><a href="../user/addatt.php?aid='.$uid.'">关注</a> | <a href="../mail/send.php?uid='.$uid.'">内信</a></div>';
}
$i=0;
$hfmax=mysql_num_rows(mysql_query("SELECT * FROM hf WHERE tid='$tid'"));
echo '
<div class="hftitle"><a href="./hflist.php?tid='.$tid.'">回复列表('.$hfmax.')</a>'.$xgsc.'</div>';
$rss=mysql_query("SELECT * FROM hf WHERE tid='$tid' ORDER BY hftime DESC LIMIT 3");
while($hf=mysql_fetch_array($rss)){
$i++;
$uid=$hf["uid"];
$hftxt=$hf["hftxt"];
$hid=$hf["hid"];
$hftime=ctime($hf["hftime"]); 
$hfs=mysql_fetch_array(mysql_query("SELECT * FROM user WHERE id='$uid'"));
$fnick=$hfs['nick'];
echo '
<div class="hflist"><a href="../user/user.php?id='.$uid.'">'.$fnick.'</a><div class="hfls">'.$i.'#</div><br/><p>'.$hftxt.'</p>'.$hftime.'<div class="right"><a href="#" onclick="atAdd("'.$fnick.'");return false">@Ta</a></div></div>
';
}
echo '
<form method="POST" action="hf.php?tid='.$tid.'">
<div class="hflist"><textarea name="hftxt" wrap="virtual" style="width:78%;height:28px;"  maxlength="100"></textarea>
<input class="so right" style="width:20%;height:28px;" name="libreg" type="submit" value="回复" /></div></form>
';
?>
<?php
include('../foot.php');
foot_staring();
?>
(/@Ta/2015-08-27 22:50//)

21. @晨梦
echo '
<div class="hflist"><a href="../user/user.php?id='.$uid.'">'.$fnick.'</a><div class="hfls">'.$i.'#</div><br/><p>'.$hftxt.'</p>'.$hftime.'<div class="right"><a href="#" onclick="atAdd("'.$fnick.'");return false">@Ta</a></div></div>
';
}


这段代码原因


在具体的是以下这句
onclick="atAdd("'.$fnick.'");
(/@Ta/2015-08-27 22:51//)

22. @飞炫的火花,是啊,点击@TA都不显示
(/@Ta/2015-08-27 22:53//)

23. @飞炫的火花,还有就是你确定js里的内容不需要修改下??
(/@Ta/2015-08-27 22:54//)

24. @晨梦,只要你的回复框值这个name="nr"就不是js原因
(/@Ta/2015-08-27 22:59//)

25. @晨梦,把name="hftxt"改成name="nr"试试
(/@Ta/2015-08-27 23:02//)

26. @飞炫的火花,改了也不行,,,点击就只会跳到顶部
(/@Ta/2015-08-27 23:04//)

27. @晨梦
换成这个

while($hf=mysql_fetch_array($rss)){
$i++;
$uid=$hf["uid"];
$hftxt=$hf["hftxt"];
$hid=$hf["hid"];
$hftime=ctime($hf["hftime"]);
$hfs=mysql_fetch_array(mysql_query("SELECT * FROM user WHERE id='$uid'"));
$fnick=$hfs['nick'];
?>

<div class="hflist"><a href="../user/user.php?id=<?php echo $uid;?>'"><?php echo $fnick;?></a><div class="hfls"><?php echo $i;?>#</div><br/><p><?php echo $hftxt;?></p><?php echo $hftime;?><div class="right"><a href="#" onclick="atAdd('<?php echo $fnick;?>');return false">@Ta</a></div></div>

<?php
}
echo '
<form method="POST" action="hf.php?tid='.$tid.'">
<div class="hflist"><textarea name="nr" wrap="virtual" style="width:78%;height:28px;"  maxlength="100"></textarea>
<input class="so right" style="width:20%;height:28px;" name="libreg" type="submit" value="回复" /></div></form>
';
(/@Ta/2015-08-27 23:33//)

28. @飞炫的火花,临时想法,轻松搞定…,,,手机超流量了,来说一声。
echo <<<htm
<div class="hflist"><a href="../user/user.php?id=$uid">$fnick</a><div class="hfls">$i#</div><br/><p>$hftxt</p>$hftime<div class="right"><a href="#" onclick="atAdd('$fnick');return false">@Ta</a></div></div>
htm;
(/@Ta/2015-08-28 00:52//)

29. @晨梦,好吧
(/@Ta/2015-08-28 00:54//)

30. @飞炫的火花,临时想法,轻松搞定…,,,手机超流量了,来说一声。
echo <<<htm
<div class="hflist"><a href="../user/user.php?id=$uid">$fnick</a><div class="hfls">$i#</div><br/><p>$hftxt</p>$hftime<div class="right"><a href="#" onclick="atAdd('$fnick');return false">@Ta</a></div></div>
htm;
(/@Ta/2015-08-28 07:05//)

上一页 2/2页,共30楼

回复需要登录

8月30日 07:07 星期六

本站由hu60wap6驱动

备案号: 京ICP备18041936号-1