2 /****************************************************************/
4 /****************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
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 /****************************************************************/
14 define('AT_INCLUDE_PATH', '../../../include/');
15 require(AT_INCLUDE_PATH.'vitals.inc.php');
16 //authenticate(USER_CLIENT, USER_ADMIN);
17 require(AT_INCLUDE_PATH.'../mods/_standard/chat/lib/chat.inc.php');
18 //not getting session username
19 $myPrefs = getPrefs($_SESSION['login']);
21 if ($_POST['submit'] || $_POST['submit_r'] || $_POST['submit_p']) {
22 getAndWriteFormPrefs($myPrefs);
24 if ($_POST['submit_p']) {
25 $location = './prefs.php?firstLoginFlag='.$addslashes($_POST['firstLoginFlag']);
26 } else if ($_POST['submit_r']) {
27 $location = './chat.php?firstLoginFlag='.$addslashes($_POST['firstLoginFlag']);
30 Header('Location: '.$location);
33 writePrefs($myPrefs, $_SESSION['username']);
35 require('include/html/chat_header.inc.php');
37 <table width="100%" border="0" cellpadding="5" cellspacing="0">
39 <th align="left"><h4><?php echo _AT('chat_layout_prefs'); ?></h4></th>
43 <form action="prefs2.php" name="f1" method="post" target="_top">
44 <input type="hidden" name="firstLoginFlag" value="<?php echo $_REQUEST['firstLoginFlag']; ?>" />
47 if ($myPrefs['newestFirstFlag'] > 0) {
48 $nFFSelT = 'selected';
52 <p><b><?php echo _AT('chat_order_prefs'); ?></b>
53 <select name="newestFirstFlag">
54 <option value="0"><?php echo _AT('chat_oldnew_prefs'); ?></option>
55 <option value="1" <?php echo $nFFSelT;?>><?php echo _AT('chat_newold_prefs'); ?></option>
57 <p><?php echo _AT('chat_message_order_help') ;?></p>
60 if ($myPrefs['onlyNewFlag'] > 0) {
61 $oNFSelT = 'selected';
65 <p><b><?php echo _AT('chat_newmsg_prefs'); ?></b>
66 <select name="onlyNewFlag">
67 <option value="0"><?php echo _AT('no'); ?></option>
68 <option value="1" <?php echo $oNFSelT;?>><?php echo _AT('yes'); ?></option>
70 <p><?php echo _AT('chat_message_new_help') ;?></p>
72 <table width="100%" border="0" cellpadding="5" cellspacing="0">
74 <td align="left"><input type="submit" value="<?php echo _AT('previous'); ?>" name="submit_p" class="submit" onFocus="this.className='submit highlight'" onBlur="this.className='submit'" /> <input type="submit" value="<?php echo _AT('chat_enter'); ?>" name="submit_r" class="submit" onFocus="this.className='submit highlight'" onBlur="this.className='submit'" /></td>
79 <?php require('include/html/chat_footer.inc.php'); ?>