Thanks shiruken! needed single quotes around switch constants
[squirrelmail.git] / plugins / administrator / defines.php
CommitLineData
abd7a3f8 1<?PHP
2
3/**
4 * defines.php
5 *
76911253 6 * Copyright (c) 1999-2003 The SquirrelMail Project Team
abd7a3f8 7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * Philippe Mingo
10 *
11 * $Id$
12 */
13
b59d1a7d 14require_once( SM_PATH . 'functions/constants.php' );
abd7a3f8 15
16/* Define constants for the various option types. */
17define('SMOPT_TYPE_UNDEFINED', -1);
18define('SMOPT_TYPE_STRING', 0);
19define('SMOPT_TYPE_STRLIST', 1);
20define('SMOPT_TYPE_TEXTAREA', 2);
21define('SMOPT_TYPE_INTEGER', 3);
22define('SMOPT_TYPE_FLOAT', 4);
23define('SMOPT_TYPE_BOOLEAN', 5);
24define('SMOPT_TYPE_HIDDEN', 6);
25define('SMOPT_TYPE_COMMENT', 7);
dcd6f144 26define('SMOPT_TYPE_NUMLIST', 8);
edd4a552 27define('SMOPT_TYPE_TITLE', 9);
28define('SMOPT_TYPE_THEME', 10);
29define('SMOPT_TYPE_PLUGINS', 11);
65a5bae6 30define('SMOPT_TYPE_LDAP', 12);
88cb1b4d 31define('SMOPT_TYPE_EXTERNAL', 32);
a28a56da 32define('SMOPT_TYPE_PATH',33);
abd7a3f8 33
34global $languages;
35
35be4418 36$language_values = array( );
abd7a3f8 37foreach ($languages as $lang_key => $lang_attributes) {
38 if (isset($lang_attributes['NAME'])) {
39 $language_values[$lang_key] = $lang_attributes['NAME'];
40 }
41}
42asort( $language_values );
35be4418 43$language_values = array_merge(array('' => _("Default")), $language_values);
dcd6f144 44$left_size_values = array();
45for ($lsv = 100; $lsv <= 300; $lsv += 10) {
46 $left_size_values[$lsv] = "$lsv " . _("pixels");
47}
48
0e66bc84 49$defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
50 'type' => SMOPT_TYPE_COMMENT,
abd7a3f8 51 'size' => 7 ),
88cb1b4d 52 'SM_ver' => array( 'name' => _("Squirrelmail Version"),
53 'type' => SMOPT_TYPE_EXTERNAL,
54 'value' => "$version" ),
55 'PHP_ver' => array( 'name' => _("PHP Version"),
56 'type' => SMOPT_TYPE_EXTERNAL,
57 'value' => phpversion() ),
0e66bc84 58 /* --------------------------------------------------------*/
59 'Group1' => array( 'name' => _("Organization Preferences"),
60 'type' => SMOPT_TYPE_TITLE ),
61 '$org_name' => array( 'name' => _("Organization Name"),
abd7a3f8 62 'type' => SMOPT_TYPE_STRING,
63 'size' => 40 ),
0e66bc84 64 '$org_logo' => array( 'name' => _("Organization Logo"),
a28a56da 65 'type' => SMOPT_TYPE_PATH,
66 'size' => 40,
67 'default' => '../images/sm_logo.png'),
99ac8983 68 '$org_logo_width' => array( 'name' => _("Organization Logo Width"),
69 'type' => SMOPT_TYPE_INTEGER,
70 'size' => 5,
71 'default' => 0),
72 '$org_logo_height' => array( 'name' => _("Organization Logo Height"),
73 'type' => SMOPT_TYPE_INTEGER,
74 'size' => 5,
75 'default' => 0),
0e66bc84 76 '$org_title' => array( 'name' => _("Organization Title"),
abd7a3f8 77 'type' => SMOPT_TYPE_STRING,
78 'size' => 40 ),
0e66bc84 79 '$signout_page' => array( 'name' => _("Signout Page"),
a28a56da 80 'type' => SMOPT_TYPE_PATH,
0e66bc84 81 'size' => 40 ),
a3d6c63e 82 '$provider_uri' => array( 'name' => _("Provider Link URI"),
83 'type' => SMOPT_TYPE_STRING ),
84 '$provider_name' => array( 'name' => _("Provider Name"),
85 'type' => SMOPT_TYPE_STRING ),
abd7a3f8 86 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
87 'type' => SMOPT_TYPE_STRLIST,
88 'size' => 7,
89 'posvals' => $language_values ),
dcd6f144 90 '$frame_top' => array( 'name' => _("Top Frame"),
91 'type' => SMOPT_TYPE_STRING,
feba1a41 92 'size' => 40,
93 'default' => '_top' ),
0e66bc84 94 /* --------------------------------------------------------*/
95 'Group2' => array( 'name' => _("Server Settings"),
96 'type' => SMOPT_TYPE_TITLE ),
97 '$domain' => array( 'name' => _("Mail Domain"),
88cb1b4d 98 'type' => SMOPT_TYPE_STRING,
99 'size' => 40 ),
abd7a3f8 100 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
101 'type' => SMOPT_TYPE_STRING,
102 'size' => 40 ),
103 '$imapPort' => array( 'name' => _("IMAP Server Port"),
88cb1b4d 104 'type' => SMOPT_TYPE_INTEGER ),
0e66bc84 105 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
106 'type' => SMOPT_TYPE_STRLIST,
0e66bc84 107 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
108 'uw' => _("University of Washington's IMAP server"),
109 'exchange' => _("Microsoft Exchange IMAP server"),
110 'courier' => _("Courier IMAP server"),
111 'other' => _("Not one of the above servers") ) ),
112 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
113 'type' => SMOPT_TYPE_STRING,
edd4a552 114 'comment' => _("Use \"detect\" to auto-detect."),
2586d588 115 'size' => 10,
116 'default' => 'detect' ),
a3d6c63e 117 '$use_imap_tls' => array( 'name' => _("Use TLS for IMAP Connections"),
a2ccd603 118 'type' => SMOPT_TYPE_BOOLEAN,
a3d6c63e 119 'comment' => _("Requires PHP 4.3.x! Experimental."),
a2ccd603 120 'default' => false ),
a3d6c63e 121 '$imap_auth_mech' => array( 'name' => _("IMAP Authentication Type"),
a2ccd603 122 'type' => SMOPT_TYPE_STRLIST,
123 'posvals' => array('plain' => 'Plaintext',
124 'cram-md5' => 'CRAM-MD5',
125 'digest-md5' => 'DIGEST-MD5') ),
a3d6c63e 126 '$useSendmail' => array( 'name' => _("Use Sendmail Binary"),
127 'type' => SMOPT_TYPE_BOOLEAN,
128 'comment' => "Say 'no' for SMTP" ),
dcd6f144 129 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
130 'type' => SMOPT_TYPE_STRING,
131 'size' => 40 ),
abd7a3f8 132 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
133 'type' => SMOPT_TYPE_STRING,
134 'size' => 40 ),
135 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
88cb1b4d 136 'type' => SMOPT_TYPE_INTEGER ),
a3d6c63e 137 '$use_smtp_tls' => array( 'name' => _("Use TLS for SMTP Connections"),
a2ccd603 138 'type' => SMOPT_TYPE_BOOLEAN,
a3d6c63e 139 'comment' => _("Requires PHP 4.3.x! Experimental."),
a2ccd603 140 'default' => false ),
a3d6c63e 141 '$smtp_auth_mech' => array( 'name' => _("SMTP Authentication Type"),
a2ccd603 142 'type' => SMOPT_TYPE_STRLIST,
143 'posvals' => array('none' => 'No SMTP auth',
144 'plain' => 'Plaintext',
145 'cram-md5' => 'CRAM-MD5',
146 'digest-md5' => 'DIGEST-MD5'),
147 'default' => 'none'),
a3d6c63e 148 '$pop_before_smtp' => array( 'name' => _("POP3 Before SMTP?"),
87d7a194 149 'type' => SMOPT_TYPE_BOOLEAN,
150 'default' => false ),
0e66bc84 151 '$invert_time' => array( 'name' => _("Invert Time"),
152 'type' => SMOPT_TYPE_BOOLEAN ),
ad0a71ac 153 '$default_use_mdn' => array( 'name' => _("Use Confirmation Flags"),
154 'type' => SMOPT_TYPE_BOOLEAN ),
0e66bc84 155 /* --------------------------------------------------------*/
156 'Group3' => array( 'name' => _("Folders Defaults"),
157 'type' => SMOPT_TYPE_TITLE ),
dcd6f144 158 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
159 'type' => SMOPT_TYPE_STRING,
160 'size' => 40 ),
161 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
162 'type' => SMOPT_TYPE_BOOLEAN ),
163 '$trash_folder' => array( 'name' => _("Trash Folder"),
164 'type' => SMOPT_TYPE_STRING,
165 'size' => 40 ),
166 '$sent_folder' => array( 'name' => _("Sent Folder"),
167 'type' => SMOPT_TYPE_STRING,
168 'size' => 40 ),
169 '$draft_folder' => array( 'name' => _("Draft Folder"),
170 'type' => SMOPT_TYPE_STRING,
171 'size' => 40 ),
172 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
173 'type' => SMOPT_TYPE_BOOLEAN ),
174 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
175 'type' => SMOPT_TYPE_BOOLEAN ),
176 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
177 'type' => SMOPT_TYPE_BOOLEAN ),
178 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
179 'type' => SMOPT_TYPE_BOOLEAN ),
180 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
181 'type' => SMOPT_TYPE_BOOLEAN ),
182 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
183 'type' => SMOPT_TYPE_BOOLEAN ),
184 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
185 'type' => SMOPT_TYPE_BOOLEAN ),
186 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
187 'type' => SMOPT_TYPE_BOOLEAN ),
188 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
5ed13ec8 189 'type' => SMOPT_TYPE_NUMLIST,
190 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
191 SMPREF_UNSEEN_INBOX => _("Only INBOX"),
192 SMPREF_UNSEEN_ALL => _("All Folders")) ),
dcd6f144 193 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
5ed13ec8 194 'type' => SMOPT_TYPE_NUMLIST ,
195 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
196 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
dcd6f144 197 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
198 'type' => SMOPT_TYPE_BOOLEAN ),
e91cf665 199 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Adrressbook"),
200 'type' => SMOPT_TYPE_BOOLEAN ),
4e85a37f 201 '$delete_folder' => array( 'name' => _("Auto delete folders"),
202 'type' => SMOPT_TYPE_BOOLEAN ),
a3d6c63e 203 '$noselect_fix_enable' => array( 'name' => _("Enable /NoSelect folder fix"),
204 'type' => SMOPT_TYPE_BOOLEAN,
205 'default' => false),
dcd6f144 206 /* --------------------------------------------------------*/
d0102e1a 207 'Group4' => array( 'name' => _("General Options"),
dcd6f144 208 'type' => SMOPT_TYPE_TITLE ),
209 '$default_charset' => array( 'name' => _("Default Charset"),
edd4a552 210 'type' => SMOPT_TYPE_STRLIST,
491e1525 211 'posvals' => array( 'iso-8859-1' => 'iso-8859-1',
212 'iso-8859-2' => 'iso-8859-2',
213 'iso-8859-7' => 'iso-8859-7',
214 'iso-8859-15' => 'iso-8859-15',
215 'iso-8859-15' => 'iso-8859-15',
edd4a552 216 'ns_4551_1' => 'ns_4551_1',
217 'koi8-r' => 'koi8-r',
218 'euc-KR' => 'euc-KR',
fc0dec58 219 'windows-1251' => 'windows-1251',
83be314a 220 'ISO-2022-JP' => 'ISO-2022-JP' ) ),
dcd6f144 221 '$data_dir' => array( 'name' => _("Data Directory"),
a28a56da 222 'type' => SMOPT_TYPE_PATH,
dcd6f144 223 'size' => 40 ),
224 '$attachment_dir' => array( 'name' => _("Temp Directory"),
a28a56da 225 'type' => SMOPT_TYPE_PATH,
abd7a3f8 226 'size' => 40 ),
dcd6f144 227 '$dir_hash_level' => array( 'name' => _("Hash Level"),
228 'type' => SMOPT_TYPE_NUMLIST,
229 'posvals' => array( 0 => _("Hash Disabled"),
230 1 => _("Low"),
231 2 => _("Moderate"),
232 3 => _("Medium"),
233 4 => _("High") ) ),
edd4a552 234 '$default_left_size' => array( 'name' => _("Default Left Size"),
dcd6f144 235 'type' => SMOPT_TYPE_NUMLIST,
236 'posvals' => $left_size_values ),
237 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
238 'type' => SMOPT_TYPE_BOOLEAN ),
239 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
240 'type' => SMOPT_TYPE_BOOLEAN ),
241 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
242 'type' => SMOPT_TYPE_BOOLEAN ),
6fa38b33 243 'default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
244 'type' => SMOPT_TYPE_BOOLEAN ),
8a7d0669 245 '$edit_identity' => array( 'name' => _("Allow editing of identities"),
246 'type' => SMOPT_TYPE_BOOLEAN ),
247 '$edit_name' => array( 'name' => _("Allow editing of full name"),
248 'type' => SMOPT_TYPE_BOOLEAN ),
a3d6c63e 249 '$allow_server_sort' => array( 'name' => _("Use server-side sorting"),
87d7a194 250 'type' => SMOPT_TYPE_BOOLEAN,
251 'default' => false ),
a3d6c63e 252 '$allow_thread_sort' => array( 'name' => _("Use server-side thread sorting"),
87d7a194 253 'type' => SMOPT_TYPE_BOOLEAN,
254 'default' => false ),
a3d6c63e 255 '$allow_charset_search' => array( 'name' => _("Allow server charset search"),
87d7a194 256 'type' => SMOPT_TYPE_BOOLEAN,
257 'default' => false ),
a3d6c63e 258 '$uid_support' => array( 'name' => _("UID support"),
87d7a194 259 'type' => SMOPT_TYPE_BOOLEAN,
260 'default' => false ),
a3d6c63e 261 '$session_name' => array( 'name' => _("PHP session name"),
87d7a194 262 'type' => SMOPT_TYPE_HIDDEN ),
dcd6f144 263 /* --------------------------------------------------------*/
edd4a552 264 'Group5' => array( 'name' => _("Message of the Day"),
265 'type' => SMOPT_TYPE_TITLE ),
266 '$motd' => array( 'name' => _("Message of the Day"),
267 'type' => SMOPT_TYPE_TEXTAREA,
268 'size' => 40 ),
269 /* --------------------------------------------------------*/
497203d4 270 'Group6' => array( 'name' => _("Database"),
271 'type' => SMOPT_TYPE_TITLE ),
272 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
273 'type' => SMOPT_TYPE_STRING,
88cb1b4d 274 'size' => 40 ),
4f40a59d 275 '$addrbook_table' => array( 'name' => _("Address book table"),
276 'type' => SMOPT_TYPE_STRING,
2586d588 277 'size' => 40,
278 'default' => 'address' ),
f58f1fd8 279 '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
280 'type' => SMOPT_TYPE_STRING,
281 'size' => 40 ),
282 '$prefs_table' => array( 'name' => _("Preferences table"),
283 'type' => SMOPT_TYPE_STRING,
284 'size' => 40,
285 'default' => 'userprefs' ),
99a6c222 286 '$prefs_user_field' => array('name' => _("Preferences username field"),
287 'type' => SMOPT_TYPE_STRING,
288 'size' => 40,
289 'default' => 'user' ),
290 '$prefs_key_field' => array('name' => _("Preferences key field"),
291 'type' => SMOPT_TYPE_STRING,
292 'size' => 40,
293 'default' => 'prefkey' ),
294 '$prefs_val_field' => array('name' => _("Preferences value field"),
295 'type' => SMOPT_TYPE_STRING,
296 'size' => 40,
297 'default' => 'prefval' ),
497203d4 298 /* --------------------------------------------------------*/
299 'Group7' => array( 'name' => _("Themes"),
edd4a552 300 'type' => SMOPT_TYPE_TITLE ),
301 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
a28a56da 302 'type' => SMOPT_TYPE_PATH,
edd4a552 303 'size' => 40 ),
a3d6c63e 304 '$theme_default' => array( 'name' => _("Default theme"),
305 'type' => SMOPT_TYPE_INTEGER,
306 'default' => 0,
307 'comment' => _("Use index number of theme") ),
edd4a552 308 /* --------------------------------------------------------*/
88cb1b4d 309 '$config_use_color' => array( 'name' => '',
a3d6c63e 310 'type' => SMOPT_TYPE_HIDDEN ),
311 '$no_list_for_subscribe' => array( 'name' => '',
312 'type' => SMOPT_TYPE_HIDDEN ),
497203d4 313 /* --------------------------------------------------------*/
dcd6f144 314
edd4a552 315 );
dcd6f144 316
4f40a59d 317?>