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