comparison installer/config.php @ 0:4681f974d28b

vanilla 1.3.3 distro, I hope
author Charlie Root
date Thu, 04 Jan 2018 15:52:31 -0500
parents
children bf99236cc5cd
comparison
equal deleted inserted replaced
-1:000000000000 0:4681f974d28b
1 <?php
2
3 if (!class_exists('rcmail_install', false) || !is_object($RCI)) {
4 die("Not allowed! Please open installer/index.php instead.");
5 }
6
7 ?>
8 <form action="index.php" method="post">
9 <input type="hidden" name="_step" value="2" />
10 <?php
11
12 // register these boolean fields
13 $RCI->bool_config_props = array(
14 'ip_check' => 1,
15 'enable_spellcheck' => 1,
16 'auto_create_user' => 1,
17 'smtp_log' => 1,
18 'prefer_html' => 1,
19 'preview_pane' => 1,
20 'debug_level' => 1,
21 );
22
23 // allow the current user to get to the next step
24 $_SESSION['allowinstaller'] = true;
25
26 if (!empty($_POST['submit'])) {
27 $_SESSION['config'] = $RCI->create_config();
28
29 if ($RCI->save_configfile($_SESSION['config'])) {
30 echo '<p class="notice">The config file was saved successfully into <tt>'.RCMAIL_CONFIG_DIR.'</tt> directory of your Roundcube installation.';
31
32 if ($RCI->legacy_config) {
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.';
34 }
35
36 echo '</p>';
37 }
38 else {
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" />';
43
44 if ($RCI->legacy_config) {
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 }
47
48 echo '</p>';
49
50 $textbox = new html_textarea(array('rows' => 16, 'cols' => 60, 'class' => "configfile"));
51 echo $textbox->show(($_SESSION['config']));
52 }
53
54 echo '<p class="hint">Of course there are more options to configure.
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>';
56
57 echo '<p><input type="button" onclick="location.href=\'./index.php?_step=3\'" value="CONTINUE" /></p>';
58
59 // echo '<style type="text/css"> .configblock { display:none } </style>';
60 echo "\n<hr style='margin-bottom:1.6em' />\n";
61 }
62
63 ?>
64 <fieldset>
65 <legend>General configuration</legend>
66 <dl class="configblock">
67
68 <dt class="propname">product_name</dt>
69 <dd>
70 <?php
71
72 $input_prodname = new html_inputfield(array('name' => '_product_name', 'size' => 30, 'id' => "cfgprodname"));
73 echo $input_prodname->show($RCI->getprop('product_name'));
74
75 ?>
76 <div>The name of your service (used to compose page titles)</div>
77 </dd>
78
79 <dt class="propname">support_url</dt>
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 (including 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
103 <dt class="propname">temp_dir</dt>
104 <dd>
105 <?php
106
107 $input_tempdir = new html_inputfield(array('name' => '_temp_dir', 'size' => 30, 'id' => "cfgtempdir"));
108 echo $input_tempdir->show($RCI->getprop('temp_dir'));
109
110 ?>
111 <div>Use this folder to store temp files (must be writeable for webserver)</div>
112 </dd>
113
114 <dt class="propname">des_key</dt>
115 <dd>
116 <?php
117
118 $input_deskey = new html_inputfield(array('name' => '_des_key', 'size' => 30, 'id' => "cfgdeskey"));
119 echo $input_deskey->show($RCI->getprop('des_key'));
120
121 ?>
122 <div>This key is used to encrypt the users imap password before storing in the session record</div>
123 <p class="hint">It's a random generated string to ensure that every installation has its own key.
124 If you enter it manually please provide a string of exactly 24 chars.</p>
125 </dd>
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>
138 </dd>
139
140
141 <dt class="propname">enable_spellcheck</dt>
142 <dd>
143 <?php
144 $check_spell = new html_checkbox(array('name' => '_enable_spellcheck', 'id' => "cfgspellcheck"));
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>
149
150 <dt class="propname">spellcheck_engine</dt>
151 <dd>
152 <?php
153 $select_spell = new html_select(array('name' => '_spellcheck_engine', 'id' => "cfgspellcheckengine"));
154 if (extension_loaded('pspell'))
155 $select_spell->add('Pspell', 'pspell');
156 if (extension_loaded('enchant'))
157 $select_spell->add('Enchant', 'enchant');
158 $select_spell->add('Googie', 'googie');
159 $select_spell->add('ATD', 'atd');
160
161 echo $select_spell->show($RCI->is_post ? $_POST['_spellcheck_engine'] : 'pspell');
162
163 ?>
164 <label for="cfgspellcheckengine">Which spell checker to use</label><br />
165
166 <p class="hint">Googie implies that the message content will be sent to external server to check the spelling.</p>
167 </dd>
168
169 <dt class="propname">identities_level</dt>
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);
178 $input_ilevel->add('one identity with possibility to edit only signature', 4);
179 echo $input_ilevel->show($RCI->getprop('identities_level'), 0);
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
186 </dl>
187 </fieldset>
188
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 ?>
206 </dd>
207
208 <dt class="propname">log_driver</dt>
209 <dd>
210 <?php
211
212 $select_log_driver = new html_select(array('name' => '_log_driver', 'id' => "cfglogdriver"));
213 $select_log_driver->add(array('file', 'syslog'), array('file', 'syslog'));
214 echo $select_log_driver->show($RCI->getprop('log_driver', 'file'));
215
216 ?>
217 <div>How to do logging? 'file' - write to files in the log directory, 'syslog' - use the syslog facility.</div>
218 </dd>
219
220 <dt class="propname">log_dir</dt>
221 <dd>
222 <?php
223
224 $input_logdir = new html_inputfield(array('name' => '_log_dir', 'size' => 30, 'id' => "cfglogdir"));
225 echo $input_logdir->show($RCI->getprop('log_dir'));
226
227 ?>
228 <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>
229 </dd>
230
231 <dt class="propname">syslog_id</dt>
232 <dd>
233 <?php
234
235 $input_syslogid = new html_inputfield(array('name' => '_syslog_id', 'size' => 30, 'id' => "cfgsyslogid"));
236 echo $input_syslogid->show($RCI->getprop('syslog_id', 'roundcube'));
237
238 ?>
239 <div>What ID to use when logging with syslog. Note that this only applies if you are using the 'syslog' log_driver.</div>
240 </dd>
241
242 <dt class="propname">syslog_facility</dt>
243 <dd>
244 <?php
245
246 $input_syslogfacility = new html_select(array('name' => '_syslog_facility', 'id' => "cfgsyslogfacility"));
247 $input_syslogfacility->add('user-level messages', LOG_USER);
248 $input_syslogfacility->add('mail subsystem', LOG_MAIL);
249 $input_syslogfacility->add('local level 0', LOG_LOCAL0);
250 $input_syslogfacility->add('local level 1', LOG_LOCAL1);
251 $input_syslogfacility->add('local level 2', LOG_LOCAL2);
252 $input_syslogfacility->add('local level 3', LOG_LOCAL3);
253 $input_syslogfacility->add('local level 4', LOG_LOCAL4);
254 $input_syslogfacility->add('local level 5', LOG_LOCAL5);
255 $input_syslogfacility->add('local level 6', LOG_LOCAL6);
256 $input_syslogfacility->add('local level 7', LOG_LOCAL7);
257 echo $input_syslogfacility->show($RCI->getprop('syslog_facility'), LOG_USER);
258
259 ?>
260 <div>What ID to use when logging with syslog. Note that this only applies if you are using the 'syslog' log_driver.</div>
261 </dd>
262
263
264
265
266 </dl>
267 </fieldset>
268
269
270 <fieldset>
271 <legend>Database setup</legend>
272 <dl class="configblock" id="cgfblockdb">
273 <dt class="propname">db_dsnw</dt>
274 <dd>
275 <p>Database settings for read/write operations:</p>
276 <?php
277
278 $select_dbtype = new html_select(array('name' => '_dbtype', 'id' => "cfgdbtype"));
279 foreach ($RCI->supported_dbs as $database => $ext) {
280 if (extension_loaded($ext)) {
281 $select_dbtype->add($database, substr($ext, 4));
282 }
283 }
284
285 $input_dbhost = new html_inputfield(array('name' => '_dbhost', 'size' => 20, 'id' => "cfgdbhost"));
286 $input_dbname = new html_inputfield(array('name' => '_dbname', 'size' => 20, 'id' => "cfgdbname"));
287 $input_dbuser = new html_inputfield(array('name' => '_dbuser', 'size' => 20, 'id' => "cfgdbuser"));
288 $input_dbpass = new html_passwordfield(array('name' => '_dbpass', 'size' => 20, 'id' => "cfgdbpass"));
289
290 $dsnw = rcube_db::parse_dsn($RCI->getprop('db_dsnw'));
291
292 echo $select_dbtype->show($RCI->is_post ? $_POST['_dbtype'] : $dsnw['phptype']);
293 echo '<label for="cfgdbtype">Database type</label><br />';
294 echo $input_dbhost->show($RCI->is_post ? $_POST['_dbhost'] : $dsnw['hostspec']);
295 echo '<label for="cfgdbhost">Database server (omit for sqlite)</label><br />';
296 echo $input_dbname->show($RCI->is_post ? $_POST['_dbname'] : $dsnw['database']);
297 echo '<label for="cfgdbname">Database name (use absolute path and filename for sqlite)</label><br />';
298 echo $input_dbuser->show($RCI->is_post ? $_POST['_dbuser'] : $dsnw['username']);
299 echo '<label for="cfgdbuser">Database user name (needs write permissions)(omit for sqlite)</label><br />';
300 echo $input_dbpass->show($RCI->is_post ? $_POST['_dbpass'] : $dsnw['password']);
301 echo '<label for="cfgdbpass">Database password (omit for sqlite)</label><br />';
302
303 ?>
304 </dd>
305
306 <dt class="propname">db_prefix</dt>
307 <dd>
308 <?php
309
310 $input_prefix = new html_inputfield(array('name' => '_db_prefix', 'size' => 20, 'id' => "cfgdbprefix"));
311 echo $input_prefix->show($RCI->getprop('db_prefix'));
312
313 ?>
314 <div>Optional prefix that will be added to database object names (tables and sequences).</div>
315 </dd>
316
317 </dl>
318 </fieldset>
319
320
321 <fieldset>
322 <legend>IMAP Settings</legend>
323 <dl class="configblock" id="cgfblockimap">
324 <dt class="propname">default_host</dt>
325 <dd>
326 <div>The IMAP host(s) chosen to perform the log-in</div>
327 <div id="defaulthostlist">
328 <?php
329
330 $text_imaphost = new html_inputfield(array('name' => '_default_host[]', 'size' => 30));
331 $default_hosts = $RCI->get_hostlist();
332
333 if (empty($default_hosts))
334 $default_hosts = array('');
335
336 $i = 0;
337 foreach ($default_hosts as $host) {
338 echo '<div id="defaulthostentry'.$i.'">' . $text_imaphost->show($host);
339 if ($i++ > 0)
340 echo '<a href="#" onclick="removehostfield(this.parentNode);return false" class="removelink" title="Remove this entry">remove</a>';
341 echo '</div>';
342 }
343
344 ?>
345 </div>
346 <div><a href="javascript:addhostfield()" class="addlink" title="Add another field">add</a></div>
347
348 <p class="hint">Leave blank to show a textbox at login. To use SSL/IMAPS connection, type ssl://hostname</p>
349 </dd>
350
351 <dt class="propname">default_port</dt>
352 <dd>
353 <?php
354
355 $text_imapport = new html_inputfield(array('name' => '_default_port', 'size' => 6, 'id' => "cfgimapport"));
356 echo $text_imapport->show($RCI->getprop('default_port'));
357
358 ?>
359 <div>TCP port used for IMAP connections</div>
360 </dd>
361
362 <dt class="propname">username_domain</dt>
363 <dd>
364 <?php
365
366 $text_userdomain = new html_inputfield(array('name' => '_username_domain', 'size' => 30, 'id' => "cfguserdomain"));
367 echo $text_userdomain->show($RCI->getprop('username_domain'));
368
369 ?>
370 <div>Automatically add this domain to user names for login</div>
371
372 <p class="hint">Only for IMAP servers that require full e-mail addresses for login</p>
373 </dd>
374
375 <dt class="propname">auto_create_user</dt>
376 <dd>
377 <?php
378
379 $check_autocreate = new html_checkbox(array('name' => '_auto_create_user', 'id' => "cfgautocreate"));
380 echo $check_autocreate->show(intval($RCI->getprop('auto_create_user')), array('value' => 1));
381
382 ?>
383 <label for="cfgautocreate">Automatically create a new Roundcube user when log-in the first time</label><br />
384
385 <p class="hint">A user is authenticated by the IMAP server but it requires a local record to store settings
386 and contacts. With this option enabled a new user record will automatically be created once the IMAP login succeeds.</p>
387
388 <p class="hint">If this option is disabled, the login only succeeds if there's a matching user-record in the local Roundcube database
389 what means that you have to create those records manually or disable this option after the first login.</p>
390 </dd>
391
392 <dt class="propname">sent_mbox</dt>
393 <dd>
394 <?php
395
396 $text_sentmbox = new html_inputfield(array('name' => '_sent_mbox', 'size' => 20, 'id' => "cfgsentmbox"));
397 echo $text_sentmbox->show($RCI->getprop('sent_mbox'));
398
399 ?>
400 <div>Store sent messages in this folder</div>
401
402 <p class="hint">Leave blank if sent messages should not be stored. Note: folder must include namespace prefix if any.</p>
403 </dd>
404
405 <dt class="propname">trash_mbox</dt>
406 <dd>
407 <?php
408
409 $text_trashmbox = new html_inputfield(array('name' => '_trash_mbox', 'size' => 20, 'id' => "cfgtrashmbox"));
410 echo $text_trashmbox->show($RCI->getprop('trash_mbox'));
411
412 ?>
413 <div>Move messages to this folder when deleting them</div>
414
415 <p class="hint">Leave blank if they should be deleted directly. Note: folder must include namespace prefix if any.</p>
416 </dd>
417
418 <dt class="propname">drafts_mbox</dt>
419 <dd>
420 <?php
421
422 $text_draftsmbox = new html_inputfield(array('name' => '_drafts_mbox', 'size' => 20, 'id' => "cfgdraftsmbox"));
423 echo $text_draftsmbox->show($RCI->getprop('drafts_mbox'));
424
425 ?>
426 <div>Store draft messages in this folder</div>
427
428 <p class="hint">Leave blank if they should not be stored. Note: folder must include namespace prefix if any.</p>
429 </dd>
430
431 <dt class="propname">junk_mbox</dt>
432 <dd>
433 <?php
434
435 $text_junkmbox = new html_inputfield(array('name' => '_junk_mbox', 'size' => 20, 'id' => "cfgjunkmbox"));
436 echo $text_junkmbox->show($RCI->getprop('junk_mbox'));
437
438 ?>
439 <div>Store spam messages in this folder</div>
440
441 <p class="hint">Note: folder must include namespace prefix if any.</p>
442 </dd>
443
444 </dd>
445 </dl>
446 </fieldset>
447
448
449 <fieldset>
450 <legend>SMTP Settings</legend>
451 <dl class="configblock" id="cgfblocksmtp">
452 <dt class="propname">smtp_server</dt>
453 <dd>
454 <?php
455
456 $text_smtphost = new html_inputfield(array('name' => '_smtp_server', 'size' => 30, 'id' => "cfgsmtphost"));
457 echo $text_smtphost->show($RCI->getprop('smtp_server'));
458
459 ?>
460 <div>Use this host for sending mails</div>
461
462 <p class="hint">To use SSL connection, set ssl://smtp.host.com. If left blank, the PHP mail() function is used</p>
463 </dd>
464
465 <dt class="propname">smtp_port</dt>
466 <dd>
467 <?php
468
469 $text_smtpport = new html_inputfield(array('name' => '_smtp_port', 'size' => 6, 'id' => "cfgsmtpport"));
470 echo $text_smtpport->show($RCI->getprop('smtp_port'));
471
472 ?>
473 <div>SMTP port (default is 25; 465 for SSL; 587 for submission)</div>
474 </dd>
475
476 <dt class="propname">smtp_user/smtp_pass</dt>
477 <dd>
478 <?php
479
480 $text_smtpuser = new html_inputfield(array('name' => '_smtp_user', 'size' => 20, 'id' => "cfgsmtpuser"));
481 $text_smtppass = new html_passwordfield(array('name' => '_smtp_pass', 'size' => 20, 'id' => "cfgsmtppass"));
482 echo $text_smtpuser->show($RCI->getprop('smtp_user'));
483 echo $text_smtppass->show($RCI->getprop('smtp_pass'));
484
485 ?>
486 <div>SMTP username and password (if required)</div>
487 <p>
488 <?php
489
490 $check_smtpuser = new html_checkbox(array('name' => '_smtp_user_u', 'id' => "cfgsmtpuseru"));
491 echo $check_smtpuser->show($RCI->getprop('smtp_user') == '%u' || $_POST['_smtp_user_u'] ? 1 : 0, array('value' => 1));
492
493 ?>
494 <label for="cfgsmtpuseru">Use the current IMAP username and password for SMTP authentication</label>
495 </p>
496 </dd>
497 <!--
498 <dt class="propname">smtp_auth_type</dt>
499 <dd>
500 <?php
501 /*
502 $select_smtpauth = new html_select(array('name' => '_smtp_auth_type', 'id' => "cfgsmtpauth"));
503 $select_smtpauth->add(array('(auto)', 'PLAIN', 'DIGEST-MD5', 'CRAM-MD5', 'LOGIN'), array('0', 'PLAIN', 'DIGEST-MD5', 'CRAM-MD5', 'LOGIN'));
504 echo $select_smtpauth->show(intval($RCI->getprop('smtp_auth_type')));
505 */
506 ?>
507 <div>Method to authenticate at the SMTP server. Choose (auto) if you don't know what this is</div>
508 </dd>
509 -->
510 <dt class="propname">smtp_log</dt>
511 <dd>
512 <?php
513
514 $check_smtplog = new html_checkbox(array('name' => '_smtp_log', 'id' => "cfgsmtplog"));
515 echo $check_smtplog->show(intval($RCI->getprop('smtp_log')), array('value' => 1));
516
517 ?>
518 <label for="cfgsmtplog">Log sent messages in <tt>{log_dir}/sendmail</tt> or to syslog.</label><br />
519 </dd>
520
521 </dl>
522 </fieldset>
523
524
525 <fieldset>
526 <legend>Display settings &amp; user prefs</legend>
527 <dl class="configblock" id="cgfblockdisplay">
528
529 <dt class="propname">language <span class="userconf">*</span></dt>
530 <dd>
531 <?php
532
533 $input_locale = new html_inputfield(array('name' => '_language', 'size' => 6, 'id' => "cfglocale"));
534 echo $input_locale->show($RCI->getprop('language'));
535
536 ?>
537 <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>
538 <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>
539 </dd>
540
541 <dt class="propname">skin <span class="userconf">*</span></dt>
542 <dd>
543 <?php
544
545 $input_skin = new html_select(array('name' => '_skin', 'id' => "cfgskin"));
546 $input_skin->add($RCI->list_skins());
547 echo $input_skin->show($RCI->getprop('skin'));
548
549 ?>
550 <div>Name of interface skin (folder in /skins)</div>
551 </dd>
552
553 <dt class="propname">mail_pagesize <span class="userconf">*</span></dt>
554 <dd>
555 <?php
556
557 $pagesize = $RCI->getprop('mail_pagesize');
558 if (!$pagesize) {
559 $pagesize = $RCI->getprop('pagesize');
560 }
561 $input_pagesize = new html_inputfield(array('name' => '_mail_pagesize', 'size' => 6, 'id' => "cfgmailpagesize"));
562 echo $input_pagesize->show($pagesize);
563
564 ?>
565 <div>Show up to X items in the mail messages list view.</div>
566 </dd>
567
568 <dt class="propname">addressbook_pagesize <span class="userconf">*</span></dt>
569 <dd>
570 <?php
571
572 $pagesize = $RCI->getprop('addressbook_pagesize');
573 if (!$pagesize) {
574 $pagesize = $RCI->getprop('pagesize');
575 }
576 $input_pagesize = new html_inputfield(array('name' => '_addressbook_pagesize', 'size' => 6, 'id' => "cfgabookpagesize"));
577 echo $input_pagesize->show($pagesize);
578
579 ?>
580 <div>Show up to X items in the contacts list view.</div>
581 </dd>
582
583 <dt class="propname">prefer_html <span class="userconf">*</span></dt>
584 <dd>
585 <?php
586
587 $check_htmlview = new html_checkbox(array('name' => '_prefer_html', 'id' => "cfghtmlview", 'value' => 1));
588 echo $check_htmlview->show(intval($RCI->getprop('prefer_html')));
589
590 ?>
591 <label for="cfghtmlview">Prefer displaying HTML messages</label><br />
592 </dd>
593
594 <dt class="propname">preview_pane <span class="userconf">*</span></dt>
595 <dd>
596 <?php
597
598 $check_prevpane = new html_checkbox(array('name' => '_preview_pane', 'id' => "cfgprevpane", 'value' => 1));
599 echo $check_prevpane->show(intval($RCI->getprop('preview_pane')));
600
601 ?>
602 <label for="cfgprevpane">If preview pane is enabled</label><br />
603 </dd>
604
605 <dt class="propname">htmleditor <span class="userconf">*</span></dt>
606 <dd>
607 <label for="cfghtmlcompose">Compose HTML formatted messages</label>
608 <?php
609
610 $select_htmlcomp = new html_select(array('name' => '_htmleditor', 'id' => "cfghtmlcompose"));
611 $select_htmlcomp->add('never', 0);
612 $select_htmlcomp->add('always', 1);
613 $select_htmlcomp->add('on reply to HTML message only', 2);
614 echo $select_htmlcomp->show(intval($RCI->getprop('htmleditor')));
615
616 ?>
617 </dd>
618
619 <dt class="propname">draft_autosave <span class="userconf">*</span></dt>
620 <dd>
621 <label for="cfgautosave">Save compose message every</label>
622 <?php
623
624 $select_autosave = new html_select(array('name' => '_draft_autosave', 'id' => 'cfgautosave'));
625 $select_autosave->add('never', 0);
626 foreach (array(1, 3, 5, 10) as $i => $min)
627 $select_autosave->add("$min min", $min*60);
628
629 echo $select_autosave->show(intval($RCI->getprop('draft_autosave')));
630
631 ?>
632 </dd>
633
634 <dt class="propname">mdn_requests <span class="userconf">*</span></dt>
635 <dd>
636 <?php
637
638 $mdn_opts = array(
639 0 => 'ask the user',
640 1 => 'send automatically',
641 3 => 'send receipt to user contacts, otherwise ask the user',
642 4 => 'send receipt to user contacts, otherwise ignore',
643 2 => 'ignore',
644 );
645
646 $select_mdnreq = new html_select(array('name' => '_mdn_requests', 'id' => "cfgmdnreq"));
647 $select_mdnreq->add(array_values($mdn_opts), array_keys($mdn_opts));
648 echo $select_mdnreq->show(intval($RCI->getprop('mdn_requests')));
649
650 ?>
651 <div>Behavior if a received message requests a message delivery notification (read receipt)</div>
652 </dd>
653
654 <dt class="propname">mime_param_folding <span class="userconf">*</span></dt>
655 <dd>
656 <?php
657
658 $select_param_folding = new html_select(array('name' => '_mime_param_folding', 'id' => "cfgmimeparamfolding"));
659 $select_param_folding->add('Full RFC 2231 (Roundcube, Thunderbird)', '0');
660 $select_param_folding->add('RFC 2047/2231 (MS Outlook, OE)', '1');
661 $select_param_folding->add('Full RFC 2047 (deprecated)', '2');
662
663 echo $select_param_folding->show(strval($RCI->getprop('mime_param_folding')));
664
665 ?>
666 <div>How to encode attachment long/non-ascii names</div>
667 </dd>
668
669 </dl>
670
671 <p class="hint"><span class="userconf">*</span>&nbsp; These settings are defaults for the user preferences</p>
672 </fieldset>
673
674
675 <fieldset>
676 <legend>Plugins</legend>
677 <dl class="configblock" id="cgfblockdisplay">
678
679 <?php
680 $plugins = $RCI->list_plugins();
681 foreach($plugins as $p)
682 {
683 $p_check = new html_checkbox(array('name' => '_plugins_'.$p['name'], 'id' => 'cfgplugin_'.$p['name'], 'value' => $p['name']));
684 echo '<dt class="propname"><label>';
685 echo $p_check->show($p['enabled'] ? $p['name'] : 0);
686 echo '&nbsp;' . $p['name'] . '</label></dt><dd>';
687 echo '<label for="cfgplugin_'.$p['name'].'" class="hint">' . $p['desc'] . '</label><br/></dd>';
688 }
689
690 ?>
691 </dl>
692
693 <p class="hint">Please consider checking dependencies of enabled plugins</p>
694 </fieldset>
695
696 <?php
697
698 echo '<p><input type="submit" name="submit" value="' . ($RCI->configured ? 'UPDATE' : 'CREATE') . ' CONFIG" ' . ($RCI->failures ? 'disabled' : '') . ' /></p>';
699
700 ?>
701 </form>