enterrm.php3 代码如下: <?php $[email protected]_connect("jtfcht","admin",""); if ($connid){ $[email protected]_exec($connid,"select password,lsttime,roomid,refrate from user where userid=".$id); if (@odbc_fetch_into($result,0,&$rarr)){ $sroomid=$rarr[2]; $srefrate=(int)$rarr[3]; if ($srefrate<2) $srefrate=2; if (($rarr[0]==$ps) && ($rarr[1]>=(time()-1800))){ $snewroomid=substr($selroom,2); if ($snewroomid!=$sroomid){ $[email protected]_exec($connid,"select password from room where roomid=".$snewroomid); if (@odbc_fetch_into($result,0,&$rarr)){ if ((strlen(trim($rarr[0]))==0) || ($rarr[0]==$spass)){ @odbc_exec($connid,"update user set roomid=".$snewroomid.",toid=0,toname='大家' where userid=".$id); if ((int)$sroomid!=1){ $[email protected]_exec($connid,"select count(userid) from user where roomid=".$sroomid); @odbc_fetch_into($result,0,&$rarr); if ($rarr[0]==0) @odbc_exec($connid,"delete * from room where roomid=".$sroomid); } } else{ ?> <html> <head> <title>输入房间口令</title> <meta http-equiv="content-type" content="text/html; charset=gb2312"> <link rel="stylesheet" href="main.css" type="text/css"> <script language="javascript"> <!--
function passsetfocus( ) { document.frmentersm.spass.focus(); }