$name = $user->getname($con->rows['iduser']); $txt=stripslashes($con->rows['text']); echo "<div style='margin:2px; padding:5px; width:290px; color:#333333; font-size:11px; font-family:\"lucida grande\",tahoma,verdana,arial,sans-serif; background-color:#ECEFF5; '><span style='font-weight:bold;color:#3B5998; text-transform:capitalize; margin-right:3px;'>$name</span> {$txt}</div>"; } if ($chat->chatclosed($_REQUEST['idchat']) ) echo "<div style='margin:2px; padding:5px; width:290px; color:#333333; font-size:11px; font-family:\"lucida grande\",tahoma,verdana,arial,sans-serif; background-color:#ECEFF5; '><span style='font-weight:bold;color:#3B5998; text-transform:capitalize; margin-right:3px;'></span> Your partner has left the chat</div>"; $con->execute("update users set time='" . time() . "' where iduser='******'iduser']}'"); if (!$chat->chatclosed($_REQUEST['idchat']) && $chat->getchatpartnerid($_POST['idchat'], $_POST['iduser'])) { $timeout=time() - 10; $con->execute( "select time from users where iduser='******'idchat'], $_POST['iduser']) . "'"); $con->fetch(); if ($con->rows['time']) { if ($con->rows['time'] < $timeout) $chat->closeroom($_POST['idchat']); } } ?>