abd7a3f8 |
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 | |
15 | /* Define constants for the various option types. */ |
16 | define('SMOPT_TYPE_UNDEFINED', -1); |
17 | define('SMOPT_TYPE_STRING', 0); |
18 | define('SMOPT_TYPE_STRLIST', 1); |
19 | define('SMOPT_TYPE_TEXTAREA', 2); |
20 | define('SMOPT_TYPE_INTEGER', 3); |
21 | define('SMOPT_TYPE_FLOAT', 4); |
22 | define('SMOPT_TYPE_BOOLEAN', 5); |
23 | define('SMOPT_TYPE_HIDDEN', 6); |
24 | define('SMOPT_TYPE_COMMENT', 7); |
0e66bc84 |
25 | define('SMOPT_TYPE_TITLE', 128); |
abd7a3f8 |
26 | |
27 | /* Define constants for the options refresh levels. */ |
28 | define('SMOPT_REFRESH_NONE', 0); |
29 | define('SMOPT_REFRESH_FOLDERLIST', 1); |
30 | define('SMOPT_REFRESH_ALL', 2); |
31 | |
32 | /* Define constants for the options size. */ |
33 | define('SMOPT_SIZE_TINY', 0); |
34 | define('SMOPT_SIZE_SMALL', 1); |
35 | define('SMOPT_SIZE_MEDIUM', 2); |
36 | define('SMOPT_SIZE_LARGE', 3); |
37 | define('SMOPT_SIZE_HUGE', 4); |
38 | |
39 | define('SMOPT_SAVE_DEFAULT', 'save_option'); |
40 | define('SMOPT_SAVE_NOOP', 'save_option_noop'); |
41 | |
42 | global $languages; |
43 | |
44 | $language_values = array(); |
45 | foreach ($languages as $lang_key => $lang_attributes) { |
46 | if (isset($lang_attributes['NAME'])) { |
47 | $language_values[$lang_key] = $lang_attributes['NAME']; |
48 | } |
49 | } |
50 | asort( $language_values ); |
51 | |
0e66bc84 |
52 | $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"), |
53 | 'type' => SMOPT_TYPE_COMMENT, |
abd7a3f8 |
54 | 'size' => 7 ), |
0e66bc84 |
55 | /* --------------------------------------------------------*/ |
56 | 'Group1' => array( 'name' => _("Organization Preferences"), |
57 | 'type' => SMOPT_TYPE_TITLE ), |
58 | '$org_name' => array( 'name' => _("Organization Name"), |
abd7a3f8 |
59 | 'type' => SMOPT_TYPE_STRING, |
60 | 'size' => 40 ), |
0e66bc84 |
61 | '$org_logo' => array( 'name' => _("Organization Logo"), |
abd7a3f8 |
62 | 'type' => SMOPT_TYPE_STRING, |
63 | 'size' => 40 ), |
0e66bc84 |
64 | '$org_title' => array( 'name' => _("Organization Title"), |
abd7a3f8 |
65 | 'type' => SMOPT_TYPE_STRING, |
66 | 'size' => 40 ), |
0e66bc84 |
67 | '$signout_page' => array( 'name' => _("Signout Page"), |
68 | 'type' => SMOPT_TYPE_STRING, |
69 | 'size' => 40 ), |
abd7a3f8 |
70 | '$squirrelmail_default_language' => array( 'name' => _("Default Language"), |
71 | 'type' => SMOPT_TYPE_STRLIST, |
72 | 'size' => 7, |
73 | 'posvals' => $language_values ), |
0e66bc84 |
74 | /* --------------------------------------------------------*/ |
75 | 'Group2' => array( 'name' => _("Server Settings"), |
76 | 'type' => SMOPT_TYPE_TITLE ), |
77 | '$domain' => array( 'name' => _("Mail Domain"), |
78 | 'type' => SMOPT_TYPE_STRING, |
79 | 'size' => 40 ), |
abd7a3f8 |
80 | '$imapServerAddress' => array( 'name' => _("IMAP Server Address"), |
81 | 'type' => SMOPT_TYPE_STRING, |
82 | 'size' => 40 ), |
83 | '$imapPort' => array( 'name' => _("IMAP Server Port"), |
84 | 'type' => SMOPT_TYPE_INTEGER ), |
0e66bc84 |
85 | '$imap_server_type' => array( 'name' => _("IMAP Server Type"), |
86 | 'type' => SMOPT_TYPE_STRLIST, |
87 | 'size' => 7, |
88 | 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"), |
89 | 'uw' => _("University of Washington's IMAP server"), |
90 | 'exchange' => _("Microsoft Exchange IMAP server"), |
91 | 'courier' => _("Courier IMAP server"), |
92 | 'other' => _("Not one of the above servers") ) ), |
93 | '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"), |
94 | 'type' => SMOPT_TYPE_STRING, |
95 | 'size' => 2 ), |
96 | '$useSendmail' => array( 'name' => _("Use Sendmail"), |
97 | 'type' => SMOPT_TYPE_BOOLEAN ), |
abd7a3f8 |
98 | '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"), |
99 | 'type' => SMOPT_TYPE_STRING, |
100 | 'size' => 40 ), |
101 | '$smtpPort' => array( 'name' => _("SMTP Server Port"), |
102 | 'type' => SMOPT_TYPE_INTEGER ), |
0e66bc84 |
103 | '$use_authenticated_smtp' => array( 'name' => _("Authenticated SMTP"), |
104 | 'type' => SMOPT_TYPE_BOOLEAN ), |
105 | '$invert_time' => array( 'name' => _("Invert Time"), |
106 | 'type' => SMOPT_TYPE_BOOLEAN ), |
107 | /* --------------------------------------------------------*/ |
108 | 'Group3' => array( 'name' => _("Folders Defaults"), |
109 | 'type' => SMOPT_TYPE_TITLE ), |
abd7a3f8 |
110 | '$motd' => array( 'name' => _("Message of the Day"), |
111 | 'type' => SMOPT_TYPE_STRING, |
112 | 'size' => 40 ), |
0e66bc84 |
113 | |
abd7a3f8 |
114 | ); |
115 | |
116 | ?> |