Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
.
define('NO_MOODLE_COOKIES', true); // Session not used here.
require('../../../config.php');
require_once('../lib.php');
$chatsid = required_param('chat_sid', PARAM_ALPHANUM);
$chatlasttime = optional_param('chat_lasttime', 0, PARAM_INT);
$chatlastrow = optional_param('chat_lastrow', 1, PARAM_INT);
$url = new moodle_url('/mod/chat/gui_header_js/jsupdate.php', array('chat_sid' => $chatsid));
if ($chatlasttime !== 0) {
$url->param('chat_lasttime', $chatlasttime);
}
if ($chatlastrow !== 1) {
$url->param('chat_lastrow', $chatlastrow);
}
$PAGE->set_url($url);
if (!$chatuser = $DB->get_record('chat_users', array('sid' => $chatsid))) {
throw new \moodle_exception('notlogged', 'chat');
}
// Get the minimal course.
if (!$course = $DB->get_record('course', array('id' => $chatuser->course))) {
throw new \moodle_exception('invalidcourseid');
}
// Get the user theme and enough info to be used in chat_format_message() which passes it along to.
// No optimisation here, it would break again in future!
if (!$user = $DB->get_record('user', array('id' => $chatuser->userid, 'deleted' => 0, 'suspended' => 0))) {
throw new \moodle_exception('invaliduser');
}
\core\session\manager::set_user($user);
// Setup course, lang and theme.
$PAGE->set_course($course);
// Force deleting of timed out users if there is a silence in room or just entering.
if ((time() - $chatlasttime) > $CFG->chat_old_ping) {
// Must be done before chat_get_latest_message!
chat_delete_old_users();
}
if ($message = chat_get_latest_message($chatuser->chatid, $chatuser->groupid)) {
$chatnewlasttime = $message->timestamp;
} else {
$chatnewlasttime = 0;
}
if ($chatlasttime == 0) { // Display some previous messages.
$chatlasttime = time() - $CFG->chat_old_ping; // TO DO - any better value?
}
$timenow = time();
$params = array('groupid' => $chatuser->groupid, 'chatid' => $chatuser->chatid, 'lasttime' => $chatlasttime);
$groupselect = $chatuser->groupid ? " AND (groupid=:groupid OR groupid=0) " : "";
$messages = $DB->get_records_select("chat_messages_current",
"chatid = :chatid AND timestamp > :lasttime $groupselect", $params,
"timestamp ASC");
if ($messages) {
$num = count($messages);
} else {
$num = 0;
}
$chatnewrow = ($chatlastrow + $num) % 2;
// No & in url, does not work in header!
$baseurl = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdate.php?";
$refreshurl = $baseurl . "chat_sid=$chatsid&chat_lasttime=$chatnewlasttime&chat_lastrow=$chatnewrow";
$refreshurlamp = $baseurl . "chat_sid=$chatsid&chat_lasttime=$chatnewlasttime&chat_lastrow=$chatnewrow";
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; charset=utf-8');
header("Refresh: $CFG->chat_refresh_room; url=$refreshurl");
// Use ob to be able to send Content-Length headers.
// Needed for Keep-Alive to work.
ob_start();
?>
(function() {';
echo 'var audioElement = document.createElement("audio");';
echo 'audioElement.setAttribute("src", "../beep.mp3");';
echo 'audioElement.play(); })();';
echo '';
}
?>
Refresh link