diff --git a/ChangeLog b/ChangeLog index 83adcf829..3a8458e69 100755 --- a/ChangeLog +++ b/ChangeLog @@ -21,10 +21,9 @@ $Source$ fixed rowcount in left frame for tables in information_schema * libraries/sql_query_form.lib.php: XHTML compl. - * server_databases.php, css/phpmyadmin.css.php: - XHTML compl. - * server_status.php - XHTML compl. + * css/phpmyadmin.css.php, server_status.php, server_databases.php + server_collations.php, server_engines.php, server_privileges.php + server_variables.php: XHTML compl. 2005-10-12 Michal Čihař * libraries/get_foreign.lib.php: Fix paging. diff --git a/css/phpmyadmin.css.php b/css/phpmyadmin.css.php index a8bf57ecd..7b83308c2 100644 --- a/css/phpmyadmin.css.php +++ b/css/phpmyadmin.css.php @@ -43,6 +43,8 @@ table .name { font-weight: normal; } +#tableuserrights td, +#tablespecificuserrights td, #tabledatabases td { vertical-align: middle; } diff --git a/server_collations.php b/server_collations.php index 15b6ca7ea..bee67d445 100644 --- a/server_collations.php +++ b/server_collations.php @@ -19,7 +19,7 @@ require('./server_links.inc.php'); * Displays the sub-page heading */ echo '

' . "\n" - . ' ' . ($GLOBALS['cfg']['MainPageIconic'] ? '' : '') + . ' ' . ($GLOBALS['cfg']['MainPageIconic'] ? '' : '') . '' . $strCharsetsAndCollations . "\n" . '

' . "\n"; diff --git a/server_engines.php b/server_engines.php index 8c6257121..4f41ec6e4 100644 --- a/server_engines.php +++ b/server_engines.php @@ -117,7 +117,7 @@ if (empty($engine) || empty($mysql_storage_engines[$engine])) { * Displays the sub-page heading */ echo '

' . "\n" - . ($cfg['MainPageIconic'] ? '' : '' ) + . ($cfg['MainPageIconic'] ? '' : '' ) . ' ' . $strStorageEngines . "\n" . '

' . "\n"; diff --git a/server_privileges.php b/server_privileges.php index d8d0a9156..44e5b39b4 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -28,7 +28,7 @@ if (!empty($pred_tablename)) { if (!$is_superuser) { require('./server_links.inc.php'); echo '

' . "\n" - . ' ' . ($GLOBALS['cfg']['MainPageIconic'] ? '' : '') + . ' ' . ($GLOBALS['cfg']['MainPageIconic'] ? '' : '') . ' ' . $GLOBALS['strPrivileges'] . "\n" . '

' . "\n" . $GLOBALS['strNoPrivileges'] . "\n"; @@ -1037,7 +1037,7 @@ if (empty($adduser) && empty($checkprivs)) { if (!isset($username)) { // No username is given --> display the overview echo '

' . "\n" - . ' ' . ($GLOBALS['cfg']['MainPageIconic'] ? '' : '') + . ' ' . ($GLOBALS['cfg']['MainPageIconic'] ? '' : '') . $GLOBALS['strUserOverview'] . "\n" . '

