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