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