Aleksander Machniak
2016-05-06 acf633c73bc8df9a5036bc52d7568f4213ab73c7
commit | author | age
619c32 1 <?php
TB 2
3 if (!class_exists('rcube_install') || !is_object($RCI)) {
4     die("Not allowed! Please open installer/index.php instead.");
5 }
6
7 ?>
354978 8 <form action="index.php" method="post">
T 9 <input type="hidden" name="_step" value="2" />
10 <?php
11
27564f 12 // register these boolean fields
871ca9 13 $RCI->bool_config_props = array(
27564f 14   'ip_check' => 1,
T 15   'enable_spellcheck' => 1,
16   'auto_create_user' => 1,
17   'smtp_log' => 1,
18   'prefer_html' => 1,
19   'preview_pane' => 1,
b77d0d 20   'debug_level' => 1,
27564f 21 );
T 22
967b34 23 // allow the current user to get to the next step
T 24 $_SESSION['allowinstaller'] = true;
25
c5042d 26 if (!empty($_POST['submit'])) {
77d534 27   $_SESSION['config'] = $RCI->create_config();
461a30 28
fd6b19 29   if ($RCI->save_configfile($_SESSION['config'])) {
57a197 30      echo '<p class="notice">The config file was saved successfully into <tt>'.RCMAIL_CONFIG_DIR.'</tt> directory of your Roundcube installation.';
77d534 31
fd6b19 32      if ($RCI->legacy_config) {
57a197 33         echo '<br/><br/>Afterwards, please <b>remove</b> the old configuration files <tt>main.inc.php</tt> and <tt>db.inc.php</tt> from the config directory.';
D 34      }
77d534 35
57a197 36      echo '</p>';
77d534 37   }
fd6b19 38   else {
TB 39     echo '<p class="notice">Copy or download the following configuration and save it';
40     echo ' as <tt><b>config.inc.php</b></tt> within the <tt>'.RCUBE_CONFIG_DIR.'</tt> directory of your Roundcube installation.<br/>';
41     echo ' Make sure that there are no characters outside the <tt>&lt;?php ?&gt;</tt> brackets when saving the file.';
42     echo '&nbsp;<input type="button" onclick="location.href=\'index.php?_getconfig=1\'" value="Download" />';
77d534 43
fd6b19 44     if ($RCI->legacy_config) {
TB 45        echo '<br/><br/>Afterwards, please <b>remove</b> the old configuration files <tt>main.inc.php</tt> and <tt>db.inc.php</tt> from the config directory.';
46     }
77d534 47
fd6b19 48     echo '</p>';
77d534 49
fd6b19 50     $textbox = new html_textarea(array('rows' => 16, 'cols' => 60, 'class' => "configfile"));
TB 51     echo $textbox->show(($_SESSION['config']));
77d534 52   }
27564f 53
T 54   echo '<p class="hint">Of course there are more options to configure.
77d534 55     Have a look at the defaults.inc.php file or visit <a href="http://trac.roundcube.net/wiki/Howto_Config" target="_blank">Howto_Config</a> to find out.</p>';
c5042d 56
T 57   echo '<p><input type="button" onclick="location.href=\'./index.php?_step=3\'" value="CONTINUE" /></p>';
461a30 58
c5042d 59   // echo '<style type="text/css"> .configblock { display:none } </style>';
T 60   echo "\n<hr style='margin-bottom:1.6em' />\n";
61 }
354978 62
T 63 ?>
64 <fieldset>
65 <legend>General configuration</legend>
c5042d 66 <dl class="configblock">
354978 67
T 68 <dt class="propname">product_name</dt>
69 <dd>
70 <?php
71
47124c 72 $input_prodname = new html_inputfield(array('name' => '_product_name', 'size' => 30, 'id' => "cfgprodname"));
354978 73 echo $input_prodname->show($RCI->getprop('product_name'));
T 74
75 ?>
76 <div>The name of your service (used to compose page titles)</div>
77 </dd>
78
c04b23 79 <dt class="propname">support_url</dt>
T 80 <dd>
81 <?php
82
83 $input_support = new html_inputfield(array('name' => '_support_url', 'size' => 50, 'id' => "cfgsupporturl"));
84 echo $input_support->show($RCI->getprop('support_url'));
85
86 ?>
87 <div>Provide an URL where a user can get support for this Roundcube installation.<br/>PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!</div>
88 <p class="hint">Enter an absolute URL (inculding http://) to a support page/form or a mailto: link.</p>
89 </dd>
90
91 <dt class="propname">skin_logo</dt>
92 <dd>
93 <?php
94
95 $input_skin = new html_inputfield(array('name' => '_skin_logo', 'size' => 50, 'id' => "cfgskinlogo"));
96 echo $input_skin->show($RCI->getprop('skin_logo'));
97
98 ?>
99 <div>Custom image to display instead of the Roundcube logo.</div>
100 <p class="hint">Enter a URL relative to the document root of this Roundcube installation.</p>
101 </dd>
102
354978 103 <dt class="propname">temp_dir</dt>
T 104 <dd>
105 <?php
106
47124c 107 $input_tempdir = new html_inputfield(array('name' => '_temp_dir', 'size' => 30, 'id' => "cfgtempdir"));
354978 108 echo $input_tempdir->show($RCI->getprop('temp_dir'));
T 109
110 ?>
a91c9b 111 <div>Use this folder to store temp files (must be writeable for webserver)</div>
354978 112 </dd>
T 113
114 <dt class="propname">des_key</dt>
115 <dd>
116 <?php
117
47124c 118 $input_deskey = new html_inputfield(array('name' => '_des_key', 'size' => 30, 'id' => "cfgdeskey"));
354978 119 echo $input_deskey->show($RCI->getprop('des_key'));
T 120
121 ?>
122 <div>This key is used to encrypt the users imap password before storing in the session record</div>
2912de 123 <p class="hint">It's a random generated string to ensure that every installation has its own key.
354978 124 If you enter it manually please provide a string of exactly 24 chars.</p>
c04b23 125 </dd>
T 126
127 <dt class="propname">ip_check</dt>
128 <dd>
129 <?php
130
131 $check_ipcheck = new html_checkbox(array('name' => '_ip_check', 'id' => "cfgipcheck"));
132 echo $check_ipcheck->show(intval($RCI->getprop('ip_check')), array('value' => 1));
133
134 ?>
135 <label for="cfgipcheck">Check client IP in session authorization</label><br />
136
137 <p class="hint">This increases security but can cause sudden logouts when someone uses a proxy with changing IPs.</p>
354978 138 </dd>
T 139
140
c5042d 141 <dt class="propname">enable_spellcheck</dt>
T 142 <dd>
143 <?php
82475f 144 $check_spell = new html_checkbox(array('name' => '_enable_spellcheck', 'id' => "cfgspellcheck"));
T 145 echo $check_spell->show(intval($RCI->getprop('enable_spellcheck')), array('value' => 1));
146 ?>
147 <label for="cfgspellcheck">Make use of the spell checker</label><br />
148 </dd>
c5042d 149
82475f 150 <dt class="propname">spellcheck_engine</dt>
T 151 <dd>
152 <?php
153 $select_spell = new html_select(array('name' => '_spellcheck_engine', 'id' => "cfgspellcheckengine"));
154 if (extension_loaded('pspell'))
9b0173 155   $select_spell->add('Pspell', 'pspell');
4765b2 156 if (extension_loaded('enchant'))
AM 157   $select_spell->add('Enchant', 'enchant');
df7d6f 158 $select_spell->add('Googie', 'googie');
4765b2 159 $select_spell->add('ATD', 'atd');
82475f 160
T 161 echo $select_spell->show($RCI->is_post ? $_POST['_spellcheck_engine'] : 'pspell');
c5042d 162
T 163 ?>
82475f 164 <label for="cfgspellcheckengine">Which spell checker to use</label><br />
c5042d 165
9b0173 166 <p class="hint">Googie implies that the message content will be sent to external server to check the spelling.</p>
c5042d 167 </dd>
T 168
ec0171 169 <dt class="propname">identities_level</dt>
A 170 <dd>
171 <?php
172
173 $input_ilevel = new html_select(array('name' => '_identities_level', 'id' => "cfgidentitieslevel"));
174 $input_ilevel->add('many identities with possibility to edit all params', 0);
175 $input_ilevel->add('many identities with possibility to edit all params but not email address', 1);
176 $input_ilevel->add('one identity with possibility to edit all params', 2);
177 $input_ilevel->add('one identity with possibility to edit all params but not email address', 3);
ac828b 178 $input_ilevel->add('one identity with possibility to edit only signature', 4);
ec0171 179 echo $input_ilevel->show($RCI->getprop('identities_level'), 0);
A 180
181 ?>
182 <div>Level of identities access</div>
183 <p class="hint">Defines what users can do with their identities.</p>
184 </dd>
185
354978 186 </dl>
T 187 </fieldset>
b77d0d 188
A 189 <fieldset>
190 <legend>Logging & Debugging</legend>
191 <dl class="loggingblock">
192
193 <dt class="propname">debug_level</dt>
194 <dd>
195 <?php
196
197 $value = $RCI->getprop('debug_level');
198 $check_debug = new html_checkbox(array('name' => '_debug_level[]'));
199 echo $check_debug->show(($value & 1) ? 1 : 0 , array('value' => 1, 'id' => 'cfgdebug1'));
200 echo '<label for="cfgdebug1">Log errors</label><br />';
201
202 echo $check_debug->show(($value & 4) ? 4 : 0, array('value' => 4, 'id' => 'cfgdebug4'));
203 echo '<label for="cfgdebug4">Print errors (to the browser)</label><br />';
204
205 echo $check_debug->show(($value & 8) ? 8 : 0, array('value' => 8, 'id' => 'cfgdebug8'));
206 echo '<label for="cfgdebug8">Verbose display (enables debug console)</label><br />';
207
208 ?>
209 </dd>
210
211 <dt class="propname">log_driver</dt>
212 <dd>
213 <?php
214
215 $select_log_driver = new html_select(array('name' => '_log_driver', 'id' => "cfglogdriver"));
216 $select_log_driver->add(array('file', 'syslog'), array('file', 'syslog'));
217 echo $select_log_driver->show($RCI->getprop('log_driver', 'file'));
218
219 ?>
220 <div>How to do logging? 'file' - write to files in the log directory, 'syslog' - use the syslog facility.</div>
221 </dd>
222
223 <dt class="propname">log_dir</dt>
224 <dd>
225 <?php
226
227 $input_logdir = new html_inputfield(array('name' => '_log_dir', 'size' => 30, 'id' => "cfglogdir"));
228 echo $input_logdir->show($RCI->getprop('log_dir'));
229
230 ?>
a91c9b 231 <div>Use this folder to store log files (must be writeable for webserver). Note that this only applies if you are using the 'file' log_driver.</div>
b77d0d 232 </dd>
A 233
234 <dt class="propname">syslog_id</dt>
235 <dd>
236 <?php
237
238 $input_syslogid = new html_inputfield(array('name' => '_syslog_id', 'size' => 30, 'id' => "cfgsyslogid"));
239 echo $input_syslogid->show($RCI->getprop('syslog_id', 'roundcube'));
240
241 ?>
242 <div>What ID to use when logging with syslog. Note that this only applies if you are using the 'syslog' log_driver.</div>
243 </dd>
244
245 <dt class="propname">syslog_facility</dt>
246 <dd>
247 <?php
248
249 $input_syslogfacility = new html_select(array('name' => '_syslog_facility', 'id' => "cfgsyslogfacility"));
250 $input_syslogfacility->add('user-level messages', LOG_USER);
251 $input_syslogfacility->add('mail subsystem', LOG_MAIL);
252 $input_syslogfacility->add('local level 0', LOG_LOCAL0);
253 $input_syslogfacility->add('local level 1', LOG_LOCAL1);
254 $input_syslogfacility->add('local level 2', LOG_LOCAL2);
255 $input_syslogfacility->add('local level 3', LOG_LOCAL3);
256 $input_syslogfacility->add('local level 4', LOG_LOCAL4);
257 $input_syslogfacility->add('local level 5', LOG_LOCAL5);
258 $input_syslogfacility->add('local level 6', LOG_LOCAL6);
259 $input_syslogfacility->add('local level 7', LOG_LOCAL7);
260 echo $input_syslogfacility->show($RCI->getprop('syslog_facility'), LOG_USER);
261
262 ?>
263 <div>What ID to use when logging with syslog.  Note that this only applies if you are using the 'syslog' log_driver.</div>
264 </dd>
265
266
267
268
269 </dl>
270 </fieldset>
271
354978 272
T 273 <fieldset>
6557d3 274 <legend>Database setup</legend>
c5042d 275 <dl class="configblock" id="cgfblockdb">
T 276 <dt class="propname">db_dsnw</dt>
277 <dd>
278 <p>Database settings for read/write operations:</p>
279 <?php
280
47124c 281 $select_dbtype = new html_select(array('name' => '_dbtype', 'id' => "cfgdbtype"));
398bff 282 foreach ($RCI->supported_dbs as $database => $ext) {
c5042d 283     if (extension_loaded($ext)) {
18df6f 284         $select_dbtype->add($database, substr($ext, 4));
c5042d 285     }
T 286 }
287
47124c 288 $input_dbhost = new html_inputfield(array('name' => '_dbhost', 'size' => 20, 'id' => "cfgdbhost"));
T 289 $input_dbname = new html_inputfield(array('name' => '_dbname', 'size' => 20, 'id' => "cfgdbname"));
290 $input_dbuser = new html_inputfield(array('name' => '_dbuser', 'size' => 20, 'id' => "cfgdbuser"));
2e90ff 291 $input_dbpass = new html_passwordfield(array('name' => '_dbpass', 'size' => 20, 'id' => "cfgdbpass"));
c5042d 292
398bff 293 $dsnw = rcube_db::parse_dsn($RCI->getprop('db_dsnw'));
c5042d 294
237119 295 echo $select_dbtype->show($RCI->is_post ? $_POST['_dbtype'] : $dsnw['phptype']);
c5042d 296 echo '<label for="cfgdbtype">Database type</label><br />';
237119 297 echo $input_dbhost->show($RCI->is_post ? $_POST['_dbhost'] : $dsnw['hostspec']);
82475f 298 echo '<label for="cfgdbhost">Database server (omit for sqlite)</label><br />';
237119 299 echo $input_dbname->show($RCI->is_post ? $_POST['_dbname'] : $dsnw['database']);
fafe5d 300 echo '<label for="cfgdbname">Database name (use absolute path and filename for sqlite)</label><br />';
237119 301 echo $input_dbuser->show($RCI->is_post ? $_POST['_dbuser'] : $dsnw['username']);
82475f 302 echo '<label for="cfgdbuser">Database user name (needs write permissions)(omit for sqlite)</label><br />';
237119 303 echo $input_dbpass->show($RCI->is_post ? $_POST['_dbpass'] : $dsnw['password']);
82475f 304 echo '<label for="cfgdbpass">Database password (omit for sqlite)</label><br />';
c5042d 305
T 306 ?>
307 </dd>
399db1 308
AM 309 <dt class="propname">db_prefix</dt>
310 <dd>
311 <?php
312
313 $input_prefix = new html_inputfield(array('name' => '_db_prefix', 'size' => 20, 'id' => "cfgdbprefix"));
314 echo $input_prefix->show($RCI->getprop('db_prefix'));
315
316 ?>
317 <div>Optional prefix that will be added to database object names (tables and sequences).</div>
318 </dd>
319
6557d3 320 </dl>
T 321 </fieldset>
322
c5042d 323
6557d3 324 <fieldset>
354978 325 <legend>IMAP Settings</legend>
c5042d 326 <dl class="configblock" id="cgfblockimap">
T 327 <dt class="propname">default_host</dt>
328 <dd>
329 <div>The IMAP host(s) chosen to perform the log-in</div>
330 <div id="defaulthostlist">
331 <?php
332
47124c 333 $text_imaphost = new html_inputfield(array('name' => '_default_host[]', 'size' => 30));
1c4e5d 334 $default_hosts = $RCI->get_hostlist();
T 335
336 if (empty($default_hosts))
337   $default_hosts = array('');
c5042d 338
b3f9df 339 $i = 0;
1c4e5d 340 foreach ($default_hosts as $host) {
b3f9df 341   echo '<div id="defaulthostentry'.$i.'">' . $text_imaphost->show($host);
T 342   if ($i++ > 0)
c5042d 343     echo '<a href="#" onclick="removehostfield(this.parentNode);return false" class="removelink" title="Remove this entry">remove</a>';
T 344   echo '</div>';
345 }
346
347 ?>
348 </div>
349 <div><a href="javascript:addhostfield()" class="addlink" title="Add another field">add</a></div>
350
b3f9df 351 <p class="hint">Leave blank to show a textbox at login. To use SSL/IMAPS connection, type ssl://hostname</p>
c5042d 352 </dd>
T 353
354 <dt class="propname">default_port</dt>
355 <dd>
356 <?php
357
47124c 358 $text_imapport = new html_inputfield(array('name' => '_default_port', 'size' => 6, 'id' => "cfgimapport"));
c5042d 359 echo $text_imapport->show($RCI->getprop('default_port'));
T 360
361 ?>
362 <div>TCP port used for IMAP connections</div>
363 </dd>
364
365 <dt class="propname">username_domain</dt>
366 <dd>
367 <?php
368
47124c 369 $text_userdomain = new html_inputfield(array('name' => '_username_domain', 'size' => 30, 'id' => "cfguserdomain"));
c5042d 370 echo $text_userdomain->show($RCI->getprop('username_domain'));
T 371
372 ?>
373 <div>Automatically add this domain to user names for login</div>
374
375 <p class="hint">Only for IMAP servers that require full e-mail addresses for login</p>
376 </dd>
377
354978 378 <dt class="propname">auto_create_user</dt>
T 379 <dd>
380 <?php
381
47124c 382 $check_autocreate = new html_checkbox(array('name' => '_auto_create_user', 'id' => "cfgautocreate"));
354978 383 echo $check_autocreate->show(intval($RCI->getprop('auto_create_user')), array('value' => 1));
T 384
385 ?>
e019f2 386 <label for="cfgautocreate">Automatically create a new Roundcube user when log-in the first time</label><br />
354978 387
T 388 <p class="hint">A user is authenticated by the IMAP server but it requires a local record to store settings
389 and contacts. With this option enabled a new user record will automatically be created once the IMAP login succeeds.</p>
390
e019f2 391 <p class="hint">If this option is disabled, the login only succeeds if there's a matching user-record in the local Roundcube database
354978 392 what means that you have to create those records manually or disable this option after the first login.</p>
T 393 </dd>
394
c5042d 395 <dt class="propname">sent_mbox</dt>
T 396 <dd>
397 <?php
398
47124c 399 $text_sentmbox = new html_inputfield(array('name' => '_sent_mbox', 'size' => 20, 'id' => "cfgsentmbox"));
c5042d 400 echo $text_sentmbox->show($RCI->getprop('sent_mbox'));
T 401
402 ?>
9abd0f 403 <div>Store sent messages in this folder</div>
c5042d 404
d08333 405 <p class="hint">Leave blank if sent messages should not be stored. Note: folder must include namespace prefix if any.</p>
c5042d 406 </dd>
T 407
408 <dt class="propname">trash_mbox</dt>
409 <dd>
410 <?php
411
47124c 412 $text_trashmbox = new html_inputfield(array('name' => '_trash_mbox', 'size' => 20, 'id' => "cfgtrashmbox"));
c5042d 413 echo $text_trashmbox->show($RCI->getprop('trash_mbox'));
T 414
415 ?>
416 <div>Move messages to this folder when deleting them</div>
417
d08333 418 <p class="hint">Leave blank if they should be deleted directly. Note: folder must include namespace prefix if any.</p>
c5042d 419 </dd>
T 420
421 <dt class="propname">drafts_mbox</dt>
422 <dd>
423 <?php
424
47124c 425 $text_draftsmbox = new html_inputfield(array('name' => '_drafts_mbox', 'size' => 20, 'id' => "cfgdraftsmbox"));
c5042d 426 echo $text_draftsmbox->show($RCI->getprop('drafts_mbox'));
T 427
428 ?>
9abd0f 429 <div>Store draft messages in this folder</div>
A 430
d08333 431 <p class="hint">Leave blank if they should not be stored. Note: folder must include namespace prefix if any.</p>
c5042d 432 </dd>
T 433
9abd0f 434 <dt class="propname">junk_mbox</dt>
A 435 <dd>
436 <?php
437
438 $text_junkmbox = new html_inputfield(array('name' => '_junk_mbox', 'size' => 20, 'id' => "cfgjunkmbox"));
439 echo $text_junkmbox->show($RCI->getprop('junk_mbox'));
440
441 ?>
442 <div>Store spam messages in this folder</div>
d08333 443
A 444 <p class="hint">Note: folder must include namespace prefix if any.</p>
445 </dd>
446
9abd0f 447 </dd>
354978 448 </dl>
T 449 </fieldset>
c5042d 450
354978 451
T 452 <fieldset>
453 <legend>SMTP Settings</legend>
c5042d 454 <dl class="configblock" id="cgfblocksmtp">
T 455 <dt class="propname">smtp_server</dt>
456 <dd>
457 <?php
458
47124c 459 $text_smtphost = new html_inputfield(array('name' => '_smtp_server', 'size' => 30, 'id' => "cfgsmtphost"));
c5042d 460 echo $text_smtphost->show($RCI->getprop('smtp_server'));
T 461
462 ?>
463 <div>Use this host for sending mails</div>
464
465 <p class="hint">To use SSL connection, set ssl://smtp.host.com. If left blank, the PHP mail() function is used</p>
466 </dd>
467
468 <dt class="propname">smtp_port</dt>
469 <dd>
470 <?php
471
47124c 472 $text_smtpport = new html_inputfield(array('name' => '_smtp_port', 'size' => 6, 'id' => "cfgsmtpport"));
c5042d 473 echo $text_smtpport->show($RCI->getprop('smtp_port'));
T 474
475 ?>
82475f 476 <div>SMTP port (default is 25; 465 for SSL; 587 for submission)</div>
c5042d 477 </dd>
T 478
479 <dt class="propname">smtp_user/smtp_pass</dt>
480 <dd>
481 <?php
482
47124c 483 $text_smtpuser = new html_inputfield(array('name' => '_smtp_user', 'size' => 20, 'id' => "cfgsmtpuser"));
2e90ff 484 $text_smtppass = new html_passwordfield(array('name' => '_smtp_pass', 'size' => 20, 'id' => "cfgsmtppass"));
c5042d 485 echo $text_smtpuser->show($RCI->getprop('smtp_user'));
T 486 echo $text_smtppass->show($RCI->getprop('smtp_pass'));
487
488 ?>
489 <div>SMTP username and password (if required)</div>
490 <p>
491 <?php
492
47124c 493 $check_smtpuser = new html_checkbox(array('name' => '_smtp_user_u', 'id' => "cfgsmtpuseru"));
c5042d 494 echo $check_smtpuser->show($RCI->getprop('smtp_user') == '%u' || $_POST['_smtp_user_u'] ? 1 : 0, array('value' => 1));
T 495
496 ?>
497 <label for="cfgsmtpuseru">Use the current IMAP username and password for SMTP authentication</label>
498 </p>
499 </dd>
500 <!--
501 <dt class="propname">smtp_auth_type</dt>
502 <dd>
503 <?php
504 /*
47124c 505 $select_smtpauth = new html_select(array('name' => '_smtp_auth_type', 'id' => "cfgsmtpauth"));
c5042d 506 $select_smtpauth->add(array('(auto)', 'PLAIN', 'DIGEST-MD5', 'CRAM-MD5', 'LOGIN'), array('0', 'PLAIN', 'DIGEST-MD5', 'CRAM-MD5', 'LOGIN'));
T 507 echo $select_smtpauth->show(intval($RCI->getprop('smtp_auth_type')));
508 */
509 ?>
510 <div>Method to authenticate at the SMTP server. Choose (auto) if you don't know what this is</div>
511 </dd>
512 -->
513 <dt class="propname">smtp_log</dt>
514 <dd>
515 <?php
516
47124c 517 $check_smtplog = new html_checkbox(array('name' => '_smtp_log', 'id' => "cfgsmtplog"));
c5042d 518 echo $check_smtplog->show(intval($RCI->getprop('smtp_log')), array('value' => 1));
T 519
520 ?>
b77d0d 521 <label for="cfgsmtplog">Log sent messages in <tt>{log_dir}/sendmail</tt> or to syslog.</label><br />
c5042d 522 </dd>
T 523
354978 524 </dl>
T 525 </fieldset>
526
c5042d 527
354978 528 <fieldset>
27564f 529 <legend>Display settings &amp; user prefs</legend>
c5042d 530 <dl class="configblock" id="cgfblockdisplay">
354978 531
569654 532 <dt class="propname">language <span class="userconf">*</span></dt>
354978 533 <dd>
T 534 <?php
535
522007 536 $input_locale = new html_inputfield(array('name' => '_language', 'size' => 6, 'id' => "cfglocale"));
T 537 echo $input_locale->show($RCI->getprop('language'));
354978 538
T 539 ?>
c8ae24 540 <div>The default locale setting. This also defines the language of the login screen.<br/>Leave it empty to auto-detect the user agent language.</div>
522007 541 <p class="hint">Enter a <a href="http://www.faqs.org/rfcs/rfc1766">RFC1766</a> formatted language name. Examples: en_US, de_DE, de_CH, fr_FR, pt_BR</p>
354978 542 </dd>
T 543
9e8e5f 544 <dt class="propname">skin <span class="userconf">*</span></dt>
A 545 <dd>
546 <?php
547
e49064 548 $input_skin = new html_select(array('name' => '_skin', 'id' => "cfgskin"));
T 549 $input_skin->add($RCI->list_skins());
9e8e5f 550 echo $input_skin->show($RCI->getprop('skin'));
A 551
552 ?>
553 <div>Name of interface skin (folder in /skins)</div>
e49064 554 </dd>
T 555
08ffd9 556 <dt class="propname">mail_pagesize <span class="userconf">*</span></dt>
27564f 557 <dd>
T 558 <?php
559
08ffd9 560 $pagesize = $RCI->getprop('mail_pagesize');
A 561 if (!$pagesize) {
562     $pagesize = $RCI->getprop('pagesize');
563 }
564 $input_pagesize = new html_inputfield(array('name' => '_mail_pagesize', 'size' => 6, 'id' => "cfgmailpagesize"));
565 echo $input_pagesize->show($pagesize);
27564f 566
T 567 ?>
08ffd9 568 <div>Show up to X items in the mail messages list view.</div>
A 569 </dd>
570
571 <dt class="propname">addressbook_pagesize <span class="userconf">*</span></dt>
572 <dd>
573 <?php
574
575 $pagesize = $RCI->getprop('addressbook_pagesize');
576 if (!$pagesize) {
577     $pagesize = $RCI->getprop('pagesize');
578 }
579 $input_pagesize = new html_inputfield(array('name' => '_addressbook_pagesize', 'size' => 6, 'id' => "cfgabookpagesize"));
580 echo $input_pagesize->show($pagesize);
581
582 ?>
583 <div>Show up to X items in the contacts list view.</div>
27564f 584 </dd>
T 585
586 <dt class="propname">prefer_html <span class="userconf">*</span></dt>
587 <dd>
588 <?php
589
47124c 590 $check_htmlview = new html_checkbox(array('name' => '_prefer_html', 'id' => "cfghtmlview", 'value' => 1));
27564f 591 echo $check_htmlview->show(intval($RCI->getprop('prefer_html')));
T 592
593 ?>
594 <label for="cfghtmlview">Prefer displaying HTML messages</label><br />
595 </dd>
596
597 <dt class="propname">preview_pane <span class="userconf">*</span></dt>
598 <dd>
599 <?php
600
47124c 601 $check_prevpane = new html_checkbox(array('name' => '_preview_pane', 'id' => "cfgprevpane", 'value' => 1));
27564f 602 echo $check_prevpane->show(intval($RCI->getprop('preview_pane')));
T 603
604 ?>
605 <label for="cfgprevpane">If preview pane is enabled</label><br />
606 </dd>
607
608 <dt class="propname">htmleditor <span class="userconf">*</span></dt>
609 <dd>
868deb 610 <label for="cfghtmlcompose">Compose HTML formatted messages</label>
27564f 611 <?php
T 612
868deb 613 $select_htmlcomp = new html_select(array('name' => '_htmleditor', 'id' => "cfghtmlcompose"));
A 614 $select_htmlcomp->add('never', 0);
615 $select_htmlcomp->add('always', 1);
616 $select_htmlcomp->add('on reply to HTML message only', 2);
617 echo $select_htmlcomp->show(intval($RCI->getprop('htmleditor')));
27564f 618
T 619 ?>
620 </dd>
621
622 <dt class="propname">draft_autosave <span class="userconf">*</span></dt>
623 <dd>
624 <label for="cfgautosave">Save compose message every</label>
625 <?php
626
47124c 627 $select_autosave = new html_select(array('name' => '_draft_autosave', 'id' => 'cfgautosave'));
27564f 628 $select_autosave->add('never', 0);
569654 629 foreach (array(1, 3, 5, 10) as $i => $min)
27564f 630   $select_autosave->add("$min min", $min*60);
T 631
632 echo $select_autosave->show(intval($RCI->getprop('draft_autosave')));
633
634 ?>
635 </dd>
636
9e8e5f 637 <dt class="propname">mdn_requests <span class="userconf">*</span></dt>
A 638 <dd>
639 <?php
640
50baa6 641 $mdn_opts = array(
A 642     0 => 'ask the user',
643     1 => 'send automatically',
6c6bb0 644     3 => 'send receipt to user contacts, otherwise ask the user',
A 645     4 => 'send receipt to user contacts, otherwise ignore',
50baa6 646     2 => 'ignore',
A 647 );
648
9e8e5f 649 $select_mdnreq = new html_select(array('name' => '_mdn_requests', 'id' => "cfgmdnreq"));
50baa6 650 $select_mdnreq->add(array_values($mdn_opts), array_keys($mdn_opts));
9e8e5f 651 echo $select_mdnreq->show(intval($RCI->getprop('mdn_requests')));
A 652
653 ?>
654 <div>Behavior if a received message requests a message delivery notification (read receipt)</div>
655 </dd>
656
ffae15 657 <dt class="propname">mime_param_folding <span class="userconf">*</span></dt>
A 658 <dd>
659 <?php
660
661 $select_param_folding = new html_select(array('name' => '_mime_param_folding', 'id' => "cfgmimeparamfolding"));
662 $select_param_folding->add('Full RFC 2231 (Roundcube, Thunderbird)', '0'); 
663 $select_param_folding->add('RFC 2047/2231 (MS Outlook, OE)', '1');
664 $select_param_folding->add('Full RFC 2047 (deprecated)', '2');
665
9bacb2 666 echo $select_param_folding->show(strval($RCI->getprop('mime_param_folding')));
ffae15 667
A 668 ?>
669 <div>How to encode attachment long/non-ascii names</div>
670 </dd>
671
354978 672 </dl>
27564f 673
T 674 <p class="hint"><span class="userconf">*</span>&nbsp; These settings are defaults for the user preferences</p>
354978 675 </fieldset>
T 676
677 <?php
678
b3f9df 679 echo '<p><input type="submit" name="submit" value="' . ($RCI->configured ? 'UPDATE' : 'CREATE') . ' CONFIG" ' . ($RCI->failures ? 'disabled' : '') . ' /></p>';
354978 680
T 681 ?>
682 </form>