unified message boxes (error, warning, confirmation)
This commit is contained in:
parent
cdc95334c9
commit
a51f2533ea
@ -5,6 +5,13 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2005-10-26 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||
* themes/*/theme_right.css.php, libraries/auth/http.auth.lib.php,
|
||||
db_operations.php, mult_submits.inc.php, server_privileges.php,
|
||||
css/phpmyadmin.css.php, libraries/common.lib.php, sql.php,
|
||||
libraries/auth/cookie.auth.lib.php:
|
||||
unified message boxes (error, warning, confirmation)
|
||||
|
||||
2005-10-25 Michal Čihař <michal@cihar.com>
|
||||
* lang/english: "Log in" is correct naming for action (RFE #945440).
|
||||
* tbl_properties_operations.php: Allow to change auto_increment for
|
||||
|
||||
@ -8,6 +8,14 @@ require_once('./libraries/grab_globals.lib.php');
|
||||
require_once('./libraries/common.lib.php');
|
||||
require_once('./libraries/sqlparser.lib.php');
|
||||
|
||||
if ( $GLOBALS['text_dir'] === 'ltr' ) {
|
||||
$right = 'right';
|
||||
$left = 'left';
|
||||
} else {
|
||||
$right = 'left';
|
||||
$left = 'right';
|
||||
}
|
||||
|
||||
// Gets the default font sizes
|
||||
// garvin: TODO: Should be optimized to not include the whole common.lib.php bunch
|
||||
// but only functions used to determine browser heritage.
|
||||
|
||||
@ -251,18 +251,15 @@ if (!$is_information_schema) {
|
||||
. ' </form>' . "\n"
|
||||
. ' ' . "\n\n";
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
|
||||
if ($num_tables > 0
|
||||
if ( $num_tables > 0
|
||||
&& !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE) {
|
||||
echo '<tr><td colspan="3"><img src="' . $GLOBALS['pmaThemeImage'] . 'spacer.png' . '" width="1" height="1" border="0" alt="" /></td></tr>'
|
||||
. '<tr><th colspan="3" class="tblHeadError"><div class="errorhead">' . $strError . '</div></th></tr>'
|
||||
. '<tr><td colspan="3" class="tblError">'
|
||||
. sprintf(wordwrap($strRelationNotWorking,65,'<br />'), '<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $url_query . '">', '</a>')
|
||||
. '</td></tr>';
|
||||
echo '<div class="error"><h1>' . $strError . '</h1>'
|
||||
. sprintf( $strRelationNotWorking, '<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $url_query . '">', '</a>')
|
||||
. '</div>';
|
||||
} // end if
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
} // end if (!$is_information_schema)
|
||||
// not sure about leaving the PDF dialog for information_schema
|
||||
|
||||
|
||||
@ -186,30 +186,31 @@ if (top != self) {
|
||||
}
|
||||
echo "\n\n";
|
||||
|
||||
echo ' </table>' . "\n"
|
||||
. ' </form>' . "\n";
|
||||
|
||||
// Displays the warning message and the login form
|
||||
|
||||
if (empty($GLOBALS['cfg']['blowfish_secret'])) {
|
||||
?>
|
||||
<tr><td colspan="2" height="5"></td></tr>
|
||||
<tr>
|
||||
<th colspan="2" align="left" class="tblHeadError">
|
||||
<div class="errorhead"><?php echo $GLOBALS['strError']; ?></div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tblError" colspan="2" align="left"><?php echo $GLOBALS['strSecretRequired']; ?></td>
|
||||
</tr>
|
||||
<div class="error"><h1><?php echo $GLOBALS['strError']; ?></h1>
|
||||
<?php echo $GLOBALS['strSecretRequired']; ?>
|
||||
</div>
|
||||
<?php
|
||||
include('./config.footer.inc.php');
|
||||
echo ' </table>' . "\n"
|
||||
. ' </form>' . "\n"
|
||||
. ' </body>' . "\n"
|
||||
echo ' </body>' . "\n"
|
||||
. '</html>';
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
if ( !empty($conn_error)) {
|
||||
echo '<div class="error"><h1>' . $GLOBALS['strError'] . '</h1>' . "\n";
|
||||
echo $conn_error . '</div>' . "\n";
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
<!-- Login form -->
|
||||
<form method="post" action="index.php" name="login_form"<?php echo $autocomplete; ?> target="_top">
|
||||
@ -296,11 +297,6 @@ if (top != self) {
|
||||
<?php
|
||||
} // end if (server choice)
|
||||
echo "\n";
|
||||
if (!empty($conn_error)) {
|
||||
echo '<tr><td colspan="2" height="5"></td></tr>';
|
||||
echo '<tr><th colspan="2" align="left" class="tblHeadError"><div class="errorhead">' . $GLOBALS['strError'] . '</div></th></tr>' . "\n";
|
||||
echo '<tr><td colspan="2" align="left" class="tblError">'. $conn_error . '</td></tr>' . "\n";
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
|
||||
@ -19,8 +19,7 @@
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function PMA_auth()
|
||||
{
|
||||
function PMA_auth() {
|
||||
global $right_font_family, $font_size, $font_bigger;
|
||||
|
||||
header('WWW-Authenticate: Basic realm="phpMyAdmin ' . sprintf($GLOBALS['strRunning'], (empty($GLOBALS['cfg']['Server']['verbose']) ? str_replace('\'', '\\\'',$GLOBALS['cfg']['Server']['host']) : str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['verbose']))) . '"');
|
||||
@ -34,9 +33,7 @@ function PMA_auth()
|
||||
require('./libraries/header_meta_style.inc.php');
|
||||
?>
|
||||
</head>
|
||||
|
||||
<body bgcolor="<?php echo $GLOBALS['cfg']['RightBgColor']; ?>">
|
||||
|
||||
<body>
|
||||
<?php include('./config.header.inc.php'); ?>
|
||||
|
||||
<br /><br />
|
||||
@ -44,18 +41,14 @@ function PMA_auth()
|
||||
<h1><?php echo sprintf($GLOBALS['strWelcome'], ' phpMyAdmin ' . PMA_VERSION); ?></h1>
|
||||
</center>
|
||||
<br />
|
||||
<div class="warning"><p><?php echo $GLOBALS['strWrongUser']; ?></p></div>
|
||||
<div class="warning"><?php echo $GLOBALS['strWrongUser']; ?></div>
|
||||
|
||||
<?php include('./config.footer.inc.php'); ?>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<?php
|
||||
echo "\n";
|
||||
exit();
|
||||
|
||||
return TRUE;
|
||||
} // end of the 'PMA_auth()' function
|
||||
|
||||
|
||||
|
||||
@ -614,7 +614,7 @@ if ($is_minimum_common == FALSE) {
|
||||
}
|
||||
// ---
|
||||
echo "\n" . '<!-- PMA-SQL-ERROR -->' . "\n";
|
||||
echo ' <h1 class="errorhead">' . $GLOBALS['strError'] . '</h1>' . "\n";
|
||||
echo ' <div class="error"><h1>' . $GLOBALS['strError'] . '</h1>' . "\n";
|
||||
// if the config password is wrong, or the MySQL server does not
|
||||
// respond, do not show the query that would reveal the
|
||||
// username/password
|
||||
@ -623,13 +623,11 @@ if ($is_minimum_common == FALSE) {
|
||||
// Robbat2 - 12 January 2003, 9:46PM
|
||||
// Revised, Robbat2 - 13 January 2003, 2:59PM
|
||||
if (function_exists('PMA_SQP_isError') && PMA_SQP_isError()) {
|
||||
echo '<div class="error">' . "\n";
|
||||
echo PMA_SQP_getErrorString() . "\n";
|
||||
echo '</div>' . "\n";
|
||||
echo '<br />' . "\n";
|
||||
}
|
||||
// ---
|
||||
// modified to show me the help on sql errors (Michael Keck)
|
||||
echo '<div class="error">' . "\n";
|
||||
echo ' <p><strong>' . $GLOBALS['strSQLQuery'] . ':</strong>' . "\n";
|
||||
if (strstr(strtolower($formatted_sql),'select')) { // please show me help to the error on select
|
||||
echo PMA_showMySQLDocu('Reference', 'SELECT');
|
||||
@ -653,7 +651,7 @@ if ($is_minimum_common == FALSE) {
|
||||
echo ' </p>' . "\n"
|
||||
.' <p>' . "\n"
|
||||
.' ' . $formatted_sql . "\n"
|
||||
.' </p></div>' . "\n";
|
||||
.' </p>' . "\n";
|
||||
} // end if
|
||||
|
||||
$tmp_mysql_error = ''; // for saving the original $error_message
|
||||
@ -663,7 +661,7 @@ if ($is_minimum_common == FALSE) {
|
||||
$error_message = preg_replace("@((\015\012)|(\015)|(\012)){3,}@", "\n\n", $error_message);
|
||||
}
|
||||
// modified to show me the help on error-returns (Michael Keck)
|
||||
echo '<div class="error"><p>' . "\n"
|
||||
echo '<p>' . "\n"
|
||||
. ' <strong>' . $GLOBALS['strMySQLSaid'] . '</strong>'
|
||||
. PMA_showMySQLDocu('Error-returns', 'Error-returns')
|
||||
. "\n"
|
||||
@ -1910,10 +1908,10 @@ window.parent.updateTableTitle( '<?php echo $uni_tbl; ?>', '<?php echo PMA_jsFor
|
||||
?>
|
||||
<br />
|
||||
<div align="<?php echo $GLOBALS['cell_align_left']; ?>">
|
||||
<table border="<?php echo $cfg['Border']; ?>" cellpadding="5" cellspacing="1">
|
||||
<?php if (isset($GLOBALS['show_error_header']) && $GLOBALS['show_error_header']) { ?>
|
||||
<tr><th class="tblHeadError"><div class="errorhead"><?php echo $GLOBALS['strError']; ?></div></th></tr>
|
||||
<?php if ( ! empty( $GLOBALS['show_error_header'] ) ) { ?>
|
||||
<div class="error"><h1><?php echo $GLOBALS['strError']; ?></h1>
|
||||
<?php } ?>
|
||||
<table border="<?php echo $cfg['Border']; ?>" cellpadding="5" cellspacing="1">
|
||||
<tr>
|
||||
<th<?php echo ($GLOBALS['theme'] != 'original') ? ' class="tblHeaders"' : ' bgcolor="' . $cfg['ThBgcolor'] . '"'; ?>>
|
||||
<b><?php
|
||||
@ -2147,6 +2145,9 @@ window.parent.updateTableTitle( '<?php echo $uni_tbl; ?>', '<?php echo PMA_jsFor
|
||||
echo "\n";
|
||||
?>
|
||||
</table>
|
||||
<?php if ( ! empty( $GLOBALS['show_error_header'] ) ) { ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div><br />
|
||||
<?php
|
||||
} // end of the 'PMA_showMessage()' function
|
||||
|
||||
@ -17,7 +17,7 @@ if (!empty($submit_mult)
|
||||
if (!empty($selected_db)) {
|
||||
$selected = $selected_db;
|
||||
$what = 'drop_db';
|
||||
} else if (!empty($selected_tbl)) {
|
||||
} elseif (!empty($selected_tbl)) {
|
||||
if ($submit_mult == $strPrintView) {
|
||||
require('./tbl_printview.php');
|
||||
} else {
|
||||
@ -54,7 +54,7 @@ if (!empty($submit_mult)
|
||||
break;
|
||||
} // end switch
|
||||
}
|
||||
} else if (!empty($selected_fld)) {
|
||||
} elseif (!empty($selected_fld)) {
|
||||
$selected = $selected_fld;
|
||||
switch ($submit_mult) {
|
||||
case $strDrop:
|
||||
@ -123,7 +123,7 @@ if (!empty($submit_mult)
|
||||
/**
|
||||
* Displays the confirmation form if required
|
||||
*/
|
||||
if (!empty($submit_mult) && !empty($what)) {
|
||||
if ( !empty($submit_mult) && !empty($what)) {
|
||||
$js_to_run = 'functions.js';
|
||||
unset($message);
|
||||
if (!empty($table)) {
|
||||
@ -146,22 +146,22 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
switch ($what) {
|
||||
case 'row_delete':
|
||||
$full_query .= htmlspecialchars(urldecode($sval))
|
||||
. ';<br />';
|
||||
. ';<br />';
|
||||
break;
|
||||
case 'drop_db':
|
||||
$full_query .= 'DROP DATABASE '
|
||||
. PMA_backquote(htmlspecialchars(urldecode($sval)))
|
||||
. ';<br />';
|
||||
. PMA_backquote(htmlspecialchars(urldecode($sval)))
|
||||
. ';<br />';
|
||||
break;
|
||||
|
||||
case 'drop_tbl':
|
||||
$current = urldecode($sval);
|
||||
if (!empty($views) && in_array($current, $views)) {
|
||||
$current = urldecode($sval);
|
||||
if (!empty($views) && in_array($current, $views)) {
|
||||
$full_query_views .= (empty($full_query_views) ? 'DROP VIEW ' : ', ')
|
||||
. PMA_backquote(htmlspecialchars($current));
|
||||
} else {
|
||||
. PMA_backquote(htmlspecialchars($current));
|
||||
} else {
|
||||
$full_query .= (empty($full_query) ? 'DROP TABLE ' : ', ')
|
||||
. PMA_backquote(htmlspecialchars($current));
|
||||
. PMA_backquote(htmlspecialchars($current));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -178,16 +178,16 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
case 'primary_fld':
|
||||
if ($full_query == '') {
|
||||
$full_query .= 'ALTER TABLE '
|
||||
. PMA_backquote(htmlspecialchars($table))
|
||||
. '<br /> DROP PRIMARY KEY,'
|
||||
. '<br /> ADD PRIMARY KEY('
|
||||
. '<br /> '
|
||||
. PMA_backquote(htmlspecialchars(urldecode($sval)))
|
||||
. ',';
|
||||
. PMA_backquote(htmlspecialchars($table))
|
||||
. '<br /> DROP PRIMARY KEY,'
|
||||
. '<br /> ADD PRIMARY KEY('
|
||||
. '<br /> '
|
||||
. PMA_backquote(htmlspecialchars(urldecode($sval)))
|
||||
. ',';
|
||||
} else {
|
||||
$full_query .= '<br /> '
|
||||
. PMA_backquote(htmlspecialchars(urldecode($sval)))
|
||||
. ',';
|
||||
. PMA_backquote(htmlspecialchars(urldecode($sval)))
|
||||
. ',';
|
||||
}
|
||||
if ($i == $selected_cnt-1) {
|
||||
$full_query = preg_replace('@,$@', ');<br />', $full_query);
|
||||
@ -197,14 +197,14 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
case 'drop_fld':
|
||||
if ($full_query == '') {
|
||||
$full_query .= 'ALTER TABLE '
|
||||
. PMA_backquote(htmlspecialchars($table))
|
||||
. '<br /> DROP '
|
||||
. PMA_backquote(htmlspecialchars(urldecode($sval)))
|
||||
. ',';
|
||||
. PMA_backquote(htmlspecialchars($table))
|
||||
. '<br /> DROP '
|
||||
. PMA_backquote(htmlspecialchars(urldecode($sval)))
|
||||
. ',';
|
||||
} else {
|
||||
$full_query .= '<br /> DROP '
|
||||
. PMA_backquote(htmlspecialchars(urldecode($sval)))
|
||||
. ',';
|
||||
. PMA_backquote(htmlspecialchars(urldecode($sval)))
|
||||
. ',';
|
||||
}
|
||||
if ($i == $selected_cnt-1) {
|
||||
$full_query = preg_replace('@,$@', ';<br />', $full_query);
|
||||
@ -215,57 +215,36 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
}
|
||||
if ($what == 'drop_tbl') {
|
||||
if (!empty($full_query)) {
|
||||
$full_query .= ';<br />' . "\n";
|
||||
}
|
||||
if (!empty($full_query_views)) {
|
||||
$full_query .= $full_query_views . ';<br />' . "\n";
|
||||
}
|
||||
unset($full_query_views);
|
||||
$full_query .= ';<br />' . "\n";
|
||||
}
|
||||
if (!empty($full_query_views)) {
|
||||
$full_query .= $full_query_views . ';<br />' . "\n";
|
||||
}
|
||||
unset($full_query_views);
|
||||
}
|
||||
|
||||
// Displays the form
|
||||
?>
|
||||
?>
|
||||
<!-- Do it really ? -->
|
||||
<table border="0" cellpadding="3" cellspacing="0">
|
||||
<tr>
|
||||
<th class="tblHeadError" align="left">
|
||||
<?php
|
||||
echo ($GLOBALS['cfg']['ErrorIconic'] ? '<img src="' . $GLOBALS['pmaThemeImage'] . 's_really.png" border="0" hspace="2" width="11" height="11" valign="middle" />' : '');
|
||||
echo $strDoYouReally . ': ' . "\n";
|
||||
?>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $GLOBALS['cfg']['BgcolorOne']; ?>">
|
||||
<?php
|
||||
echo '<tt>' . $full_query . '</tt> ?<br/>' . "\n";
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<form action="<?php echo $action; ?>" method="post">
|
||||
<input type="hidden" name="query_type" value="<?php echo $what; ?>" />
|
||||
<?php
|
||||
echo "\n";
|
||||
if (strpos(' ' . $action, 'db_details') == 1) {
|
||||
echo PMA_generate_common_hidden_inputs($db);
|
||||
} else if (strpos(' ' . $action, 'tbl_properties') == 1
|
||||
} elseif (strpos(' ' . $action, 'tbl_properties') == 1
|
||||
|| $what == 'row_delete') {
|
||||
echo PMA_generate_common_hidden_inputs($db,$table);
|
||||
} else {
|
||||
echo PMA_generate_common_hidden_inputs();
|
||||
}
|
||||
foreach ($selected AS $idx => $sval) {
|
||||
echo ' <input type="hidden" name="selected[]" value="' . htmlspecialchars($sval) . '" />' . "\n";
|
||||
echo '<input type="hidden" name="selected[]" value="' . htmlspecialchars($sval) . '" />' . "\n";
|
||||
}
|
||||
if ($what == 'drop_tbl' && !empty($views)) {
|
||||
foreach ($views as $current) {
|
||||
echo ' <input type="hidden" name="views[]" value="' . htmlspecialchars($current) . '" />' . "\n";
|
||||
}
|
||||
echo '<input type="hidden" name="views[]" value="' . htmlspecialchars($current) . '" />' . "\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="query_type" value="<?php echo $what; ?>" />
|
||||
<?php
|
||||
if ($what == 'row_delete') {
|
||||
echo '<input type="hidden" name="original_sql_query" value="' . htmlspecialchars($original_sql_query) . '" />' . "\n";
|
||||
echo '<input type="hidden" name="original_pos" value="' . $original_pos . '" />' . "\n";
|
||||
@ -277,15 +256,15 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
echo '<input type="hidden" name="session_max_rows" value="' . $session_max_rows . '" />' . "\n";
|
||||
}
|
||||
?>
|
||||
<fieldset class="confirmation">
|
||||
<legend><?php echo $strDoYouReally; ?>:</legend>
|
||||
<tt><?php echo $full_query; ?></tt>
|
||||
</fieldset>
|
||||
<fieldset class="tblFooters">
|
||||
<input type="submit" name="mult_btn" value="<?php echo $strYes; ?>" id="buttonYes" />
|
||||
<input type="submit" name="mult_btn" value="<?php echo $strNo; ?>" id="buttonNo" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo"\n";
|
||||
|
||||
require_once('./footer.inc.php');
|
||||
} // end if
|
||||
|
||||
@ -293,7 +272,7 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
/**
|
||||
* Executes the query
|
||||
*/
|
||||
else if ($mult_btn == $strYes) {
|
||||
elseif ($mult_btn == $strYes) {
|
||||
|
||||
if ($query_type == 'drop_db' || $query_type == 'drop_tbl' || $query_type == 'drop_fld') {
|
||||
require_once('./libraries/relation_cleanup.lib.php');
|
||||
@ -338,9 +317,9 @@ else if ($mult_btn == $strYes) {
|
||||
|
||||
case 'drop_tbl':
|
||||
PMA_relationsCleanupTable($db, $selected[$i]);
|
||||
$current = urldecode($selected[$i]);
|
||||
if (!empty($views) && in_array($current, $views)) {
|
||||
$sql_query_views .= (empty($sql_query_views) ? 'DROP VIEW ' : ', ')
|
||||
$current = urldecode($selected[$i]);
|
||||
if (!empty($views) && in_array($current, $views)) {
|
||||
$sql_query_views .= (empty($sql_query_views) ? 'DROP VIEW ' : ', ')
|
||||
. PMA_backquote($current);
|
||||
} else {
|
||||
$sql_query .= (empty($sql_query) ? 'DROP TABLE ' : ', ')
|
||||
@ -440,13 +419,11 @@ else if ($mult_btn == $strYes) {
|
||||
} elseif (!$run_parts) {
|
||||
PMA_DBI_select_db($db);
|
||||
$result = PMA_DBI_query($sql_query);
|
||||
if (!empty($sql_query_views)) {
|
||||
$sql_query .= ' ' . $sql_query_views . ';';
|
||||
PMA_DBI_query($sql_query_views);
|
||||
unset($sql_query_views);
|
||||
}
|
||||
if (!empty($sql_query_views)) {
|
||||
$sql_query .= ' ' . $sql_query_views . ';';
|
||||
PMA_DBI_query($sql_query_views);
|
||||
unset($sql_query_views);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -1255,7 +1255,7 @@ if (empty($adduser) && empty($checkprivs)) {
|
||||
. ' </fieldset>' . "\n";
|
||||
} // end if (display overview)
|
||||
echo '</form>' . "\n"
|
||||
. '<div class="tblWarn">' . "\n"
|
||||
. '<div class="warning">' . "\n"
|
||||
. ' ' . sprintf($GLOBALS['strFlushPrivilegesNote'], '<a href="server_privileges.php?' . $GLOBALS['url_query'] . '&flush_privileges=1">', '</a>') . "\n"
|
||||
. '</div>' . "\n";
|
||||
}
|
||||
|
||||
48
sql.php
48
sql.php
@ -208,37 +208,15 @@ if (!$cfg['Confirm']
|
||||
$do_confirm = isset($analyzed_sql[0]['queryflags']['need_confirm']);
|
||||
}
|
||||
|
||||
if ($do_confirm) {
|
||||
if ( $do_confirm ) {
|
||||
$stripped_sql_query = $sql_query;
|
||||
require_once('./header.inc.php');
|
||||
echo '<table border="0" cellpadding="3" cellspacing="0">' . "\n";
|
||||
if ($is_drop_database) {
|
||||
echo ' <tr>' . "\n"
|
||||
. ' <td class="tblHeadError">' . "\n";
|
||||
if($cfg['ErrorIconic']){
|
||||
echo ' <img src="' .$pmaThemeImage .'s_warn.png" border="0" hspace="2" vspace="2" align="left" />';
|
||||
}
|
||||
echo $strDropDatabaseStrongWarning . ' <br />' . "\n";
|
||||
} else {
|
||||
echo ' <tr>' . "\n"
|
||||
. ' <td class="tblHeadError">' . "\n";
|
||||
if($cfg['ErrorIconic']){
|
||||
echo ' <img src="' .$pmaThemeImage .'s_really.png" border="0" hspace="2" align="middle" />';
|
||||
}
|
||||
if ( $is_drop_database) {
|
||||
echo '<h1 class="warning">' . $strDropDatabaseStrongWarning . '</h1>';
|
||||
}
|
||||
echo $strDoYouReally . "\n"
|
||||
. ' </td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <td class="tblError">' . "\n"
|
||||
. ' <tt>' . htmlspecialchars($stripped_sql_query) . '</tt> ?<br/>' . "\n"
|
||||
. ' </td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <form action="sql.php" method="post">' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <td align="right">' . "\n"
|
||||
echo '<form action="sql.php" method="post">' . "\n"
|
||||
.PMA_generate_common_hidden_inputs($db, (isset($table)?$table:''));
|
||||
?>
|
||||
<?php echo PMA_generate_common_hidden_inputs($db, (isset($table)?$table:'')); ?>
|
||||
<input type="hidden" name="sql_query" value="<?php echo urlencode($sql_query); ?>" />
|
||||
<input type="hidden" name="zero_rows" value="<?php echo isset($zero_rows) ? PMA_sanitize($zero_rows) : ''; ?>" />
|
||||
<input type="hidden" name="goto" value="<?php echo $goto; ?>" />
|
||||
@ -248,15 +226,19 @@ if ($do_confirm) {
|
||||
<input type="hidden" name="cpurge" value="<?php echo isset($cpurge) ? PMA_sanitize($cpurge) : ''; ?>" />
|
||||
<input type="hidden" name="purgekey" value="<?php echo isset($purgekey) ? PMA_sanitize($purgekey) : ''; ?>" />
|
||||
<input type="hidden" name="show_query" value="<?php echo isset($show_query) ? PMA_sanitize($show_query) : ''; ?>" />
|
||||
<?php
|
||||
echo '<fieldset class="confirmation">' . "\n"
|
||||
.' <legend>' . $strDoYouReally . '</legend>'
|
||||
.' <tt>' . htmlspecialchars( $stripped_sql_query ) . '</tt>' . "\n"
|
||||
.'</fieldset>' . "\n"
|
||||
.'<fieldset class="tblFooters">' . "\n";
|
||||
?>
|
||||
<input type="submit" name="btnDrop" value="<?php echo $strYes; ?>" id="buttonYes" />
|
||||
<input type="submit" name="btnDrop" value="<?php echo $strNo; ?>" id="buttonNo" />
|
||||
<?php
|
||||
echo ' </td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' </form>' . "\n"
|
||||
. '</table>';
|
||||
echo "\n";
|
||||
} // end if
|
||||
echo '</fieldset>' . "\n"
|
||||
. '</form>' . "\n";
|
||||
} // end if $do_confirm
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -145,12 +145,6 @@ dfn:hover{
|
||||
font-style: normal;
|
||||
cursor: help;
|
||||
}
|
||||
.warning{
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
color: #cc0000;
|
||||
}
|
||||
td.topline{
|
||||
font-size: 1px;
|
||||
}
|
||||
@ -291,51 +285,89 @@ span.tab, span.tabcaution {
|
||||
/* end topmenu */
|
||||
|
||||
|
||||
/* Warning showing div with right border and optional icon */
|
||||
|
||||
/* message boxes: warning, error, confirmation */
|
||||
.warning {
|
||||
color: #CC0000;
|
||||
background-color: #FFFFCC;
|
||||
}
|
||||
p.warning,
|
||||
h1.warning,
|
||||
div.warning {
|
||||
border: 1px solid #cc0000;
|
||||
/*
|
||||
<?php if( $GLOBLAS['cfg']['ErrorIconic'] ) { ?>
|
||||
*/
|
||||
background-image: url(../themes/darkblue_orange/img/s_warn.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 10px 10px;
|
||||
padding: 10px 10px 10px 36px;
|
||||
margin: 0px;
|
||||
/*
|
||||
<?php } ?>
|
||||
*/
|
||||
margin: 0.5em 0 0.5em 0;
|
||||
border: 0.1em solid #CC0000;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
div.error {
|
||||
width: 100%;
|
||||
border: 1px solid #cc0000;
|
||||
background-color: #ffffcc;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
div.error div.text {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
div.error div.head {
|
||||
background-color: #cc0000;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
/*
|
||||
<?php if ( $GLOBALS['cfg']['ErrorIconic'] ) { ?>
|
||||
*/
|
||||
background-image: url(../themes/darkblue_orange/img/s_error.png);
|
||||
<?php if ( $GLOBALS['cfg']['ErrorIconic'] ) { ?>
|
||||
background-image: url(../themes/original/img/s_warn.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 2px 50%;
|
||||
padding: 2px 2px 2px 30px;
|
||||
/*
|
||||
<?php } ?>
|
||||
*/
|
||||
margin: 0px;
|
||||
background-position: 10px; 50%;
|
||||
padding: 10px 10px 10px 36px;
|
||||
<?php } else {?>
|
||||
padding: 0.5em;
|
||||
<?php }?>
|
||||
}
|
||||
.warning h1 {
|
||||
border-bottom: 0.1em solid #cc0000;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
margin: 0 0 0.2em 0;
|
||||
}
|
||||
|
||||
.error {
|
||||
background-color: #FFFFCC;
|
||||
color: #ff0000;
|
||||
}
|
||||
p.error,
|
||||
h1.error,
|
||||
div.error {
|
||||
margin: 0.5em 0 0.5em 0;
|
||||
border: 0.1em solid #ff0000;
|
||||
width: 90%;
|
||||
<?php if ( $GLOBALS['cfg']['ErrorIconic'] ) { ?>
|
||||
background-image: url(../themes/original/img/s_error.png);
|
||||
background-repeat: no-repeat;
|
||||
<?php if ( $GLOBALS['text_dir'] === 'ltr' ) {?>
|
||||
background-position: 10px 50%;
|
||||
padding: 10px 10px 10px 36px;
|
||||
<?php } else {?>
|
||||
background-position: 100% 50%;
|
||||
padding: 10px 36px 10px 10px;
|
||||
<?php }?>
|
||||
<?php } else {?>
|
||||
padding: 0.5em;
|
||||
<?php }?>
|
||||
}
|
||||
div.error h1 {
|
||||
border-bottom: 0.1em solid #ff0000;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
margin: 0 0 0.2em 0;
|
||||
}
|
||||
|
||||
.confirmation {
|
||||
background-color: #FFFFCC;
|
||||
}
|
||||
fieldset.confirmation {
|
||||
border: 0.1em solid #FF0000;
|
||||
}
|
||||
fieldset.confirmation legend {
|
||||
border-left: 0.1em solid #FF0000;
|
||||
border-right: 0.1em solid #FF0000;
|
||||
font-weight: bold;
|
||||
<?php if ( $GLOBALS['cfg']['ErrorIconic'] ) { ?>
|
||||
background-image: url(../themes/original/img/s_really.png);
|
||||
background-repeat: no-repeat;
|
||||
<?php if ( $GLOBALS['text_dir'] === 'ltr' ) {?>
|
||||
background-position: 5px 50%;
|
||||
padding: 0.2em 0.2em 0.2em 25px;
|
||||
<?php } else {?>
|
||||
background-position: 100% 50%;
|
||||
padding: 0.2em 25px 0.2em 0.2em;
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
}
|
||||
/* end messageboxes */
|
||||
|
||||
|
||||
.print{font-family:arial;font-size:8pt;}
|
||||
|
||||
/* MySQL Parser */
|
||||
@ -358,19 +390,6 @@ div.error div.head {
|
||||
.syntax_quote_backtick {}
|
||||
|
||||
/* tables */
|
||||
.tblError {
|
||||
border: 1px solid #cc0000;
|
||||
background-color: #ffffcc;
|
||||
}
|
||||
.tblWarn, div.tblWarn {
|
||||
border: 1px solid #cc0000;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
div.tblWarn {
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 2px 0px 2px 0px;
|
||||
width: 100%;
|
||||
}
|
||||
.tblHeaders{
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
@ -396,49 +415,6 @@ div.tblWarn {
|
||||
text-decoration: none;
|
||||
color: #ffffff;
|
||||
}
|
||||
.tblHeadError {
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
background-color: #cc0000;
|
||||
background-image: url(../themes/darkblue_orange/img/tbl_error.png);
|
||||
background-repeat: repeat-x;
|
||||
background-position: top;
|
||||
height: 18px;
|
||||
}
|
||||
div.errorhead {
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
text-align: left;
|
||||
<?php if ( $GLOBALS['cfg']['ErrorIconic'] ) { ?>
|
||||
background-image: url(../themes/darkblue_orange/img/s_error.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 2px 50%;
|
||||
padding: 2px 2px 2px 20px;
|
||||
<?php } ?>
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.tblHeadWarn {
|
||||
background-color: #ffcc00;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
background-image: url(../themes/darkblue_orange/img/tbl_th.png);
|
||||
background-repeat: repeat-x;
|
||||
background-position: top;
|
||||
height: 18px;
|
||||
}
|
||||
div.warnhead {
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
text-align: left;
|
||||
<?php if ( $GLOBALS['cfg']['ErrorIconic'] ) { ?>
|
||||
background-image: url(../themes/darkblue_orange/img/s_warn.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 2px 50%;
|
||||
padding: 2px 2px 2px 20px;
|
||||
<?php } ?>
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* forbidden, no privilegs */
|
||||
.noPrivileges{
|
||||
|
||||
@ -49,8 +49,6 @@ a.drop:visited {font-family: <?php echo $right_font_family; ?>; color: #ff0000}
|
||||
a.drop:hover {font-family: <?php echo $right_font_family; ?>; color: #ffffff; background-color:#ff0000; text-decoration: none}
|
||||
dfn {font-style: normal}
|
||||
dfn:hover {font-style: normal; cursor: help}
|
||||
.warning {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold; color: #FF0000}
|
||||
.tblcomment {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_smallest; ?>; font-weight: normal; color: #000099; }
|
||||
td.topline {font-size: 1px}
|
||||
|
||||
|
||||
@ -204,38 +202,89 @@ span.tab, span.tabcaution {
|
||||
<?php } ?>
|
||||
/* end topmenu */
|
||||
|
||||
/* Warning showing div with right border and optional icon */
|
||||
|
||||
.errorhead {
|
||||
background-color: #FF0000;
|
||||
/* message boxes: warning, error, confirmation */
|
||||
.warning {
|
||||
color: #CC0000;
|
||||
background-color: #FFFFCC;
|
||||
}
|
||||
h1.warning,
|
||||
div.warning {
|
||||
margin: 0.5em 0 0.5em 0;
|
||||
border: 0.1em solid #CC0000;
|
||||
<?php if ( $GLOBALS['cfg']['ErrorIconic'] ) { ?>
|
||||
background-image: url(../themes/original/img/s_warn.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 10px; 50%;
|
||||
padding: 10px 10px 10px 36px;
|
||||
<?php } else {?>
|
||||
padding: 0.5em;
|
||||
<?php }?>
|
||||
}
|
||||
.warning h1 {
|
||||
border-bottom: 0.1em solid #cc0000;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
text-align: left;
|
||||
margin: 0 0 0.2em 0;
|
||||
}
|
||||
|
||||
.error {
|
||||
background-color: #FFFFCC;
|
||||
color: #ff0000;
|
||||
}
|
||||
h1.error,
|
||||
div.error {
|
||||
margin: 0.5em 0 0.5em 0;
|
||||
border: 0.1em solid #ff0000;
|
||||
<?php if ( $GLOBALS['cfg']['ErrorIconic'] ) { ?>
|
||||
background-image: url(../themes/original/img/s_error.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 5px 50%;
|
||||
padding: 0 0 0 25px;
|
||||
<?php if ( $GLOBALS['text_dir'] === 'ltr' ) {?>
|
||||
background-position: 10px 50%;
|
||||
padding: 10px 10px 10px 36px;
|
||||
<?php } else {?>
|
||||
background-position: 100% 50%;
|
||||
padding: 10px 36px 10px 10px;
|
||||
<?php }?>
|
||||
<?php } else {?>
|
||||
padding: 0.2em;
|
||||
padding: 0.5em;
|
||||
<?php }?>
|
||||
margin: 0.5em 0 0 0;
|
||||
}
|
||||
div.error h1 {
|
||||
border-bottom: 0.1em solid #ff0000;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
margin: 0 0 0.2em 0;
|
||||
}
|
||||
|
||||
/* tables */
|
||||
.error,
|
||||
.tblError {
|
||||
border: 1px solid #FF0000;
|
||||
|
||||
.confirmation {
|
||||
background-color: #FFFFCC;
|
||||
}
|
||||
.tblWarn, div.tblWarn, div.warning {
|
||||
border: 1px solid #FF0000;
|
||||
background-color: #FFFFFF;
|
||||
fieldset.confirmation {
|
||||
border: 0.1em solid #FF0000;
|
||||
}
|
||||
div.tblWarn, div.warning {
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 0.5em 0px 0.5em 0px;
|
||||
fieldset.confirmation legend {
|
||||
border-left: 0.1em solid #FF0000;
|
||||
border-right: 0.1em solid #FF0000;
|
||||
font-weight: bold;
|
||||
<?php if ( $GLOBALS['cfg']['ErrorIconic'] ) { ?>
|
||||
background-image: url(../themes/original/img/s_really.png);
|
||||
background-repeat: no-repeat;
|
||||
<?php if ( $GLOBALS['text_dir'] === 'ltr' ) {?>
|
||||
background-position: 5px 50%;
|
||||
padding: 0.2em 0.2em 0.2em 25px;
|
||||
<?php } else {?>
|
||||
background-position: 100% 50%;
|
||||
padding: 0.2em 25px 0.2em 0.2em;
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
}
|
||||
/* end messageboxes */
|
||||
|
||||
|
||||
.tblcomment {font-size: <?php echo $font_smallest; ?>; font-weight: normal; color: #000099; }
|
||||
|
||||
.tblHeaders {
|
||||
background-color: <?php echo $cfg['LeftBgColor']; ?>;
|
||||
font-weight: bold;
|
||||
@ -246,20 +295,19 @@ div.tblWarn, div.warning {
|
||||
font-weight: normal;
|
||||
color: #000000;
|
||||
}
|
||||
.tblHeaders a:link, .tblHeaders a:active, .tblHeaders a:visited, .tblFooters a:link, .tblFooters a:active, .tblFooters a:visited {
|
||||
.tblHeaders a:link,
|
||||
.tblHeaders a:active,
|
||||
.tblHeaders a:visited,
|
||||
.tblFooters a:link,
|
||||
.tblFooters a:active,
|
||||
.tblFooters a:visited {
|
||||
color: #0000FF;
|
||||
}
|
||||
.tblHeaders a:hover, .tblFooters a:hover { color: #FF0000; }
|
||||
.tblHeadError {
|
||||
background-color: #FF0000;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.tblHeadWarn {
|
||||
background-color: #FFCC00;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
.tblHeaders a:hover,
|
||||
.tblFooters a:hover {
|
||||
color: #FF0000;
|
||||
}
|
||||
|
||||
/* forbidden, no privilegs */
|
||||
.noPrivileges{
|
||||
color: #FF0000;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user