Thomas Bruederli
2013-06-28 9bacb2cd3f7e8f96a29f651460954965c400aac6
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'])) {
9bacb2 27   echo '<p class="notice">Copy or download the following configuration and save it';
TB 28   echo ' as <tt><b>config.inc.php</b></tt> within the <tt>'.RCUBE_CONFIG_DIR.'</tt> directory of your Roundcube installation.<br/>';
461a30 29   echo ' Make sure that there are no characters outside the <tt>&lt;?php ?&gt;</tt> brackets when saving the file.';
9bacb2 30   echo '&nbsp;<input type="button" onclick="location.href=\'index.php?_getconfig=1\'" value="Download" />';
TB 31   if ($RCI->legacy_config) {
32       echo '<br/><br/>Afterwards, please <b>remove</b> the old configuration files <tt>main.inc.php</tt> and <tt>db.inc.php</tt>';
33       echo ' from the config directory.';
34   }
35   echo '</p>';
461a30 36
47124c 37   $textbox = new html_textarea(array('rows' => 16, 'cols' => 60, 'class' => "configfile"));
461a30 38   echo $textbox->show(($_SESSION['config'] = $RCI->create_config()));
27564f 39
T 40   echo '<p class="hint">Of course there are more options to configure.
461a30 41     Have a look at the defaults.inc.php file or visit <a href="http://trac.roundcube.net/wiki/Howto_Config">Howto_Config</a> to find out.</p>';
c5042d 42
T 43   echo '<p><input type="button" onclick="location.href=\'./index.php?_step=3\'" value="CONTINUE" /></p>';
461a30 44
c5042d 45   // echo '<style type="text/css"> .configblock { display:none } </style>';
T 46   echo "\n<hr style='margin-bottom:1.6em' />\n";
47 }
354978 48
T 49 ?>
50 <fieldset>
51 <legend>General configuration</legend>
c5042d 52 <dl class="configblock">
354978 53
T 54 <dt class="propname">product_name</dt>
55 <dd>
56 <?php
57
47124c 58 $input_prodname = new html_inputfield(array('name' => '_product_name', 'size' => 30, 'id' => "cfgprodname"));
354978 59 echo $input_prodname->show($RCI->getprop('product_name'));
T 60
61 ?>
62 <div>The name of your service (used to compose page titles)</div>
63 </dd>
64
c04b23 65 <dt class="propname">support_url</dt>
T 66 <dd>
67 <?php
68
69 $input_support = new html_inputfield(array('name' => '_support_url', 'size' => 50, 'id' => "cfgsupporturl"));
70 echo $input_support->show($RCI->getprop('support_url'));
71
72 ?>
73 <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>
74 <p class="hint">Enter an absolute URL (inculding http://) to a support page/form or a mailto: link.</p>
75 </dd>
76
77 <dt class="propname">skin_logo</dt>
78 <dd>
79 <?php
80
81 $input_skin = new html_inputfield(array('name' => '_skin_logo', 'size' => 50, 'id' => "cfgskinlogo"));
82 echo $input_skin->show($RCI->getprop('skin_logo'));
83
84 ?>
85 <div>Custom image to display instead of the Roundcube logo.</div>
86 <p class="hint">Enter a URL relative to the document root of this Roundcube installation.</p>
87 </dd>
88
354978 89 <dt class="propname">temp_dir</dt>
T 90 <dd>
91 <?php
92
47124c 93 $input_tempdir = new html_inputfield(array('name' => '_temp_dir', 'size' => 30, 'id' => "cfgtempdir"));
354978 94 echo $input_tempdir->show($RCI->getprop('temp_dir'));
T 95
96 ?>
a91c9b 97 <div>Use this folder to store temp files (must be writeable for webserver)</div>
354978 98 </dd>
T 99
100 <dt class="propname">des_key</dt>
101 <dd>
102 <?php
103
47124c 104 $input_deskey = new html_inputfield(array('name' => '_des_key', 'size' => 30, 'id' => "cfgdeskey"));
354978 105 echo $input_deskey->show($RCI->getprop('des_key'));
T 106
107 ?>
108 <div>This key is used to encrypt the users imap password before storing in the session record</div>
2912de 109 <p class="hint">It's a random generated string to ensure that every installation has its own key.
354978 110 If you enter it manually please provide a string of exactly 24 chars.</p>
c04b23 111 </dd>
T 112
113 <dt class="propname">ip_check</dt>
114 <dd>
115 <?php
116
117 $check_ipcheck = new html_checkbox(array('name' => '_ip_check', 'id' => "cfgipcheck"));
118 echo $check_ipcheck->show(intval($RCI->getprop('ip_check')), array('value' => 1));
119
120 ?>
121 <label for="cfgipcheck">Check client IP in session authorization</label><br />
122
123 <p class="hint">This increases security but can cause sudden logouts when someone uses a proxy with changing IPs.</p>
354978 124 </dd>
T 125
126
c5042d 127 <dt class="propname">enable_spellcheck</dt>
T 128 <dd>
129 <?php
82475f 130 $check_spell = new html_checkbox(array('name' => '_enable_spellcheck', 'id' => "cfgspellcheck"));
T 131 echo $check_spell->show(intval($RCI->getprop('enable_spellcheck')), array('value' => 1));
132 ?>
133 <label for="cfgspellcheck">Make use of the spell checker</label><br />
134 </dd>
c5042d 135
82475f 136 <dt class="propname">spellcheck_engine</dt>
T 137 <dd>
138 <?php
139 $select_spell = new html_select(array('name' => '_spellcheck_engine', 'id' => "cfgspellcheckengine"));
140 if (extension_loaded('pspell'))
141   $select_spell->add('pspell', 'pspell');
df7d6f 142 $select_spell->add('Googie', 'googie');
82475f 143
T 144 echo $select_spell->show($RCI->is_post ? $_POST['_spellcheck_engine'] : 'pspell');
c5042d 145
T 146 ?>
82475f 147 <label for="cfgspellcheckengine">Which spell checker to use</label><br />
c5042d 148
82475f 149 <p class="hint">GoogieSpell implies that the message content will be sent to Google in order to check the spelling.</p>
c5042d 150 </dd>
T 151
ec0171 152 <dt class="propname">identities_level</dt>
A 153 <dd>
154 <?php
155
156 $input_ilevel = new html_select(array('name' => '_identities_level', 'id' => "cfgidentitieslevel"));
157 $input_ilevel->add('many identities with possibility to edit all params', 0);
158 $input_ilevel->add('many identities with possibility to edit all params but not email address', 1);
159 $input_ilevel->add('one identity with possibility to edit all params', 2);
160 $input_ilevel->add('one identity with possibility to edit all params but not email address', 3);
161 echo $input_ilevel->show($RCI->getprop('identities_level'), 0);
162
163 ?>
164 <div>Level of identities access</div>
165 <p class="hint">Defines what users can do with their identities.</p>
166 </dd>
167
354978 168 </dl>
T 169 </fieldset>
b77d0d 170
A 171 <fieldset>
172 <legend>Logging & Debugging</legend>
173 <dl class="loggingblock">
174
175 <dt class="propname">debug_level</dt>
176 <dd>
177 <?php
178
179 $value = $RCI->getprop('debug_level');
180 $check_debug = new html_checkbox(array('name' => '_debug_level[]'));
181 echo $check_debug->show(($value & 1) ? 1 : 0 , array('value' => 1, 'id' => 'cfgdebug1'));
182 echo '<label for="cfgdebug1">Log errors</label><br />';
183
184 echo $check_debug->show(($value & 4) ? 4 : 0, array('value' => 4, 'id' => 'cfgdebug4'));
185 echo '<label for="cfgdebug4">Print errors (to the browser)</label><br />';
186
187 echo $check_debug->show(($value & 8) ? 8 : 0, array('value' => 8, 'id' => 'cfgdebug8'));
188 echo '<label for="cfgdebug8">Verbose display (enables debug console)</label><br />';
189
190 ?>
191 </dd>
192
193 <dt class="propname">log_driver</dt>
194 <dd>
195 <?php
196
197 $select_log_driver = new html_select(array('name' => '_log_driver', 'id' => "cfglogdriver"));
198 $select_log_driver->add(array('file', 'syslog'), array('file', 'syslog'));
199 echo $select_log_driver->show($RCI->getprop('log_driver', 'file'));
200
201 ?>
202 <div>How to do logging? 'file' - write to files in the log directory, 'syslog' - use the syslog facility.</div>
203 </dd>
204
205 <dt class="propname">log_dir</dt>
206 <dd>
207 <?php
208
209 $input_logdir = new html_inputfield(array('name' => '_log_dir', 'size' => 30, 'id' => "cfglogdir"));
210 echo $input_logdir->show($RCI->getprop('log_dir'));
211
212 ?>
a91c9b 213 <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 214 </dd>
A 215
216 <dt class="propname">syslog_id</dt>
217 <dd>
218 <?php
219
220 $input_syslogid = new html_inputfield(array('name' => '_syslog_id', 'size' => 30, 'id' => "cfgsyslogid"));
221 echo $input_syslogid->show($RCI->getprop('syslog_id', 'roundcube'));
222
223 ?>
224 <div>What ID to use when logging with syslog. Note that this only applies if you are using the 'syslog' log_driver.</div>
225 </dd>
226
227 <dt class="propname">syslog_facility</dt>
228 <dd>
229 <?php
230
231 $input_syslogfacility = new html_select(array('name' => '_syslog_facility', 'id' => "cfgsyslogfacility"));
232 $input_syslogfacility->add('user-level messages', LOG_USER);
233 $input_syslogfacility->add('mail subsystem', LOG_MAIL);
234 $input_syslogfacility->add('local level 0', LOG_LOCAL0);
235 $input_syslogfacility->add('local level 1', LOG_LOCAL1);
236 $input_syslogfacility->add('local level 2', LOG_LOCAL2);
237 $input_syslogfacility->add('local level 3', LOG_LOCAL3);
238 $input_syslogfacility->add('local level 4', LOG_LOCAL4);
239 $input_syslogfacility->add('local level 5', LOG_LOCAL5);
240 $input_syslogfacility->add('local level 6', LOG_LOCAL6);
241 $input_syslogfacility->add('local level 7', LOG_LOCAL7);
242 echo $input_syslogfacility->show($RCI->getprop('syslog_facility'), LOG_USER);
243
244 ?>
245 <div>What ID to use when logging with syslog.  Note that this only applies if you are using the 'syslog' log_driver.</div>
246 </dd>
247
248
249
250
251 </dl>
252 </fieldset>
253
354978 254
T 255 <fieldset>
6557d3 256 <legend>Database setup</legend>
c5042d 257 <dl class="configblock" id="cgfblockdb">
T 258 <dt class="propname">db_dsnw</dt>
259 <dd>
260 <p>Database settings for read/write operations:</p>
261 <?php
262
47124c 263 $select_dbtype = new html_select(array('name' => '_dbtype', 'id' => "cfgdbtype"));
398bff 264 foreach ($RCI->supported_dbs as $database => $ext) {
c5042d 265     if (extension_loaded($ext)) {
18df6f 266         $select_dbtype->add($database, substr($ext, 4));
c5042d 267     }
T 268 }
269
47124c 270 $input_dbhost = new html_inputfield(array('name' => '_dbhost', 'size' => 20, 'id' => "cfgdbhost"));
T 271 $input_dbname = new html_inputfield(array('name' => '_dbname', 'size' => 20, 'id' => "cfgdbname"));
272 $input_dbuser = new html_inputfield(array('name' => '_dbuser', 'size' => 20, 'id' => "cfgdbuser"));
2e90ff 273 $input_dbpass = new html_passwordfield(array('name' => '_dbpass', 'size' => 20, 'id' => "cfgdbpass"));
c5042d 274
398bff 275 $dsnw = rcube_db::parse_dsn($RCI->getprop('db_dsnw'));
c5042d 276
237119 277 echo $select_dbtype->show($RCI->is_post ? $_POST['_dbtype'] : $dsnw['phptype']);
c5042d 278 echo '<label for="cfgdbtype">Database type</label><br />';
237119 279 echo $input_dbhost->show($RCI->is_post ? $_POST['_dbhost'] : $dsnw['hostspec']);
82475f 280 echo '<label for="cfgdbhost">Database server (omit for sqlite)</label><br />';
237119 281 echo $input_dbname->show($RCI->is_post ? $_POST['_dbname'] : $dsnw['database']);
fafe5d 282 echo '<label for="cfgdbname">Database name (use absolute path and filename for sqlite)</label><br />';
237119 283 echo $input_dbuser->show($RCI->is_post ? $_POST['_dbuser'] : $dsnw['username']);
82475f 284 echo '<label for="cfgdbuser">Database user name (needs write permissions)(omit for sqlite)</label><br />';
237119 285 echo $input_dbpass->show($RCI->is_post ? $_POST['_dbpass'] : $dsnw['password']);
82475f 286 echo '<label for="cfgdbpass">Database password (omit for sqlite)</label><br />';
c5042d 287
T 288 ?>
289 </dd>
399db1 290
AM 291 <dt class="propname">db_prefix</dt>
292 <dd>
293 <?php
294
295 $input_prefix = new html_inputfield(array('name' => '_db_prefix', 'size' => 20, 'id' => "cfgdbprefix"));
296 echo $input_prefix->show($RCI->getprop('db_prefix'));
297
298 ?>
299 <div>Optional prefix that will be added to database object names (tables and sequences).</div>
300 </dd>
301
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
9bacb2 648 echo $select_param_folding->show(strval($RCI->getprop('mime_param_folding')));
ffae15 649
A 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>