squirrelmail-webmail  1.4.22
About: SquirrelMail is a standards-based webmail package with strong MIME support, address books, and folder manipulation (written in PHP4).
  Fossies Dox: squirrelmail-webmail-1.4.22.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

defines.php
Go to the documentation of this file.
1 <?php
2 
15 require_once( SM_PATH . 'functions/constants.php' );
16 
17 /* Define constants for the various option types. */
18 define('SMOPT_TYPE_UNDEFINED', -1);
19 define('SMOPT_TYPE_STRING', 0);
20 define('SMOPT_TYPE_STRLIST', 1);
21 define('SMOPT_TYPE_TEXTAREA', 2);
22 define('SMOPT_TYPE_INTEGER', 3);
23 define('SMOPT_TYPE_FLOAT', 4);
24 define('SMOPT_TYPE_BOOLEAN', 5);
25 define('SMOPT_TYPE_HIDDEN', 6);
26 define('SMOPT_TYPE_COMMENT', 7);
27 define('SMOPT_TYPE_NUMLIST', 8);
28 define('SMOPT_TYPE_TITLE', 9);
29 define('SMOPT_TYPE_THEME', 10);
30 define('SMOPT_TYPE_PLUGINS', 11);
31 define('SMOPT_TYPE_LDAP', 12);
32 define('SMOPT_TYPE_EXTERNAL', 32);
33 define('SMOPT_TYPE_PATH',33);
34 
35 global $languages;
36 
37 $language_values = array( );
38 foreach ($languages as $lang_key => $lang_attributes) {
39  if (isset($lang_attributes['NAME'])) {
40  $language_values[$lang_key] = $lang_attributes['NAME'];
41  }
42 }
43 asort( $language_values );
44 $language_values = array_merge(array('' => _("Default")), $language_values);
46 for ($lsv = 100; $lsv <= 300; $lsv += 10) {
47  $left_size_values[$lsv] = "$lsv " . _("pixels");
48 }
49 
50 $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
51  'type' => SMOPT_TYPE_COMMENT,
52  'size' => 7 ),
53  'SM_ver' => array( 'name' => _("SquirrelMail Version"),
54  'type' => SMOPT_TYPE_EXTERNAL,
55  'value' => "$version" ),
56  'PHP_ver' => array( 'name' => _("PHP Version"),
57  'type' => SMOPT_TYPE_EXTERNAL,
58  'value' => phpversion() ),
59  /* --------------------------------------------------------*/
60  'Group1' => array( 'name' => _("Organization Preferences"),
61  'type' => SMOPT_TYPE_TITLE ),
62  '$org_name' => array( 'name' => _("Organization Name"),
63  'type' => SMOPT_TYPE_STRING,
64  'size' => 40 ),
65  '$org_logo' => array( 'name' => _("Organization Logo"),
66  'type' => SMOPT_TYPE_PATH,
67  'size' => 40,
68  'default' => '../images/sm_logo.png'),
69  '$org_logo_width' => array( 'name' => _("Organization Logo Width"),
70  'type' => SMOPT_TYPE_STRING,
71  'size' => 5,
72  'default' => 0),
73  '$org_logo_height' => array( 'name' => _("Organization Logo Height"),
74  'type' => SMOPT_TYPE_STRING,
75  'size' => 5,
76  'default' => 0),
77  '$org_title' => array( 'name' => _("Organization Title"),
78  'type' => SMOPT_TYPE_STRING,
79  'size' => 40 ),
80  '$signout_page' => array( 'name' => _("Signout Page"),
81  'type' => SMOPT_TYPE_PATH,
82  'size' => 40 ),
83  '$provider_uri' => array( 'name' => _("Provider Link URI"),
84  'type' => SMOPT_TYPE_STRING ),
85  '$provider_name' => array( 'name' => _("Provider Name"),
86  'type' => SMOPT_TYPE_STRING ),
87  '$frame_top' => array( 'name' => _("Top Frame"),
88  'type' => SMOPT_TYPE_STRING,
89  'size' => 40,
90  'default' => '_top' ),
91  /* --------------------------------------------------------*/
92  'Group2' => array( 'name' => _("Server Settings"),
93  'type' => SMOPT_TYPE_TITLE ),
94  '$domain' => array( 'name' => _("Mail Domain"),
95  'type' => SMOPT_TYPE_STRING,
96  'size' => 40 ),
97  '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
98  'type' => SMOPT_TYPE_STRING,
99  'size' => 40 ),
100  '$imapPort' => array( 'name' => _("IMAP Server Port"),
101  'type' => SMOPT_TYPE_INTEGER ),
102  '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
103  'type' => SMOPT_TYPE_STRLIST,
104  'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
105  'uw' => _("University of Washington's IMAP server"),
106  'exchange' => _("Microsoft Exchange IMAP server"),
107  'courier' => _("Courier IMAP server"),
108  'macosx' => _("Mac OS X Mailserver"),
109  'hmailserver' => _("hMailServer IMAP server"),
110  'mercury32' => _("Mercury/32 IMAP server"),
111  'bincimap' => _("Binc IMAP server"),
112  'dovecot' => _("Dovecot IMAP server"),
113  'other' => _("Not one of the above servers") ) ),
114  '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
115  'type' => SMOPT_TYPE_STRING,
116  'comment' => _("Use &quot;detect&quot; to auto-detect."),
117  'size' => 10,
118  'default' => 'detect' ),
119  '$use_imap_tls' => array( 'name' => _("Use TLS for IMAP Connections"),
120  'type' => SMOPT_TYPE_BOOLEAN,
121  'comment' => _("Requires PHP 4.3.x! Experimental."),
122  'default' => false ),
123  '$imap_auth_mech' => array( 'name' => _("IMAP Authentication Type"),
124  'type' => SMOPT_TYPE_STRLIST,
125  'posvals' => array('login' => _("IMAP login"),
126  'cram-md5' => 'CRAM-MD5',
127  'digest-md5' => 'DIGEST-MD5'),
128  'default' => 'login' ),
129  '$useSendmail' => array( 'name' => _("Use Sendmail Binary"),
130  'type' => SMOPT_TYPE_BOOLEAN,
131  'comment' => _("Choose &quot;no&quot; for SMTP") ),
132  '$sendmail_path' => array( 'name' => _("Sendmail Path"),
133  'type' => SMOPT_TYPE_STRING,
134  'size' => 40 ),
135  '$sendmail_args' => array( 'name' => _("Sendmail Arguments"),
136  'type' => SMOPT_TYPE_STRING,
137  'size' => 40 ),
138  '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
139  'type' => SMOPT_TYPE_STRING,
140  'size' => 40 ),
141  '$smtpPort' => array( 'name' => _("SMTP Server Port"),
142  'type' => SMOPT_TYPE_INTEGER ),
143  '$use_smtp_tls' => array( 'name' => _("Use TLS for SMTP Connections"),
144  'type' => SMOPT_TYPE_BOOLEAN,
145  'comment' => _("Requires PHP 4.3.x! Experimental."),
146  'default' => false ),
147  '$smtp_auth_mech' => array( 'name' => _("SMTP Authentication Type"),
148  'type' => SMOPT_TYPE_STRLIST,
149  'posvals' => array('none' => _("No SMTP auth"),
150  'login' => _("Login (plain text)"),
151  'cram-md5' => 'CRAM-MD5',
152  'digest-md5' => 'DIGEST-MD5'),
153  'default' => 'none'),
154  '$smtp_sitewide_user' => array( 'name' => _("Custom SMTP AUTH username"),
155  'type' => SMOPT_TYPE_STRING,
156  'size' => 40),
157  '$smtp_sitewide_pass' => array( 'name' => _("Custom SMTP AUTH password"),
158  'type' => SMOPT_TYPE_STRING,
159  'size' => 40),
160  '$pop_before_smtp' => array( 'name' => _("POP3 Before SMTP?"),
161  'type' => SMOPT_TYPE_BOOLEAN,
162  'default' => false ),
163  '$encode_header_key' => array( 'name' => _("Header Encryption Key"),
164  'type' => SMOPT_TYPE_STRING ),
165  '$invert_time' => array( 'name' => _("Invert Time"),
166  'type' => SMOPT_TYPE_BOOLEAN ),
167  /* --------------------------------------------------------*/
168  'Group3' => array( 'name' => _("Folders Defaults"),
169  'type' => SMOPT_TYPE_TITLE ),
170  '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
171  'type' => SMOPT_TYPE_STRING,
172  'size' => 40 ),
173  '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
174  'type' => SMOPT_TYPE_BOOLEAN ),
175  '$trash_folder' => array( 'name' => _("Trash Folder"),
176  'type' => SMOPT_TYPE_STRING,
177  'size' => 40 ),
178  '$sent_folder' => array( 'name' => _("Sent Folder"),
179  'type' => SMOPT_TYPE_STRING,
180  'size' => 40 ),
181  '$draft_folder' => array( 'name' => _("Draft Folder"),
182  'type' => SMOPT_TYPE_STRING,
183  'size' => 40 ),
184  '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
185  'type' => SMOPT_TYPE_BOOLEAN ),
186  '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
187  'type' => SMOPT_TYPE_BOOLEAN ),
188  '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
189  'type' => SMOPT_TYPE_BOOLEAN ),
190  '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
191  'type' => SMOPT_TYPE_BOOLEAN ),
192  '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
193  'type' => SMOPT_TYPE_BOOLEAN ),
194  '$auto_expunge' => array( 'name' => _("Auto Expunge"),
195  'type' => SMOPT_TYPE_BOOLEAN ),
196  '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
197  'type' => SMOPT_TYPE_BOOLEAN ),
198  '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
199  'type' => SMOPT_TYPE_BOOLEAN ),
200  '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
201  'type' => SMOPT_TYPE_NUMLIST,
202  'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
203  SMPREF_UNSEEN_INBOX => _("Only INBOX"),
204  SMPREF_UNSEEN_ALL => _("All Folders")) ),
205  '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
206  'type' => SMOPT_TYPE_NUMLIST ,
207  'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
208  SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
209  '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
210  'type' => SMOPT_TYPE_BOOLEAN ),
211  '$delete_folder' => array( 'name' => _("Auto delete folders"),
212  'type' => SMOPT_TYPE_BOOLEAN ),
213  '$noselect_fix_enable' => array( 'name' => _("Enable /NoSelect folder fix"),
214  'type' => SMOPT_TYPE_BOOLEAN,
215  'default' => false),
216  /* --------------------------------------------------------*/
217  'Group4' => array( 'name' => _("General Options"),
218  'type' => SMOPT_TYPE_TITLE ),
219  '$data_dir' => array( 'name' => _("Data Directory"),
220  'type' => SMOPT_TYPE_PATH,
221  'size' => 40 ),
222  '$attachment_dir' => array( 'name' => _("Temp Directory"),
223  'type' => SMOPT_TYPE_PATH,
224  'size' => 40 ),
225  '$dir_hash_level' => array( 'name' => _("Hash Level"),
226  'type' => SMOPT_TYPE_NUMLIST,
227  'posvals' => array( 0 => _("Hash Disabled"),
228  1 => _("Low"),
229  2 => _("Moderate"),
230  3 => _("Medium"),
231  4 => _("High") ) ),
232  '$default_left_size' => array( 'name' => _("Default Left Size"),
233  'type' => SMOPT_TYPE_NUMLIST,
234  'posvals' => $left_size_values ),
235  '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
236  'type' => SMOPT_TYPE_BOOLEAN ),
237  '$default_use_priority' => array( 'name' => _("Allow use of priority"),
238  'type' => SMOPT_TYPE_BOOLEAN ),
239  '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
240  'type' => SMOPT_TYPE_BOOLEAN ),
241  '$default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
242  'type' => SMOPT_TYPE_BOOLEAN ),
243  '$edit_identity' => array( 'name' => _("Allow editing of identities"),
244  'type' => SMOPT_TYPE_BOOLEAN ),
245  '$edit_name' => array( 'name' => _("Allow editing of full name"),
246  'type' => SMOPT_TYPE_BOOLEAN ),
247  '$hide_auth_header' => array( 'name' => _("Remove username from headers"),
248  'comment' => _("Used only when identities can't be modified"),
249  'type' => SMOPT_TYPE_BOOLEAN ),
250  '$allow_server_sort' => array( 'name' => _("Use server-side sorting"),
251  'type' => SMOPT_TYPE_BOOLEAN,
252  'default' => false ),
253  '$allow_thread_sort' => array( 'name' => _("Use server-side thread sorting"),
254  'type' => SMOPT_TYPE_BOOLEAN,
255  'default' => false ),
256  '$allow_charset_search' => array( 'name' => _("Allow server charset search"),
257  'type' => SMOPT_TYPE_BOOLEAN,
258  'default' => false ),
259  '$uid_support' => array( 'name' => _("UID support"),
260  'type' => SMOPT_TYPE_BOOLEAN,
261  'default' => false ),
262  '$session_name' => array( 'name' => _("PHP session name"),
263  'type' => SMOPT_TYPE_HIDDEN ),
264  '$config_location_base' => array( 'name' => _("Location base"),
265  'type' => SMOPT_TYPE_STRING,
266  'size' => 40,
267  'default' => '' ),
268  /* --------------------------------------------------------*/
269  'Group5' => array( 'name' => _("Message of the Day"),
270  'type' => SMOPT_TYPE_TITLE ),
271  '$motd' => array( 'name' => _("Message of the Day"),
272  'type' => SMOPT_TYPE_TEXTAREA,
273  'size' => 40 ),
274  /* ---- Database settings ---- */
275  'Group6' => array( 'name' => _("Database"),
276  'type' => SMOPT_TYPE_TITLE ),
277  '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
278  'type' => SMOPT_TYPE_STRING,
279  'size' => 40 ),
280  '$addrbook_table' => array( 'name' => _("Address book table"),
281  'type' => SMOPT_TYPE_STRING,
282  'size' => 40,
283  'default' => 'address' ),
284  '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
285  'type' => SMOPT_TYPE_STRING,
286  'size' => 40 ),
287  '$prefs_table' => array( 'name' => _("Preferences table"),
288  'type' => SMOPT_TYPE_STRING,
289  'size' => 40,
290  'default' => 'userprefs' ),
291  '$prefs_user_field' => array('name' => _("Preferences username field"),
292  'type' => SMOPT_TYPE_STRING,
293  'size' => 40,
294  'default' => 'user' ),
295  '$prefs_key_field' => array('name' => _("Preferences key field"),
296  'type' => SMOPT_TYPE_STRING,
297  'size' => 40,
298  'default' => 'prefkey' ),
299  '$prefs_val_field' => array('name' => _("Preferences value field"),
300  'type' => SMOPT_TYPE_STRING,
301  'size' => 40,
302  'default' => 'prefval' ),
303  '$addrbook_global_dsn' => array( 'name' => _("Global address book DSN"),
304  'type' => SMOPT_TYPE_STRING,
305  'size' => 40 ),
306  '$addrbook_global_table' => array( 'name' => _("Global address book table"),
307  'type' => SMOPT_TYPE_STRING,
308  'size' => 40,
309  'default' => 'global_abook' ),
310  '$addrbook_global_writeable' => array( 'name' => _("Allow writing into global address book"),
311  'type' => SMOPT_TYPE_BOOLEAN ),
312  '$addrbook_global_listing' => array( 'name' => _("Allow listing of global address book"),
313  'type' => SMOPT_TYPE_BOOLEAN ),
314  /* ---- Language settings ---- */
315  'Group9' => array( 'name' => _("Language settings"),
316  'type' => SMOPT_TYPE_TITLE ),
317  '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
318  'type' => SMOPT_TYPE_STRLIST,
319  'size' => 7,
320  'posvals' => $language_values ),
321  '$default_charset' => array( 'name' => _("Default Charset"),
322  'type' => SMOPT_TYPE_STRLIST,
323  'posvals' => array( 'iso-8859-1' => 'iso-8859-1',
324  'iso-8859-2' => 'iso-8859-2',
325  'iso-8859-7' => 'iso-8859-7',
326  'iso-8859-9' => 'iso-8859-9',
327  'iso-8859-15' => 'iso-8859-15',
328  'utf-8' => 'utf-8',
329  'koi8-r' => 'koi8-r',
330  'euc-kr' => 'euc-kr',
331  'big5' => 'big5',
332  'gb2312' => 'gb2312',
333  'tis-620' => 'tis-620',
334  'windows-1251' => 'windows-1251',
335  'windows-1255' => 'windows-1255',
336  'windows-1256' => 'windows-1256',
337  'iso-2022-jp' => 'iso-2022-jp' ) ),
338  '$lossy_encoding' => array( 'name' => _("Enable lossy encoding"),
339  'type' => SMOPT_TYPE_BOOLEAN ),
340  /* ---- Settings of address books ---- */
341  'Group10' => array( 'name' => _("Address Books"),
342  'type' => SMOPT_TYPE_TITLE ),
343  '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Addressbook"),
344  'type' => SMOPT_TYPE_BOOLEAN ),
345  '$abook_global_file' => array( 'name' => _("Global address book file"),
346  'type' => SMOPT_TYPE_STRING ),
347  '$abook_global_file_writeable' => array( 'name' => _("Allow writing into global address book file"),
348  'type' => SMOPT_TYPE_BOOLEAN ),
349  /* --------------------------------------------------------*/
350  'Group7' => array( 'name' => _("Themes"),
351  'type' => SMOPT_TYPE_TITLE ),
352  '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
353  'type' => SMOPT_TYPE_PATH,
354  'size' => 40 ),
355  '$theme_default' => array( 'name' => _("Default theme"),
356  'type' => SMOPT_TYPE_INTEGER,
357  'default' => 0,
358  'comment' => _("Use index number of theme") ),
359  /* --------------------------------------------------------*/
360  '$config_use_color' => array( 'name' => '',
361  'type' => SMOPT_TYPE_HIDDEN ),
362  '$no_list_for_subscribe' => array( 'name' => '',
363  'type' => SMOPT_TYPE_HIDDEN ),
364  /* --------------------------------------------------------*/
365 
366  );
$languages
global $languages
Definition: defines.php:35
$defcfg
for($lsv=100; $lsv<=300; $lsv+=10) $defcfg
Definition: defines.php:50
SMOPT_TYPE_PATH
const SMOPT_TYPE_PATH
Definition: defines.php:33
SMPREF_UNSEEN_NONE
const SMPREF_UNSEEN_NONE
Definition: constants.php:39
SMOPT_TYPE_BOOLEAN
const SMOPT_TYPE_BOOLEAN
Definition: defines.php:24
SMOPT_TYPE_NUMLIST
const SMOPT_TYPE_NUMLIST
Definition: defines.php:27
SMPREF_UNSEEN_ONLY
const SMPREF_UNSEEN_ONLY
Definition: constants.php:44
SMPREF_UNSEEN_ALL
const SMPREF_UNSEEN_ALL
Definition: constants.php:41
SMOPT_TYPE_STRLIST
const SMOPT_TYPE_STRLIST
Definition: defines.php:20
SMOPT_TYPE_EXTERNAL
const SMOPT_TYPE_EXTERNAL
Definition: defines.php:32
SMPREF_UNSEEN_TOTAL
const SMPREF_UNSEEN_TOTAL
Definition: constants.php:45
$left_size_values
$left_size_values
Definition: defines.php:45
SM_PATH
const SM_PATH
Definition: decrypt_headers.php:16
$language_values
$language_values
Definition: defines.php:37
_
_($str)
Definition: gettext.php:160
SMPREF_UNSEEN_INBOX
const SMPREF_UNSEEN_INBOX
Definition: constants.php:40
SMOPT_TYPE_COMMENT
const SMOPT_TYPE_COMMENT
Definition: defines.php:26
SMOPT_TYPE_STRING
const SMOPT_TYPE_STRING
Definition: defines.php:19
SMOPT_TYPE_TITLE
const SMOPT_TYPE_TITLE
Definition: defines.php:28
SMOPT_TYPE_INTEGER
const SMOPT_TYPE_INTEGER
Definition: defines.php:22
SMOPT_TYPE_TEXTAREA
const SMOPT_TYPE_TEXTAREA
Definition: defines.php:21
SMOPT_TYPE_HIDDEN
const SMOPT_TYPE_HIDDEN
Definition: defines.php:25