mirrored from git://git.moodle.org/moodle.git
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
radical chat clean up, see forum for details
- Loading branch information
skodak
committed
Feb 3, 2005
1 parent
60ecca3
commit 516121b
Showing
32 changed files
with
668 additions
and
1,556 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,50 @@ | ||
<?php | ||
<?php // $Id$ | ||
|
||
require("../../../config.php"); | ||
require("../lib.php"); | ||
$nomoodlecookie = true; // Session not needed! | ||
|
||
require_variable($chat_sid); | ||
optional_variable($groupid); | ||
optional_variable($chat_pretext, ''); | ||
require('../../../config.php'); | ||
require('../lib.php'); | ||
|
||
if (!$chatuser = get_record("chat_users", "sid", $chat_sid)) { | ||
echo "Not logged in!"; | ||
die; | ||
} | ||
$chat_sid = required_param('chat_sid', PARAM_ALPHANUM); | ||
|
||
if (!$chat = get_record("chat", "id", $chatuser->chatid)) { | ||
error("No chat found"); | ||
} | ||
|
||
require_login($chat->course); | ||
if (!$chatuser = get_record('chat_users', 'sid', $chat_sid)) { | ||
error('Not logged in!'); | ||
} | ||
|
||
?> | ||
|
||
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\"> | ||
<html> | ||
<head> | ||
<title>Message Input</title> | ||
|
||
<?php include("$CFG->javascript"); ?> | ||
|
||
<script language="Javascript"> | ||
<!-- | ||
scroll_active = true; | ||
function empty_field_and_submit() { | ||
document.fdummy.chat_message.value=document.f.chat_message.value; | ||
document.fdummy.submit(); | ||
document.f.chat_message.value=''; | ||
document.f.chat_message.focus(); | ||
return false; | ||
} | ||
// --> | ||
</script> | ||
</head> | ||
chat_force_language($chatuser->lang); | ||
|
||
<body bgcolor="<?php echo $THEME->body ?>" | ||
OnLoad="document.f.chat_message.focus();document.f.chat_message.select();"> | ||
|
||
ob_start(); | ||
?> | ||
<script type="text/javascript"> | ||
<!-- | ||
scroll_active = true; | ||
function empty_field_and_submit() { | ||
document.fdummy.chat_message.value=document.f.chat_message.value; | ||
document.fdummy.submit(); | ||
document.f.chat_message.value=''; | ||
document.f.chat_message.focus(); | ||
return false; | ||
} | ||
// --> | ||
</script> | ||
<?php | ||
|
||
<form action="../insert.php" method="GET" target="empty" name="f" | ||
OnSubmit="return empty_field_and_submit()"> | ||
>><input type="text" name="chat_message" size="60" value="<?php echo $chat_pretext; ?>" /> | ||
<?php helpbutton("chatting", get_string("helpchatting", "chat"), "chat", true, false); ?> | ||
</form> | ||
|
||
<form action="../insert.php" method="GET" target="empty" name="fdummy" | ||
OnSubmit="return empty_field_and_submit()"> | ||
<input type="hidden" name="chat_sid" value="<?php echo $chat_sid ?>" /> | ||
<input type="hidden" name="groupid" value="<?php echo $groupid ?>" /> | ||
<input type="hidden" name="chat_version" value="header_js" /> | ||
<input type="hidden" name="chat_message" /> | ||
</form> | ||
$meta = ob_get_clean(); | ||
print_header('', '', '', 'f.chat_message', $meta, false); | ||
|
||
?> | ||
<form action="insert.php" method="GET" target="empty" name="f" | ||
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="insert.php" method="GET" target="empty" name="fdummy" | ||
OnSubmit="return empty_field_and_submit()"> | ||
<input type="hidden" name="chat_sid" value="<?php echo $chat_sid ?>" /> | ||
<input type="hidden" name="chat_message" /> | ||
</form> | ||
</body> | ||
|
||
</html> | ||
</html> |
Oops, something went wrong.