move code up one directory
[atutor.git] / mods / _standard / chat / poster.php
1 <?php
2 /****************************************************************/
3 /* ATutor                                                                                                               */
4 /****************************************************************/
5 /* Copyright (c) 2002-2010                                      */
6 /* Inclusive Design Institute                                   */
7 /* http://atutor.ca                                                                                             */
8 /*                                                              */
9 /* This program is free software. You can redistribute it and/or*/
10 /* modify it under the terms of the GNU General Public License  */
11 /* as published by the Free Software Foundation.                                */
12 /****************************************************************/
13
14 define('AT_INCLUDE_PATH', '../../../include/');
15 require(AT_INCLUDE_PATH.'vitals.inc.php');
16 session_write_close();
17 //authenticate(USER_CLIENT, USER_ADMIN);
18 require(AT_INCLUDE_PATH.'../mods/_standard/chat/lib/chat.inc.php');
19
20 $myPrefs = getPrefs($_GET['chatID']);
21
22 require('include/html/chat_header.inc.php');
23
24 $now = time();
25 ?>
26 <table width="100%" border="0" cellpadding="5" cellspacing="0" class="input-form">
27 <tr>
28         <th align="left"><?php echo _AT('chat_compose_message'); ?></th>
29 </tr>
30 <tr>
31         <td>
32         <form action="display.php?set=<?php echo $now; ?>" target="display" name="f1" method="post" onsubmit="return checkForm();" />
33                 <input type="hidden" name="message" value="<?php echo $now; ?>" /><label accesskey="c" for="tempField"><input type="text" maxlength="200" size="40" name="tempField" id="tempField" value="" class="input" onfocus="this.className='input highlight'" onblur="this.className='input'" /></label><input type="submit" value="<?php echo _AT('send'); ?>" class="button" onfocus="this.className='submit highlight'" onblur="this.className='submit'" />  
34         </form>
35         </td>
36 </tr>
37 </table>
38 <script language="javascript" type="text/javascript"><!--
39         function checkForm() {
40                 document.f1.message.value = document.f1.tempField.value;
41         if (document.f1.message.value == "" || !document.f1.message.value) return false;
42                 document.f1.tempField.value = "";
43         return true;
44         }
45 //--></script>
46 <?php require('include/html/chat_footer.inc.php'); ?>