The 2000000 bugfix
[squirrelmail.git] / plugins / administrator / defines.php
CommitLineData
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
5ed13ec8 14require_once( '../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);
abd7a3f8 32
33global $languages;
34
35be4418 35$language_values = array( );
abd7a3f8 36foreach ($languages as $lang_key => $lang_attributes) {
37 if (isset($lang_attributes['NAME'])) {
38 $language_values[$lang_key] = $lang_attributes['NAME'];
39 }
40}
41asort( $language_values );
35be4418 42$language_values = array_merge(array('' => _("Default")), $language_values);
dcd6f144 43$left_size_values = array();
44for ($lsv = 100; $lsv <= 300; $lsv += 10) {
45 $left_size_values[$lsv] = "$lsv " . _("pixels");
46}
47
0e66bc84 48$defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
49 'type' => SMOPT_TYPE_COMMENT,
abd7a3f8 50 'size' => 7 ),
88cb1b4d 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() ),
0e66bc84 57 /* --------------------------------------------------------*/
58 'Group1' => array( 'name' => _("Organization Preferences"),
59 'type' => SMOPT_TYPE_TITLE ),
60 '$org_name' => array( 'name' => _("Organization Name"),
abd7a3f8 61 'type' => SMOPT_TYPE_STRING,
62 'size' => 40 ),
0e66bc84 63 '$org_logo' => array( 'name' => _("Organization Logo"),
abd7a3f8 64 'type' => SMOPT_TYPE_STRING,
65 'size' => 40 ),
0e66bc84 66 '$org_title' => array( 'name' => _("Organization Title"),
abd7a3f8 67 'type' => SMOPT_TYPE_STRING,
68 'size' => 40 ),
0e66bc84 69 '$signout_page' => array( 'name' => _("Signout Page"),
70 'type' => SMOPT_TYPE_STRING,
71 'size' => 40 ),
abd7a3f8 72 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
73 'type' => SMOPT_TYPE_STRLIST,
74 'size' => 7,
75 'posvals' => $language_values ),
dcd6f144 76 '$frame_top' => array( 'name' => _("Top Frame"),
77 'type' => SMOPT_TYPE_STRING,
feba1a41 78 'size' => 40,
79 'default' => '_top' ),
0e66bc84 80 /* --------------------------------------------------------*/
81 'Group2' => array( 'name' => _("Server Settings"),
82 'type' => SMOPT_TYPE_TITLE ),
83 '$domain' => array( 'name' => _("Mail Domain"),
88cb1b4d 84 'type' => SMOPT_TYPE_STRING,
85 'size' => 40 ),
abd7a3f8 86 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
87 'type' => SMOPT_TYPE_STRING,
88 'size' => 40 ),
89 '$imapPort' => array( 'name' => _("IMAP Server Port"),
88cb1b4d 90 'type' => SMOPT_TYPE_INTEGER ),
0e66bc84 91 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
92 'type' => SMOPT_TYPE_STRLIST,
0e66bc84 93 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
94 'uw' => _("University of Washington's IMAP server"),
95 'exchange' => _("Microsoft Exchange IMAP server"),
96 'courier' => _("Courier IMAP server"),
97 'other' => _("Not one of the above servers") ) ),
98 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
99 'type' => SMOPT_TYPE_STRING,
edd4a552 100 'comment' => _("Use \"detect\" to auto-detect."),
2586d588 101 'size' => 10,
102 'default' => 'detect' ),
0e66bc84 103 '$useSendmail' => array( 'name' => _("Use Sendmail"),
104 'type' => SMOPT_TYPE_BOOLEAN ),
dcd6f144 105 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
106 'type' => SMOPT_TYPE_STRING,
107 'size' => 40 ),
abd7a3f8 108 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
109 'type' => SMOPT_TYPE_STRING,
110 'size' => 40 ),
111 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
88cb1b4d 112 'type' => SMOPT_TYPE_INTEGER ),
0e66bc84 113 '$use_authenticated_smtp' => array( 'name' => _("Authenticated SMTP"),
114 'type' => SMOPT_TYPE_BOOLEAN ),
115 '$invert_time' => array( 'name' => _("Invert Time"),
116 'type' => SMOPT_TYPE_BOOLEAN ),
117 /* --------------------------------------------------------*/
118 'Group3' => array( 'name' => _("Folders Defaults"),
119 'type' => SMOPT_TYPE_TITLE ),
dcd6f144 120 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
121 'type' => SMOPT_TYPE_STRING,
122 'size' => 40 ),
123 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
124 'type' => SMOPT_TYPE_BOOLEAN ),
125 '$trash_folder' => array( 'name' => _("Trash Folder"),
126 'type' => SMOPT_TYPE_STRING,
127 'size' => 40 ),
128 '$sent_folder' => array( 'name' => _("Sent Folder"),
129 'type' => SMOPT_TYPE_STRING,
130 'size' => 40 ),
131 '$draft_folder' => array( 'name' => _("Draft Folder"),
132 'type' => SMOPT_TYPE_STRING,
133 'size' => 40 ),
134 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
135 'type' => SMOPT_TYPE_BOOLEAN ),
136 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
137 'type' => SMOPT_TYPE_BOOLEAN ),
138 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
139 'type' => SMOPT_TYPE_BOOLEAN ),
140 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
141 'type' => SMOPT_TYPE_BOOLEAN ),
142 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
143 'type' => SMOPT_TYPE_BOOLEAN ),
144 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
145 'type' => SMOPT_TYPE_BOOLEAN ),
146 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
147 'type' => SMOPT_TYPE_BOOLEAN ),
148 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
149 'type' => SMOPT_TYPE_BOOLEAN ),
150 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
5ed13ec8 151 'type' => SMOPT_TYPE_NUMLIST,
152 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
153 SMPREF_UNSEEN_INBOX => _("Only INBOX"),
154 SMPREF_UNSEEN_ALL => _("All Folders")) ),
dcd6f144 155 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
5ed13ec8 156 'type' => SMOPT_TYPE_NUMLIST ,
157 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
158 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
dcd6f144 159 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
160 'type' => SMOPT_TYPE_BOOLEAN ),
e91cf665 161 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Adrressbook"),
162 'type' => SMOPT_TYPE_BOOLEAN ),
dcd6f144 163 /* --------------------------------------------------------*/
d0102e1a 164 'Group4' => array( 'name' => _("General Options"),
dcd6f144 165 'type' => SMOPT_TYPE_TITLE ),
166 '$default_charset' => array( 'name' => _("Default Charset"),
edd4a552 167 'type' => SMOPT_TYPE_STRLIST,
168 'posvals' => array( 'iso_8859_1' => 'iso_8859_1',
169 'iso_8859_2' => 'iso_8859_2',
170 'iso_8859_7' => 'iso_8859_7',
171 'iso_8859_15' => 'iso_8859_15',
172 'iso_8859_15' => 'iso_8859_15',
173 'ns_4551_1' => 'ns_4551_1',
174 'koi8-r' => 'koi8-r',
175 'euc-KR' => 'euc-KR',
176 'windows-1251' => 'windows-1251' ) ),
dcd6f144 177 '$data_dir' => array( 'name' => _("Data Directory"),
178 'type' => SMOPT_TYPE_STRING,
179 'size' => 40 ),
180 '$attachment_dir' => array( 'name' => _("Temp Directory"),
abd7a3f8 181 'type' => SMOPT_TYPE_STRING,
182 'size' => 40 ),
dcd6f144 183 '$dir_hash_level' => array( 'name' => _("Hash Level"),
184 'type' => SMOPT_TYPE_NUMLIST,
185 'posvals' => array( 0 => _("Hash Disabled"),
186 1 => _("Low"),
187 2 => _("Moderate"),
188 3 => _("Medium"),
189 4 => _("High") ) ),
edd4a552 190 '$default_left_size' => array( 'name' => _("Default Left Size"),
dcd6f144 191 'type' => SMOPT_TYPE_NUMLIST,
192 'posvals' => $left_size_values ),
193 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
194 'type' => SMOPT_TYPE_BOOLEAN ),
195 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
196 'type' => SMOPT_TYPE_BOOLEAN ),
197 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
198 'type' => SMOPT_TYPE_BOOLEAN ),
199 /* --------------------------------------------------------*/
edd4a552 200 'Group5' => array( 'name' => _("Message of the Day"),
201 'type' => SMOPT_TYPE_TITLE ),
202 '$motd' => array( 'name' => _("Message of the Day"),
203 'type' => SMOPT_TYPE_TEXTAREA,
204 'size' => 40 ),
205 /* --------------------------------------------------------*/
497203d4 206 'Group6' => array( 'name' => _("Database"),
207 'type' => SMOPT_TYPE_TITLE ),
208 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
209 'type' => SMOPT_TYPE_STRING,
88cb1b4d 210 'size' => 40 ),
4f40a59d 211 '$addrbook_table' => array( 'name' => _("Address book table"),
212 'type' => SMOPT_TYPE_STRING,
2586d588 213 'size' => 40,
214 'default' => 'address' ),
497203d4 215 /* --------------------------------------------------------*/
216 'Group7' => array( 'name' => _("Themes"),
edd4a552 217 'type' => SMOPT_TYPE_TITLE ),
218 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
219 'type' => SMOPT_TYPE_STRING,
220 'size' => 40 ),
221 /* --------------------------------------------------------*/
88cb1b4d 222 '$config_use_color' => array( 'name' => '',
223 'type' => SMOPT_TYPE_HIDDEN )
497203d4 224 /* --------------------------------------------------------*/
dcd6f144 225
edd4a552 226 );
dcd6f144 227
4f40a59d 228?>