<?php
/**************************************************************************
This program is free software; you can 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.
@Author: Ryan Thompson(hide@address.com)
***************************************************************************/
/*$Id: preferences.php,v 1.3 2003/12/10 04:53:28 rthomp Exp $*/
if(isset($_POST['save_preferences']))
{
unset($_POST['save_preferences']);
if(!isset($_POST['display_overdue']))
{
$_POST['display_overdue'] = 'FALSE';
}
if(!isset($_POST['display_complete']))
{
$_POST['display_complete'] = 'FALSE';
}
$user->update_preferences($_POST, 'tl', $user->user_id);
}
$prefs = $user->get_all_prefs('tl', $user->user_id);
?>
<form action="<?php echo $_SERVER['PHP_SELF']?>?s=tl" method="post">
<table align="center">
<tr>
<td class="list_dark" style="width:50px;text-align:center">
<input type="checkbox" name="display_overdue" value='TRUE'<?php
if($prefs['display_overdue'] == 'TRUE')
{
echo " checked=\"checked\"";
}?>>
</td>
<td class="list_dark" style="width:250px"><?php echo $lang->get_msg('display_overdue','tl')?></td>
</tr>
<tr>
<td class="list_light" style="width:50px;text-align:center">
<input type="checkbox" name="display_complete" value='TRUE'<?php
if($prefs['display_complete'] == 'TRUE')
{
echo " checked=\"checked\"";
}?>>
</td>
<td class="list_light"><?php echo $lang->get_msg('display_complete','tl')?></td>
</tr>
<tr>
<td class="list_dark" colspan="2"><?php echo str_replace('%COUNT%',
"<input type=\"text\" size=\"2\" name=\"display_days\" value=\"{$prefs['display_days']}\">",
$lang->get_msg('display_days', 'tl'));?>
</td>
</tr>
<tr>
<td class="list_light" style="text-align:center">
<input type="text" name="max_home_display" value="<?php echo $prefs['max_home_display']?>" size="4">
</td>
<td class="list_light"><?php echo $lang->get_msg('max_home_display', 'tl')?></td>
</tr>
<tr>
<td class="list_light" colspan="2">
<input type="submit" name="save_preferences" value="<?php echo $text['save']?>" class="button1">
</td>
</tr>
</table>
</form>