added $GLOBALS['PMA_errors'] array
This commit is contained in:
@@ -21,6 +21,8 @@ $Source$
|
||||
libraries/select_lang.php: keep the global space clean
|
||||
- unset variables after use
|
||||
- commented out some never used variables
|
||||
* main.php, libraries/common.lib.php, libraries/dbi/*:
|
||||
- added $GLOBALS['PMA_errors'] array
|
||||
|
||||
2005-11-16 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* tbl_properties_links.php: missing menu tabs
|
||||
|
@@ -51,10 +51,14 @@
|
||||
// TODO: remove direct calling from elsewhere
|
||||
require_once('./libraries/grab_globals.lib.php');
|
||||
|
||||
/**
|
||||
* @var array $GLOBALS['PMA_errors'] holds errors
|
||||
*/
|
||||
$GLOBALS['PMA_errors'] = array();
|
||||
|
||||
/**
|
||||
* Minimum inclusion? (i.e. for the stylesheet builder)
|
||||
*/
|
||||
|
||||
if (!isset($is_minimum_common)) {
|
||||
$is_minimum_common = FALSE;
|
||||
}
|
||||
|
104
main.php
104
main.php
@@ -50,17 +50,17 @@ require_once('./header.inc.php');
|
||||
* Displays the welcome message and the server informations
|
||||
*/
|
||||
if ( @file_exists($pmaThemeImage . 'logo_right.png') ) {
|
||||
?>
|
||||
?>
|
||||
<img id="pmalogoright" src="<?php echo $pmaThemeImage; ?>logo_right.png"
|
||||
alt="phpMyAdmin" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<h1>
|
||||
<?php
|
||||
echo sprintf( $strWelcome,
|
||||
'<bdo dir="ltr" xml:lang="en">phpMyAdmin ' . PMA_VERSION . '</bdo>');
|
||||
?>
|
||||
?>
|
||||
</h1>
|
||||
<?php
|
||||
// Don't display server info if $server == 0 (no server selected)
|
||||
@@ -93,7 +93,7 @@ if ( $server > 0 ) {
|
||||
|
||||
echo ' <p><strong>' . $full_string . '</strong></p>' . "\n";
|
||||
} // end if $server > 0
|
||||
?>
|
||||
?>
|
||||
<hr class="clearfloat" />
|
||||
|
||||
<?php
|
||||
@@ -132,7 +132,7 @@ if (!$cfg['LeftDisplayServers']) {
|
||||
}
|
||||
|
||||
// nested table needed
|
||||
?>
|
||||
?>
|
||||
<table>
|
||||
<tr><td valign="top">
|
||||
<?php
|
||||
@@ -155,58 +155,58 @@ if ( $server > 0 ) {
|
||||
$cfg['ShowChgPassword'] = FALSE;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
<table cellpadding="3" cellspacing="0">
|
||||
<tr><th class="tblHeaders" colspan="2" xml:lang="en" dir="ltr">MySQL</th></tr>
|
||||
<tr>
|
||||
<?php
|
||||
echo $str_iconic_list != '' ? sprintf($str_iconic_list,'','b_newdb.png',$strCreateNewDatabase,'') : $str_normal_list;
|
||||
?>
|
||||
?>
|
||||
<td valign="top">
|
||||
<?php require('./libraries/display_create_database.lib.php'); ?>
|
||||
<?php require('./libraries/display_create_database.lib.php'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_status.php?'.$common_url_query.'">','s_status.png',$strMySQLShowStatus,'</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><a href="./server_status.php?<?php echo $common_url_query; ?>">
|
||||
<?php echo $strMySQLShowStatus; ?>
|
||||
<?php echo $strMySQLShowStatus; ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr> <?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_variables.php?'.$common_url_query.'">','s_vars.png',$strMySQLShowVars,'</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><a href="./server_variables.php?<?php echo $common_url_query; ?>">
|
||||
<?php echo $strMySQLShowVars;?></a>
|
||||
<?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_VARIABLES'); ?>
|
||||
<?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_VARIABLES'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr> <?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_processlist.php?'.$common_url_query.'">','s_process.png',$strMySQLShowProcess,'</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><a href="./server_processlist.php?<?php echo $common_url_query; ?>">
|
||||
<?php echo $strMySQLShowProcess; ?></a>
|
||||
<?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_PROCESSLIST'); ?>
|
||||
<?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_PROCESSLIST'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if (PMA_MYSQL_INT_VERSION >= 40100) {
|
||||
?>
|
||||
?>
|
||||
<tr> <?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_collations.php?'.$common_url_query.'">','s_asci.png',$strCharsetsAndCollations,'</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><a href="./server_collations.php?<?php echo $common_url_query; ?>">
|
||||
<?php echo $strCharsetsAndCollations; ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<tr> <?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_engines.php?'.$common_url_query.'">','b_engine.png',$strStorageEngines,'</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><a href="./server_engines.php?<?php echo $common_url_query; ?>">
|
||||
<?php echo $strStorageEngines; ?></a>
|
||||
</td>
|
||||
@@ -214,10 +214,10 @@ if ( $server > 0 ) {
|
||||
<?php
|
||||
if ($is_reload_priv) {
|
||||
echo "\n";
|
||||
?>
|
||||
?>
|
||||
<tr> <?php
|
||||
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);
|
||||
?>
|
||||
?>
|
||||
<td><a href="main.php?<?php echo $common_url_query; ?>&mode=reload">
|
||||
<?php echo $strReloadMySQL; ?></a>
|
||||
<?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'FLUSH') . "\n"; ?>
|
||||
@@ -226,10 +226,10 @@ if ( $server > 0 ) {
|
||||
<?php
|
||||
}
|
||||
if ($is_superuser) {
|
||||
?>
|
||||
?>
|
||||
<tr> <?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="server_privileges.php?'.$common_url_query.'">','s_rights.png',$strPrivileges,'</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><a href="server_privileges.php?<?php echo $common_url_query; ?>">
|
||||
<?php echo $strPrivileges; ?></a>
|
||||
</td>
|
||||
@@ -239,10 +239,10 @@ if ( $server > 0 ) {
|
||||
$binlogs = PMA_DBI_try_query('SHOW MASTER LOGS', NULL, PMA_DBI_QUERY_STORE);
|
||||
if ($binlogs) {
|
||||
if (PMA_DBI_num_rows($binlogs) > 0) {
|
||||
?>
|
||||
?>
|
||||
<tr> <?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="server_binlog.php?'.$common_url_query.'">','s_tbl.png',$strBinaryLog,'</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><a href="server_binlog.php?<?php echo $common_url_query; ?>">
|
||||
<?php echo $strBinaryLog; ?></a>
|
||||
</td>
|
||||
@@ -252,10 +252,10 @@ if ( $server > 0 ) {
|
||||
PMA_DBI_free_result($binlogs);
|
||||
}
|
||||
unset($binlogs);
|
||||
?>
|
||||
?>
|
||||
<tr> <?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="server_databases.php?'.$common_url_query.'">','s_db.png',$strDatabases,'</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><a href="./server_databases.php?<?php echo $common_url_query; ?>">
|
||||
<?php echo $strDatabases; ?></a>
|
||||
</td>
|
||||
@@ -263,7 +263,7 @@ if ( $server > 0 ) {
|
||||
<tr>
|
||||
<?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="server_export.php?'.$common_url_query.'">','b_export.png',$strExport,'</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><a href="./server_export.php?<?php echo $common_url_query; ?>">
|
||||
<?php echo $strExport; ?></a>
|
||||
</td>
|
||||
@@ -271,7 +271,7 @@ if ( $server > 0 ) {
|
||||
<tr>
|
||||
<?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="server_import.php?'.$common_url_query.'">','b_import.png',$strImport,'</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><a href="./server_import.php?<?php echo $common_url_query; ?>">
|
||||
<?php echo $strImport; ?></a>
|
||||
</td>
|
||||
@@ -279,11 +279,11 @@ if ( $server > 0 ) {
|
||||
<?php
|
||||
// Change password (needs another message)
|
||||
if ($cfg['ShowChgPassword']) {
|
||||
?>
|
||||
?>
|
||||
<tr>
|
||||
<?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="user_password.php?'.$common_url_query.'">','s_passwd.png',$strChangePassword,'</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><a href="user_password.php?<?php echo $common_url_query; ?>">
|
||||
<?php echo ($strChangePassword); ?></a>
|
||||
</td>
|
||||
@@ -297,21 +297,21 @@ if ( $server > 0 ) {
|
||||
? '<a href="./Documentation.html#login_bug" target="documentation">'
|
||||
. ($cfg['ReplaceHelpImg'] ? '<img class="icon" src="' . $pmaThemeImage . 'b_info.png" width="11" height="11" alt="Info" />' : '(*)') . '</a>'
|
||||
: '';
|
||||
?>
|
||||
?>
|
||||
<tr>
|
||||
<?php
|
||||
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);
|
||||
?>
|
||||
?>
|
||||
<td><a href="index.php?<?php echo $common_url_query; ?>&old_usr=<?php echo urlencode($PHP_AUTH_USER); ?>"
|
||||
target="_parent">
|
||||
<b><?php echo $strLogout; ?></b></a>
|
||||
<?php echo $http_logout; ?>
|
||||
<?php echo $http_logout; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
} // end if
|
||||
} // end of if ($server > 0)
|
||||
?>
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
<td width="20"> </td>
|
||||
@@ -324,7 +324,7 @@ if (empty($cfg['Lang'])) {
|
||||
?>
|
||||
<tr><?php
|
||||
echo ($str_iconic_list !='' ? sprintf($str_iconic_list,'<a href="./translators.html" target="documentation">','s_lang.png','Language','</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><form method="post" action="index.php" target="_parent">
|
||||
<bdo xml:lang="en" dir="ltr">
|
||||
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
|
||||
@@ -358,7 +358,7 @@ if (empty($cfg['Lang'])) {
|
||||
echo ' ';
|
||||
echo '<option value="' . $id . '"' . $selected . '>' . $lang_name . ' (' . $id . ')</option>' . "\n";
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</select>
|
||||
</bdo>
|
||||
<noscript><input type="submit" value="<?php echo $strGo;?>" /></noscript>
|
||||
@@ -370,10 +370,10 @@ if (empty($cfg['Lang'])) {
|
||||
|
||||
if ( isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding']
|
||||
&& $server != 0 && $allow_recoding && PMA_MYSQL_INT_VERSION < 40100) {
|
||||
?>
|
||||
?>
|
||||
<tr><?php
|
||||
echo $str_iconic_list != '' ? sprintf($str_iconic_list,'','s_asci.png',$strMySQLCharset,'') : $str_normal_list;
|
||||
?>
|
||||
?>
|
||||
<td><form method="post" action="index.php" target="_parent">
|
||||
<input type="hidden" name="server" value="<?php echo $server; ?>" />
|
||||
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
|
||||
@@ -390,7 +390,7 @@ if ( isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding']
|
||||
echo ' '
|
||||
. '<option value="' . $tmpcharset . '"' . $selected . '>' . $tmpcharset . '</option>' . "\n";
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</select>
|
||||
<noscript><input type="submit" value="<?php echo $strGo;?>" /></noscript>
|
||||
</form>
|
||||
@@ -436,16 +436,16 @@ if (isset($available_themes_choices) && $available_themes_choices > 1) {
|
||||
$theme_preview_href = '<a href="' . $theme_preview_path . '" target="themes" onclick="'
|
||||
. "window.open('" . $theme_preview_path . "','themes','left=10,top=20,width=510,height=350,scrollbars=yes,status=yes,resizable=yes');"
|
||||
. '">';
|
||||
?>
|
||||
?>
|
||||
<tr>
|
||||
<?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,$theme_preview_href,'s_theme.png',$strTheme ,'</a>') : $str_normal_list) . "\n";
|
||||
?>
|
||||
?>
|
||||
<td><form name="setTheme" method="post" action="index.php" target="_parent">
|
||||
<?php
|
||||
echo PMA_generate_common_hidden_inputs( '', '', 5 );
|
||||
echo $theme_preview_href . $strTheme . '</a>:' . "\n";
|
||||
?>
|
||||
?>
|
||||
<select name="set_theme" xml:lang="en" dir="ltr" onchange="this.form.submit();" >
|
||||
<?php
|
||||
foreach ($available_themes_choices AS $cur_theme) {
|
||||
@@ -455,7 +455,7 @@ if (isset($available_themes_choices) && $available_themes_choices > 1) {
|
||||
}
|
||||
echo '>' . htmlspecialchars($available_themes_choices_names[$cur_theme]) . '</option>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</select>
|
||||
<noscript><input type="submit" value="<?php echo $strGo;?>" /></noscript>
|
||||
</form>
|
||||
@@ -463,10 +463,10 @@ if (isset($available_themes_choices) && $available_themes_choices > 1) {
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<tr><?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="Documentation.html" target="documentation">','b_docs.png',$strPmaDocumentation,'</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><a href="Documentation.html" target="documentation">
|
||||
<b><?php echo $strPmaDocumentation; ?></b></a>
|
||||
</td>
|
||||
@@ -474,21 +474,21 @@ if (isset($available_themes_choices) && $available_themes_choices > 1) {
|
||||
|
||||
<?php
|
||||
if ($cfg['ShowPhpInfo']) {
|
||||
?>
|
||||
?>
|
||||
<tr><?php
|
||||
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);
|
||||
?>
|
||||
?>
|
||||
<td><a href="phpinfo.php?<?php echo PMA_generate_common_url(); ?>"
|
||||
target="_blank"><?php echo $strShowPHPInfo; ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<tr>
|
||||
<?php
|
||||
echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="http://www.phpMyAdmin.net/" target="_blank">','b_home.png',$strHomepageOfficial,'</a>') : $str_normal_list);
|
||||
?>
|
||||
?>
|
||||
<td><a href="http://www.phpMyAdmin.net/" target="_blank">
|
||||
<?php echo $strHomepageOfficial; ?></a>
|
||||
</td>
|
||||
@@ -512,6 +512,12 @@ echo ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="http://www.php
|
||||
<hr />
|
||||
|
||||
<?php
|
||||
if ( ! empty( $GLOBALS['PMA_errors'] ) && is_array( $GLOBALS['PMA_errors'] ) ) {
|
||||
foreach( $GLOBALS['PMA_errors'] as $error ) {
|
||||
echo '<div class="error">' . $error . '</div>' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removed the "empty $cfg['PmaAbsoluteUri']" warning on 2005-08-23
|
||||
* See https://sourceforge.net/tracker/index.php?func=detail&aid=1257134&group_id=23067&atid=377411
|
||||
|
Reference in New Issue
Block a user