Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/chat/gui_sockets/chatinput.php
Go to the documentation of this file.
00001 <?php
00002 
00003 define('NO_MOODLE_COOKIES', true); // session not used here
00004 
00005 require('../../../config.php');
00006 require('../lib.php');
00007 
00008 $chat_sid = required_param('chat_sid', PARAM_ALPHANUM);
00009 
00010 $PAGE->set_url('/mod/chat/gui_sockets/chatinput.php', array('chat_sid'=>$chat_sid));
00011 
00012 if (!$chatuser = $DB->get_record('chat_users', array('sid'=>$chat_sid))) {
00013     print_error('notlogged', 'chat');
00014 }
00015 
00016 //Get the user theme
00017 $USER = $DB->get_record('user', array('id'=>$chatuser->userid));
00018 
00019 //Setup course, lang and theme
00020 $PAGE->set_course($DB->get_record('course', array('id' => $chatuser->course)));
00021 $PAGE->requires->js('/mod/chat/gui_sockets/chat_gui_sockets.js', true);
00022 $PAGE->requires->js_function_call('setfocus');
00023 $PAGE->set_focuscontrol('chat_message');
00024 $PAGE->set_cacheable(false);
00025 echo $OUTPUT->header();
00026 
00027 ?>
00028 
00029     <form action="../empty.php" method="get" target="empty" id="inputform"
00030           onsubmit="return empty_field_and_submit();">
00031         <input type="text" name="chat_message" id="chat_message" size="60" value="" />
00032         <?php echo $OUTPUT->help_icon('usingchat', 'chat'); ?>
00033     </form>
00034 
00035     <form action="<?php echo "http://$CFG->chat_serverhost:$CFG->chat_serverport/"; ?>" method="get" target="empty" id="sendform">
00036         <input type="hidden" name="win" value="message" />
00037         <input type="hidden" name="chat_message" value="" />
00038         <input type="hidden" name="chat_msgidnr" value="0" />
00039         <input type="hidden" name="chat_sid" value="<?php echo $chat_sid ?>" />
00040     </form>
00041 <?php
00042     echo $OUTPUT->footer();
00043 ?>
 All Data Structures Namespaces Files Functions Variables Enumerations