2001-08-26 06:32:28 +02:00
< ? php
/************************************************************************** \
2004-08-09 16:30:59 +02:00
* eGroupWare - Preferences *
* http :// www . egroupware . org *
2001-08-26 06:32:28 +02:00
* -------------------------------------------- *
* 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$ */
2005-07-09 21:07:16 +02:00
$templates = $GLOBALS [ 'egw' ] -> common -> list_templates ();
2001-08-26 06:32:28 +02:00
while ( list ( $var , $value ) = each ( $templates ))
{
$_templates [ $var ] = $templates [ $var ][ 'title' ];
}
2005-07-09 21:07:16 +02:00
$themes = $GLOBALS [ 'egw' ] -> common -> list_themes ();
2001-08-26 06:32:28 +02:00
while ( list (, $value ) = each ( $themes ))
{
$_themes [ $value ] = $value ;
}
2003-03-31 20:16:33 +02:00
create_input_box ( 'Max matches per page' , 'maxmatchs' ,
2004-08-09 17:23:43 +02:00
'Any listing in eGW will show you this number of entries or lines per page.<br>To many slow down the page display, to less will cost you the overview.' , '' , 3 );
2003-03-31 20:16:33 +02:00
create_select_box ( 'Interface/Template Selection' , 'template_set' , $_templates ,
2004-08-09 16:30:59 +02:00
'A template defines the layout of eGroupWare and it contains icons for each application.' );
2003-03-31 20:16:33 +02:00
create_select_box ( 'Theme (colors/fonts) Selection' , 'theme' , $_themes ,
'A theme defines the colors and fonts used by the template.' );
2001-08-26 06:32:28 +02:00
$navbar_format = array (
'icons' => lang ( 'Icons only' ),
'icons_and_text' => lang ( 'Icons and text' ),
'text' => lang ( 'Text only' )
);
2003-03-31 20:16:33 +02:00
create_select_box ( 'Show navigation bar as' , 'navbar_format' , $navbar_format ,
'You can show the applications as icons only, icons with app-name or both.' );
2001-08-26 06:32:28 +02:00
2005-07-09 21:07:16 +02:00
$format = $GLOBALS [ 'egw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'dateformat' ];
2003-03-31 20:16:33 +02:00
$format = ( $format ? $format : 'Y/m/d' ) . ', ' ;
2005-07-09 21:07:16 +02:00
if ( $GLOBALS [ 'egw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'timeformat' ] == '12' )
2003-03-31 20:16:33 +02:00
{
$format .= 'h:i a' ;
}
else
{
$format .= 'H:i' ;
}
2001-08-26 06:32:28 +02:00
for ( $i = - 23 ; $i < 24 ; $i ++ )
{
2003-03-31 20:16:33 +02:00
$t = time () + $i * 60 * 60 ;
$tz_offset [ $i ] = $i . ' ' . lang ( 'hours' ) . ': ' . date ( $format , $t );
2001-08-26 06:32:28 +02:00
}
2003-03-31 20:16:33 +02:00
create_select_box ( 'Time zone offset' , 'tz_offset' , $tz_offset ,
2003-05-01 11:19:50 +02:00
'How many hours are you in front or after the timezone of the server.<br>If you are in the same time zone as the server select 0 hours, else select your locale date and time.' );
2001-08-26 06:32:28 +02:00
$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' ,
2003-08-28 16:31:11 +02:00
'd.m.Y' => 'd.m.Y' ,
'd-M-Y' => 'd-M-Y'
2001-08-26 06:32:28 +02:00
);
2003-03-31 20:16:33 +02:00
create_select_box ( 'Date format' , 'dateformat' , $date_formats ,
2004-08-09 16:30:59 +02:00
'How should eGroupWare display dates for you.' );
2001-08-26 06:32:28 +02:00
$time_formats = array (
2003-03-18 12:28:50 +01:00
'12' => lang ( '12 hour' ),
'24' => lang ( '24 hour' )
2001-08-26 06:32:28 +02:00
);
2003-03-31 20:16:33 +02:00
create_select_box ( 'Time format' , 'timeformat' , $time_formats ,
'Do you prefer a 24 hour time format, or a 12 hour one with am/pm attached.' );
2001-08-26 06:32:28 +02:00
$sbox = createobject ( 'phpgwapi.sbox' );
2003-03-31 20:16:33 +02:00
create_select_box ( 'Country' , 'country' , $sbox -> country_array ,
'In which country are you. This is used to set certain defaults for you.' );
2005-07-09 21:07:16 +02:00
$langs = $GLOBALS [ 'egw' ] -> translation -> get_installed_langs ();
2003-03-31 20:16:33 +02:00
create_select_box ( 'Language' , 'lang' , $langs ,
2004-08-09 16:30:59 +02:00
'Select the language of texts and messages within eGroupWare.<br>Some languages may not contain all messages, in that case you will see an english message.' );
2004-03-21 23:41:00 +01:00
2001-08-26 06:32:28 +02:00
// preference.php handles this function
if ( is_admin ())
{
2003-05-02 03:49:52 +02:00
create_check_box ( 'Show number of current users' , 'show_currentusers' ,
2003-03-31 20:16:33 +02:00
'Should the number of active sessions be displayed for you all the time.' );
2001-08-26 06:32:28 +02:00
}
2005-07-09 21:07:16 +02:00
reset ( $GLOBALS [ 'egw_info' ][ 'user' ][ 'apps' ]);
while ( list ( $app ) = each ( $GLOBALS [ 'egw_info' ][ 'user' ][ 'apps' ]))
2001-08-26 06:32:28 +02:00
{
2005-07-09 21:07:16 +02:00
if ( $GLOBALS [ 'egw_info' ][ 'apps' ][ $app ][ 'status' ] != 2 && $app )
2001-08-26 06:32:28 +02:00
{
2005-07-09 21:07:16 +02:00
$user_apps [ $app ] = $GLOBALS [ 'egw_info' ][ 'apps' ][ $app ][ 'title' ] ? $GLOBALS [ 'egw_info' ][ 'apps' ][ $app ][ 'title' ] : lang ( $app );
2001-08-26 06:32:28 +02:00
}
}
2003-03-31 20:16:33 +02:00
create_select_box ( 'Default application' , 'default_app' , $user_apps ,
2004-08-09 16:30:59 +02:00
" The default application will be started when you enter eGroupWare or click on the homepage icon.<br>You can also have more than one application showing up on the homepage, if you don't choose a specific application here (has to be configured in the preferences of each application). " );
2001-08-26 06:32:28 +02:00
2003-03-31 20:16:33 +02:00
create_input_box ( 'Currency' , 'currency' ,
2004-08-09 15:54:48 +02:00
'Which currency symbol or name should be used in eGroupWare.' );
2005-07-09 21:07:16 +02:00
2003-05-02 03:49:52 +02:00
$account_sels = array (
'selectbox' => lang ( 'Selectbox' ),
2004-07-11 08:58:49 +02:00
'primary_group' => lang ( 'Selectbox with primary group and search' ),
2003-05-02 03:49:52 +02:00
'popup' => lang ( 'Popup with search' )
);
create_select_box ( 'How do you like to select accounts' , 'account_selection' , $account_sels ,
'The selectbox shows all available users (can be very slow on big installs with many users). The popup can search users by name or group.' );
2003-05-04 00:23:50 +02:00
$account_display = array (
'firstname' => lang ( 'Firstname' ) . ' ' . lang ( 'Lastname' ),
'lastname' => lang ( 'Lastname' ) . ', ' . lang ( 'Firstname' ),
'username' => lang ( 'username' ),
2003-05-04 17:14:06 +02:00
'firstall' => lang ( 'Firstname' ) . ' ' . lang ( 'Lastname' ) . ' [' . lang ( 'username' ) . ']' ,
2004-08-26 20:48:12 +02:00
'lastall' => lang ( 'Lastname' ) . ', ' . lang ( 'Firstname' ) . ' [' . lang ( 'username' ) . ']' ,
2003-05-04 17:14:06 +02:00
'all' => '[' . lang ( 'username' ) . '] ' . lang ( 'Lastname' ) . ', ' . lang ( 'Firstname' )
2003-05-04 00:23:50 +02:00
);
create_select_box ( 'How do you like to display accounts' , 'account_display' , $account_display ,
'Set this to your convenience. For security reasons, you might not want to show your Loginname in public.' );
2003-03-31 20:16:33 +02:00
create_check_box ( 'Show helpmessages by default' , 'show_help' ,
2003-05-02 03:49:52 +02:00
'Should this help messages shown up always, when you enter the preferences or only on request.' );