diff --git a/htdocs/sql/main.php b/htdocs/sql/main.php new file mode 100755 --- /dev/null +++ b/htdocs/sql/main.php @@ -0,0 +1,458 @@ +' . "\n"; + +/** + * Displays the mysql server related links + */ +if ($server > 0) { + + require_once './libraries/check_user_privileges.lib.php'; + // why this? a non-priv user should be able to change his + // password if the configuration permits + //$cfg['ShowChgPassword'] = $is_superuser = PMA_isSuperuser(); + $is_superuser = PMA_isSuperuser(); + + if ($cfg['Server']['auth_type'] == 'config') { + $cfg['ShowChgPassword'] = false; + } +} +?> + +
+ 0) { + // robbat2: Use the verbose name of the server instead of the hostname + // if a value is set + $server_info = ''; + if (!empty($cfg['Server']['verbose'])) { + $server_info .= htmlspecialchars($cfg['Server']['verbose']); + if ($GLOBALS['cfg']['ShowServerInfo']) { + $server_info .= ' ('; + } + } + if ($GLOBALS['cfg']['ShowServerInfo'] || empty($cfg['Server']['verbose'])) { + $server_info .= PMA_DBI_get_host_info(); + } + + if (!empty($cfg['Server']['verbose']) && $GLOBALS['cfg']['ShowServerInfo']) { + $server_info .= ')'; + } + // loic1: skip this because it's not a so good idea to display sockets + // used to everybody + // if (!empty($cfg['Server']['socket']) && PMA_PHP_INT_VERSION >= 30010) { + // $server_info .= ':' . $cfg['Server']['socket']; + // } + $mysql_cur_user_and_host = PMA_DBI_fetch_value('SELECT USER();'); + + + // should we add the port info here? + $short_server_info = (!empty($GLOBALS['cfg']['Server']['verbose']) + ? $GLOBALS['cfg']['Server']['verbose'] + : $GLOBALS['cfg']['Server']['host']); + echo '

' . $short_server_info .'

' . "\n"; + unset($short_server_info); +} else { + // Case when no server selected + //echo '

MySQL

' . "\n"; +} + +if ($server > 0) { + echo ''; +} // end of if ($server > 0) +?> +
+
+phpMyAdmin - ' . PMA_VERSION . '' + . "\n"; + +echo ' +
+ here, otherwise it will not extend the outer div to the + * full height of the inner divs + */ +?> +
+
+ + +' . $error . '' . "\n"; + } +} + +/** + * Warning if using the default MySQL privileged account + * modified: 2004-05-05 mkkeck + */ +if ($server != 0 + && $cfg['Server']['user'] == 'root' + && $cfg['Server']['password'] == '') { + echo '
' . $strInsecureMySQL . '
' . "\n"; +} + +/** + * Warning for PHP 4.2.3 + * modified: 2004-05-05 mkkeck + */ +if (PMA_PHP_INT_VERSION == 40203 && @extension_loaded('mbstring')) { + echo '
' . $strPHP40203 . '
' . "\n"; +} + +/** + * Nijel: As we try to handle charsets by ourself, mbstring overloads just + * break it, see bug 1063821. + */ +if (@extension_loaded('mbstring') && @ini_get('mbstring.func_overload') > 1) { + echo '
' . $strMbOverloadWarning . '
' . "\n"; +} + +/** + * Nijel: mbstring is used for handling multibyte inside parser, so it is good + * to tell user something might be broken without it, see bug #1063149. + */ +if ($GLOBALS['using_mb_charset'] && !@extension_loaded('mbstring')) { + echo '
' . $strMbExtensionMissing . '
' . "\n"; +} + +/** + * Warning for old PHP version + */ +if (PMA_PHP_INT_VERSION < 40200) { + echo '
' . sprintf($strUpgrade, 'PHP', '4.2.0') . '
' . "\n"; +} + +/** + * Warning for old MySQL version + * modified: 2004-05-05 mkkeck + */ +// not yet defined before the server choice +if (defined('PMA_MYSQL_INT_VERSION') && PMA_MYSQL_INT_VERSION < 32332) { + echo '
' . sprintf($strUpgrade, 'MySQL', '3.23.32') . '
' . "\n"; +} + +/** + * Warning about different MySQL library and server version + * (a difference on the third digit does not count) + */ +if ($server > 0 && substr(PMA_MYSQL_CLIENT_API, 0, 3) != substr(PMA_MYSQL_INT_VERSION, 0, 3)) { + echo '
' + . PMA_sanitize(sprintf($strMysqlLibDiffersServerVersion, + PMA_DBI_get_client_info(), + substr(PMA_MYSQL_STR_VERSION, 0, strpos(PMA_MYSQL_STR_VERSION . '-', '-')))) + . '
' . "\n"; +} + +/** + * Warning about wrong controluser settings + */ +if (defined('PMA_DBI_CONNECT_FAILED_CONTROLUSER')) { + echo '
' . $strControluserFailed . '
' . "\n"; +} + +/** + * Warning about missing mcrypt extension + */ +if (defined('PMA_WARN_FOR_MCRYPT')) { + echo '
' . PMA_sanitize(sprintf($strCantLoad, 'mcrypt')) . '
' . "\n"; +} + +/** + * Warning about Suhosin + */ +if ($cfg['SuhosinDisableWarning'] == false && @ini_get('suhosin.request.max_value_length')) { + echo '
' . PMA_sanitize(sprintf($strSuhosin, '[a@./Documentation.html#faq1_38@_blank]', '[/a]')) . '
' . "\n"; +} + +/** + * prints list item for main page + * + * @param string $name displayed text + * @param string $id id, used for css styles + * @param string $url make item as link with $url as target + * @param string $mysql_help_page display a link to MySQL's manual + * @param string $target special target for $url + */ +function PMA_printListItem($name, $id = null, $url = null, $mysql_help_page = null, $target = null) +{ + echo '
  • '; + if (null !== $url) { + echo ''; + } + + echo $name; + + if (null !== $url) { + echo '' . "\n"; + } + if (null !== $mysql_help_page) { + echo PMA_showMySQLDocu('', $mysql_help_page); + } + echo '
  • '; +} + +/** + * Displays the footer + */ +require_once './libraries/footer.inc.php'; +?>