iso_xxxx_x should be iso-xxxx-x. #550725
[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_logo_width' => array( 'name' => _("Organization Logo Width"),
67 'type' => SMOPT_TYPE_INTEGER,
68 'size' => 5,
69 'default' => 0),
70 '$org_logo_height' => array( 'name' => _("Organization Logo Height"),
71 'type' => SMOPT_TYPE_INTEGER,
72 'size' => 5,
73 'default' => 0),
74 '$org_title' => array( 'name' => _("Organization Title"),
75 'type' => SMOPT_TYPE_STRING,
76 'size' => 40 ),
77 '$signout_page' => array( 'name' => _("Signout Page"),
78 'type' => SMOPT_TYPE_STRING,
79 'size' => 40 ),
80 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
81 'type' => SMOPT_TYPE_STRLIST,
82 'size' => 7,
83 'posvals' => $language_values ),
84 '$frame_top' => array( 'name' => _("Top Frame"),
85 'type' => SMOPT_TYPE_STRING,
86 'size' => 40,
87 'default' => '_top' ),
88 /* --------------------------------------------------------*/
89 'Group2' => array( 'name' => _("Server Settings"),
90 'type' => SMOPT_TYPE_TITLE ),
91 '$domain' => array( 'name' => _("Mail Domain"),
92 'type' => SMOPT_TYPE_STRING,
93 'size' => 40 ),
94 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
95 'type' => SMOPT_TYPE_STRING,
96 'size' => 40 ),
97 '$imapPort' => array( 'name' => _("IMAP Server Port"),
98 'type' => SMOPT_TYPE_INTEGER ),
99 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
100 'type' => SMOPT_TYPE_STRLIST,
101 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
102 'uw' => _("University of Washington's IMAP server"),
103 'exchange' => _("Microsoft Exchange IMAP server"),
104 'courier' => _("Courier IMAP server"),
105 'other' => _("Not one of the above servers") ) ),
106 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
107 'type' => SMOPT_TYPE_STRING,
108 'comment' => _("Use \"detect\" to auto-detect."),
109 'size' => 10,
110 'default' => 'detect' ),
111 '$useSendmail' => array( 'name' => _("Use Sendmail"),
112 'type' => SMOPT_TYPE_BOOLEAN ),
113 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
114 'type' => SMOPT_TYPE_STRING,
115 'size' => 40 ),
116 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
117 'type' => SMOPT_TYPE_STRING,
118 'size' => 40 ),
119 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
120 'type' => SMOPT_TYPE_INTEGER ),
121 '$use_authenticated_smtp' => array( 'name' => _("Authenticated SMTP"),
122 'type' => SMOPT_TYPE_BOOLEAN ),
123 '$invert_time' => array( 'name' => _("Invert Time"),
124 'type' => SMOPT_TYPE_BOOLEAN ),
125 '$default_use_mdn' => array( 'name' => _("Use Confirmation Flags"),
126 'type' => SMOPT_TYPE_BOOLEAN ),
127 /* --------------------------------------------------------*/
128 'Group3' => array( 'name' => _("Folders Defaults"),
129 'type' => SMOPT_TYPE_TITLE ),
130 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
131 'type' => SMOPT_TYPE_STRING,
132 'size' => 40 ),
133 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
134 'type' => SMOPT_TYPE_BOOLEAN ),
135 '$trash_folder' => array( 'name' => _("Trash Folder"),
136 'type' => SMOPT_TYPE_STRING,
137 'size' => 40 ),
138 '$sent_folder' => array( 'name' => _("Sent Folder"),
139 'type' => SMOPT_TYPE_STRING,
140 'size' => 40 ),
141 '$draft_folder' => array( 'name' => _("Draft Folder"),
142 'type' => SMOPT_TYPE_STRING,
143 'size' => 40 ),
144 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
145 'type' => SMOPT_TYPE_BOOLEAN ),
146 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
147 'type' => SMOPT_TYPE_BOOLEAN ),
148 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
149 'type' => SMOPT_TYPE_BOOLEAN ),
150 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
151 'type' => SMOPT_TYPE_BOOLEAN ),
152 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
153 'type' => SMOPT_TYPE_BOOLEAN ),
154 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
155 'type' => SMOPT_TYPE_BOOLEAN ),
156 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
157 'type' => SMOPT_TYPE_BOOLEAN ),
158 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
159 'type' => SMOPT_TYPE_BOOLEAN ),
160 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
161 'type' => SMOPT_TYPE_NUMLIST,
162 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
163 SMPREF_UNSEEN_INBOX => _("Only INBOX"),
164 SMPREF_UNSEEN_ALL => _("All Folders")) ),
165 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
166 'type' => SMOPT_TYPE_NUMLIST ,
167 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
168 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
169 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
170 'type' => SMOPT_TYPE_BOOLEAN ),
171 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Adrressbook"),
172 'type' => SMOPT_TYPE_BOOLEAN ),
173 '$delete_folder' => array( 'name' => _("Auto delete folders"),
174 'type' => SMOPT_TYPE_BOOLEAN ),
175 /* --------------------------------------------------------*/
176 'Group4' => array( 'name' => _("General Options"),
177 'type' => SMOPT_TYPE_TITLE ),
178 '$default_charset' => array( 'name' => _("Default Charset"),
179 'type' => SMOPT_TYPE_STRLIST,
180 'posvals' => array( 'iso-8859-1' => 'iso-8859-1',
181 'iso-8859-2' => 'iso-8859-2',
182 'iso-8859-7' => 'iso-8859-7',
183 'iso-8859-15' => 'iso-8859-15',
184 'iso-8859-15' => 'iso-8859-15',
185 'ns_4551_1' => 'ns_4551_1',
186 'koi8-r' => 'koi8-r',
187 'euc-KR' => 'euc-KR',
188 'windows-1251' => 'windows-1251' ) ),
189 '$data_dir' => array( 'name' => _("Data Directory"),
190 'type' => SMOPT_TYPE_STRING,
191 'size' => 40 ),
192 '$attachment_dir' => array( 'name' => _("Temp Directory"),
193 'type' => SMOPT_TYPE_STRING,
194 'size' => 40 ),
195 '$dir_hash_level' => array( 'name' => _("Hash Level"),
196 'type' => SMOPT_TYPE_NUMLIST,
197 'posvals' => array( 0 => _("Hash Disabled"),
198 1 => _("Low"),
199 2 => _("Moderate"),
200 3 => _("Medium"),
201 4 => _("High") ) ),
202 '$default_left_size' => array( 'name' => _("Default Left Size"),
203 'type' => SMOPT_TYPE_NUMLIST,
204 'posvals' => $left_size_values ),
205 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
206 'type' => SMOPT_TYPE_BOOLEAN ),
207 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
208 'type' => SMOPT_TYPE_BOOLEAN ),
209 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
210 'type' => SMOPT_TYPE_BOOLEAN ),
211 'default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
212 'type' => SMOPT_TYPE_BOOLEAN ),
213 '$edit_identity' => array( 'name' => _("Allow editing of identities"),
214 'type' => SMOPT_TYPE_BOOLEAN ),
215 '$edit_name' => array( 'name' => _("Allow editing of full name"),
216 'type' => SMOPT_TYPE_BOOLEAN ),
217 /* --------------------------------------------------------*/
218 'Group5' => array( 'name' => _("Message of the Day"),
219 'type' => SMOPT_TYPE_TITLE ),
220 '$motd' => array( 'name' => _("Message of the Day"),
221 'type' => SMOPT_TYPE_TEXTAREA,
222 'size' => 40 ),
223 /* --------------------------------------------------------*/
224 'Group6' => array( 'name' => _("Database"),
225 'type' => SMOPT_TYPE_TITLE ),
226 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
227 'type' => SMOPT_TYPE_STRING,
228 'size' => 40 ),
229 '$addrbook_table' => array( 'name' => _("Address book table"),
230 'type' => SMOPT_TYPE_STRING,
231 'size' => 40,
232 'default' => 'address' ),
233 '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
234 'type' => SMOPT_TYPE_STRING,
235 'size' => 40 ),
236 '$prefs_table' => array( 'name' => _("Preferences table"),
237 'type' => SMOPT_TYPE_STRING,
238 'size' => 40,
239 'default' => 'userprefs' ),
240 '$prefs_user_field' => array('name' => _("Preferences username field"),
241 'type' => SMOPT_TYPE_STRING,
242 'size' => 40,
243 'default' => 'user' ),
244 '$prefs_key_field' => array('name' => _("Preferences key field"),
245 'type' => SMOPT_TYPE_STRING,
246 'size' => 40,
247 'default' => 'prefkey' ),
248 '$prefs_val_field' => array('name' => _("Preferences value field"),
249 'type' => SMOPT_TYPE_STRING,
250 'size' => 40,
251 'default' => 'prefval' ),
252 /* --------------------------------------------------------*/
253 'Group7' => array( 'name' => _("Themes"),
254 'type' => SMOPT_TYPE_TITLE ),
255 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
256 'type' => SMOPT_TYPE_STRING,
257 'size' => 40 ),
258 /* --------------------------------------------------------*/
259 '$config_use_color' => array( 'name' => '',
260 'type' => SMOPT_TYPE_HIDDEN )
261 /* --------------------------------------------------------*/
262
263 );
264
265 ?>