swap in the sqgetGlobalVar function
[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 ),
abd7a3f8 82 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
83 'type' => SMOPT_TYPE_STRLIST,
84 'size' => 7,
85 'posvals' => $language_values ),
dcd6f144 86 '$frame_top' => array( 'name' => _("Top Frame"),
87 'type' => SMOPT_TYPE_STRING,
feba1a41 88 'size' => 40,
89 'default' => '_top' ),
0e66bc84 90 /* --------------------------------------------------------*/
91 'Group2' => array( 'name' => _("Server Settings"),
92 'type' => SMOPT_TYPE_TITLE ),
93 '$domain' => array( 'name' => _("Mail Domain"),
88cb1b4d 94 'type' => SMOPT_TYPE_STRING,
95 'size' => 40 ),
abd7a3f8 96 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
97 'type' => SMOPT_TYPE_STRING,
98 'size' => 40 ),
99 '$imapPort' => array( 'name' => _("IMAP Server Port"),
88cb1b4d 100 'type' => SMOPT_TYPE_INTEGER ),
0e66bc84 101 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
102 'type' => SMOPT_TYPE_STRLIST,
0e66bc84 103 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
104 'uw' => _("University of Washington's IMAP server"),
105 'exchange' => _("Microsoft Exchange IMAP server"),
106 'courier' => _("Courier IMAP server"),
107 'other' => _("Not one of the above servers") ) ),
108 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
109 'type' => SMOPT_TYPE_STRING,
edd4a552 110 'comment' => _("Use \"detect\" to auto-detect."),
2586d588 111 'size' => 10,
112 'default' => 'detect' ),
a2ccd603 113 '$use_imap_tls' => array( 'name' => "Use TLS for IMAP connections",
114 'type' => SMOPT_TYPE_BOOLEAN,
115 'comment' => "Requires PHP 4.3.x! Experimental.",
116 'default' => false ),
117 '$imap_auth_mech' => array( 'name' => "IMAP Authentication Mech",
118 'type' => SMOPT_TYPE_STRLIST,
119 'posvals' => array('plain' => 'Plaintext',
120 'cram-md5' => 'CRAM-MD5',
121 'digest-md5' => 'DIGEST-MD5') ),
0e66bc84 122 '$useSendmail' => array( 'name' => _("Use Sendmail"),
123 'type' => SMOPT_TYPE_BOOLEAN ),
dcd6f144 124 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
125 'type' => SMOPT_TYPE_STRING,
126 'size' => 40 ),
abd7a3f8 127 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
128 'type' => SMOPT_TYPE_STRING,
129 'size' => 40 ),
130 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
88cb1b4d 131 'type' => SMOPT_TYPE_INTEGER ),
a2ccd603 132 '$use_smtp_tls' => array( 'name' => "Use TLS for SMTP connections",
133 'type' => SMOPT_TYPE_BOOLEAN,
134 'comment' => "Requires PHP 4.3.x! Experimental.",
135 'default' => false ),
136 '$smtp_auth_mech' => array( 'name' => "SMTP Authentication Mech",
137 'type' => SMOPT_TYPE_STRLIST,
138 'posvals' => array('none' => 'No SMTP auth',
139 'plain' => 'Plaintext',
140 'cram-md5' => 'CRAM-MD5',
141 'digest-md5' => 'DIGEST-MD5'),
142 'default' => 'none'),
87d7a194 143 '$pop_before_smtp' => array( 'name' => "POP3 before SMTP?",
144 'type' => SMOPT_TYPE_BOOLEAN,
145 'default' => false ),
0e66bc84 146 '$invert_time' => array( 'name' => _("Invert Time"),
147 'type' => SMOPT_TYPE_BOOLEAN ),
ad0a71ac 148 '$default_use_mdn' => array( 'name' => _("Use Confirmation Flags"),
149 'type' => SMOPT_TYPE_BOOLEAN ),
0e66bc84 150 /* --------------------------------------------------------*/
151 'Group3' => array( 'name' => _("Folders Defaults"),
152 'type' => SMOPT_TYPE_TITLE ),
dcd6f144 153 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
154 'type' => SMOPT_TYPE_STRING,
155 'size' => 40 ),
156 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
157 'type' => SMOPT_TYPE_BOOLEAN ),
158 '$trash_folder' => array( 'name' => _("Trash Folder"),
159 'type' => SMOPT_TYPE_STRING,
160 'size' => 40 ),
161 '$sent_folder' => array( 'name' => _("Sent Folder"),
162 'type' => SMOPT_TYPE_STRING,
163 'size' => 40 ),
164 '$draft_folder' => array( 'name' => _("Draft Folder"),
165 'type' => SMOPT_TYPE_STRING,
166 'size' => 40 ),
167 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
168 'type' => SMOPT_TYPE_BOOLEAN ),
169 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
170 'type' => SMOPT_TYPE_BOOLEAN ),
171 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
172 'type' => SMOPT_TYPE_BOOLEAN ),
173 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
174 'type' => SMOPT_TYPE_BOOLEAN ),
175 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
176 'type' => SMOPT_TYPE_BOOLEAN ),
177 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
178 'type' => SMOPT_TYPE_BOOLEAN ),
179 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
180 'type' => SMOPT_TYPE_BOOLEAN ),
181 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
182 'type' => SMOPT_TYPE_BOOLEAN ),
183 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
5ed13ec8 184 'type' => SMOPT_TYPE_NUMLIST,
185 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
186 SMPREF_UNSEEN_INBOX => _("Only INBOX"),
187 SMPREF_UNSEEN_ALL => _("All Folders")) ),
dcd6f144 188 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
5ed13ec8 189 'type' => SMOPT_TYPE_NUMLIST ,
190 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
191 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
dcd6f144 192 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
193 'type' => SMOPT_TYPE_BOOLEAN ),
e91cf665 194 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Adrressbook"),
195 'type' => SMOPT_TYPE_BOOLEAN ),
4e85a37f 196 '$delete_folder' => array( 'name' => _("Auto delete folders"),
197 'type' => SMOPT_TYPE_BOOLEAN ),
dcd6f144 198 /* --------------------------------------------------------*/
d0102e1a 199 'Group4' => array( 'name' => _("General Options"),
dcd6f144 200 'type' => SMOPT_TYPE_TITLE ),
201 '$default_charset' => array( 'name' => _("Default Charset"),
edd4a552 202 'type' => SMOPT_TYPE_STRLIST,
491e1525 203 'posvals' => array( 'iso-8859-1' => 'iso-8859-1',
204 'iso-8859-2' => 'iso-8859-2',
205 'iso-8859-7' => 'iso-8859-7',
206 'iso-8859-15' => 'iso-8859-15',
207 'iso-8859-15' => 'iso-8859-15',
edd4a552 208 'ns_4551_1' => 'ns_4551_1',
209 'koi8-r' => 'koi8-r',
210 'euc-KR' => 'euc-KR',
fc0dec58 211 'windows-1251' => 'windows-1251',
83be314a 212 'ISO-2022-JP' => 'ISO-2022-JP' ) ),
dcd6f144 213 '$data_dir' => array( 'name' => _("Data Directory"),
a28a56da 214 'type' => SMOPT_TYPE_PATH,
dcd6f144 215 'size' => 40 ),
216 '$attachment_dir' => array( 'name' => _("Temp Directory"),
a28a56da 217 'type' => SMOPT_TYPE_PATH,
abd7a3f8 218 'size' => 40 ),
dcd6f144 219 '$dir_hash_level' => array( 'name' => _("Hash Level"),
220 'type' => SMOPT_TYPE_NUMLIST,
221 'posvals' => array( 0 => _("Hash Disabled"),
222 1 => _("Low"),
223 2 => _("Moderate"),
224 3 => _("Medium"),
225 4 => _("High") ) ),
edd4a552 226 '$default_left_size' => array( 'name' => _("Default Left Size"),
dcd6f144 227 'type' => SMOPT_TYPE_NUMLIST,
228 'posvals' => $left_size_values ),
229 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
230 'type' => SMOPT_TYPE_BOOLEAN ),
231 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
232 'type' => SMOPT_TYPE_BOOLEAN ),
233 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
234 'type' => SMOPT_TYPE_BOOLEAN ),
6fa38b33 235 'default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
236 'type' => SMOPT_TYPE_BOOLEAN ),
8a7d0669 237 '$edit_identity' => array( 'name' => _("Allow editing of identities"),
238 'type' => SMOPT_TYPE_BOOLEAN ),
239 '$edit_name' => array( 'name' => _("Allow editing of full name"),
240 'type' => SMOPT_TYPE_BOOLEAN ),
87d7a194 241 '$allow_server_sort' => array( 'name' => "Use server-side sorting",
242 'type' => SMOPT_TYPE_BOOLEAN,
243 'default' => false ),
244 '$allow_thread_sort' => array( 'name' => "Use server-side thread sorting",
245 'type' => SMOPT_TYPE_BOOLEAN,
246 'default' => false ),
247 '$allow_charset_search' => array( 'name' => "Allow server charset search",
248 'type' => SMOPT_TYPE_BOOLEAN,
249 'default' => false ),
250 '$uid_support' => array( 'name' => "UID support",
251 'type' => SMOPT_TYPE_BOOLEAN,
252 'default' => false ),
253 '$session_name' => array( 'name' => "PHP session name",
254 'type' => SMOPT_TYPE_HIDDEN ),
dcd6f144 255 /* --------------------------------------------------------*/
edd4a552 256 'Group5' => array( 'name' => _("Message of the Day"),
257 'type' => SMOPT_TYPE_TITLE ),
258 '$motd' => array( 'name' => _("Message of the Day"),
259 'type' => SMOPT_TYPE_TEXTAREA,
260 'size' => 40 ),
261 /* --------------------------------------------------------*/
497203d4 262 'Group6' => array( 'name' => _("Database"),
263 'type' => SMOPT_TYPE_TITLE ),
264 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
265 'type' => SMOPT_TYPE_STRING,
88cb1b4d 266 'size' => 40 ),
4f40a59d 267 '$addrbook_table' => array( 'name' => _("Address book table"),
268 'type' => SMOPT_TYPE_STRING,
2586d588 269 'size' => 40,
270 'default' => 'address' ),
f58f1fd8 271 '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
272 'type' => SMOPT_TYPE_STRING,
273 'size' => 40 ),
274 '$prefs_table' => array( 'name' => _("Preferences table"),
275 'type' => SMOPT_TYPE_STRING,
276 'size' => 40,
277 'default' => 'userprefs' ),
99a6c222 278 '$prefs_user_field' => array('name' => _("Preferences username field"),
279 'type' => SMOPT_TYPE_STRING,
280 'size' => 40,
281 'default' => 'user' ),
282 '$prefs_key_field' => array('name' => _("Preferences key field"),
283 'type' => SMOPT_TYPE_STRING,
284 'size' => 40,
285 'default' => 'prefkey' ),
286 '$prefs_val_field' => array('name' => _("Preferences value field"),
287 'type' => SMOPT_TYPE_STRING,
288 'size' => 40,
289 'default' => 'prefval' ),
497203d4 290 /* --------------------------------------------------------*/
291 'Group7' => array( 'name' => _("Themes"),
edd4a552 292 'type' => SMOPT_TYPE_TITLE ),
293 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
a28a56da 294 'type' => SMOPT_TYPE_PATH,
edd4a552 295 'size' => 40 ),
296 /* --------------------------------------------------------*/
88cb1b4d 297 '$config_use_color' => array( 'name' => '',
298 'type' => SMOPT_TYPE_HIDDEN )
497203d4 299 /* --------------------------------------------------------*/
dcd6f144 300
edd4a552 301 );
dcd6f144 302
4f40a59d 303?>