-<?php // $Id$
-
- $nomoodlecookie = true; // Session not needed!
-
- require('../../../config.php');
- require('../lib.php');
-
- $chat_sid = required_param('chat_sid', PARAM_ALPHANUM);
- $groupid = optional_param('groupid', 0, PARAM_INT);
-
- if (!$chatuser = get_record('chat_users', 'sid', $chat_sid)) {
- error('Not logged in!');
- }
-
- chat_force_language($chatuser->lang);
-
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
-<head>
-<meta http-equiv="content-type" content="text/html; charset=<?php echo get_string('thischarset'); ?>" />
-<title>Message Input</title>
-
-<?php
- $focus = '';
- include("$CFG->javascript");
-?>
-
-<script type="text/javascript">
-<!--
-
-scroll_active = true;
-function empty_field_and_submit() {
- var cf = document.getElementById('sendform');
- var inpf = document.getElementById('inputform');
- cf.chat_msgidnr.value = parseInt(cf.chat_msgidnr.value) + 1;
- cf.chat_message.value = inpf.chat_message.value;
- cf.submit();
- inpf.chat_message.value='';
- inpf.chat_message.focus();
- return false;
-}
-function prepareusers() {
- var frm = window.parent.frames;
- for(i = 0; i < frm.length; ++i) {
- if(frm[i]).name == "users") {
- window.userFrame = frm[i];
- window.userHREF = frm[i].location.href;
- window.setTimeout("reloadusers();", <?php echo $CFG->chat_refresh_userlist; ?> * 1000);
- }
- }
-}
-function reloadusers() {
- if(window.userFrame) {
- window.userFrame.location.href = window.userFrame.location.href;
- window.setTimeout("reloadusers();", <?php echo $CFG->chat_refresh_userlist; ?> * 1000);
- }
-}
-// -->
-</script>
-</head>
-
-<body bgcolor="<?php echo $THEME->body ?>" onload="document.getElementById('inputform').chat_message.focus();document.getElementById('inputform').chat_message.select(); prepareusers();">
-
-<form action="<?php echo "http://$CFG->chat_serverhost:$CFG->chat_serverport/"; ?>" method="get" target="empty" id="inputform" onsubmit="return empty_field_and_submit();">
->> <input type="text" name="chat_message" size="60" value="" />
-<?php helpbutton("chatting", get_string("helpchatting", "chat"), "chat", true, false); ?>
-</form>
-
-<form action="<?php echo "http://$CFG->chat_serverhost:$CFG->chat_serverport/"; ?>" method="get" target="empty" id="sendform">
- <input type="hidden" name="win" value="message" />
- <input type="hidden" name="chat_message" value="" />
- <input type="hidden" name="chat_msgidnr" value="0" />
- <input type="hidden" name="chat_sid" value="<?php echo $chat_sid ?>" />
- <input type="hidden" name="groupid" value="<?php echo $groupid ?>" />
-</form>
-</body>
-
-</html>
+<?php // $Id$\r
+\r
+ $nomoodlecookie = true; // Session not needed!\r
+\r
+ require('../../../config.php');\r
+ require('../lib.php');\r
+\r
+ $chat_sid = required_param('chat_sid', PARAM_ALPHANUM);\r
+ $groupid = optional_param('groupid', 0, PARAM_INT);\r
+\r
+ if (!$chatuser = get_record('chat_users', 'sid', $chat_sid)) {\r
+ error('Not logged in!');\r
+ }\r
+\r
+ chat_force_language($chatuser->lang);\r
+\r
+?>\r
+\r
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+<head>\r
+<meta http-equiv="content-type" content="text/html; charset=<?php echo get_string('thischarset'); ?>" />\r
+<title>Message Input</title>\r
+\r
+<?php\r
+ $focus = '';\r
+ include("$CFG->javascript");\r
+?>\r
+\r
+<script type="text/javascript">\r
+<!--\r
+\r
+scroll_active = true;\r
+function empty_field_and_submit() {\r
+ var cf = document.getElementById('sendform');\r
+ var inpf = document.getElementById('inputform');\r
+ cf.chat_msgidnr.value = parseInt(cf.chat_msgidnr.value) + 1;\r
+ cf.chat_message.value = inpf.chat_message.value;\r
+ cf.submit();\r
+ inpf.chat_message.value='';\r
+ inpf.chat_message.focus();\r
+ return false;\r
+}\r
+function prepareusers() {\r
+ var frm = window.parent.frames;\r
+ for(i = 0; i < frm.length; ++i) {\r
+ if(frm[i].name == "users") {\r
+ window.userFrame = frm[i];\r
+ window.userHREF = frm[i].location.href;\r
+ window.setTimeout("reloadusers();", <?php echo $CFG->chat_refresh_userlist; ?> * 1000);\r
+ }\r
+ }\r
+}\r
+function reloadusers() {\r
+ if(window.userFrame) {\r
+ window.userFrame.location.href = window.userFrame.location.href;\r
+ window.setTimeout("reloadusers();", <?php echo $CFG->chat_refresh_userlist; ?> * 1000);\r
+ }\r
+}\r
+// -->\r
+</script>\r
+</head>\r
+\r
+<body bgcolor="<?php echo $THEME->body ?>" onload="document.getElementById('inputform').chat_message.focus(); prepareusers();">\r
+\r
+<form action="../empty.php" method="get" target="empty" id="inputform" onsubmit="return empty_field_and_submit();">\r
+>> <input type="text" name="chat_message" size="60" value="" />\r
+<?php helpbutton("chatting", get_string("helpchatting", "chat"), "chat", true, false); ?>\r
+</form>\r
+\r
+<form action="<?php echo "http://$CFG->chat_serverhost:$CFG->chat_serverport/"; ?>" method="get" target="empty" id="sendform">\r
+ <input type="hidden" name="win" value="message" />\r
+ <input type="hidden" name="chat_message" value="" />\r
+ <input type="hidden" name="chat_msgidnr" value="0" />\r
+ <input type="hidden" name="chat_sid" value="<?php echo $chat_sid ?>" />\r
+ <input type="hidden" name="groupid" value="<?php echo $groupid ?>" />\r
+</form>\r
+</body>\r
+\r
+</html>\r