leave.php3 :
<?php
$[email protected]_connect("jtfcht","admin","");
if ($connid){
if (!($id=="1" && $ps="superldz")){
$[email protected]_exec($connid,"select username,password,roomid,sex from user where userid=".$id);
if (@odbc_fetch_into($result,0,&$rarr)){
if ($rarr[1]==$ps)
if ($rarr[3])
@odbc_exec($connid,"insert into chtcont (sidfrom, snamefrom, sipfrom, sidto, snameto, stime, scont, bsecret, roomid) values (".$id.", '".$rarr[0]."', '".getenv("remote_addr")."', 0, '大家', '".date("h:i:s")."', '<font color=gray>【系统消息】<font color=#ff9933>".$rarr[0]."</font>离开了这个聊天室</font>', false, ".$rarr[2].")");
else
@odbc_exec($connid,"insert into chtcont (sidfrom, snamefrom, sipfrom, sidto, snameto, stime, scont, bsecret, roomid) values (".$id.", '".$rarr[0]."', '".getenv("remote_addr")."', 0, '大家', '".date("h:i:s")."', '<font color=gray>【系统消息】<font color=#3399ff>".$rarr[0]."</font>离开了这个聊天室</font>', false, ".$rarr[2].")");
}
@odbc_exec($connid,"update user set roomid=0,toid=0,toname='',secret=false,firsttime=false,lsttime=0,lastloc=0 where userid=".$id);
}
@odbc_close($connid);
}
header("location: .");
?>
新闻热点
疑难解答