_finally_ merged my dual pass and default preference changes

This commit is contained in:
jengo 2001-08-26 04:32:28 +00:00
parent 4dc6237cff
commit 955fa303be
3 changed files with 165 additions and 9 deletions

View File

@ -10,18 +10,14 @@
* option) any later version. *
\**************************************************************************/
/* $Id$ */
{
/* $Id$ */
//Do not modify below this line
// Actual content
$title = $appname;
if ($phpgw->acl->check('changepassword',1))
{
$file['Change your Password'] = $phpgw->link('/preferences/changepassword.php');
}
$file['change your settings'] = $phpgw->link('/preferences/settings.php');
$file['change your settings'] = $phpgw->link('/preferences/preferences.php','appname=preferences');
display_section($appname,$title,$file);
}
?>
display_section('Preferences','Preferences',$file);
?>

View File

@ -0,0 +1,108 @@
<?php
/**************************************************************************\
* phpGroupWare - Preferences *
* http://www.phpgroupware.org *
* -------------------------------------------- *
* 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. *
\**************************************************************************/
/* $Id$ */
$templates = $phpgw->common->list_templates();
while (list($var,$value) = each($templates))
{
$_templates[$var] = $templates[$var]['title'];
}
$themes = $phpgw->common->list_themes();
while (list(,$value) = each($themes))
{
$_themes[$value] = $value;
}
create_input_box('Max matches per page','maxmatchs');
create_select_box('Interface/Template Selection','template_set',$_templates);
create_select_box('Theme (colors/fonts) Selection','theme',$_themes);
$navbar_format = array(
'icons' => lang('Icons only'),
'icons_and_text' => lang('Icons and text'),
'text' => lang('Text only')
);
create_select_box('Show navigation bar as','navbar_format',$navbar_format);
for ($i = -23; $i<24; $i++)
{
$timezone_offset[$i] = $i;
}
create_select_box('Time zone offset','timezone_offset',$timezone_offset);
$date_formats = array(
'm/d/Y' => 'm/d/Y',
'm-d-Y' => 'm-d-Y',
'm.d.Y' => 'm.d.Y',
'Y/d/m' => 'Y/d/m',
'Y-d-m' => 'Y-d-m',
'Y.d.m' => 'Y.d.m',
'Y/m/d' => 'Y/m/d',
'Y-m-d' => 'Y-m-d',
'Y.m.d' => 'Y.m.d',
'd/m/Y' => 'd/m/Y',
'd-m-Y' => 'd-m-Y',
'd.m.Y' => 'd.m.Y'
);
create_select_box('Date format','dateformat',$date_formats);
$time_formats = array(
'12' => '12 hour',
'24' => '24 hour'
);
create_select_box('Time format','timeformat',$time_formats);
$sbox = createobject('phpgwapi.sbox');
create_select_box('Country','country',$sbox->country_array);
$db2 = $phpgw->db;
$phpgw->db->query("select distinct lang from lang",__LINE__,__FILE__);
while ($phpgw->db->next_record())
{
// $phpgw_info['installed_langs'][$phpgw->db->f('lang')] = $phpgw->db->f('lang');
$db2->query("select lang_name from languages where lang_id = '"
. $phpgw->db->f('lang') . "'",__LINE__,__FILE__);
$db2->next_record();
// When its not in the phpgw_langauges table, it will show ??? in the field
// otherwise
if ($db2->f('lang_name'))
{
$langs[$phpgw->db->f('lang')] = $db2->f('lang_name');
}
}
create_select_box('Language','lang',$langs);
// preference.php handles this function
if (is_admin())
{
// The 'True' is *NOT* being used as a constant, don't change it
$yes_and_no = array(
'True' => 'Yes',
'' => 'No'
);
create_select_box('Show current users on navigation bar','show_currentusers',$yes_and_no);
}
reset($phpgw_info['user']['apps']);
while (list($permission) = each($phpgw_info['user']['apps']))
{
if ($phpgw_info['apps'][$permission]['status'] != 2)
{
$user_apps[$permission] = $permission;
}
}
create_select_box('Default application','default_app',$user_apps);
create_input_box('Currency','currency');

View File

@ -0,0 +1,52 @@
<!-- BEGIN header -->
<b>{lang_title}</b>
<hr><p>
<form method="POST" action="{action_url}">
<table border="0">
<!-- END header -->
<!-- BEGIN footer -->
</table>
<table border="0" width="70%" cellspacing="5" cellpadding="5">
<tr>
<td align="left"><input type="submit" name="submit" value="{lang_submit}"></td>
<td align="right"><input type="submit" name="cancel" value="{lang_cancel}"></td>
</tr>
</table>
<!-- END footer -->
<!-- BEGIN list_a -->
<tr bgcolor="{th_bg}">
<td>&nbsp;</td>
<td>{lang_user}</td>
<td>{lang_global}</td>
<td>{lang_default}</td>
</tr>
{rows}
<!-- END list_a -->
<!-- BEGIN row_a -->
<tr bgcolor="{tr_color}">
<td>{row_name}</td>
<td>{row_user}</td>
<td>{row_global}</td>
<td>{row_default}</td>
</tr>
<!-- END row_a -->
<!-- BEGIN list_u -->
<tr bgcolor="{th_bg}">
<td>&nbsp;</td>
<td>{lang_user}</td>
</tr>
{rows}
<!-- END list_u -->
<!-- BEGIN row_u -->
<tr bgcolor="{tr_color}">
<td>{row_name}</td>
<td>{row_user}</td>
</tr>
<!-- END row_u -->