performConfigChecks(); // // Check whether we can read/write configuration // $config_readable = false; $config_writable = false; $config_exists = false; PMA_checkConfigRw($config_readable, $config_writable, $config_exists); if (!$config_writable || !$config_readable) { PMA_messagesSet( 'error', 'config_rw', __('Cannot load or save configuration'), PMA_sanitize( __( 'Please create web server writable folder [em]config[/em] in ' . 'phpMyAdmin top level directory as described in ' . '[doc@setup_script]documentation[/doc]. Otherwise you will be ' . 'only able to download or display it.' ) ) ); } // // Check https connection // $is_https = !empty($_SERVER['HTTPS']) && /*overload*/mb_strtolower($_SERVER['HTTPS']) == 'on'; if (!$is_https) { $text = __( 'You are not using a secure connection; all data (including potentially ' . 'sensitive information, like passwords) is transferred unencrypted!' ); if (!empty($_SERVER['REQUEST_URI']) && !empty($_SERVER['HTTP_HOST'])) { $link = htmlspecialchars( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); $text .= ' '; $text .= PMA_sanitize( sprintf( __( 'If your server is also configured to accept HTTPS requests ' . 'follow [a@%s]this link[/a] to use a secure connection.' ), $link ) ); } PMA_messagesSet('notice', 'no_https', __('Insecure connection'), $text); } echo '
'; echo PMA_URL_getHiddenInputs(); echo '
'; echo ''; echo '
'; // Check for done action info and set notice message if present switch ($action_done) { case 'config_saved': /* Use uniqid to display this message every time configuration is saved */ PMA_messagesSet( 'notice', uniqid('config_saved'), __('Configuration saved.'), PMA_sanitize( __( 'Configuration saved to file /etc/phpmyadmin/config.inc.php.' ) ) ); break; default: break; } echo '

' . __('Overview') . '

'; // message handling PMA_messagesEnd(); PMA_messagesShowHtml(); echo ''; echo '
'; echo __('Servers'); echo ''; // // Display server list // echo PMA_displayFormTop( 'index.php', 'get', array( 'page' => 'servers', 'mode' => 'add' ) ); echo '
'; if ($cf->getServerCount() > 0) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; foreach ($cf->getServers() as $id => $server) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } echo '
#' . __('Name') . '' . __('Authentication type') . 'DSN
' . $id . '' . htmlspecialchars($cf->getServerName($id)) . '' . htmlspecialchars($cf->getValue("Servers/$id/auth_type")) . '' . htmlspecialchars($cf->getServerDSN($id)) . ''; echo ''; echo '' . __('Edit') . ''; echo ' | '; echo '' . __('Delete') . ''; echo ''; echo '
'; } else { echo ''; echo ''; echo ''; echo ''; echo '
'; echo '' . __('There are no configured servers') . ''; echo '
'; } echo ''; echo ''; echo ''; echo ''; echo '
'; echo ''; echo '
'; echo '
'; echo PMA_displayFormBottom(); echo '
'; echo '
' . __('Configuration file') . ''; // // Display config file settings and load/save form // $form_display = new FormDisplay($cf); echo PMA_displayFormTop('config.php'); echo ''; // Display language list $opts = array( 'doc' => $form_display->getDocLink('DefaultLang'), 'values' => array(), 'values_escaped' => true); foreach ($all_languages as $each_lang_key => $each_lang) { $lang_name = PMA_languageName($each_lang); $opts['values'][$each_lang_key] = $lang_name; } echo PMA_displayInput( 'DefaultLang', __('Default language'), 'select', $cf->getValue('DefaultLang'), '', true, $opts ); // Display server list $opts = array( 'doc' => $form_display->getDocLink('ServerDefault'), 'values' => array(), 'values_disabled' => array()); if ($cf->getServerCount() > 0) { $opts['values']['0'] = __('let the user choose'); $opts['values']['-'] = '------------------------------'; if ($cf->getServerCount() == 1) { $opts['values_disabled'][] = '0'; } $opts['values_disabled'][] = '-'; foreach ($cf->getServers() as $id => $server) { $opts['values'][(string)$id] = $cf->getServerName($id) . " [$id]"; } } else { $opts['values']['1'] = __('- none -'); $opts['values_escaped'] = true; } echo PMA_displayInput( 'ServerDefault', __('Default server'), 'select', $cf->getValue('ServerDefault'), '', true, $opts ); // Display EOL list $opts = array( 'values' => array( 'unix' => 'UNIX / Linux (\n)', 'win' => 'Windows (\r\n)'), 'values_escaped' => true); $eol = PMA_ifSetOr($_SESSION['eol'], (PMA_IS_WINDOWS ? 'win' : 'unix')); echo PMA_displayInput( 'eol', __('End of line'), 'select', $eol, '', true, $opts ); echo ''; echo ''; echo ''; echo '
'; echo ''; echo ''; echo '   '; echo ''; echo ''; echo ''; echo '   '; echo ''; echo '
'; echo PMA_displayFormBottom(); echo '
'; echo '