' . "\n"; @@ -1116,16 +1116,16 @@ if (empty($adduser) && empty($checkprivs)) { uksort($array_initials, "strnatcasecmp"); reset($array_initials); - echo ''; + echo '
'; foreach ($array_initials as $tmp_initial => $initial_was_found) { if ($initial_was_found) { - echo '' . "\n"; + echo '' . "\n"; } else { - echo ''; + echo ''; } } - echo '' . "\n"; + echo '' . "\n"; echo '
' . $tmp_initial . '' . $tmp_initial . '' . $tmp_initial . '' . $tmp_initial . '[' . $GLOBALS['strShowAll'] . '][' . $GLOBALS['strShowAll'] . ']
'; /** @@ -1137,9 +1137,9 @@ if (empty($adduser) && empty($checkprivs)) { echo '
' . "\n" . PMA_generate_common_hidden_inputs('', '', 1) - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . '
' . "\n" + . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" @@ -1147,56 +1147,57 @@ if (empty($adduser) && empty($checkprivs)) { . ' ' . "\n" . ' ' . ($GLOBALS['cfg']['PropertiesIconic'] ? '' : '') . "\n"; echo ' ' . "\n"; - $useBgcolorOne = TRUE; + echo ' ' . "\n"; + echo ' ' . "\n"; + $odd_row = true; for ($i = 0; $row = PMA_DBI_fetch_assoc($res); $i++) { - echo ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n"; + echo ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n"; $privs = PMA_extractPrivInfo($row, TRUE); - echo ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n"; - $useBgcolorOne = !$useBgcolorOne; + $odd_row = ! $odd_row; } @PMA_DBI_free_result($res); unset($res); unset ($row); - echo ' ' . "\n" - . ' ' . "\n" + echo ' ' . "\n" . ' ' . "\n" . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" . ' ' . "\n" + . ' ' . "\n" . '
' . $GLOBALS['strUser'] . '' . $GLOBALS['strHost'] . '' . $GLOBALS['strPassword'] . '' . $GLOBALS['strGrantOption'] . '' . $GLOBALS['strAction'] . '
' . htmlspecialchars($row['Host']) . '
' . htmlspecialchars($row['Host']) . '' . ($row['Password'] == 'Y' ? $GLOBALS['strYes'] : '' . $GLOBALS['strNo'] . '') . '' . "\n" + echo ' ' . ($row['Password'] == 'Y' ? $GLOBALS['strYes'] : '' . $GLOBALS['strNo'] . '') . '' . "\n" . ' ' . join(',' . "\n" . ' ', $privs) . "\n" - . ' ' . ($row['Grant_priv'] == 'Y' ? $GLOBALS['strYes'] : $GLOBALS['strNo']) . ''; + . ' ' . ($row['Grant_priv'] == 'Y' ? $GLOBALS['strYes'] : $GLOBALS['strNo']) . ''; if ($GLOBALS['cfg']['PropertiesIconic']) { - echo '' . $GLOBALS['strEditPrivileges'] . ''; + echo '' . $GLOBALS['strEditPrivileges'] . ''; } else { echo $GLOBALS['strEditPrivileges']; } echo '
' . "\n" . ' ' . $GLOBALS['strEnglishPrivileges'] . '' . "\n" . '
' . "\n" + . '
' . "\n" . ' ' . $GLOBALS['strWithChecked'] . '' . "\n" . ' ' . $GLOBALS['strCheckAll'] . '' . "\n" . ' /' . "\n" . ' ' . $GLOBALS['strUncheckAll'] . '' . "\n" . '

' . "\n"; // add/delete user fieldset echo '
' . "\n" . ' ' . "\n" - . ($GLOBALS['cfg']['PropertiesIconic'] ? ' ' . "\n" : '' ) - . ' ' . $GLOBALS['strAddUser'] . '' . "\n" + . ($GLOBALS['cfg']['PropertiesIconic'] ? ' ' . "\n" : '' ) + . ' ' . $GLOBALS['strAddUser'] . '' . "\n" . '
' . "\n" . '
' . ' ' . "\n" - . ($GLOBALS['cfg']['PropertiesIconic'] ? ' ' . "\n" : '' ) + . ($GLOBALS['cfg']['PropertiesIconic'] ? ' ' . "\n" : '' ) . ' ' . $GLOBALS['strRemoveSelectedUsers'] . '' . "\n" . ' ' . "\n" . ' ' . "\n" @@ -1224,8 +1225,8 @@ if (empty($adduser) && empty($checkprivs)) { unset ($row); echo '
' . "\n" . ' ' . "\n" - . ($GLOBALS['cfg']['PropertiesIconic'] ? ' ' . "\n" : '' ) - . ' ' . $GLOBALS['strAddUser'] . '' . "\n" + . ($GLOBALS['cfg']['PropertiesIconic'] ? ' ' . "\n" : '' ) + . ' ' . $GLOBALS['strAddUser'] . '' . "\n" . '
' . "\n"; } // end if (display overview) echo '' . "\n" @@ -1240,7 +1241,7 @@ if (empty($adduser) && empty($checkprivs)) { // A user was selected -> display the user's properties echo '

