ob_start();
?>
- <script type="text/javascript">
- <!--
+ <script language="JavaScript" type="text/javascript">
+ //<![CDATA[
var waitFlag = false;
function empty_field_and_submit() {
if(waitFlag) return false;
input_chat_message.focus();
}
- // -->
+ //]]>
</script>
<?php
print_header('', '', '', 'inputForm.chat_message', $meta, false);
?>
- <form action="../empty.php" method="POST" target="empty" name="inputForm"
- OnSubmit="return empty_field_and_submit()">
+ <form action="../empty.php" method="post" target="empty" name="inputForm"
+ onsubmit="return empty_field_and_submit()">
>><input type="text" id="input_chat_message" name="chat_message" size="60" value="" />
<?php helpbutton('chatting', get_string('helpchatting', 'chat'), 'chat', true, false); ?>
</form>
- <form action="insert.php" method="POST" target="empty" name="sendForm">
+ <form action="insert.php" method="post" target="empty" name="sendForm">
<input type="hidden" name="chat_sid" value="<?php echo $chat_sid ?>" />
<input type="hidden" name="chat_message" />
</form>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
+<head>
+<title>Dummy</title>
+</head>
<body>
+</body>
+</html>
if ($chatuser->version == 'header_js') {
/// force msg referesh ASAP
if ($CFG->chat_normal_updatemode == 'jsupdated') { // See bug MDL-6791
- echo '<script type="text/javascript">parent.input.enableForm();</script>';
+ echo '<script language="Javascript" type="text/javascript">'.
+ "//<![CDATA[ \n".
+ ' parent.input.enableForm();'.
+ "//]]> \n".
+ '</script>';
} else {
- echo '<script type="text/javascript">parent.jsupdate.location.href = parent.jsupdate.document.anchors[0].href;parent.input.enableForm();</script>';
+ echo '<script language="Javascript" type="text/javascript">'.
+ "//<![CDATA[ \n".
+ ' parent.jsupdate.location.href = parent.jsupdate.document.anchors[0].href;'.
+ ' parent.input.enableForm();'.
+ "//]]> \n".
+ '</script>';
}
}
// no & in url, does not work in header!
$refreshurl = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdate.php?chat_sid=$chat_sid&chat_lasttime=$chat_newlasttime&chat_lastrow=$chat_newrow";
+ $refreshurlamp = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdate.php?chat_sid=$chat_sid&chat_lasttime=$chat_newlasttime&chat_lastrow=$chat_newrow";
header('Expires: Sun, 28 Dec 1997 09:32:45 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
+ <title> </title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript">
- <!--
+ //<![CDATA[
if (parent.msg.document.getElementById("msgStarted") == null) {
parent.msg.document.close();
parent.msg.document.open("text/html","replace");
parent.msg.document.write("<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />");
parent.msg.document.write("<base target=\"_blank\" />");
parent.msg.document.write("<?php echo $stylesheetshtml ?>");
- parent.msg.document.write("</head><body class=\"mod-chat-gui_header_js course-<?php echo $chatuser->course ?>\" id=\"mod-chat-gui_header_js-jsupdate\"><div style=\"display: none\" id=\"msgStarted\"> </div>");
+ parent.msg.document.write("<\/head><body class=\"mod-chat-gui_header_js course-<?php echo $chatuser->course ?>\" id=\"mod-chat-gui_header_js-jsupdate\"><div style=\"display: none\" id=\"msgStarted\"> <\/div>");
}
<?php
$beep = false;
}
?>
parent.msg.scroll(1,5000000);
- // -->
+ //]]>
</script>
</head>
<body>
echo '<embed src="../beep.wav" autostart="true" hidden="true" name="beep" />';
}
?>
- <a href="<?php echo $refreshurl ?>" name="refreshLink">Refresh link</a>
+ <a href="<?php echo $refreshurlamp ?>" name="refreshLink">Refresh link</a>
</body>
</html>
<?php
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript">
- <!--
+ //<![CDATA[
if (parent.msg.document.getElementById("msgStarted") == null) {
parent.msg.document.close();
parent.msg.document.open("text/html","replace");
parent.msg.document.write("<?php echo $stylesheetshtml ?>");
parent.msg.document.write("</head><body class=\"mod-chat-gui_header_js course-<?php echo $chatuser->course ?>\" id=\"mod-chat-gui_header_js-jsupdate\"><div style=\"display: none\" id=\"msgStarted\"> </div>");
}
- // -->
+ //]]>
</script>
</head>
<body>
$num = 0;
}
- print '<script type="text/javascript">' . "\n";
- print "<!-- \n\n";
+ print '<script language="Javascript" type="text/javascript">' . "\n";
+ print "//<![CDATA[\n\n";
$chat_newrow = ($chat_lastrow + $num) % 2;
}
print 'parent.msg.scroll(1,5000000);' . "\n\n";
- print "// -->\n";
+ print "//]]>\n";
print '</script>' . "\n\n";
if ($beep) {
print '<embed src="../beep.wav" autostart="true" hidden="true" name="beep" />';
// here & should be written & :-D
$refreshurl = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdated.php?chat_sid=$chat_sid&chat_lasttime=$chat_lasttime&chat_lastrow=$chat_newrow&chat_lastid=$chat_lastid";
- print '<script type="text/javascript">' . "\n";
- print "<!-- \n\n";
+ print '<script language="Javascript" type="text/javascript">' . "\n";
+ print "//<![CDATA[ \n\n";
print "location.href = '$refreshurl';\n";
- print "// -->\n";
+ print "//]]>\n";
print '</script>' . "\n\n";
?>
ob_start();
?>
- <script type="text/javascript">
- <!--
+ <script language="JavaScript" type="text/javascript">
+ //<![CDATA[
var timer = null
var f = 1; //seconds
var uidles = new Array(<?php echo count($chatusers) ?>);
}
timer = setTimeout("update()", f*1000);
}
- // -->
+ //]]>
</script>
<?php
echo fullname($chatuser).'<br />';
echo "<font color=\"#888888\">$stridle: ".format_time($lastping)."</font>";
echo '</font></p>';
- echo '<td></tr>';
+ echo '</td></tr>';
}
echo '</table>';
print_simple_box_end();