| | |
| | | 'htmleditor' => 1, |
| | | ); |
| | | |
| | | // allow the current user to get to the next step |
| | | $_SESSION['allowinstaller'] = true; |
| | | |
| | | if (!empty($_POST['submit'])) { |
| | | |
| | | echo '<p class="notice">Copy the following configurations and save them in two files (names above the text box)'; |
| | |
| | | |
| | | $dsnw = DB::parseDSN($RCI->getprop('db_dsnw')); |
| | | |
| | | echo $select_dbtype->show($_POST['_dbtype'] ? $_POST['_dbtype'] : $dsnw['phptype']); |
| | | echo $select_dbtype->show($RCI->is_post ? $_POST['_dbtype'] : $dsnw['phptype']); |
| | | echo '<label for="cfgdbtype">Database type</label><br />'; |
| | | echo $input_dbhost->show($_POST['_dbhost'] ? $_POST['_dbhost'] : $dsnw['hostspec']); |
| | | echo $input_dbhost->show($RCI->is_post ? $_POST['_dbhost'] : $dsnw['hostspec']); |
| | | echo '<label for="cfgdbhost">Database server</label><br />'; |
| | | echo $input_dbname->show($_POST['_dbname'] ? $_POST['_dbname'] : $dsnw['database']); |
| | | echo $input_dbname->show($RCI->is_post ? $_POST['_dbname'] : $dsnw['database']); |
| | | echo '<label for="cfgdbname">Database name</label><br />'; |
| | | echo $input_dbuser->show($_POST['_dbuser'] ? $_POST['_dbuser'] : $dsnw['username']); |
| | | echo $input_dbuser->show($RCI->is_post ? $_POST['_dbuser'] : $dsnw['username']); |
| | | echo '<label for="cfgdbuser">Database user name (needs write permissions)</label><br />'; |
| | | echo $input_dbpass->show($_POST['_dbpass'] ? $_POST['_dbpass'] : $dsnw['password']); |
| | | echo $input_dbpass->show($RCI->is_post ? $_POST['_dbpass'] : $dsnw['password']); |
| | | echo '<label for="cfgdbpass">Database password</label><br />'; |
| | | |
| | | ?> |
| | |
| | | <div id="defaulthostlist"> |
| | | <?php |
| | | |
| | | $default_hosts = (array)$RCI->getprop('default_host'); |
| | | $text_imaphost = new textfield(array('name' => '_default_host[]', 'size' => 30)); |
| | | $default_hosts = $RCI->get_hostlist(); |
| | | |
| | | if (empty($default_hosts)) |
| | | $default_hosts = array(''); |
| | | |
| | | $i = 0; |
| | | foreach ($default_hosts as $key => $name) { |
| | | if (empty($name)) |
| | | continue; |
| | | $host = is_numeric($key) ? $name : $key; |
| | | foreach ($default_hosts as $host) { |
| | | echo '<div id="defaulthostentry'.$i.'">' . $text_imaphost->show($host); |
| | | if ($i++ > 0) |
| | | echo '<a href="#" onclick="removehostfield(this.parentNode);return false" class="removelink" title="Remove this entry">remove</a>'; |