Aleksander Machniak
2016-05-20 e48f8945b32ab5b67f1cdeb53a37d3d196e31e4d
commit | author | age
619c32 1 <?php
TB 2
eea11e 3 if (!class_exists('rcmail_install', false) || !is_object($RCI)) {
619c32 4     die("Not allowed! Please open installer/index.php instead.");
TB 5 }
6
7 ?>
354978 8 <form action="index.php" method="post">
T 9 <input type="hidden" name="_step" value="2" />
10 <?php
11
27564f 12 // register these boolean fields
871ca9 13 $RCI->bool_config_props = array(
27564f 14   'ip_check' => 1,
T 15   'enable_spellcheck' => 1,
16   'auto_create_user' => 1,
17   'smtp_log' => 1,
18   'prefer_html' => 1,
19   'preview_pane' => 1,
b77d0d 20   'debug_level' => 1,
27564f 21 );
T 22
967b34 23 // allow the current user to get to the next step
T 24 $_SESSION['allowinstaller'] = true;
25
c5042d 26 if (!empty($_POST['submit'])) {
77d534 27   $_SESSION['config'] = $RCI->create_config();
461a30 28
fd6b19 29   if ($RCI->save_configfile($_SESSION['config'])) {
57a197 30      echo '<p class="notice">The config file was saved successfully into <tt>'.RCMAIL_CONFIG_DIR.'</tt> directory of your Roundcube installation.';
77d534 31
fd6b19 32      if ($RCI->legacy_config) {
57a197 33         echo '<br/><br/>Afterwards, please <b>remove</b> the old configuration files <tt>main.inc.php</tt> and <tt>db.inc.php</tt> from the config directory.';
D 34      }
77d534 35
57a197 36      echo '</p>';
77d534 37   }
fd6b19 38   else {
TB 39     echo '<p class="notice">Copy or download the following configuration and save it';
40     echo ' as <tt><b>config.inc.php</b></tt> within the <tt>'.RCUBE_CONFIG_DIR.'</tt> directory of your Roundcube installation.<br/>';
41     echo ' Make sure that there are no characters outside the <tt>&lt;?php ?&gt;</tt> brackets when saving the file.';
42     echo '&nbsp;<input type="button" onclick="location.href=\'index.php?_getconfig=1\'" value="Download" />';
77d534 43
fd6b19 44     if ($RCI->legacy_config) {
TB 45        echo '<br/><br/>Afterwards, please <b>remove</b> the old configuration files <tt>main.inc.php</tt> and <tt>db.inc.php</tt> from the config directory.';
46     }
77d534 47
fd6b19 48     echo '</p>';
77d534 49
fd6b19 50     $textbox = new html_textarea(array('rows' => 16, 'cols' => 60, 'class' => "configfile"));
TB 51     echo $textbox->show(($_SESSION['config']));
77d534 52   }
27564f 53
T 54   echo '<p class="hint">Of course there are more options to configure.
77d534 55     Have a look at the defaults.inc.php file or visit <a href="http://trac.roundcube.net/wiki/Howto_Config" target="_blank">Howto_Config</a> to find out.</p>';
c5042d 56
T 57   echo '<p><input type="button" onclick="location.href=\'./index.php?_step=3\'" value="CONTINUE" /></p>';
461a30 58
c5042d 59   // echo '<style type="text/css"> .configblock { display:none } </style>';
T 60   echo "\n<hr style='margin-bottom:1.6em' />\n";
61 }
354978 62
T 63 ?>
64 <fieldset>
65 <legend>General configuration</legend>
c5042d 66 <dl class="configblock">
354978 67
T 68 <dt class="propname">product_name</dt>
69 <dd>
70 <?php
71
47124c 72 $input_prodname = new html_inputfield(array('name' => '_product_name', 'size' => 30, 'id' => "cfgprodname"));
354978 73 echo $input_prodname->show($RCI->getprop('product_name'));
T 74
75 ?>
76 <div>The name of your service (used to compose page titles)</div>
77 </dd>
78
c04b23 79 <dt class="propname">support_url</dt>
T 80 <dd>
81 <?php
82
83 $input_support = new html_inputfield(array('name' => '_support_url', 'size' => 50, 'id' => "cfgsupporturl"));
84 echo $input_support->show($RCI->getprop('support_url'));
85
86 ?>
87 <div>Provide an URL where a user can get support for this Roundcube installation.<br/>PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!</div>
b9bbc6 88 <p class="hint">Enter an absolute URL (including http://) to a support page/form or a mailto: link.</p>
c04b23 89 </dd>
T 90
91 <dt class="propname">skin_logo</dt>
92 <dd>
93 <?php
94
95 $input_skin = new html_inputfield(array('name' => '_skin_logo', 'size' => 50, 'id' => "cfgskinlogo"));
96 echo $input_skin->show($RCI->getprop('skin_logo'));
97
98 ?>
99 <div>Custom image to display instead of the Roundcube logo.</div>
100 <p class="hint">Enter a URL relative to the document root of this Roundcube installation.</p>
101 </dd>
102
354978 103 <dt class="propname">temp_dir</dt>
T 104 <dd>
105 <?php
106
47124c 107 $input_tempdir = new html_inputfield(array('name' => '_temp_dir', 'size' => 30, 'id' => "cfgtempdir"));
354978 108 echo $input_tempdir->show($RCI->getprop('temp_dir'));
T 109
110 ?>
a91c9b 111 <div>Use this folder to store temp files (must be writeable for webserver)</div>
354978 112 </dd>
T 113
114 <dt class="propname">des_key</dt>
115 <dd>
116 <?php
117
47124c 118 $input_deskey = new html_inputfield(array('name' => '_des_key', 'size' => 30, 'id' => "cfgdeskey"));
354978 119 echo $input_deskey->show($RCI->getprop('des_key'));
T 120
121 ?>
122 <div>This key is used to encrypt the users imap password before storing in the session record</div>
2912de 123 <p class="hint">It's a random generated string to ensure that every installation has its own key.
354978 124 If you enter it manually please provide a string of exactly 24 chars.</p>
c04b23 125 </dd>
T 126
127 <dt class="propname">ip_check</dt>
128 <dd>
129 <?php
130
131 $check_ipcheck = new html_checkbox(array('name' => '_ip_check', 'id' => "cfgipcheck"));
132 echo $check_ipcheck->show(intval($RCI->getprop('ip_check')), array('value' => 1));
133
134 ?>
135 <label for="cfgipcheck">Check client IP in session authorization</label><br />
136
137 <p class="hint">This increases security but can cause sudden logouts when someone uses a proxy with changing IPs.</p>
354978 138 </dd>
T 139
140
c5042d 141 <dt class="propname">enable_spellcheck</dt>
T 142 <dd>
143 <?php
82475f 144 $check_spell = new html_checkbox(array('name' => '_enable_spellcheck', 'id' => "cfgspellcheck"));
T 145 echo $check_spell->show(intval($RCI->getprop('enable_spellcheck')), array('value' => 1));
146 ?>
147 <label for="cfgspellcheck">Make use of the spell checker</label><br />
148 </dd>
c5042d 149
82475f 150 <dt class="propname">spellcheck_engine</dt>
T 151 <dd>
152 <?php
153 $select_spell = new html_select(array('name' => '_spellcheck_engine', 'id' => "cfgspellcheckengine"));
154 if (extension_loaded('pspell'))
cdf79e 155   $select_spell->add('Pspell', 'pspell');
c76e49 156 if (extension_loaded('enchant'))
AM 157   $select_spell->add('Enchant', 'enchant');
df7d6f 158 $select_spell->add('Googie', 'googie');
c76e49 159 $select_spell->add('ATD', 'atd');
82475f 160
T 161 echo $select_spell->show($RCI->is_post ? $_POST['_spellcheck_engine'] : 'pspell');
c5042d 162
T 163 ?>
82475f 164 <label for="cfgspellcheckengine">Which spell checker to use</label><br />
c5042d 165
cdf79e 166 <p class="hint">Googie implies that the message content will be sent to external server to check the spelling.</p>
c5042d 167 </dd>
T 168
ec0171 169 <dt class="propname">identities_level</dt>
A 170 <dd>
171 <?php
172
173 $input_ilevel = new html_select(array('name' => '_identities_level', 'id' => "cfgidentitieslevel"));
174 $input_ilevel->add('many identities with possibility to edit all params', 0);
175 $input_ilevel->add('many identities with possibility to edit all params but not email address', 1);
176 $input_ilevel->add('one identity with possibility to edit all params', 2);
177 $input_ilevel->add('one identity with possibility to edit all params but not email address', 3);
530936 178 $input_ilevel->add('one identity with possibility to edit only signature', 4);
ec0171 179 echo $input_ilevel->show($RCI->getprop('identities_level'), 0);
A 180
181 ?>
182 <div>Level of identities access</div>
183 <p class="hint">Defines what users can do with their identities.</p>
184 </dd>
185
354978 186 </dl>
T 187 </fieldset>
b77d0d 188
A 189 <fieldset>
190 <legend>Logging & Debugging</legend>
191 <dl class="loggingblock">
192
193 <dt class="propname">debug_level</dt>
194 <dd>
195 <?php
196
197 $value = $RCI->getprop('debug_level');
198 $check_debug = new html_checkbox(array('name' => '_debug_level[]'));
199 echo $check_debug->show(($value & 1) ? 1 : 0 , array('value' => 1, 'id' => 'cfgdebug1'));
200 echo '<label for="cfgdebug1">Log errors</label><br />';
201
202 echo $check_debug->show(($value & 4) ? 4 : 0, array('value' => 4, 'id' => 'cfgdebug4'));
203 echo '<label for="cfgdebug4">Print errors (to the browser)</label><br />';
204
205 ?>
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 ?>
a91c9b 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>
b77d0d 229 </dd>
A 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
354978 269
T 270 <fieldset>
6557d3 271 <legend>Database setup</legend>
c5042d 272 <dl class="configblock" id="cgfblockdb">
T 273 <dt class="propname">db_dsnw</dt>
274 <dd>
275 <p>Database settings for read/write operations:</p>
276 <?php
277
47124c 278 $select_dbtype = new html_select(array('name' => '_dbtype', 'id' => "cfgdbtype"));
398bff 279 foreach ($RCI->supported_dbs as $database => $ext) {
c5042d 280     if (extension_loaded($ext)) {
18df6f 281         $select_dbtype->add($database, substr($ext, 4));
c5042d 282     }
T 283 }
284
47124c 285 $input_dbhost = new html_inputfield(array('name' => '_dbhost', 'size' => 20, 'id' => "cfgdbhost"));
T 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"));
2e90ff 288 $input_dbpass = new html_passwordfield(array('name' => '_dbpass', 'size' => 20, 'id' => "cfgdbpass"));
c5042d 289
398bff 290 $dsnw = rcube_db::parse_dsn($RCI->getprop('db_dsnw'));
c5042d 291
237119 292 echo $select_dbtype->show($RCI->is_post ? $_POST['_dbtype'] : $dsnw['phptype']);
c5042d 293 echo '<label for="cfgdbtype">Database type</label><br />';
237119 294 echo $input_dbhost->show($RCI->is_post ? $_POST['_dbhost'] : $dsnw['hostspec']);
82475f 295 echo '<label for="cfgdbhost">Database server (omit for sqlite)</label><br />';
237119 296 echo $input_dbname->show($RCI->is_post ? $_POST['_dbname'] : $dsnw['database']);
fafe5d 297 echo '<label for="cfgdbname">Database name (use absolute path and filename for sqlite)</label><br />';
237119 298 echo $input_dbuser->show($RCI->is_post ? $_POST['_dbuser'] : $dsnw['username']);
82475f 299 echo '<label for="cfgdbuser">Database user name (needs write permissions)(omit for sqlite)</label><br />';
237119 300 echo $input_dbpass->show($RCI->is_post ? $_POST['_dbpass'] : $dsnw['password']);
82475f 301 echo '<label for="cfgdbpass">Database password (omit for sqlite)</label><br />';
c5042d 302
T 303 ?>
304 </dd>
399db1 305
AM 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
6557d3 317 </dl>
T 318 </fieldset>
319
c5042d 320
6557d3 321 <fieldset>
354978 322 <legend>IMAP Settings</legend>
c5042d 323 <dl class="configblock" id="cgfblockimap">
T 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
47124c 330 $text_imaphost = new html_inputfield(array('name' => '_default_host[]', 'size' => 30));
1c4e5d 331 $default_hosts = $RCI->get_hostlist();
T 332
333 if (empty($default_hosts))
334   $default_hosts = array('');
c5042d 335
b3f9df 336 $i = 0;
1c4e5d 337 foreach ($default_hosts as $host) {
b3f9df 338   echo '<div id="defaulthostentry'.$i.'">' . $text_imaphost->show($host);
T 339   if ($i++ > 0)
c5042d 340     echo '<a href="#" onclick="removehostfield(this.parentNode);return false" class="removelink" title="Remove this entry">remove</a>';
T 341   echo '</div>';
342 }
343
344 ?>
345 </div>
346 <div><a href="javascript:addhostfield()" class="addlink" title="Add another field">add</a></div>
347
b3f9df 348 <p class="hint">Leave blank to show a textbox at login. To use SSL/IMAPS connection, type ssl://hostname</p>
c5042d 349 </dd>
T 350
351 <dt class="propname">default_port</dt>
352 <dd>
353 <?php
354
47124c 355 $text_imapport = new html_inputfield(array('name' => '_default_port', 'size' => 6, 'id' => "cfgimapport"));
c5042d 356 echo $text_imapport->show($RCI->getprop('default_port'));
T 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
47124c 366 $text_userdomain = new html_inputfield(array('name' => '_username_domain', 'size' => 30, 'id' => "cfguserdomain"));
c5042d 367 echo $text_userdomain->show($RCI->getprop('username_domain'));
T 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
354978 375 <dt class="propname">auto_create_user</dt>
T 376 <dd>
377 <?php
378
47124c 379 $check_autocreate = new html_checkbox(array('name' => '_auto_create_user', 'id' => "cfgautocreate"));
354978 380 echo $check_autocreate->show(intval($RCI->getprop('auto_create_user')), array('value' => 1));
T 381
382 ?>
e019f2 383 <label for="cfgautocreate">Automatically create a new Roundcube user when log-in the first time</label><br />
354978 384
T 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
e019f2 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
354978 389 what means that you have to create those records manually or disable this option after the first login.</p>
T 390 </dd>
391
c5042d 392 <dt class="propname">sent_mbox</dt>
T 393 <dd>
394 <?php
395
47124c 396 $text_sentmbox = new html_inputfield(array('name' => '_sent_mbox', 'size' => 20, 'id' => "cfgsentmbox"));
c5042d 397 echo $text_sentmbox->show($RCI->getprop('sent_mbox'));
T 398
399 ?>
9abd0f 400 <div>Store sent messages in this folder</div>
c5042d 401
d08333 402 <p class="hint">Leave blank if sent messages should not be stored. Note: folder must include namespace prefix if any.</p>
c5042d 403 </dd>
T 404
405 <dt class="propname">trash_mbox</dt>
406 <dd>
407 <?php
408
47124c 409 $text_trashmbox = new html_inputfield(array('name' => '_trash_mbox', 'size' => 20, 'id' => "cfgtrashmbox"));
c5042d 410 echo $text_trashmbox->show($RCI->getprop('trash_mbox'));
T 411
412 ?>
413 <div>Move messages to this folder when deleting them</div>
414
d08333 415 <p class="hint">Leave blank if they should be deleted directly. Note: folder must include namespace prefix if any.</p>
c5042d 416 </dd>
T 417
418 <dt class="propname">drafts_mbox</dt>
419 <dd>
420 <?php
421
47124c 422 $text_draftsmbox = new html_inputfield(array('name' => '_drafts_mbox', 'size' => 20, 'id' => "cfgdraftsmbox"));
c5042d 423 echo $text_draftsmbox->show($RCI->getprop('drafts_mbox'));
T 424
425 ?>
9abd0f 426 <div>Store draft messages in this folder</div>
A 427
d08333 428 <p class="hint">Leave blank if they should not be stored. Note: folder must include namespace prefix if any.</p>
c5042d 429 </dd>
T 430
9abd0f 431 <dt class="propname">junk_mbox</dt>
A 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>
d08333 440
A 441 <p class="hint">Note: folder must include namespace prefix if any.</p>
442 </dd>
443
9abd0f 444 </dd>
354978 445 </dl>
T 446 </fieldset>
c5042d 447
354978 448
T 449 <fieldset>
450 <legend>SMTP Settings</legend>
c5042d 451 <dl class="configblock" id="cgfblocksmtp">
T 452 <dt class="propname">smtp_server</dt>
453 <dd>
454 <?php
455
47124c 456 $text_smtphost = new html_inputfield(array('name' => '_smtp_server', 'size' => 30, 'id' => "cfgsmtphost"));
c5042d 457 echo $text_smtphost->show($RCI->getprop('smtp_server'));
T 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
47124c 469 $text_smtpport = new html_inputfield(array('name' => '_smtp_port', 'size' => 6, 'id' => "cfgsmtpport"));
c5042d 470 echo $text_smtpport->show($RCI->getprop('smtp_port'));
T 471
472 ?>
82475f 473 <div>SMTP port (default is 25; 465 for SSL; 587 for submission)</div>
c5042d 474 </dd>
T 475
476 <dt class="propname">smtp_user/smtp_pass</dt>
477 <dd>
478 <?php
479
47124c 480 $text_smtpuser = new html_inputfield(array('name' => '_smtp_user', 'size' => 20, 'id' => "cfgsmtpuser"));
2e90ff 481 $text_smtppass = new html_passwordfield(array('name' => '_smtp_pass', 'size' => 20, 'id' => "cfgsmtppass"));
c5042d 482 echo $text_smtpuser->show($RCI->getprop('smtp_user'));
T 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
47124c 490 $check_smtpuser = new html_checkbox(array('name' => '_smtp_user_u', 'id' => "cfgsmtpuseru"));
c5042d 491 echo $check_smtpuser->show($RCI->getprop('smtp_user') == '%u' || $_POST['_smtp_user_u'] ? 1 : 0, array('value' => 1));
T 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 /*
47124c 502 $select_smtpauth = new html_select(array('name' => '_smtp_auth_type', 'id' => "cfgsmtpauth"));
c5042d 503 $select_smtpauth->add(array('(auto)', 'PLAIN', 'DIGEST-MD5', 'CRAM-MD5', 'LOGIN'), array('0', 'PLAIN', 'DIGEST-MD5', 'CRAM-MD5', 'LOGIN'));
T 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
47124c 514 $check_smtplog = new html_checkbox(array('name' => '_smtp_log', 'id' => "cfgsmtplog"));
c5042d 515 echo $check_smtplog->show(intval($RCI->getprop('smtp_log')), array('value' => 1));
T 516
517 ?>
b77d0d 518 <label for="cfgsmtplog">Log sent messages in <tt>{log_dir}/sendmail</tt> or to syslog.</label><br />
c5042d 519 </dd>
T 520
354978 521 </dl>
T 522 </fieldset>
523
c5042d 524
354978 525 <fieldset>
27564f 526 <legend>Display settings &amp; user prefs</legend>
c5042d 527 <dl class="configblock" id="cgfblockdisplay">
354978 528
569654 529 <dt class="propname">language <span class="userconf">*</span></dt>
354978 530 <dd>
T 531 <?php
532
522007 533 $input_locale = new html_inputfield(array('name' => '_language', 'size' => 6, 'id' => "cfglocale"));
T 534 echo $input_locale->show($RCI->getprop('language'));
354978 535
T 536 ?>
c8ae24 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>
522007 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>
354978 539 </dd>
T 540
9e8e5f 541 <dt class="propname">skin <span class="userconf">*</span></dt>
A 542 <dd>
543 <?php
544
e49064 545 $input_skin = new html_select(array('name' => '_skin', 'id' => "cfgskin"));
T 546 $input_skin->add($RCI->list_skins());
9e8e5f 547 echo $input_skin->show($RCI->getprop('skin'));
A 548
549 ?>
550 <div>Name of interface skin (folder in /skins)</div>
e49064 551 </dd>
T 552
08ffd9 553 <dt class="propname">mail_pagesize <span class="userconf">*</span></dt>
27564f 554 <dd>
T 555 <?php
556
08ffd9 557 $pagesize = $RCI->getprop('mail_pagesize');
A 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);
27564f 563
T 564 ?>
08ffd9 565 <div>Show up to X items in the mail messages list view.</div>
A 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>
27564f 581 </dd>
T 582
583 <dt class="propname">prefer_html <span class="userconf">*</span></dt>
584 <dd>
585 <?php
586
47124c 587 $check_htmlview = new html_checkbox(array('name' => '_prefer_html', 'id' => "cfghtmlview", 'value' => 1));
27564f 588 echo $check_htmlview->show(intval($RCI->getprop('prefer_html')));
T 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
47124c 598 $check_prevpane = new html_checkbox(array('name' => '_preview_pane', 'id' => "cfgprevpane", 'value' => 1));
27564f 599 echo $check_prevpane->show(intval($RCI->getprop('preview_pane')));
T 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>
868deb 607 <label for="cfghtmlcompose">Compose HTML formatted messages</label>
27564f 608 <?php
T 609
868deb 610 $select_htmlcomp = new html_select(array('name' => '_htmleditor', 'id' => "cfghtmlcompose"));
A 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')));
27564f 615
T 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
47124c 624 $select_autosave = new html_select(array('name' => '_draft_autosave', 'id' => 'cfgautosave'));
27564f 625 $select_autosave->add('never', 0);
569654 626 foreach (array(1, 3, 5, 10) as $i => $min)
27564f 627   $select_autosave->add("$min min", $min*60);
T 628
629 echo $select_autosave->show(intval($RCI->getprop('draft_autosave')));
630
631 ?>
632 </dd>
633
9e8e5f 634 <dt class="propname">mdn_requests <span class="userconf">*</span></dt>
A 635 <dd>
636 <?php
637
50baa6 638 $mdn_opts = array(
A 639     0 => 'ask the user',
640     1 => 'send automatically',
6c6bb0 641     3 => 'send receipt to user contacts, otherwise ask the user',
A 642     4 => 'send receipt to user contacts, otherwise ignore',
50baa6 643     2 => 'ignore',
A 644 );
645
9e8e5f 646 $select_mdnreq = new html_select(array('name' => '_mdn_requests', 'id' => "cfgmdnreq"));
50baa6 647 $select_mdnreq->add(array_values($mdn_opts), array_keys($mdn_opts));
9e8e5f 648 echo $select_mdnreq->show(intval($RCI->getprop('mdn_requests')));
A 649
650 ?>
651 <div>Behavior if a received message requests a message delivery notification (read receipt)</div>
652 </dd>
653
ffae15 654 <dt class="propname">mime_param_folding <span class="userconf">*</span></dt>
A 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
9bacb2 663 echo $select_param_folding->show(strval($RCI->getprop('mime_param_folding')));
ffae15 664
A 665 ?>
666 <div>How to encode attachment long/non-ascii names</div>
667 </dd>
668
354978 669 </dl>
27564f 670
T 671 <p class="hint"><span class="userconf">*</span>&nbsp; These settings are defaults for the user preferences</p>
354978 672 </fieldset>
T 673
b8837e 674
F 675 <fieldset>
676 <legend>Plugins</legend>
677 <dl class="configblock" id="cgfblockdisplay">
678
679 <?php
680 $plugins = $RCI->list_plugins();
8f576d 681 foreach($plugins as $p) 
F 682 {
b73702 683     $p_check = new html_checkbox(array('name' => '_plugins_'.$p['name'], 'id' => 'cfgplugin_'.$p['name'], 'value' => $p['name']));
TB 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>';
b8837e 688 }
F 689
690 ?>
691 </dl>
692
8f576d 693 <p class="hint">Please consider checking dependencies of enabled plugins</p>
b8837e 694 </fieldset>
F 695
354978 696 <?php
T 697
b3f9df 698 echo '<p><input type="submit" name="submit" value="' . ($RCI->configured ? 'UPDATE' : 'CREATE') . ' CONFIG" ' . ($RCI->failures ? 'disabled' : '') . ' /></p>';
354978 699
T 700 ?>
701 </form>