php中如何实现在线网友

简介:这是php中如何实现在线网友的详细页面,介绍了和php,有关的知识、技巧、经验,和一些php源码等。

class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=323738' scrolling='no'>

P><?

$time=getdate();

$tt=$time[year]*365*24*60+$time[mon]*30*24*60+$time[mday]*24*60+$time[hours]*60+$time[minutes];

if($userid!="guest"){

 

$SQLqq="UPDATE $USER_ATTR_TABLE SET time=$tt,status=1 WHERE userid='$userid'";

mysql_query($SQLqq);}

 

  $SQLq="SELECT status,userid,time FROM $USER_ATTR_TABLE WHERE status=1;";

  $resultq=mysql_query($SQLq) or die(mysql_error());

  $countq=mysql_numrows($resultq);

 

  for ($ii=0;$ii<$countq;$ii++) {

 $rowq=mysql_fetch_Array($resultq);

       $useridq=$rowq[userid];

    $times=$rowq[time];

  

$ts=$tt-$times;

if($ts>=15)

{

$sqls="UPDATE $USER_ATTR_TABLE SET status=0 WHERE userid='$useridq'";

mysql_query($sqls);

}

 

 }

?>


我把代码写下来,剩下的就看你们自己的了:)

“php中如何实现在线网友”的更多相关文章 》

爱J2EE关注Java迈克尔杰克逊视频站JSON在线工具

http://biancheng.dnbcw.info/php/323738.html pageNo:16

posted on 2011-11-20 11:41  圣者  阅读(145)  评论(0编辑  收藏  举报

导航