' . "\n" - . ($GLOBALS['cfg']['PropertiesIconic'] ? '' : '' ) + . ($GLOBALS['cfg']['PropertiesIconic'] ? '' : '' ) . ' ' . $GLOBALS['strUser'] . ' \'' . htmlspecialchars($username) . '\'@\'' . htmlspecialchars($hostname) . '\'' . "\n"; if (!empty($dbname)) { echo ' - ' . $GLOBALS['strDatabase'] . ' ' . htmlspecialchars($dbname) . '' . "\n"; @@ -1275,10 +1276,9 @@ if (empty($adduser) && empty($checkprivs)) { . '' . "\n" . '
' . "\n" . '' . (empty($dbname) ? $GLOBALS['strDbPrivileges'] : $GLOBALS['strTblPrivileges']) . '' . "\n" - . '' . "\n" + . '
' . "\n" . '' . "\n" - . '' . "\n" - . ' ' . "\n" + . '' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" @@ -1294,43 +1294,41 @@ if (empty($adduser) && empty($checkprivs)) { } $res = PMA_DBI_query($sql_query, NULL, PMA_DBI_QUERY_STORE); if (PMA_DBI_affected_rows() == 0) { - echo '' . "\n" - . ' ' . "\n" + echo '' . "\n" + . ' ' . "\n" . '' . "\n"; } else { - $useBgcolorOne = TRUE; + $odd_row = true; if (empty($dbname)) { $res2 = PMA_DBI_query('SELECT `Db` FROM `mysql`.`tables_priv`' . $user_host_condition . ' GROUP BY `Db` ORDER BY `Db` ASC;'); $row2 = PMA_DBI_fetch_assoc($res2); } $found_rows = array(); while ($row = PMA_DBI_fetch_assoc($res)) { - while (empty($dbname) && $row2 && $row['Db'] > $row2['Db']) { $found_rows[] = $row2['Db']; - - echo '' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" . '' . "\n"; $row2 = PMA_DBI_fetch_assoc($res2); - $useBgcolorOne = !$useBgcolorOne; + $odd_row = ! $odd_row; } // end while $found_rows[] = empty($dbname) ? $row['Db'] : $row['Table_name']; - echo '' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" . '' . "\n"; - $useBgcolorOne = !$useBgcolorOne; + $odd_row = ! $odd_row; } // end while while (empty($dbname) && $row2) { $found_rows[] = $row2['Db']; - echo '' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" . '' . "\n"; $row2 = PMA_DBI_fetch_assoc($res2); - $useBgcolorOne = !$useBgcolorOne; + $odd_row = ! $odd_row; } // end while if (empty($dbname)) { PMA_DBI_free_result($res2); @@ -1434,20 +1432,20 @@ if (empty($adduser) && empty($checkprivs)) { . '' . "\n" . '
' . "\n" . ' ' . $GLOBALS['strChangePassword'] . '' . "\n" - . '
' . (empty($dbname) ? $GLOBALS['strDatabase'] : $GLOBALS['strTable']) . '
' . (empty($dbname) ? $GLOBALS['strDatabase'] : $GLOBALS['strTable']) . '' . $GLOBALS['strPrivileges'] . '' . $GLOBALS['strGrantOption'] . '' . (empty($dbname) ? $GLOBALS['strTblPrivileges'] : $GLOBALS['strColumnPrivileges']) . '
' . $GLOBALS['strNone'] . '
' . $GLOBALS['strNone'] . '
' . htmlspecialchars($row2['Db']) . '' . "\n" + echo '
' . htmlspecialchars($row2['Db']) . '' . "\n" . ' USAGE' . "\n" . ' ' . $GLOBALS['strNo'] . '' . $GLOBALS['strYes'] . '' . $GLOBALS['strEdit'] . '' . $GLOBALS['strRevoke'] . '' . $GLOBALS['strNo'] . '' . $GLOBALS['strYes'] . '' . $GLOBALS['strEdit'] . '' . $GLOBALS['strRevoke'] . '
' . htmlspecialchars(empty($dbname) ? $row['Db'] : $row['Table_name']) . '' . "\n" + echo '
' . htmlspecialchars(empty($dbname) ? $row['Db'] : $row['Table_name']) . '' . "\n" . ' ' . join(',' . "\n" . ' ', PMA_extractPrivInfo($row, TRUE)) . "\n" . ' ' . (((empty($dbname) && $row['Grant_priv'] == 'Y') || (!empty($dbname) && in_array('Grant', explode(',', $row['Table_priv'])))) ? $GLOBALS['strYes'] : $GLOBALS['strNo']) . ''; + . ' ' . (((empty($dbname) && $row['Grant_priv'] == 'Y') || (!empty($dbname) && in_array('Grant', explode(',', $row['Table_priv'])))) ? $GLOBALS['strYes'] : $GLOBALS['strNo']) . ''; if ((empty($dbname) && $row2 && $row['Db'] == $row2['Db']) || (!empty($dbname) && $row['Column_priv'])) { echo $GLOBALS['strYes']; @@ -1341,29 +1339,29 @@ if (empty($adduser) && empty($checkprivs)) { echo $GLOBALS['strNo']; } echo '' . $GLOBALS['strEdit'] . '' . $GLOBALS['strRevoke'] . '' . $GLOBALS['strEdit'] . '' . $GLOBALS['strRevoke'] . '
' . htmlspecialchars($row2['Db']) . '' . "\n" + echo '
' . htmlspecialchars($row2['Db']) . '' . "\n" . ' USAGE' . "\n" . ' ' . $GLOBALS['strNo'] . '' . $GLOBALS['strYes'] . '' . $GLOBALS['strEdit'] . '' . $GLOBALS['strRevoke'] . '' . $GLOBALS['strNo'] . '' . $GLOBALS['strYes'] . '' . $GLOBALS['strEdit'] . '' . $GLOBALS['strRevoke'] . '
' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . '
' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n" . '
' . "\n" . '
' . "\n" @@ -1466,16 +1464,13 @@ if (empty($adduser) && empty($checkprivs)) { . ' ' . $GLOBALS['strChangeCopyMode'] . '' . "\n" . ' ' . "\n" - . '
' . "\n" + . '
' . "\n" . ' ' . "\n" - . '
' . "\n" + . '
' . "\n" . ' ' . "\n" - . '
' . "\n" + . '
' . "\n" . ' ' . "\n" @@ -1491,7 +1486,7 @@ if (empty($adduser) && empty($checkprivs)) { // Add a new user $GLOBALS['url_query'] .= '&adduser=1'; echo '

' . "\n" - . ($GLOBALS['cfg']['PropertiesIconic'] ? '' : '' ) + . ($GLOBALS['cfg']['PropertiesIconic'] ? '' : '' ) . ' ' . $GLOBALS['strAddUser'] . "\n" . '

' . "\n" . '
' . "\n" @@ -1504,35 +1499,22 @@ if (empty($adduser) && empty($checkprivs)) { . '
' . "\n"; } else { // check the privileges for a particular database. - echo '' . "\n" + echo '
' . "\n" . '' . "\n" . '' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n" . '' . "\n" . '' . "\n"; - $useBgcolorOne = TRUE; + $odd_row = TRUE; unset($row); unset($row1); unset($row2); @@ -1594,23 +1576,20 @@ if (empty($adduser) && empty($checkprivs)) { $row2 = PMA_DBI_fetch_assoc($res2); } } - echo ' ' . "\n" + echo ' ' . "\n" . ' 1) { echo ' rowspan="' . count($current_privileges) . '"'; } - echo ' bgcolor="' . ($useBgcolorOne ? $GLOBALS['cfg']['BgcolorOne'] : $GLOBALS['cfg']['BgcolorTwo']) . '">' . "\n" - . ' ' . (empty($current_user) ? '' . $GLOBALS['strAny'] . '' : htmlspecialchars($current_user)) . "\n" + echo '>' . (empty($current_user) ? '' . $GLOBALS['strAny'] . '' : htmlspecialchars($current_user)) . "\n" . ' ' . "\n" . ' 1) { echo ' rowspan="' . count($current_privileges) . '"'; } - echo ' bgcolor="' . ($useBgcolorOne ? $GLOBALS['cfg']['BgcolorOne'] : $GLOBALS['cfg']['BgcolorTwo']) . '">' . "\n" - . ' ' . htmlspecialchars($current_host) . "\n" - . ' ' . "\n"; + echo '>' . htmlspecialchars($current_host) . '' . "\n"; foreach ($current_privileges as $current) { - echo ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n"; diff --git a/server_variables.php b/server_variables.php index 9bee7c439..b91f83f93 100644 --- a/server_variables.php +++ b/server_variables.php @@ -19,7 +19,7 @@ require('./server_links.inc.php'); * Displays the sub-page heading */ echo '

' . "\n" - . ($cfg['MainPageIconic'] ? '' : '' ) + . ($cfg['MainPageIconic'] ? '' : '' ) . '' . $strServerVars . "\n" . '

' . "\n";
' . "\n" - . ($GLOBALS['cfg']['PropertiesIconic'] ? ' ' . "\n" : '' ) + . ($GLOBALS['cfg']['PropertiesIconic'] ? ' ' . "\n" : '' ) . ' ' . sprintf($GLOBALS['strUsersHavingAccessToDb'], '' . htmlspecialchars($checkprivs) . '') . "\n" . '
' . "\n" - . ' ' . $GLOBALS['strUser'] . '' . "\n" - . ' ' . "\n" - . ' ' . $GLOBALS['strHost'] . '' . "\n" - . ' ' . "\n" - . ' ' . $GLOBALS['strType'] . '' . "\n" - . ' ' . "\n" - . ' ' . $GLOBALS['strPrivileges'] . '' . "\n" - . ' ' . "\n" - . ' ' . $GLOBALS['strGrantOption'] . '' . "\n" - . ' ' . "\n" - . ' ' . $GLOBALS['strAction'] . '' . "\n" - . '
' . $GLOBALS['strUser'] . '' . $GLOBALS['strHost'] . '' . $GLOBALS['strType'] . '' . $GLOBALS['strPrivileges'] . '' . $GLOBALS['strGrantOption'] . '' . $GLOBALS['strAction'] . '
' . "\n" + echo ' ' . "\n" . ' '; if (!isset($current['Db']) || $current['Db'] == '*') { echo $GLOBALS['strGlobal']; @@ -1621,15 +1600,15 @@ if (empty($adduser) && empty($checkprivs)) { } echo "\n" . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n" . ' ' . join(',' . "\n" . ' ', PMA_extractPrivInfo($current, TRUE)) . "\n" . ' ' . "\n" . ' ' . "\n" + . ' ' . "\n" . ' ' . ($current['Grant_priv'] == 'Y' ? $GLOBALS['strYes'] : $GLOBALS['strNo']) . "\n" . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n" . ' ' . $GLOBALS['strEdit'] . "\n" . ' ' . "\n" @@ -1639,11 +1618,11 @@ if (empty($adduser) && empty($checkprivs)) { if (empty($row) && empty($row1) && empty($row2)) { break; } - $useBgcolorOne = !$useBgcolorOne; + $odd_row = ! $odd_row; } } else { - echo '
' . "\n" + echo '
' . "\n" . ' ' . $GLOBALS['strNoUsersFound'] . "\n" . '