} // Never cache this page if ($jalGetChat == "yes" || $jalSendChat == "yes") { header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); header("Content-Type: text/html; charset=utf-8"); //if the request does not provide the id of the last know message the id is set to 0 if (!$jal_lastID) { $jal_lastID = 0; } } // retrieves all messages with an id greater than $jal_lastID if ($jalGetChat == "yes") { jal_getData($jal_lastID, $shout_cat); } // Where the shoutbox receives information function jal_getData($jal_lastID, $cat = "") { global $shout_tb; $who = $_SESSION['Show_Users'] == 0 ? "" : jal_get_useronline_extended(); if (isset($_SESSION['spam_msg'])) { $loop = $jal_lastID . "---Info---" . $_SESSION['spam_msg']; unset($_SESSION['spam_msg']); } else { $conn = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); mysql_select_db(DB_NAME, $conn); @mysql_query("SET CHARACTER SET 'utf8'", $conn); @mysql_query("SET NAMES utf8", $conn); $sql = "SELECT * FROM " . mysql_real_escape_string($shout_tb) . "liveshoutbox WHERE cat='" . mysql_real_escape_string($cat) . "' AND id > " . $jal_lastID;
// Functions Below are for getting comments from the database //////////////////////////////////////////////////////////// // Never cache this page if ($jalGetChat == "yes" || $jalSendChat == "yes") { header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); header( "Last-Modified: ".gmdate( "D, d M Y H:i:s" )."GMT" ); header( "Cache-Control: no-cache, must-revalidate" ); header( "Pragma: no-cache" ); header("Content-Type: text/html; charset=utf-8"); //if the request does not provide the id of the last know message the id is set to 0 if (!$jal_lastID) $jal_lastID = 0; } // retrieves all messages with an id greater than $jal_lastID if ($jalGetChat == "yes") { jal_getData($jal_lastID); } // Where the shoutbox receives information function jal_getData ($jal_lastID) { global $jal_table_prefix; if(isset($_SESSION['spam_msg'])) { $loop =$jal_lastID."---SPAMMER---".$_SESSION['spam_msg']; $who=($_SESSION['Show_Users']==0) ? "" : jal_get_useronline_extended(); echo $who."\n".$loop; unset($_SESSION['spam_msg']); } else { $conn = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); mysql_select_db(DB_NAME, $conn); @mysql_query("SET CHARACTER SET 'utf8'", $conn);