3 // vim: expandtab sw=4 ts=4 sts=4:
6 * Don't display the page heading
8 define('PMA_DISPLAY_HEADING', 0);
11 * Gets some core libraries and displays a top message if required
13 require_once('./libraries/grab_globals.lib.php');
14 require_once('./libraries/common.lib.php');
15 setcookie('pma_lang', $lang, time() +
60*60*24*30, $cookie_path, '', $is_https);
16 if (isset($convcharset)) {
17 setcookie('pma_charset', $convcharset, time() +
60*60*24*30, $cookie_path, '', $is_https);
21 * Includes the ThemeManager
23 require_once('./libraries/select_theme.lib.php');
24 // Defines the "item" image depending on text direction
25 $item_img = $GLOBALS['pmaThemeImage'] . 'item_ltr.png';
26 // Defines for MainPageIconic
27 $str_iconic_list = '';
28 $str_iconic_colspan = '';
29 $str_normal_list = '<td valign="top" align="right" width="16"><img src="'.$item_img.'" border="0" hspace="2" vspace="5" /></td>';
30 if ($cfg['MainPageIconic']) {
31 $str_iconic_list .= "<td width=\"16\" valign=\"top\" align=\"center\" nowrap=\"nowrap\">%1\$s"
32 . "<img src=\"" . $pmaThemeImage . "%2\$s\" border=\"0\" width=\"16\" height=\"16\" hspace=\"2\" alt=\"%3\$s\" />"
34 $str_iconic_colspan .= ' colspan="2"';
36 $str_iconic_list = '';
37 $str_iconic_colspan = ' colspan="2"';
40 // Handles some variables that may have been sent by the calling script
48 require_once('./header.inc.php');
53 * Displays the welcome message and the server informations
56 // note: for proper display of RTL languages, I removed the
57 // align="left" in the next <td> tag
59 <table border
="0" cellpadding
="0" cellspacing
="0" width
="100%">
64 echo sprintf($strWelcome, ' phpMyAdmin ' . PMA_VERSION
. '');
69 // Don't display server info if $server == 0 (no server selected)
70 // loic1: modified in order to have a valid words order whatever is the
73 // robbat2: Use the verbose name of the server instead of the hostname
75 if (!empty($cfg['Server']['verbose'])) {
76 $server_info = $cfg['Server']['verbose'];
78 $server_info = $cfg['Server']['host'];
79 $server_info .= (empty($cfg['Server']['port']) ?
'' : ':' . $cfg['Server']['port']);
81 // loic1: skip this because it's not a so good idea to display sockets
83 // if (!empty($cfg['Server']['socket']) && PMA_PHP_INT_VERSION >= 30010) {
84 // $server_info .= ':' . $cfg['Server']['socket'];
86 $res = PMA_DBI_query('SELECT USER();');
87 list($mysql_cur_user_and_host) = PMA_DBI_fetch_row($res);
88 $mysql_cur_user = substr($mysql_cur_user_and_host, 0, strrpos($mysql_cur_user_and_host, '@'));
90 PMA_DBI_free_result($res);
93 $full_string = str_replace('%pma_s1%', PMA_MYSQL_STR_VERSION
, $strMySQLServerProcess);
94 $full_string = str_replace('%pma_s2%', $server_info, $full_string);
95 $full_string = str_replace('%pma_s3%', $mysql_cur_user_and_host, $full_string);
97 echo '<p><b>' . $full_string . '</b></p>' . "\n";
101 // Any message to display?
103 if (isset($message)) {
104 PMA_showMessage($message);
109 * Reload mysql (flush privileges)
111 if (($server > 0) && isset($mode) && ($mode == 'reload')) {
112 $result = PMA_DBI_query('FLUSH PRIVILEGES');
115 echo $strMySQLReloaded;
117 echo $strReloadFailed;
120 echo '</b></p>' . "\n\n";
125 if (@file_exists
($pmaThemeImage . 'logo_right.png')) {
126 // td and img seems not to obey the general dir= of the html tag
127 if ($GLOBALS['text_dir'] == 'ltr') {
128 $tmp_align = 'right';
132 echo ' <td align="' . $tmp_align . '" valign="top">' . "\n";
133 echo ' <img src="' . $pmaThemeImage . 'logo_right.png" alt="phpMyAdmin - Logo" border="0" hspace="5" vspace="5" align="' . $tmp_align . '" />' . "\n";
142 * Displays the MySQL servers choice form
144 if (!$cfg['LeftDisplayServers']) {
145 $show_server_left = FALSE;
146 include('./libraries/select_server.lib.php');
149 // nested table needed
151 <table border
="0" cellpadding
="0" cellspacing
="0">
154 <!-- MySQL
and phpMyAdmin related links
-->
157 * Displays the mysql server related links
159 $is_superuser = FALSE;
162 // Get user's global privileges ($dbh and $userlink are links to MySQL
163 // defined in the "common.lib.php" library)
164 // Note: if no controluser is defined, $dbh contains $userlink
166 $is_create_priv = FALSE;
167 $is_process_priv = TRUE;
168 $is_reload_priv = FALSE;
171 // We were trying to find if user if superuser with 'USE mysql'
172 // but users with the global priv CREATE TEMPORARY TABLES or LOCK TABLES
173 // can do a 'USE mysql' (even if they cannot see the tables)
174 $is_superuser = PMA_DBI_try_query('SELECT COUNT(*) FROM mysql.user', $userlink, PMA_DBI_QUERY_STORE
);
176 function PMA_analyseShowGrant($rs_usr, &$is_create_priv, &$db_to_create, &$is_reload_priv) {
178 $re0 = '(^|(\\\\\\\\)+|[^\])'; // non-escaped wildcards
179 $re1 = '(^|[^\])(\\\)+'; // escaped wildcards
180 while ($row = PMA_DBI_fetch_row($rs_usr)) {
181 $show_grants_dbname = substr($row[0], strpos($row[0], ' ON ') +
4,(strpos($row[0], '.', strpos($row[0], ' ON ')) - strpos($row[0], ' ON ') - 4));
182 $show_grants_dbname = ereg_replace('^`(.*)`','\\1', $show_grants_dbname);
183 $show_grants_str = substr($row[0],6,(strpos($row[0],' ON ')-6));
184 if (($show_grants_str == 'ALL') ||
($show_grants_str == 'ALL PRIVILEGES') ||
($show_grants_str == 'CREATE') ||
strpos($show_grants_str, 'CREATE')) {
185 if ($show_grants_dbname == '*') {
186 $is_create_priv = TRUE;
187 $is_reload_priv = TRUE;
191 else if ( (ereg($re0 . '%|_', $show_grants_dbname)
192 && !ereg('\\\\%|\\\\_', $show_grants_dbname))
193 ||
(!PMA_DBI_try_query('USE ' . ereg_replace($re1 .'(%|_)', '\\1\\3', $show_grants_dbname)) && substr(PMA_DBI_getError(), 1, 4) != 1044)
195 $db_to_create = ereg_replace($re0 . '%', '\\1...', ereg_replace($re0 . '_', '\\1?', $show_grants_dbname));
196 $db_to_create = ereg_replace($re1 . '(%|_)', '\\1\\3', $db_to_create);
197 $is_create_priv = TRUE;
204 // Detection for some CREATE privilege.
206 // Since MySQL 4.1.2, we can easily detect current user's grants
207 // using $userlink (no control user needed)
208 // and we don't have to try any other method for detection
210 if (PMA_MYSQL_INT_VERSION
>= 40102) {
211 $rs_usr = PMA_DBI_try_query('SHOW GRANTS', $userlink, PMA_DBI_QUERY_STORE
);
213 PMA_analyseShowGrant($rs_usr,$is_create_priv, $db_to_create, $is_reload_priv);
214 PMA_DBI_free_result($rs_usr);
219 // Before MySQL 4.1.2, we first try to find a priv in mysql.user. Hopefuly
220 // the controluser is correctly defined; but here, $dbh could contain
221 // $userlink so maybe the SELECT will fail
223 if (!$is_create_priv) {
224 $local_query = 'SELECT Create_priv, Reload_priv FROM mysql.user WHERE ' . PMA_convert_using('User') . ' = ' . PMA_convert_using(PMA_sqlAddslashes($mysql_cur_user), 'quoted') . ' OR ' . PMA_convert_using('User') . ' = ' . PMA_convert_using('', 'quoted') . ';';
225 $rs_usr = PMA_DBI_try_query($local_query, $dbh); // Debug: or PMA_mysqlDie('', $local_query, FALSE);
227 while ($result_usr = PMA_DBI_fetch_assoc($rs_usr)) {
228 if (!$is_create_priv) {
229 $is_create_priv = ($result_usr['Create_priv'] == 'Y');
231 if (!$is_reload_priv) {
232 $is_reload_priv = ($result_usr['Reload_priv'] == 'Y');
235 PMA_DBI_free_result($rs_usr);
236 unset($rs_usr, $result_usr);
240 // If the user has Create priv on a inexistant db, show him in the dialog
241 // the first inexistant db name that we find, in most cases it's probably
242 // the one he just dropped :)
243 if (!$is_create_priv) {
244 $local_query = 'SELECT DISTINCT Db FROM mysql.db WHERE ' . PMA_convert_using('Create_priv') . ' = ' . PMA_convert_using('Y', 'quoted') . ' AND (' . PMA_convert_using('User') . ' = ' .PMA_convert_using(PMA_sqlAddslashes($mysql_cur_user), 'quoted') . ' OR ' . PMA_convert_using('User') . ' = ' . PMA_convert_using('', 'quoted') . ');';
245 $rs_usr = PMA_DBI_try_query($local_query, $dbh, PMA_DBI_QUERY_STORE
);
247 $re0 = '(^|(\\\\\\\\)+|[^\])'; // non-escaped wildcards
248 $re1 = '(^|[^\])(\\\)+'; // escaped wildcards
249 while ($row = PMA_DBI_fetch_assoc($rs_usr)) {
250 if (ereg($re0 . '(%|_)', $row['Db'])
251 ||
(!PMA_DBI_try_query('USE ' . ereg_replace($re1 . '(%|_)', '\\1\\3', $row['Db'])) && substr(PMA_DBI_getError(), 1, 4) != 1044)) {
252 $db_to_create = ereg_replace($re0 . '%', '\\1...', ereg_replace($re0 . '_', '\\1?', $row['Db']));
253 $db_to_create = ereg_replace($re1 . '(%|_)', '\\1\\3', $db_to_create);
254 $is_create_priv = TRUE;
258 PMA_DBI_free_result($rs_usr);
259 unset($rs_usr, $row, $re0, $re1);
262 // Finally, let's try to get the user's privileges by using SHOW
264 // Maybe we'll find a little CREATE priv there :)
265 $rs_usr = PMA_DBI_try_query('SHOW GRANTS FOR ' . $mysql_cur_user_and_host . ';', $dbh, PMA_DBI_QUERY_STORE
);
267 // OK, now we'd have to guess the user's hostname, but we
268 // only try out the 'username'@'%' case.
269 $rs_usr = PMA_DBI_try_query('SHOW GRANTS FOR ' . $mysql_cur_user . ';', $dbh, PMA_DBI_QUERY_STORE
);
273 PMA_analyseShowGrant($rs_usr,$is_create_priv, $db_to_create, $is_reload_priv);
274 PMA_DBI_free_result($rs_usr);
279 } // end else (MySQL < 4.1.2)
281 if (!$cfg['SuggestDBName']) {
285 $common_url_query = PMA_generate_common_url();
288 $cfg['ShowMysqlInfo'] = TRUE;
289 $cfg['ShowMysqlVars'] = TRUE;
290 $cfg['ShowChgPassword'] = TRUE;
292 if ($cfg['Server']['auth_type'] == 'config') {
293 $cfg['ShowChgPassword'] = FALSE;
296 // loic1: Displays the MySQL column only if at least one feature has to be
298 if ($is_superuser ||
$is_create_priv ||
$is_process_priv ||
$is_reload_priv
299 ||
$cfg['ShowMysqlInfo'] ||
$cfg['ShowMysqlVars'] ||
$cfg['ShowChgPassword']
300 ||
$cfg['Server']['auth_type'] != 'config') {
302 <!-- MySQL server related links
-->
303 <table cellpadding
="3" cellspacing
="0">
305 <th
class="tblHeaders"<?php
echo $str_iconic_colspan; ?
>> 
; 
;MySQL
</th
>
308 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'','b_newdb.png',$strCreateNewDatabase,'') : $str_normal_list);
310 <!-- db creation form
-->
311 <td valign
="top" align
="<?php echo $cell_align_left; ?>" nowrap
="nowrap">
313 if ($is_create_priv) {
314 // The user is allowed to create a db
316 <form method
="post" action
="db_create.php"><b
>
317 <?php
echo $strCreateNewDatabase . ' ' . PMA_showMySQLDocu('Reference', 'CREATE_DATABASE'); ?
></b
><br
/>
318 <?php
echo PMA_generate_common_hidden_inputs('', '', 5); ?
>
319 <input type
="hidden" name
="reload" value
="1" />
320 <input type
="text" name
="db" value
="<?php echo $db_to_create; ?>" maxlength
="64" class="textfield" />
322 if (PMA_MYSQL_INT_VERSION
>= 40101) {
323 require_once('./libraries/mysql_charsets.lib.php');
324 echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION
, 'db_collation', NULL, NULL, TRUE, 5);
327 <input type
="submit" value
="<?php echo $strCreate; ?>" id
="buttonGo" />
332 <!-- db creation no privileges message
-->
333 <b
><?php
echo $strCreateNewDatabase . ': ' . PMA_showMySQLDocu('Reference', 'CREATE_DATABASE'); ?
></b
><br
/>
335 echo '<span class="noPrivileges">'
336 . ($cfg['ErrorIconic'] ?
'<img src="' . $pmaThemeImage . 's_error2.png" width="11" height="11" hspace="2" border="0" align="middle" />' : '')
337 . '' . $strNoPrivileges .'</span>';
338 } // end create db form or message
345 // Server related links
347 <!-- server
-related links
-->
349 if ($cfg['ShowMysqlInfo']) {
352 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="./server_status.php?'.$common_url_query.'">','s_status.png',$strMySQLShowStatus,'</a>') : $str_normal_list);
355 <a href
="./server_status.php?<?php echo $common_url_query; ?>">
356 <?php
echo $strMySQLShowStatus . "\n"; ?
>
362 if ($cfg['ShowMysqlVars']) {
365 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="./server_variables.php?'.$common_url_query.'">','s_vars.png',$strMySQLShowVars,'</a>') : $str_normal_list);
368 <a href
="./server_variables.php?<?php echo $common_url_query; ?>"><?php
echo $strMySQLShowVars;?
></a
> 
;<?php
echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_VARIABLES') . "\n"; ?
>
375 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="./server_processlist.php?'.$common_url_query.'">','s_process.png',$strMySQLShowProcess,'</a>') : $str_normal_list);
378 <a href
="./server_processlist.php?<?php echo $common_url_query; ?>">
379 <?php
echo $strMySQLShowProcess; ?
></a
> 
;
380 <?php
echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_PROCESSLIST') . "\n"; ?
>
385 if (PMA_MYSQL_INT_VERSION
>= 40100) {
389 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="./server_collations.php?'.$common_url_query.'">','s_asci.png',$strCharsetsAndCollations,'</a>') : $str_normal_list);
392 <a href
="./server_collations.php?<?php echo $common_url_query; ?>">
393 <?php
echo $strCharsetsAndCollations; ?
></a
> 
;
400 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="./server_engines.php?'.$common_url_query.'">','b_engine.png',$strStorageEngines,'</a>') : $str_normal_list);
403 <a href
="./server_engines.php?<?php echo $common_url_query; ?>">
404 <?php
echo $strStorageEngines; ?
></a
> 
;
408 if ($is_reload_priv) {
412 echo ' ' . ($str_iconic_list!='' ?
sprintf($str_iconic_list,'<a href="main.php?'.$common_url_query.'&mode=reload">','s_reload.png',$strReloadMySQL,'</a>') : $str_normal_list);
415 <a href
="main.php?<?php echo $common_url_query; ?>&mode=reload">
416 <?php
echo $strReloadMySQL; ?
></a
> 
;
417 <?php
echo PMA_showMySQLDocu('MySQL_Database_Administration', 'FLUSH') . "\n"; ?
>
427 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="server_privileges.php?'.$common_url_query.'">','s_rights.png',$strPrivileges,'</a>') : $str_normal_list);
430 <a href
="server_privileges.php?<?php echo $common_url_query; ?>">
431 <?php
echo $strPrivileges; ?
></a
> 
;
437 $binlogs = PMA_DBI_try_query('SHOW MASTER LOGS', NULL, PMA_DBI_QUERY_STORE
);
439 if (PMA_DBI_num_rows($binlogs) > 0) {
442 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="server_binlog.php?'.$common_url_query.'">','s_tbl.png',$strBinaryLog,'</a>') : $str_normal_list);
445 <a href
="server_binlog.php?<?php echo $common_url_query; ?>">
446 <?php
echo $strBinaryLog; ?
></a
> 
;
451 PMA_DBI_free_result($binlogs);
456 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="server_databases.php?'.$common_url_query.'">','s_db.png',$strDatabases,'</a>') : $str_normal_list);
459 <a href
="./server_databases.php?<?php echo $common_url_query; ?>">
460 <?php
echo $strDatabases; ?
></a
>
465 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="server_export.php?'.$common_url_query.'">','b_export.png',$strExport,'</a>') : $str_normal_list);
468 <a href
="./server_export.php?<?php echo $common_url_query; ?>">
469 <?php
echo $strExport; ?
></a
>
474 // Change password (needs another message)
475 if ($cfg['ShowChgPassword']) {
480 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="user_password.php?'.$common_url_query.'">','s_passwd.png',$strChangePassword,'</a>') : $str_normal_list);
483 <a href
="user_password.php?<?php echo $common_url_query; ?>">
484 <?php
echo ($strChangePassword); ?
></a
>
490 // Logout for advanced authentication
491 if ($cfg['Server']['auth_type'] != 'config') {
492 $http_logout = ($cfg['Server']['auth_type'] == 'http')
494 . ' <a href="./Documentation.html#login_bug" target="documentation">'
495 . ($cfg['ReplaceHelpImg'] ?
'<img src="' . $pmaThemeImage . 'b_info.png" width="11" height="11" border="0" alt="Info" align="middle" />' : '(*)') . '</a>'
501 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="index.php?'.$common_url_query.'&old_usr='.urlencode($PHP_AUTH_USER).'">','s_loggoff.png',$strLogout,'</a>') : $str_normal_list);
505 <a href
="index.php?<?php echo $common_url_query; ?>&old_usr=<?php echo urlencode($PHP_AUTH_USER); ?>" target
="_parent">
506 <b
><?php
echo $strLogout; ?
></b
></a
> 
;<?php
echo $http_logout . "\n"; ?
>
515 } // end of if ($server > 0)
520 <td width
="20"> 
;</td
>
522 <table border
="0" cellpadding
="3" cellspacing
="0">
524 <th
class="tblHeaders"<?php
echo $str_iconic_colspan; ?
>> 
; 
;phpMyAdmin
</th
>
527 // Displays language selection combo
528 if (empty($cfg['Lang'])) {
530 <!-- Language Selection
-->
532 echo ' ' . ($str_iconic_list !='' ?
sprintf($str_iconic_list,'<a href="./translators.html" target="documentation">','s_lang.png','Language','</a>') : $str_normal_list);
535 <form method
="post" action
="index.php" target
="_parent">
536 <input type
="hidden" name
="convcharset" value
="<?php echo $convcharset; ?>" />
537 <input type
="hidden" name
="server" value
="<?php echo $server; ?>" />
538 Language
<a href
="./translators.html" target
="documentation"><?php
539 if ($cfg['ReplaceHelpImg']){
540 echo '<img src="' . $pmaThemeImage . 'b_info.png" border="0" width="11" height="11" alt="Info" hspace="1" vspace="1" />';
542 ?
></a
>: <select name
="lang" dir
="ltr" onchange
="this.form.submit();" style
="vertical-align: middle">
547 * Sorts available languages by their true names
549 * @param array the array to be sorted
550 * @param mixed a required parameter
552 * @return the sorted array
556 function PMA_cmp(&$a, $b)
558 return (strcmp($a[1], $b[1]));
559 } // end of the 'PMA_cmp()' function
561 uasort($available_languages, 'PMA_cmp');
562 foreach ($available_languages AS $id => $tmplang) {
563 $lang_name = ucfirst(substr(strrchr($tmplang[0], '|'), 1));
565 $selected = ' selected="selected"';
570 echo '<option value="' . $id . '"' . $selected . '>' . $lang_name . ' (' . $id . ')</option>' . "\n";
574 <noscript
><input type
="submit" value
="Go" style
="vertical-align: middle" /></noscript
>
582 if (isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding']
583 && $server != 0 && $allow_recoding && PMA_MYSQL_INT_VERSION
< 40100) {
586 <!-- Charset Selection
-->
588 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'','s_asci.png',$strMySQLCharset,'') : $str_normal_list);
591 <form method
="post" action
="index.php" target
="_parent">
592 <input type
="hidden" name
="server" value
="<?php echo $server; ?>" />
593 <input type
="hidden" name
="lang" value
="<?php echo $lang; ?>" />
594 <?php
echo $strMySQLCharset;?
>:
595 <select name
="convcharset" dir
="ltr" onchange
="this.form.submit();" style
="vertical-align: middle">
598 foreach ($cfg['AvailableCharsets'] AS $id => $tmpcharset) {
599 if ($convcharset == $tmpcharset) {
600 $selected = ' selected="selected"';
605 . '<option value="' . $tmpcharset . '"' . $selected . '>' . $tmpcharset . '</option>' . "\n";
609 <noscript
><input type
="submit" value
="Go" style
="vertical-align: middle" /></noscript
>
614 } elseif ($server != 0 && PMA_MYSQL_INT_VERSION
>= 40100) {
615 echo ' <!-- Charset Info -->' . "\n"
617 .' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'','s_asci.png',$strMySQLCharset,'') : $str_normal_list) . "\n"
619 . ' ' . $strMySQLCharset . ': '
621 . ' ' . $mysql_charsets_descriptions[$mysql_charset_map[strtolower($charset)]] . "\n"
622 . ' (' . $mysql_charset_map[strtolower($charset)] . ')' . "\n"
626 . ' <!-- MySQL Connection Collation -->' . "\n"
628 .' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'','s_asci.png',$strMySQLCharset,'') : $str_normal_list) . "\n"
630 . ' <form method="post" action="index.php" target="_parent">' . "\n"
631 . PMA_generate_common_hidden_inputs(NULL, NULL, 4, 'collation_connection')
632 . ' <label for="select_collation_connection">' . "\n"
633 . ' ' . $strMySQLConnectionCollation . ': ' . "\n"
635 . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION
, 'collation_connection', 'select_collation_connection', $collation_connection, TRUE, 4, TRUE)
636 . ' <noscript><input type="submit" value="' . $strGo . '" style="vertical-align: middle" /></noscript>' . "\n"
637 // put the doc link in the form so that it appears on the same line
638 . PMA_showMySQLDocu('MySQL_Database_Administration', 'Charset-connection') . "\n"
645 // added by Michael Keck <mail_at_michaelkeck_dot_de>
646 // ThemeManager if available
648 if (isset($available_themes_choices) && $available_themes_choices > 1) {
649 $theme_selected = FALSE;
650 $theme_preview_path= './themes.php';
651 $theme_preview_href = '<a href="' . $theme_preview_path . '" target="themes" onclick="'
652 . "window.open('" . $theme_preview_path . "','themes','left=10,top=20,width=510,height=350,scrollbars=yes,status=yes,resizable=yes');"
655 <!-- Theme Manager
-->
658 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,$theme_preview_href,'s_theme.png',(isset($strTheme) ?
$strTheme : 'Theme (Style)'),'</a>') : $str_normal_list) . "\n";
661 <form name
="setTheme" method
="post" action
="index.php" target
="_parent">
663 echo PMA_generate_common_hidden_inputs('', '', 5);
664 echo $theme_preview_href
665 . (isset($strTheme) ?
$strTheme : 'Theme (Style)')
668 <select name
="set_theme" dir
="ltr" onchange
="this.form.submit();" style
="vertical-align: middle">
670 foreach ($available_themes_choices AS $cur_theme) {
671 echo '<option value="' . $cur_theme . '"';
672 if ($cur_theme == $theme) {
673 echo ' selected="selected"';
675 echo '>' . htmlspecialchars($available_themes_choices_names[$cur_theme]) . '</option>';
679 <noscript
><input type
="submit" value
="Go" style
="vertical-align: middle" /></noscript
>
686 <!-- Documentation
-->
688 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="Documentation.html" target="documentation">','b_docs.png',$strPmaDocumentation,'</a>') : $str_normal_list);
691 <a href
="Documentation.html" target
="documentation"><b
><?php
echo $strPmaDocumentation; ?
></b
></a
>
696 if ($is_superuser ||
$cfg['ShowPhpInfo']) {
698 <!-- PHP Information
-->
700 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="phpinfo.php?' . PMA_generate_common_url() . '" target="_blank">','php_sym.png',$strShowPHPInfo,'</a>') : $str_normal_list);
703 <a href
="phpinfo.php?<?php echo PMA_generate_common_url(); ?>" target
="_blank"><?php
echo $strShowPHPInfo; ?
></a
>
711 <!-- phpMyAdmin related urls
-->
713 echo ' ' . ($str_iconic_list != '' ?
sprintf($str_iconic_list,'<a href="http://www.phpMyAdmin.net/" target="_blank">','b_home.png',$strHomepageOfficial,'</a>') : $str_normal_list);
716 <a href
="http://www.phpMyAdmin.net/" target
="_blank"><?php
echo $strHomepageOfficial; ?
></a
>
721 echo '<td><img src="' .$GLOBALS['pmaThemeImage'] . 'spacer.png' . '" width="1" height="1" border="0" /></td>';
724 [<a href
="changelog.php" target
="_blank">ChangeLog
</a
>]
725  
; 
; 
;[<a href
="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmyadmin/phpMyAdmin/" target
="_blank">CVS
</a
>]
726  
; 
; 
;[<a href
="http://sourceforge.net/mail/?group_id=23067" target
="_blank">Lists
</a
>]
740 * Displays the "empty $cfg['PmaAbsoluteUri'] warning"
741 * modified: 2004-05-05 mkkeck
743 if ($display_pmaAbsoluteUri_warning) {
744 echo '<div class="warning">' . $strPmaUriError . '</div>' . "\n";
748 * Warning if using the default MySQL privileged account
749 * modified: 2004-05-05 mkkeck
752 && $cfg['Server']['user'] == 'root'
753 && $cfg['Server']['password'] == '') {
754 echo '<div class="warning">' . $strInsecureMySQL . '</div>' . "\n";
758 * Warning for PHP 4.2.3
759 * modified: 2004-05-05 mkkeck
762 if (PMA_PHP_INT_VERSION
== 40203 && @extension_loaded
('mbstring')) {
763 echo '<div class="warning">' . $strPHP40203 . '</div>' . "\n";
767 * Nijel: As we try to hadle charsets by ourself, mbstring overloads just
768 * break it, see bug 1063821.
771 if (@extension_loaded
('mbstring') && @ini_get
('mbstring.func_overload') > 1) {
772 echo '<div class="warning">' . $strMbOverloadWarning . '</div>' . "\n";
776 * Nijel: mbstring is used for handling multibyte inside parser, so it is good
777 * to tell user something might be broken without it, see bug #1063149.
779 if ($GLOBALS['using_mb_charset'] && !@extension_loaded
('mbstring')) {
780 echo '<div class="warning">' . $strMbExtensionMissing . '</div>' . "\n";
784 * Warning for old PHP version
785 * modified: 2004-05-05 mkkeck
788 if (PMA_PHP_INT_VERSION
< 40100) {
789 echo '<div class="warning">' . sprintf($strUpgrade, 'PHP', '4.1.0') . '</div>' . "\n";
793 * Warning for old MySQL version
794 * modified: 2004-05-05 mkkeck
796 // not yet defined before the server choice
797 if (defined('PMA_MYSQL_INT_VERSION') && PMA_MYSQL_INT_VERSION
< 32332) {
798 echo '<div class="warning">' . sprintf($strUpgrade, 'MySQL', '3.23.32') . '</div>' . "\n";
801 * Displays the footer
804 require_once('./footer.inc.php');