Hi friends!! chat messages continue to disappear after 50 seconds, I tried to solve this problem, we can not.
file core.php
and file chat.php
thanks to those who solves this problem
file core.php
Code:
///////////////////////////////////////Add to chat 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."', text='".$msg."'"); } $timeto = 86400; $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) if($counter<15) { mysql_query("UPDATE ibwf_chonline SET lton='".time()."', rid='".$rid."' WHERE uid='".$uid."'"); } }
Code:
addtochat($uid, $rid); $timeto = 86400; $timenw = time(); $timeout = $timenw-$timeto; $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); $rname = $rooms[1]; $nick = getnick_sid($sid); if ($action=="") { $check = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_chonline WHERE uid='".$uid."', rid='".$rid."'")); if($check[0]!=$uid){ mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', chatter='".$uid."', text='".$msg."'"); } addtochat($uid, $rid); echo "<head>"; echo "<title>$rname</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_popups WHERE unread='1' AND touid='".$uid."'")); if ($unreadpopup[0]<1) { echo "<meta http-equiv=\"refresh\" content=\"20; url=chat.php?time="; echo "".date("dmHis").""; echo "&sid=$sid&rid=$rid&rpw=$rpw\">";
Comment