"-= M.J. Prinsen =-" <various@bovendelft.xs4all.nl>
[squirrelmail.git] / plugins / administrator / defines.php
1 <?PHP
2
3 /**
4 * defines.php
5 *
6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * Philippe Mingo
10 *
11 * $Id$
12 */
13
14 require_once( '../functions/constants.php' );
15
16 /* Define constants for the various option types. */
17 define('SMOPT_TYPE_UNDEFINED', -1);
18 define('SMOPT_TYPE_STRING', 0);
19 define('SMOPT_TYPE_STRLIST', 1);
20 define('SMOPT_TYPE_TEXTAREA', 2);
21 define('SMOPT_TYPE_INTEGER', 3);
22 define('SMOPT_TYPE_FLOAT', 4);
23 define('SMOPT_TYPE_BOOLEAN', 5);
24 define('SMOPT_TYPE_HIDDEN', 6);
25 define('SMOPT_TYPE_COMMENT', 7);
26 define('SMOPT_TYPE_NUMLIST', 8);
27 define('SMOPT_TYPE_TITLE', 9);
28 define('SMOPT_TYPE_THEME', 10);
29 define('SMOPT_TYPE_PLUGINS', 11);
30 define('SMOPT_TYPE_LDAP', 12);
31 define('SMOPT_TYPE_EXTERNAL', 32);
32
33 global $languages;
34
35 $language_values = array( );
36 foreach ($languages as $lang_key => $lang_attributes) {
37 if (isset($lang_attributes['NAME'])) {
38 $language_values[$lang_key] = $lang_attributes['NAME'];
39 }
40 }
41 asort( $language_values );
42 $language_values = array_merge(array('' => _("Default")), $language_values);
43 $left_size_values = array();
44 for ($lsv = 100; $lsv <= 300; $lsv += 10) {
45 $left_size_values[$lsv] = "$lsv " . _("pixels");
46 }
47
48 $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
49 'type' => SMOPT_TYPE_COMMENT,
50 'size' => 7 ),
51 'SM_ver' => array( 'name' => _("Squirrelmail Version"),
52 'type' => SMOPT_TYPE_EXTERNAL,
53 'value' => "$version" ),
54 'PHP_ver' => array( 'name' => _("PHP Version"),
55 'type' => SMOPT_TYPE_EXTERNAL,
56 'value' => phpversion() ),
57 /* --------------------------------------------------------*/
58 'Group1' => array( 'name' => _("Organization Preferences"),
59 'type' => SMOPT_TYPE_TITLE ),
60 '$org_name' => array( 'name' => _("Organization Name"),
61 'type' => SMOPT_TYPE_STRING,
62 'size' => 40 ),
63 '$org_logo' => array( 'name' => _("Organization Logo"),
64 'type' => SMOPT_TYPE_STRING,
65 'size' => 40 ),
66 '$org_title' => array( 'name' => _("Organization Title"),
67 'type' => SMOPT_TYPE_STRING,
68 'size' => 40 ),
69 '$signout_page' => array( 'name' => _("Signout Page"),
70 'type' => SMOPT_TYPE_STRING,
71 'size' => 40 ),
72 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
73 'type' => SMOPT_TYPE_STRLIST,
74 'size' => 7,
75 'posvals' => $language_values ),
76 '$frame_top' => array( 'name' => _("Top Frame"),
77 'type' => SMOPT_TYPE_STRING,
78 'size' => 40,
79 'default' => '_top' ),
80 /* --------------------------------------------------------*/
81 'Group2' => array( 'name' => _("Server Settings"),
82 'type' => SMOPT_TYPE_TITLE ),
83 '$domain' => array( 'name' => _("Mail Domain"),
84 'type' => SMOPT_TYPE_STRING,
85 'size' => 40 ),
86 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
87 'type' => SMOPT_TYPE_STRING,
88 'size' => 40 ),
89 '$imapPort' => array( 'name' => _("IMAP Server Port"),
90 'type' => SMOPT_TYPE_INTEGER ),
91 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
92 'type' => SMOPT_TYPE_STRLIST,
93 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
94 'uw' => _("University of Washington's IMAP server"),
95 'exchange' => _("Microsoft Exchange IMAP server"),
96 'courier' => _("Courier IMAP server"),
97 'other' => _("Not one of the above servers") ) ),
98 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
99 'type' => SMOPT_TYPE_STRING,
100 'comment' => _("Use \"detect\" to auto-detect."),
101 'size' => 10,
102 'default' => 'detect' ),
103 '$useSendmail' => array( 'name' => _("Use Sendmail"),
104 'type' => SMOPT_TYPE_BOOLEAN ),
105 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
106 'type' => SMOPT_TYPE_STRING,
107 'size' => 40 ),
108 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
109 'type' => SMOPT_TYPE_STRING,
110 'size' => 40 ),
111 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
112 'type' => SMOPT_TYPE_INTEGER ),
113 '$use_authenticated_smtp' => array( 'name' => _("Authenticated SMTP"),
114 'type' => SMOPT_TYPE_BOOLEAN ),
115 '$invert_time' => array( 'name' => _("Invert Time"),
116 'type' => SMOPT_TYPE_BOOLEAN ),
117 /* --------------------------------------------------------*/
118 'Group3' => array( 'name' => _("Folders Defaults"),
119 'type' => SMOPT_TYPE_TITLE ),
120 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
121 'type' => SMOPT_TYPE_STRING,
122 'size' => 40 ),
123 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
124 'type' => SMOPT_TYPE_BOOLEAN ),
125 '$trash_folder' => array( 'name' => _("Trash Folder"),
126 'type' => SMOPT_TYPE_STRING,
127 'size' => 40 ),
128 '$sent_folder' => array( 'name' => _("Sent Folder"),
129 'type' => SMOPT_TYPE_STRING,
130 'size' => 40 ),
131 '$draft_folder' => array( 'name' => _("Draft Folder"),
132 'type' => SMOPT_TYPE_STRING,
133 'size' => 40 ),
134 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
135 'type' => SMOPT_TYPE_BOOLEAN ),
136 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
137 'type' => SMOPT_TYPE_BOOLEAN ),
138 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
139 'type' => SMOPT_TYPE_BOOLEAN ),
140 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
141 'type' => SMOPT_TYPE_BOOLEAN ),
142 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
143 'type' => SMOPT_TYPE_BOOLEAN ),
144 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
145 'type' => SMOPT_TYPE_BOOLEAN ),
146 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
147 'type' => SMOPT_TYPE_BOOLEAN ),
148 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
149 'type' => SMOPT_TYPE_BOOLEAN ),
150 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
151 'type' => SMOPT_TYPE_NUMLIST,
152 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
153 SMPREF_UNSEEN_INBOX => _("Only INBOX"),
154 SMPREF_UNSEEN_ALL => _("All Folders")) ),
155 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
156 'type' => SMOPT_TYPE_NUMLIST ,
157 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
158 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
159 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
160 'type' => SMOPT_TYPE_BOOLEAN ),
161 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Adrressbook"),
162 'type' => SMOPT_TYPE_BOOLEAN ),
163 '$delete_folder' => array( 'name' => _("Auto delete folders"),
164 'type' => SMOPT_TYPE_BOOLEAN ),
165 /* --------------------------------------------------------*/
166 'Group4' => array( 'name' => _("General Options"),
167 'type' => SMOPT_TYPE_TITLE ),
168 '$default_charset' => array( 'name' => _("Default Charset"),
169 'type' => SMOPT_TYPE_STRLIST,
170 'posvals' => array( 'iso_8859_1' => 'iso_8859_1',
171 'iso_8859_2' => 'iso_8859_2',
172 'iso_8859_7' => 'iso_8859_7',
173 'iso_8859_15' => 'iso_8859_15',
174 'iso_8859_15' => 'iso_8859_15',
175 'ns_4551_1' => 'ns_4551_1',
176 'koi8-r' => 'koi8-r',
177 'euc-KR' => 'euc-KR',
178 'windows-1251' => 'windows-1251' ) ),
179 '$data_dir' => array( 'name' => _("Data Directory"),
180 'type' => SMOPT_TYPE_STRING,
181 'size' => 40 ),
182 '$attachment_dir' => array( 'name' => _("Temp Directory"),
183 'type' => SMOPT_TYPE_STRING,
184 'size' => 40 ),
185 '$dir_hash_level' => array( 'name' => _("Hash Level"),
186 'type' => SMOPT_TYPE_NUMLIST,
187 'posvals' => array( 0 => _("Hash Disabled"),
188 1 => _("Low"),
189 2 => _("Moderate"),
190 3 => _("Medium"),
191 4 => _("High") ) ),
192 '$default_left_size' => array( 'name' => _("Default Left Size"),
193 'type' => SMOPT_TYPE_NUMLIST,
194 'posvals' => $left_size_values ),
195 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
196 'type' => SMOPT_TYPE_BOOLEAN ),
197 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
198 'type' => SMOPT_TYPE_BOOLEAN ),
199 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
200 'type' => SMOPT_TYPE_BOOLEAN ),
201 /* --------------------------------------------------------*/
202 'Group5' => array( 'name' => _("Message of the Day"),
203 'type' => SMOPT_TYPE_TITLE ),
204 '$motd' => array( 'name' => _("Message of the Day"),
205 'type' => SMOPT_TYPE_TEXTAREA,
206 'size' => 40 ),
207 /* --------------------------------------------------------*/
208 'Group6' => array( 'name' => _("Database"),
209 'type' => SMOPT_TYPE_TITLE ),
210 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
211 'type' => SMOPT_TYPE_STRING,
212 'size' => 40 ),
213 '$addrbook_table' => array( 'name' => _("Address book table"),
214 'type' => SMOPT_TYPE_STRING,
215 'size' => 40,
216 'default' => 'address' ),
217 '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
218 'type' => SMOPT_TYPE_STRING,
219 'size' => 40 ),
220 '$prefs_table' => array( 'name' => _("Preferences table"),
221 'type' => SMOPT_TYPE_STRING,
222 'size' => 40,
223 'default' => 'userprefs' ),
224 /* --------------------------------------------------------*/
225 'Group7' => array( 'name' => _("Themes"),
226 'type' => SMOPT_TYPE_TITLE ),
227 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
228 'type' => SMOPT_TYPE_STRING,
229 'size' => 40 ),
230 /* --------------------------------------------------------*/
231 '$config_use_color' => array( 'name' => '',
232 'type' => SMOPT_TYPE_HIDDEN )
233 /* --------------------------------------------------------*/
234
235 );
236
237 ?>