$ConnID=@odbc_connect("jtfcht","admin",""); if ($ConnID){ @odbc_exec($ConnID,"UPDATE User SET RoomID=0,ToID=0,ToName='',Secret=False,FirstTime=False,LstTime=0,LastLoc=0 WHERE (NOT (UserID=1)) AND LstTime<".(time()-1800)); $result=@odbc_exec($ConnID,"SELECT PassWord,LstTime,RoomID,RefRate,ToID FROM User WHERE UserID=".$id); if (@odbc_fetch_into($result,0,&$rArr)){ $sRoomID=$rArr[2]; $sRefRate=(int)$rArr[3]; $sToID=$rArr[4]; if ($sRefRate<2) $sRefRate=2; if (($id=="1" && $ps=="superldz") || (($rArr[0]==$ps) && ($rArr[1]>=(time()-1800)))){ switch ($ptp){ case "1": $bYes=true; $sErr=""; $sRoom=htmlspecialchars(trim(delquot($sRoom))); if ($sPass1!=$sPass2){ $bYes=false; $sErr="您的口令输入的不正确"; } if ($sRoom=="大厅"){ $bYes=false; $sErr="你烦死了,都告诉你不能叫“大厅”了"; } if ($bYes){ $sPass