I have try this code..maybe something wrong and i need help
in core.php
and chat.php
the problem is it become
alex - *mat enter the room
not
Chat system - Alex enter the room.
anybody can help me??
in core.php
PHP Code:
function addtochat($uid, $rid)
{
$bago = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE uid='".$uid."' AND rid='".$rid."'"));
if($bago[0]==0){
$msg = "*mat Enter the Room";
mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', chatter='".$uid."', msgtext='".$msg."', rid='".$rid."'");
}
$timeto = 120;
$timenw = time();
$timeout = $timenw - $timeto;
$exec = mysql_query("DELETE FROM ibwf_chonline WHERE lton<'".$timeout."'");
$res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'");
if(!$res)
{
mysql_query("UPDATE ibwf_chonline SET lton='".time()."', rid='".$rid."' WHERE uid='".$uid."'");
}
}
PHP Code:
if(isspam($text) || substr($chat[3],0,4)=="*mat")
{
$chatters=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline where rid='".$rid."'"));
$chnick = getnick_uid($chat[0]);
if(isspam($text)){
echo "<b>Chat system:<i>*$chnick, please don't try to spam*</i></b><br/>";
}else{
echo "<b>Chat system:<br/><i>$chnick joined room with ".getbr_uid($chat[0])."<br/>($chatters[0] user in this room)</i></b><br/>";
}
}
alex - *mat enter the room
not
Chat system - Alex enter the room.
anybody can help me??
Comment