chatid)) { error("No chat found"); } require_login($chat->course); if ($message = chat_get_latest_message($chatuser->chatid)) { $chat_newlasttime = $message->timestamp; } else { $chat_newlasttime = 0; } if (empty($chat_lasttime)) { $chat_lasttime = 0; } header("Expires: Sun, 28 Dec 1997 09:32:45 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"); header("Refresh: $CFG->chat_refresh_room; URL=jsupdate.php?chat_sid=".$chat_sid."&chat_lasttime=".$chat_newlasttime); ?>