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