* @license http://www.gnu.org/licenses/gpl.html GNU GPL 2.0
* @version $Id: index.inc.php 11650 2008-10-14 10:31:07Z crackpl $
*/
if (!defined('PHPMYADMIN')) {
exit;
}
require_once './libraries/display_select_lang.lib.php';
require_once './setup/lib/FormDisplay.class.php';
require_once './setup/lib/index.lib.php';
// prepare unfiltered language list
$all_languages = PMA_langList();
uasort($all_languages, 'PMA_language_cmp');
$cf = ConfigFile::getInstance();
$separator = PMA_get_arg_separator('html');
// message handling
messages_begin();
//
// Check phpMyAdmin version
//
if (isset($_GET['version_check'])) {
PMA_version_check();
}
//
// Perform various security, compatibility and consistency checks
//
perform_config_checks();
//
// Check whether we can read/write configuration
//
$config_readable = false;
$config_writable = false;
$config_exists = false;
check_config_rw($config_readable, $config_writable, $config_exists);
if (!$config_writable || !$config_readable) {
messages_set('error', 'config_rw', 'CannotLoadConfig', PMA_lang('CannotLoadConfigMsg'));
}
//
// Check https connection
//
$is_https = !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
if (!$is_https) {
$text = $GLOBALS['strSetupInsecureConnectionMsg1'];
if (!empty($_SERVER['REQUEST_URI']) && !empty($_SERVER['HTTP_HOST'])) {
$text .= ' ' . PMA_lang('InsecureConnectionMsg2',
'https://' . htmlspecialchars($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
}
messages_set('warning', 'no_https', 'InsecureConnection', $text);
}
?>
'servers',
'mode' => 'add'
));
?>
'simple'));
// Display language list
$opts = array(
'doc' => $form_display->getDocLink('DefaultLang'),
'wiki' => $form_display->getWikiLink('DefaultLang'),
'values' => array(),
'values_escaped' => true);
foreach ($all_languages as $each_lang_key => $each_lang) {
if (!file_exists($GLOBALS['lang_path'] . $each_lang[1] . '.inc.php')) {
continue;
}
$lang_name = ucfirst(substr(strrchr($each_lang[0], '|'), 1));
// Include native name if non empty
if (!empty($each_lang[3])) {
$lang_name = $each_lang[3] . ' - ' . $lang_name;
}
$opts['values'][$each_lang_key] = $lang_name;
}
display_input('DefaultLang', $GLOBALS['strSetupDefaultLanguage'], '', 'select',
$cf->getValue('DefaultLang'), true, $opts);
// Display server list
$opts = array(
'doc' => $form_display->getDocLink('ServerDefault'),
'wiki' => $form_display->getWikiLink('ServerDefault'),
'values' => array(),
'values_disabled' => array());
if ($cf->getServerCount() > 0) {
$opts['values']['0'] = $GLOBALS['strSetupLetUserChoose'];
$opts['values']['-'] = '------------------------------';
if ($cf->getServerCount() == 1) {
$opts['values_disabled'][] = '0';
}
$opts['values_disabled'][] = '-';
foreach ($_SESSION['ConfigFile']['Servers'] as $id => $server) {
$opts['values'][(string)$id] = $cf->getServerName($id) . " [$id]";
}
} else {
$opts['values']['1'] = $GLOBALS['strSetupOptionNone'];
$opts['values_escaped'] = true;
}
display_input('ServerDefault', $GLOBALS['strSetupDefaultServer'], '', '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'));
display_input('eol', $GLOBALS['strSetupEndOfLine'], '', 'select',
$eol, true, $opts);
?>
/>
/>
/>
|