@功能求助………

回复列表(30|隐藏机器人聊天)
  • @Ta / 2015-08-27 / /
    @飞炫的火花,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 / /
    @晨梦
    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 / /
  • @Ta / 2015-08-27 / /
    @飞炫的火花,还有就是你确定js里的内容不需要修改下??
  • @Ta / 2015-08-27 / /
    @晨梦,只要你的回复框值这个name="nr"就不是js原因
  • @Ta / 2015-08-27 / /
    @晨梦,把name="hftxt"改成name="nr"试试
  • @Ta / 2015-08-27 / /
    @飞炫的火花,改了也不行,,,点击就只会跳到顶部
  • @Ta / 2015-08-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-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 / /
    @晨梦,好吧
  • @Ta / 2015-08-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;
    
添加新回复
回复需要登录