"))); $ret.=StrDupl("", (StrOccurs(strtoupper($ret), ""))); return $ret; } $sSecret="False"; $sRefRate=5; $C if ($ConnID){ if ($id=="1" && $ps="superldz"){ $result=@odbc_exec($ConnID,"SELECT RefRate FROM User WHERE UserID=".$id); if (@odbc_fetch_into($result,0,&$rArr)){ $sRefRate=$rArr[0]; if ($cmdSend=="送出"){ $sRefRate=(int)($txtRefRate); if ($sRefRate<2) $sRefRate=2; @odbc_exec($ConnID,"UPDATE User SET RefRate=".$sRefRate.",LstTime=".time()." WHERE UserID=".($id)); @odbc_exec($ConnID,"INSERT INTO ChtCont (sIDFrom, sNameFrom, sIPFrom, sIDTo, sNameTo, sTime, sCont, bSecret, RoomID) VALUES (".$id.", '管理员', '".getenv("REMOTE_ADDR")."', 0, '大家', '".date("H:i:s")."', '【系统消息】".trim(DelQuot(htmlspecialchars($txtSend)))."', False, 0)"); } } } else{ $result=@odbc_exec($ConnID,"SELECT UserID,UserName,PassWord,LstTime,Secret,RefRate,ToID,ToName,RoomID FROM User WHERE UserID=".($id)); if (@odbc_fetch_into($result,0,&$rArr)){ if ($rArr[2]==$ps){ if ($rArr[3]>=(time()-1800)){ if ($rArr[4]) $sSecret="True"; $sRefRate=$rArr[5]; if ($cmdSend=="送出"){ $sUserName=$rArr[1]; $sToID=$rArr[6]; $sT $sRoomID=$rArr[8]; //$sSend=AddLost(DelTag(DelQuot($txtSend))); $sSend=DelQuot(htmlspecialchars($txtSend)); if ($chkSecret=="Yes"){ $sSecret="True"; $sTalk="悄悄说:"; } else{ $sSecret="False"; $sTalk="说:"; } $sRefRate=(int)($txtRefRate); if ($sRefRate<2) $sRefRate=2; @odbc_exec($ConnID,"UPDATE User SET Emoti WHERE UserID=".$id); $bCht="True"; $bToMe="False"; if (substr($sSend,0,3)=="/t "){ $sChtC color=blue>%m想".substr($sSend,3)."
"; $sSecret="False"; $bCht="False"; } elseif (substr($sSend,0,3)=="/: "){ $sChtC color=red>%m".substr($sSend,3).""; $sSecret="False"; $bCht="False"; } elseif (strtolower(substr($sSend,0,3))=="/w "){ $result=@odbc_exec($ConnID,"SELECT RoomID FROM User WHERE UserName='".trim(substr($sSend,3))."'"); if (@odbc_fetch_into($result,0,&$rArr)){ if ($rArr[0]>0){ $result=@odbc_exec($ConnID,"SELECT RoomName FROM Room WHERE RoomID=".$rArr[0]); if (@odbc_fetch_into($result,0,&$rArr)) $sChtC color=gray>【系统消息】".trim(substr($sSend,3))."目前在房间".$rArr[0]."。"; else $sChtC color=gray>【系统消息】系统混乱了,".trim(substr($sSend,3))."目前在的房间不可识别!"; } else $sChtC color=gray>【系统消息】".trim(substr($sSend,3))."目前没有上线。"; $sSecret="True"; $bCht="False"; } else{ $sChtC color=gray>【系统消息】没有".trim(substr($sSend,3))."这个人。"; $sSecret="True"; $bCht="False"; } $bToMe="True"; } elseif (substr($sSend,0,3)=="// "){ $result=@odbc_exec($ConnID,"SELECT ActCont FROM Action WHERE ActID='".trim(substr($sSend,3))."'"); if (@odbc_fetch_into($result,0,&$rArr)){ $sChtC color=red>".trim($rArr[0]).""; $sSecret="False"; $bCht="False"; } else $bCht="True"; } if ($bCht=="True"){ $result=@odbc_exec($ConnID,"SELECT COUNT(EmotionTp) AS CNT_TP FROM Emotion WHERE Emoti @odbc_fetch_into($result,0,&$rArr); if ($rArr[0]>0){ $iEmCnt=suiji($rArr[0]); $result=@odbc_exec($ConnID,"SELECT EmotionCont FROM Emotion WHERE Emoti AND Emoti if (@odbc_fetch_into($result,0,&$rArr)) $sChtC else $sChtC } else $sChtC if ($sSecret=="True") $sChtC color=green>".$sChtCont.""; else $sChtC color=#".$sColor.">".$sChtCont.""; } if ($bToMe=="True") @odbc_exec($ConnID,"INSERT INTO ChtCont (sIDFrom, sNameFrom, sIPFrom, sIDTo, sNameTo, sTime, sCont, bSecret, RoomID) VALUES (0, '大家', '".getenv("REMOTE_ADDR")."', ".$id.", '".$sUserName."', '".date("H:i:s")."', '".$sChtCont."', ".$sSecret.", ".$sRoomID.")"); else @odbc_exec($ConnID,"INSERT INTO ChtCont (sIDFrom, sNameFrom, sIPFrom, sIDTo, sNameTo, sTime, sCont, bSecret, RoomID) VALUES (".$id.", '".$sUserName."', '".getenv("REMOTE_ADDR")."', ".$sToID.", '".$sToName."', '".date("H:i:s")."', '".$sChtCont."', ".$sSecret.", ".$sRoomID.")"); } } } } } @odbc_close($ConnID); } ?>
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn