<?php

// setup_configuration.php - PHProjekt Version 5.2
// copyright © 2000-2005 Albrecht Guenther  ag@phprojekt.com
// www.phprojekt.com
// Author: Albrecht Guenther, $Author: polidor $
// $Id: setup_configuration.php,v 1.41.2.3 2007/04/25 01:10:48 polidor Exp $

// check whether setup.php calls this script - authentication!
if (!defined('setup_included')) die('Please use setup.php!');

/*
Array definition:
step: where will be displayed the field
noconfigure: if true, this value will not be displayed on configuration or upgrade
mode: Advanced or basic
label: label of field on page
type: kind of input
range: function to get the array range (only for select type fields)
callback: function to get the default value
default: default value
notes: text after input field
validate: function to be performed after save a value.

gr_config: Inside config.inc.php the values are stored in groups. This value determnines the group for each var.
comment: The comment on config.inc.php

*/

$config_array = array(
                      'version'          => array('step'        => 'initial',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => '5.2.2',
                                                  'gr_config'   => 'version',
                                                  'comment'     => 'installed version'),

                      'languaje_block'   => array('step'        => 'initial',
                                                  'noconfigure' => false,
                                                  'mode'        => 'basic',
                                                  'label'       => __('Language'),
                                                  'type'        => 'separator'),

                      'langua'           => array('step'        => 'initial',
                                                  'noconfigure' => false,
                                                  'mode'        => 'basic',
                                                  'label'       => __('Language'),
                                                  'type'        => 'select',
                                                  'range'       => 'get_language_options',
                                                  'callback'    => 'check_languaje'),

                      'db_block'         => array('step'        => 'initial',
                                                  'noconfigure' => true,
                                                  'mode'        => 'basic',
                                                  'label'       => __('Database Setup'),
                                                  'type'        => 'separator'),

                      'db_type'          => array('step'        => 'initial',
                                                  'noconfigure' => true,
                                                  'mode'        => 'basic',
                                                  'label'       => __('db_type'),
                                                  'type'        => 'select',
                                                  'range'       => 'get_db_type_options',
                                                  'callback'    => 'check_db_type',
                                                  'gr_config'   => 'database',
                                                  'comment'     => __('Type of database system')),

                      'db_host'          => array('step'        => 'initial',
                                                  'noconfigure' => true,
                                                  'mode'        => 'basic',
                                                  'label'       => __('Hostname'),
                                                  'type'        => 'text',
                                                  'callback'    => 'check_db_host',
                                                  'gr_config'   => 'database',
                                                  'comment'     => __('Location of the database')),

                      'db_user'          => array('step'        => 'initial',
                                                  'noconfigure' => true,
                                                  'mode'        => 'basic',
                                                  'label'       => __('Username'),
                                                  'type'        => 'text',
                                                  'callback'    => 'check_db_user',
                                                  'gr_config'   => 'database',
                                                  'comment'     => __('Username for the access')),

                      'db_pass'          => array('step'        => 'initial',
                                                  'noconfigure' => true,
                                                  'mode'        => 'basic',
                                                  'label'       => __('Password'),
                                                  'type'        => 'password',
                                                  'callback'    => 'check_db_pass',
                                                  'gr_config'   => 'database',
                                                  'comment'     => __('Password for the access')),

                      'db_name'          => array('step'        => 'initial',
                                                  'noconfigure' => true,
                                                  'mode'        => 'basic',
                                                  'label'       => __('Name of the existing database'),
                                                  'type'        => 'text',
                                                  'callback'    => 'check_db_name',
                                                  'validate'    => 'test_db_connection',
                                                  'gr_config'   => 'database',
                                                  'comment'     => __('Name of the database')),

                      'db_check'         => array('step'        => 'initial',
                                                  'noconfigure' => true,
                                                  'mode'        => 'basic',
                                                  'label'       => __('Check Database Connection'),
                                                  'type'        => 'button',
                                                  'on_click'    => "check_db('db_check');",
                                                  'default'     => __('Check'),
                                                  'alert'       => 'test_db_connection'),


                      'db_prefix'        => array('step'        => 'initial',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => true,
                                                  'label'       => __('Prefix for table names in db'),
                                                  'type'        => 'text',
                                                  'callback'    => 'check_db_prefix',
                                                  'gr_config'   => 'database',
                                                  'comment'     => __('Prefix of tables')),

                      'rootpass'         => array('step'        => 'initial',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => true,
                                                  'label'       => __('Please define a password for the administrator "root"'),
                                                  'type'        => 'password',
                                                  'default'     => ''),

                      'rootpass2'        => array('step'        => 'initial',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => true,
                                                  'label'       => __('Confirm password for administrator'),
                                                  'type'        => 'password',
                                                  'default'     => ''),
                      
                      'testcreation'     => array('step'        => 'initial',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => true,
                                                  'label'       => __('Create default user "test"'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Activate'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 1,
                                                  'extra_code'  => 'onChange="testCreationChange();"'),
                                                  
                                                  
                      'testpass'         => array('step'        => 'initial',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => true,
                                                  'label'       => __('Please define a password for the default user "test"'),
                                                  'type'        => 'password',
                                                  'default'     => ''),

                      'testpass2'        => array('step'        => 'initial',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => true,
                                                  'label'       => __('Confirm password for test user'),
                                                  'type'        => 'password',
                                                  'default'     => ''),

                      'session_name'     => array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 'PHPR'.strtoupper(substr(md5(time()), 0, 5)),
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('name of the PHProjekt session')),

                      'modules_block'    => array('step'        => 'configuration',
                                                  'noconfigure' => false,
                                                  'mode'        => 'basic',
                                                  'label'       => __('Modules'),
                                                  'type'        => 'separator'),

                      'acc_default'       =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 1,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('Default access mode: private=0, group=1')),

                      'acc_write_default' =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 1,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('Default write access mode: private=0, group=1')),
                                                  
                      'alter_acc'         =>array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Access rights'),
                                                  'type'        => 'select',
                                                  'values'      => array(0 =>__('Only author can change it'),
                                                                         1 =>__('All users with write access can change')),
                                                  'default'     => 0,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('Access rights: 0 = only author can change it, 1 = all users with write access can change')),
                                                  
                      'session_time_limit'=>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 0,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('Time limit for sessions')),

                      'maxhits'           =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 50,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('number of hits found in search form')),

                      'error_reporting_level'=>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 0,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('displays error messages')),

                      'support_pdf'       =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 1,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('activates pdf library')),

                     'support_html'      =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 1,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('activates html editor for textareas')),

                     'support_chart'     =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'callback'    => 'check_support_chart',
                                                  'default'     => 1,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('activates chart generation')),

                     'doc_path'          =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 'docs',
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('path for files related to forms')),

                     'att_path'          =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 'attach',
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('path for mail attachments')),

                     'file_path'         =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => get_upload_pre_path().'upload',
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('path for uploads in filemanager')),

                      'filter_maxhits'    =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 50,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('number of hits in selector')),

                      'roles'             =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 1,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('activates role based access system')),

                      'default_visi'      =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 0,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('default visibility of calendar events. 0: normal, 1: private, , 3: public')),

                      'access_groups'     =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 0,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('0: current group only, 1: all groups the user is member of, 2: no restrictions = all groups')),

                     'compatibility_mode' =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 0,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('activates compatibility to V 4.x')),

                      'calendar'         => array('step'        => 'configuration',
                                                  'noconfigure' => false,
                                                  'mode'        => 'basic',
                                                  'label'       => __('Calendar'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Activate'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'calendar',
                                                  'comment'     => __('Calendar')),

                      'calendar_dateconflicts_maxdays' =>array('step' => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 10,
                                                  'gr_config'   => 'calendar',
                                                  'comment'     => __('Max number of days to search timeslots')),

                      'calendar_dateconflicts_maxhits' =>array('step' => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 10,
                                                  'gr_config'   => 'calendar',
                                                  'comment'     => __('Max number of hits to search timeslots')),

                      'calendar_access_mode' =>array('step' => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 'standard',
                                                  'gr_config'   => 'calendar',
                                                  'comment'     => 'Access modes for calendar events: standard, special-1'),

                      'timecard'         => array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'label'       => __('Time Card'),
                                                  'type'        => 'select',
                                                  'values'      => array(0 =>__('Timecard disabled'),
                                                                         1 =>__('Timecard enabled'),
                                                                         2 =>__('Mail to the chief')),
                                                  'default'     => 2,
                                                  'gr_config'   => 'timecard',
                                                  'comment'     => __('Timecard').", ".__('Mail to the chief').": = 2"),

                      'timecard_delete'   =>array('step' => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 60,
                                                  'gr_config'   => 'timecard',
                                                  'comment'     => __(' allows users to change their timecard entries')),

                      'timecard_add'      =>array('step' => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  //'default'     => 60,
                                                  'callback'    => 'check_timecard_add',
                                                  'gr_config'   => 'timecard',
                                                  'comment'     => __('past days where it is possible to change entries')),

                      'projects'         => array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'label'       => __('Create project'),
                                                  'type'        => 'select',
                                                  'values'      => array(1 =>__('Create Project'),
                                                                         2 =>__('Assign worktime only with Timecard entry'),
                                                                         3 =>__('Assign worktime without timecard entry')),
                                                  'default'     => 2,
                                                  'gr_config'   => 'projects',
                                                  'comment'     => __('Project management yes = 1, no = 0').", ".__('additionally assign resources to events').": = 2"),

                      'contacts'         => array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'label'       => __('Contact Manager'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Activate'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'contacts',
                                                  'comment'     => __('Address book  = 1, nein = 0')),

                      'contacts_profiles' =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'label'       => __('Profiles for contacts'),
                                                  'type'        => 'select',
                                                  'values'      => array(1 =>__('Activate'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'contacts',
                                                  'comment'     => __('Profiles for contacts')),

                      'calltype'          =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'label'       => '',
                                                  'type'        => 'hidden',
                                                  'default'     => 'calltype',
                                                  'gr_config'   => 'contacts',
                                                  'comment'     => __('defines type of cti telephone')),

                      'todo'             => array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'label'       => __('Todo lists'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Activate'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'todo',
                                                  'comment'     => __('Todo-Lists yes = 1, no = 0')),

                      'todo_option_accepted' =>array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'label'       => '',
                                                  'type'        => 'hidden',
                                                  'default'     => 0,
                                                  'gr_config'   => 'todo',
                                                  'comment'     => __('Select-Option accepted available = 1, not available = 0')),

                      'forum'            => array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'label'       => __('Forum'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Activate'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'forum',
                                                  'comment'     => __('Forum yes = 1, no = 0')),

                      'forum_tree_open'   =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 0,
                                                  'gr_config'   => 'forum',
                                                  'comment'     => __('default mode for forum tree: 1 - open, 0 - closed')),

                      'forum_notify'      =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 0,
                                                  'gr_config'   => 'forum',
                                                  'comment'     => __('Enables mail notification on new elements')),

                      'notes'            => array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'label'       => __('Notes'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Activate'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'notes',
                                                  'comment'     => __('Notes')),

                      'filemanager'      => array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'label'       => __('File management'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Activate'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'file manager',
                                                  'comment'     => __('File management no = 0').",  ".__('yes = 1')),

                     'filemanager_notify'=> array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 1,
                                                  'gr_config'   => 'file manager',
                                                  'comment'     => __('Enables mail notification on new elements')),
                                                  
                     'download_inline_option'=> array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 0,
                                                  'gr_config'   => 'file manager',
                                                  'comment'     => __('Allow inline download of files')),
                                                  
                     'file_versioning'   => array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 1,
                                                  'gr_config'   => 'file manager',
                                                  'comment'     => __('Enables file versioning')),

                     'votum'             => array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'label'       => __('Voting system'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Activate'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 0,
                                                  'gr_config'   => 'modules',
                                                  'comment'     => __('Voting system yes = 1, no = 0')),

                      'bookmarks'        => array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'label'       => __('Bookmarks'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Activate'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 0,
                                                  'gr_config'   => 'modules',
                                                  'comment'     => __('Bookmarks yes = 1, no = 0'),
                                                  'old_name'    => 'lesezeichen'),


                     'links'              =>array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 0,
                                                  'gr_config'   => 'modules',
                                                  'comment'     => __('activates links module')),

                      'chat'             => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Chat'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Activate'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'chat',
                                                  'comment'     => __('activates chat module')),

                      'config_block'    => array('step'        => 'configuration',
                                                  'noconfigure' => false,
                                                  'mode'        => 'advanced',
                                                  'label'       => __('Configuration'),
                                                  'type'        => 'separator'),

                      'chat_alive_freq'  => array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 30,
                                                  'gr_config'   => 'chat',
                                                  'comment'     => __('Minutes to keep alive an user on chat from last comment')),

                      'chat_content_freq'=> array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 5,
                                                  'gr_config'   => 'chat',
                                                  'comment'     => __('Seconds to refresh the chat log')),

                      'chat_last_hours'  => array('step'        => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 24,
                                                  'gr_config'   => 'chat',
                                                  'comment'     => __('Number of hours of log to be displayed on chat page')),

                      'logs'             => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Track user login/logout'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Activate'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('Logging')),

                      'history_log'      => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Log history of records'),
                                                  'type'        => 'select',
                                                  'values'      => array(2 =>__('Activate and display'),
                                                                         1 =>__('Activate but do not display'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 2,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('Log history of records')),

                      'sysadmin_email'   => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('System Administrator Mail Address'),
                                                  'type'        => 'text',
                                                  'default'     => '',
                                                  'notes'       => __('No email option: leave blank'),
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('System Administrator Mail Address')),


                      'quickmail'        => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Mail'),
                                                  'type'        => 'select',
                                                  'range'      => 'get_quickmail_options',
                                                  //'default'     => 1,
                                                  'callback'    => 'check_quickmail',
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('Mail no = 0, only send = 1, send and receive = 2')),

                      'mail_send_arg'    => array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 0,
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('Adds -f as 5. parameter to mail(), see php manual')),

                      'mail_eol'         => array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'callback'    => 'check_mail_eol',
                                                  'default'     => '\r\n',
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('end of line in body; e.g.').' \r\n '.__('(conform to RFC 2821 / 2822)')),

                      'mail_eoh'         => array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'callback'    => 'check_mail_eol',
                                                  'default'     => '\r\n',
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('end of header line; e.g.').' \r\n '.__('(conform to RFC 2821 / 2822)')),

                     'mail_mode'         => array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 0,
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('Sendmail mode: 0: use mail(); 1: use socket')),

                     'mail_auth'         => array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 0,
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('Authentication')." - 0:".__('No Authentication').",1:".__('with POP before SMTP').",2:".__('SMTP auth (via socket only!)')),

                     'smtp_hostname'     => array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 'localhost',
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('the real address of the SMTP mail server, you have access to (maybe localhost)')),

                     'local_hostname'    => array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 'hereiam',
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('name of the local server to identify it while HELO procedure')),

                     'pop_account'                 => array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 'itsme',
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('real username for POP before SMTP')),

                     'pop_password'      => array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 'mypw',
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('password for this pop account')),
                     'pop_hostname'      => array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 'mypop.domain.net',
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('the POP server')),

                     'smtp_account'      => array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 'itsme',
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('real username for SMTP auth')),

                     'smtp_password'     => array('step'     => 'configuration',
                                                  'mode'        => 'basic',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 'mypw',
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('password for this account')),

                      'faxpath'          => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Path to sendfax'),
                                                  'type'        => 'text',
                                                  'default'     => '',
                                                  'notes'       => __('No fax option: leave blank'),
                                                  'gr_config'   => 'mail',
                                                  'comment'     => __('Path to sendfax')),

                      'reminder'         => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Reminder'),
                                                  'type'        => 'select',
                                                  'values'      => array(1 =>__('Show appointment list in new window'),
                                                                         2 =>__('Show an additional alert')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'reminder',
                                                  'comment'     => __('Reminder')),

                      'remind_freq'      => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Alarm'),
                                                  'type'        => 'text',
                                                  'default'     => 15,
                                                  'notes'       => __('Max. minutes before the event'),
                                                  'gr_config'   => 'reminder',
                                                  'comment'     => __('fequency of check for next events [min]')),

                      'rts'              => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Help Desk Manager / Trouble Ticket System'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Activate'),
                                                                         0 =>__('Do not Activate')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'helpdesk - rts',
                                                  'comment'     => __('Help desk')),

                      'rts_work'      => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Helpdesk: Workflow functionality'),
                                                  'type'        => 'select',
                                                  'values'      => array(1 =>__('Yes'),
                                                                         0 =>__('No')),
                                                  'default'     => 0,
                                                  'gr_config'   => 'helpdesk - rts',
                                                  'comment'     => __('0 = without workflow functionality - 1 = with workflow functionality')),
                                                  
                      'rts_duedate'      => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('RT Option: Customer can set a due date'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Yes'),
                                                                         0 =>__('No')),
                                                  'default'     => 0,
                                                  'gr_config'   => 'helpdesk - rts',
                                                  'comment'     => __('RT Option: Customer can set a due date')),

                      'rts_cust_acc'     => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('RT Option: Customer Authentification'),
                                                  'type'        => 'select',
                                                  'values'      => array(0 =>__('Open to all, email-address is sufficient'),
                                                                         1 =>__('Registered contact enter his family name'),
                                                                         2 =>__('His email')),
                                                  'default'     => 0,
                                                  'gr_config'   => 'helpdesk - rts',
                                                  'comment'     => __('RT Option: Customer Authentification').", ".__('0: open to all, email-address is sufficient<br />1: registered contact enter his family name<br />2: his email')),

                      'rts_mail'         => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Email Address of the support'),
                                                  'type'        => 'text',
                                                  'default'     => '',
                                                  'gr_config'   => 'helpdesk - rts',
                                                  'comment'     => __('Email Address of the support')),

                      'server_ip'        => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('IP address of server where cronjob is activated'),
                                                  'type'        => 'text',
                                                  'default'     => $_SERVER['SERVER_ADDR'],
                                                  'gr_config'   => 'helpdesk - rts',
                                                  'comment'     => __('IP address of server where cronjob is activated')),

                      'host_path'        => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Host-Path'),
                                                  'type'        => 'text',
                                                  'callback'    => 'check_hostname',
                                                  'default'     => strtolower(substr($_SERVER['SERVER_PROTOCOL'], 0, strpos($_SERVER['SERVER_PROTOCOL'], '/'))).'://'.$_SERVER['SERVER_NAME'].'/',
                                                  'gr_config'   => 'paths',
                                                  'comment'     => __('absolute path to host, e.g. http://myhost/')),


                      'install_dir' =>      array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Installation directory'),
                                                  'type'        => 'text',
                                                  'default'     => substr($_SERVER['SCRIPT_NAME'], 1, strrpos($_SERVER['SCRIPT_NAME'], '/')),
                                                  'gr_config'   => 'paths',
                                                  'comment'     => __('installation directory below host, e.g. myInstallation/of/phprojekt5/')),

                      // old step 2b


                       'acc_all_groups'  => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Access for all groups (Option to release objects in all groups)'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Yes'),
                                                                         0 =>__('No')),
                                                  'default'     => 0,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('Option to release objects in all groups')),

                       'login_short'     => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => true,
                                                  'label'       => __('Login name'),
                                                  'type'        => 'select',
                                                  'values'      => array(0 =>__('Last name'),
                                                                         1 =>__('Short name'),
                                                                         2 =>__('login name')),
                                                  'default'     =>  2,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('Login name')." - ".__('0: last name, 1: short name, 2: login name')),

                       'ldap'            => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Use LDAP'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Yes'),
                                                                         0 =>__('No')),
                                                  'default'     => 0,
                                                  'check'       => 'check_ldap',
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('use LDAP')),

                       'timezone'        => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Timezone'),
                                                  'type'        => 'select',
                                                  'range'       => 'get_timezone_options',
                                                  'default'     => 0,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('Timezone difference [h] Server - user')),

                       'pw_crypt'        => array('step'      => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => true,
                                                  'label'       => __('Encrypt passwords'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Yes'),
                                                                         0 =>__('No')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('Encrypt passwords')),



                       'pw_change'       => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Password change'),
                                                  'type'        => 'select',
                                                  'values'      => array(0 =>__('None'),
                                                                         1 =>__('Only Random passwords'),
                                                                         2 =>__('Choose own')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'system',
                                                  'comment'     => __('Password change')),

                       'groupviewuserheader' => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Header groupviews'),
                                                  'type'        => 'select',
                                                  'values'      => array(0 =>__('Name, F.'),
                                                                         1 =>__('Shortname'),
                                                                         2 =>__('Loginname')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'calendar',
                                                  'comment'     => __('Header groupviews')),

                       'default_size'    => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Default size of form elements'),
                                                  'type'        => 'text',
                                                  'default'     => 40,
                                                  'gr_config'   => 'layout',
                                                  'comment'     => __('Default size of form elements')),

                       'cur_symbol'      => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Currency symbol'),
                                                  'type'        => 'text',
                                                  'default'     => '',
                                                  'notes'       => 'Current :value:',
                                                  'gr_config'   => 'layout',
                                                  'comment'     => __('Currency symbol')),

                       'day_start'       => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('First hour of the day'),
                                                  'type'        => 'text',
                                                  'default'     => 8,
                                                  'gr_config'   => 'calendar',
                                                  'comment'     => __('First hour of the day:').": 6,7,8,9"),

                       'day_end'         => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Last hour of the day'),
                                                  'type'        => 'text',
                                                  'default'     => 20,
                                                  'gr_config'   => 'calendar',
                                                  'comment'     => __('Last hour of the day:').": 17,18,19,2"),

                       'skin'            => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'type'        => 'hidden',
                                                  'default'     => 'default',
                                                  'gr_config'   => 'layout',
                                                  'comment'     => __('Default skin')),

                       'bgcolor_mark'    => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Color to mark rows'),
                                                  'type'        => 'text',
                                                  'default'     => '#E6DE90',
                                                  'gr_config'   => 'layout',
                                                  'comment'     => __('Color to mark rows')),

                       'bgcolor_hili'    => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Color to highlight rows'),
                                                  'type'        => 'text',
                                                  'default'     => '#FFFFFF',
                                                  'gr_config'   => 'layout',
                                                  'comment'     => __('Color to highlight rows')),

                       'logo'            => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Path to customized company logo'),
                                                  'type'        => 'text',
                                                  'default'     => '',
                                                  'gr_config'   => 'layout',
                                                  'comment'     => __('path to customized company logo (e.g. ').'layout/default/img/logo.png)'),

                       'hp_url'          => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('URL to the homepage of the company'),
                                                  'type'        => 'text',
                                                  'default'     => 'http://www.phprojekt.com',
                                                  'gr_config'   => 'layout',
                                                  'comment'     => __('URL to the homepage of the company').", ".__('no = leave empty')),

                       'tr_hover'        => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Highlight list records with mouseover'),
                                                  'type'        => 'checkbox',
                                                  'values'      => array(1 =>__('Yes'),
                                                                         0 =>__('No')),
                                                  'default'     => 1,
                                                  'gr_config'   => 'layout',
                                                  'comment'     => __('Highlight list records with mouseover')),

                       'cont_usrdef1'    => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Name of userdefined field 1'),
                                                  'type'        => 'text',
                                                  'default'     => 'Userdefined',
                                                  'gr_config'   => 'contacts',
                                                  'comment'     => __('Name of userdefined field')." 1"),

                       'cont_usrdef2'    => array('step'        => 'configuration',
                                                  'mode'        => 'advanced',
                                                  'noconfigure' => false,
                                                  'label'       => __('Name of userdefined field 2'),
                                                  'type'        => 'text',
                                                  'default'     => 'Userdefined',
                                                  'gr_config'   => 'contacts',
                                                  'comment'     => __('Name of userdefined field')." 2"),
                     );

// This arrays are the 'groups' of values inside config.inc.php

$sections_array = array ('version','paths', 'database', 'system', 'modules', 'calendar',
                   'reminder', 'projects', 'timecard', 'contacts', 'notes', 'todo', 'mail',
                   'file manager', 'forum', 'helpdesk - rts', 'chat', 'layout');

?>
