Location: PHPKode > projects > ACollab > chat/prefs2.php
<?php
/****************************************************************************************/
/* ACollab                                                                              */
/****************************************************************************************/
/* Copyright (c) 2002-2004  Adaptive Technology Resource Centre / University of Toronto */
/*                                                                                      */
/* http://atutor.ca/acollab                                                             */
/*                                                                                      */
/* This program is free software. You may redistribute it and/or                        */
/* modify it under the terms of the GNU General Public License                          */
/* as published by the Free Software Foundation; either version 2 of the License,       */
/* or (at your option) any later version.                                               */
/*                                                                                      */
/* This program is distributed in the hope that it will be useful, but                  */
/* WITHOUT ANY WARRANTY; without even the implied warranty of                           */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                                 */
/* See the GNU General Public License for more details.                                 */
/*                                                                                      */
/* You may access the GNU General Public License at:                                    */
/* http://www.opensource.org/licenses/gpl-license.php                                   */
/*                                                                                      */
/* You may contact the Adaptive Technology Resource Centre at                           */
/* Robarts Library, University of Toronto                                               */
/* 130 St. George Street, Toronto, Ontario, Canada M5S 1A5                              */
/* Further contact information is available at http://www.utoronto.ca/atrc/             */
/****************************************************************************************/
/* Programmer:                                                                          */
/* Joel Kronenberg - ATRC                                                               */
/****************************************************************************************/
// $Id: prefs2.php 230 2004-06-07 18:52:57Z boonhau $

define('AC_INCLUDE_PATH', '../include/');

	require(AC_INCLUDE_PATH.'vitals.inc.php');
	authenticate(USER_CLIENT, USER_GROUP_ADMIN, USER_ADMIN);
	require('include/functions.inc.php');
	$myPrefs = getPrefs($_SESSION['login']);

	if ($_POST['submit'] || $_POST['submit_r'] || $_POST['submit_p']) {
		getAndWriteFormPrefs($myPrefs);

		if ($_POST['submit_p']) {
			$location = './prefs.php?firstLoginFlag='.$_POST['firstLoginFlag'];
		} else if ($_POST['submit_r']) {
			$location = './chat.php?firstLoginFlag='.$_POST['firstLoginFlag'];
		}

		Header('Location: '.$location);
		exit;
	}
	writePrefs($myPrefs, $_SESSION['login']);

require(AC_INCLUDE_PATH.'pub/header.inc.php');
?>
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
	<td align="left"><h4><?php echo _AC('chat_layout_prefs'); ?></h4></td>
</tr>
</table>

<form action="chat/prefs2.php" name="f1" method="post" target="_top">
	<input type="hidden" name="firstLoginFlag" value="<?php echo $_REQUEST['firstLoginFlag']; ?>" />

<?php
    if ($myPrefs['newestFirstFlag'] > 0) {
       $nFFSelT = 'selected="selected"';
    }
?>

<p><b><?php echo _AC('chat_order_prefs'); ?></b>
	<select name="newestFirstFlag">
		<option value="0"><?php echo _AC('chat_oldnew_prefs'); ?></option>
		<option value="1" <?php echo $nFFSelT;?>><?php echo _AC('chat_newold_prefs'); ?></option>
	</select></p>
<p><?php echo _AC('chat_message_order_help') ;?></p>
<!-- p style="margin-left: 40;">The <?php echo $admin['chatName'];?> allows you to set the order of the message list to either "Old to New" or "New to Old".</p>

<p style="margin-left: 40;"><i>We suggest that people using screen readers set the order of messages to "New to Old" so that after each message check the focus will be on the most recent message.</i></p>

<p style="margin-left: 40;"><i>We suggest that people using screen magnifiers set the order of messages to "Old to New" so that sfter each message check the most recent message will be close to the Compose Message area, minimizing the necessary scrolling.</i></p -->

<?php
    if ($myPrefs['onlyNewFlag'] > 0) {
       $oNFSelT = 'selected="selected"';
    }
?>

<p><b><?php echo _AC('chat_newmsg_prefs'); ?></b>
	<select name="onlyNewFlag">
		<option value="0"><?php echo _AC('chat_newmsg_no'); ?></option>
        <option value="1" <?php echo $oNFSelT;?>><?php echo _AC('chat_newmsg_yes'); ?></option>
	</select></p>
<p><?php echo _AC('chat_message_new_help') ;?></p>
<!--p style="margin-left: 40;">To minimize the number of messages displayed, set the Show Only New Messages option to "Yes". This will cause the chat to display only messages that have arrived since your last check.</p>

<p style="margin-left: 40;"><b>Important:</b> This feature works best when Message Checking is set to manual. Using it in conjunction with "Automatic" message checking may cause messages to be removed before you have a chance to read them.</p>

<p style="margin-left: 40;"><i>We suggest this feature be used by users who prefer as few messages displayed as  possible.</i></p -->

<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
	<td align="left"><input type="submit" value="<?php echo _AC('chat_previous'); ?>" name="submit_p" class="submit" onfocus="this.className='submit highlight'" onblur="this.className='submit'" /> <input type="submit" value="<?php echo _AC('chat_enter'); ?>" name="submit_r" class="submit" onfocus="this.className='submit highlight'" onblur="this.className='submit'" /></td>
</tr>
</table>

</form>
<?php
	require(AC_INCLUDE_PATH.'pub/footer.inc.php');
?>
Return current item: ACollab