Main page now uses lists instead of nested tables.

This commit is contained in:
Michal Čihař
2004-04-27 13:35:59 +00:00
parent 850741a174
commit c35f015a10
3 changed files with 98 additions and 141 deletions

View File

@@ -8,7 +8,9 @@ $Source$
2004-04-27 Michal Cihar <michal@cihar.com> 2004-04-27 Michal Cihar <michal@cihar.com>
* calendar.php, libraries/tbl_change.js: Don't reset clock when moving in * calendar.php, libraries/tbl_change.js: Don't reset clock when moving in
calendar. calendar.
* Almost everyting: Be valid XHTML (probably still not completely). * Almost everything: Be valid XHTML 1.0 (probably still not completely).
* main.php, css/phpmyadmin.css.php: Main page now uses lists instead of
nested tables.
2004-04-27 Garvin Hicking <pma@supergarv.de> 2004-04-27 Garvin Hicking <pma@supergarv.de>
* libraries/display_tbl.lib.php: Bug #942392 - Wrapping sort order * libraries/display_tbl.lib.php: Bug #942392 - Wrapping sort order

View File

@@ -289,3 +289,13 @@ li {
li form { li form {
display: inline; display: inline;
} }
ul.main {
margin: 0px;
padding-left:2em;
}
ul.main li {
list-style-image: url(../images/item_<?php echo $text_dir; ?>.png);
padding-bottom: 0.1em;
}

225
main.php
View File

@@ -160,8 +160,6 @@ if ($server == 0 || count($cfg['Servers']) > 1) {
?> ?>
<!-- MySQL and phpMyAdmin related links --> <!-- MySQL and phpMyAdmin related links -->
<table>
<tr>
<?php <?php
/** /**
@@ -283,45 +281,45 @@ if ($server > 0) {
|| $cfg['ShowMysqlInfo'] || $cfg['ShowMysqlVars'] || $cfg['ShowChgPassword'] || $cfg['ShowMysqlInfo'] || $cfg['ShowMysqlVars'] || $cfg['ShowChgPassword']
|| $cfg['Server']['auth_type'] != 'config') { || $cfg['Server']['auth_type'] != 'config') {
?> ?>
<!-- MySQL server related links --> <table>
<td valign="top" align="<?php echo $cell_align_left; ?>"> <tr>
<table> <th>&nbsp;&nbsp;MySQL</th>
<tr> <th>&nbsp;&nbsp;phpMyAdmin</th>
<th colspan="2">&nbsp;&nbsp;MySQL</th> </tr>
</tr> <tr>
<!-- MySQL server related links -->
<td valign="top" align="<?php echo $cell_align_left; ?>">
<ul class="main">
<?php <?php
// The user is allowed to create a db // The user is allowed to create a db
if ($is_create_priv) { if ($is_create_priv) {
echo "\n" ?>
. ' <!-- db creation form -->' . "\n"
. ' <tr>' . "\n" <!-- db creation form -->
. ' <td valign="baseline"><img src="' . $item_img . '" width="7" height="7" alt="item" /></td>' . "\n" <li>
. ' <td>' . "\n" <form method="post" action="db_create.php">
. ' <form method="post" action="db_create.php">' . "\n" <?php echo $strCreateNewDatabase . '&nbsp;' . PMA_showMySQLDocu('Reference', 'CREATE_DATABASE'); ?><br />
. ' ' . $strCreateNewDatabase . '&nbsp;' . PMA_showMySQLDocu('Reference', 'CREATE_DATABASE') . "\n" <?php echo PMA_generate_common_hidden_inputs(5); ?>
. '<br />' . "\n" <input type="hidden" name="reload" value="1" />
. PMA_generate_common_hidden_inputs(5) <input type="text" name="db" value="<?php echo $db_to_create; ?>" maxlength="64" class="textfield" />
. ' <input type="hidden" name="reload" value="1" />' . "\n" <?php
. ' <input type="text" name="db" value="' . $db_to_create . '" maxlength="64" class="textfield" />' . "\n";
if (PMA_MYSQL_INT_VERSION >= 40101) { if (PMA_MYSQL_INT_VERSION >= 40101) {
require_once('./libraries/mysql_charsets.lib.php'); require_once('./libraries/mysql_charsets.lib.php');
echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', NULL, NULL, TRUE, 5); echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', NULL, NULL, TRUE, 5);
} }
echo ' <input type="submit" value="' . $strCreate . '" />' . "\n" ?>
. ' </form>' . "\n" <input type="submit" value="<?php echo $strCreate; ?>" />
. ' </td>' . "\n" </form>
. ' </tr>' . "\n"; </li>
<?php
} else { } else {
echo "\n";
?> ?>
<!-- db creation no privileges message -->
<tr> <!-- db creation no privileges message -->
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td> <li>
<td>
<?php echo $strCreateNewDatabase . ':&nbsp;' . PMA_showMySQLDocu('Reference', 'CREATE_DATABASE'); ?><br /> <?php echo $strCreateNewDatabase . ':&nbsp;' . PMA_showMySQLDocu('Reference', 'CREATE_DATABASE'); ?><br />
<?php echo '<i>' . $strNoPrivileges .'</i>'; ?><br /> <?php echo '<i>' . $strNoPrivileges .'</i>'; ?><br />
</td> </li>
</tr>
<?php <?php
} // end create db form or message } // end create db form or message
echo "\n"; echo "\n";
@@ -333,109 +331,82 @@ if ($server > 0) {
if ($cfg['ShowMysqlInfo']) { if ($cfg['ShowMysqlInfo']) {
echo "\n"; echo "\n";
?> ?>
<tr> <li>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
<td>
<a href="./server_status.php?<?php echo $common_url_query; ?>"> <a href="./server_status.php?<?php echo $common_url_query; ?>">
<?php echo $strMySQLShowStatus . "\n"; ?> <?php echo $strMySQLShowStatus . "\n"; ?>
</a> </a>
</td> </li>
</tr>
<?php <?php
} // end if } // end if
if ($cfg['ShowMysqlVars']) { if ($cfg['ShowMysqlVars']) {
echo "\n"; echo "\n";
?> ?>
<tr> <li>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
<td>
<a href="./server_variables.php?<?php echo $common_url_query; ?>"> <a href="./server_variables.php?<?php echo $common_url_query; ?>">
<?php echo $strMySQLShowVars;?></a>&nbsp; <?php echo $strMySQLShowVars;?></a>&nbsp;
<?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_VARIABLES') . "\n"; ?> <?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_VARIABLES') . "\n"; ?>
</td> </li>
</tr>
<?php <?php
} }
echo "\n"; echo "\n";
?> ?>
<tr> <li>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
<td>
<a href="./server_processlist.php?<?php echo $common_url_query; ?>"> <a href="./server_processlist.php?<?php echo $common_url_query; ?>">
<?php echo $strMySQLShowProcess; ?></a>&nbsp; <?php echo $strMySQLShowProcess; ?></a>&nbsp;
<?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_PROCESSLIST') . "\n"; ?> <?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_PROCESSLIST') . "\n"; ?>
</td> </li>
</tr>
<?php <?php
if (PMA_MYSQL_INT_VERSION >= 40100) { if (PMA_MYSQL_INT_VERSION >= 40100) {
echo "\n"; echo "\n";
?> ?>
<tr> <li>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
<td>
<a href="./server_collations.php?<?php echo $common_url_query; ?>"> <a href="./server_collations.php?<?php echo $common_url_query; ?>">
<?php echo $strCharsetsAndCollations; ?></a>&nbsp; <?php echo $strCharsetsAndCollations; ?></a>&nbsp;
</td> </li>
</tr>
<?php <?php
} }
if ($is_reload_priv) { if ($is_reload_priv) {
echo "\n"; echo "\n";
?> ?>
<tr> <li>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
<td>
<a href="main.php?<?php echo $common_url_query; ?>&amp;mode=reload"> <a href="main.php?<?php echo $common_url_query; ?>&amp;mode=reload">
<?php echo $strReloadMySQL; ?></a>&nbsp; <?php echo $strReloadMySQL; ?></a>&nbsp;
<?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'FLUSH') . "\n"; ?> <?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'FLUSH') . "\n"; ?>
</td> </li>
</tr>
<?php <?php
} }
if ($is_superuser) { if ($is_superuser) {
echo "\n"; echo "\n";
?> ?>
<tr> <li>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
<td>
<a href="server_privileges.php?<?php echo $common_url_query; ?>"> <a href="server_privileges.php?<?php echo $common_url_query; ?>">
<?php echo $strPrivileges; ?></a>&nbsp; <?php echo $strPrivileges; ?></a>&nbsp;
</td> </li>
</tr>
<?php <?php
} }
?> ?>
<tr> <li>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
<td>
<a href="./server_databases.php?<?php echo $common_url_query; ?>"> <a href="./server_databases.php?<?php echo $common_url_query; ?>">
<?php echo $strDatabases; ?></a> <?php echo $strDatabases; ?></a>
</td> </li>
</tr> <li>
<tr>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
<td>
<a href="./server_export.php?<?php echo $common_url_query; ?>"> <a href="./server_export.php?<?php echo $common_url_query; ?>">
<?php echo $strExport; ?></a> <?php echo $strExport; ?></a>
</td> </li>
</tr>
<?php <?php
// Change password (needs another message) // Change password (needs another message)
if ($cfg['ShowChgPassword']) { if ($cfg['ShowChgPassword']) {
echo "\n"; echo "\n";
?> ?>
<tr> <li>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
<td>
<a href="user_password.php?<?php echo $common_url_query; ?>"> <a href="user_password.php?<?php echo $common_url_query; ?>">
<?php echo ($strChangePassword); ?></a> <?php echo ($strChangePassword); ?></a>
</td> </li>
</tr>
<?php <?php
} // end if } // end if
@@ -446,21 +417,16 @@ if ($server > 0) {
: ''; : '';
echo "\n"; echo "\n";
?> ?>
<tr> <li>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
<td>
<a href="index.php?<?php echo $common_url_query; ?>&amp;old_usr=<?php echo urlencode($PHP_AUTH_USER); ?>" target="_parent"> <a href="index.php?<?php echo $common_url_query; ?>&amp;old_usr=<?php echo urlencode($PHP_AUTH_USER); ?>" target="_parent">
<b><?php echo $strLogout; ?></b></a>&nbsp;<?php echo $http_logout . "\n"; ?> <b><?php echo $strLogout; ?></b></a>&nbsp;<?php echo $http_logout . "\n"; ?>
</td> </li>
</tr>
<?php <?php
} // end if } // end if
echo "\n";
?> ?>
</table> </ul>
</td> </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<?php <?php
} // end if } // end if
} // end of if ($server > 0) } // end of if ($server > 0)
@@ -474,24 +440,19 @@ echo "\n";
<!-- phpMyAdmin related links --> <!-- phpMyAdmin related links -->
<td valign="top" align="<?php echo $cell_align_left; ?>"> <td valign="top" align="<?php echo $cell_align_left; ?>">
<table> <ul class="main">
<tr>
<th colspan="2">&nbsp;&nbsp;phpMyAdmin</th>
</tr>
<?php <?php
// Displays language selection combo // Displays language selection combo
if (empty($cfg['Lang'])) { if (empty($cfg['Lang'])) {
?> ?>
<!-- Language Selection --> <!-- Language Selection -->
<tr> <li class="nowrap">
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td> <form method="post" action="index.php" target="_parent">
<td nowrap="nowrap"> <input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<form method="post" action="index.php" target="_parent"> <input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" /> Language <a href="./translators.html" target="documentation">(*)</a>:
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <select name="lang" dir="ltr" onchange="this.form.submit();">
Language <a href="./translators.html" target="documentation">(*)</a>:
<select name="lang" dir="ltr" onchange="this.form.submit();">
<?php <?php
echo "\n"; echo "\n";
@@ -522,11 +483,10 @@ if (empty($cfg['Lang'])) {
echo '<option value="' . $id . '"' . $selected . '>' . $lang_name . ' (' . $id . ')</option>' . "\n"; echo '<option value="' . $id . '"' . $selected . '>' . $lang_name . ' (' . $id . ')</option>' . "\n";
} }
?> ?>
</select> </select>
<noscript><input type="submit" value="Go" /></noscript> <noscript><input type="submit" value="Go" /></noscript>
</form> </form>
</td> </li>
</tr>
<?php <?php
} }
@@ -535,14 +495,12 @@ if (isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding']
echo "\n"; echo "\n";
?> ?>
<!-- Charset Selection --> <!-- Charset Selection -->
<tr> <li class="nowrap">
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td> <form method="post" action="index.php" target="_parent">
<td nowrap="nowrap"> <input type="hidden" name="server" value="<?php echo $server; ?>" />
<form method="post" action="index.php" target="_parent"> <input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo $strMySQLCharset;?>:
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <select name="convcharset" dir="ltr" onchange="this.form.submit();">
<?php echo $strMySQLCharset;?>:
<select name="convcharset" dir="ltr" onchange="this.form.submit();">
<?php <?php
echo "\n"; echo "\n";
foreach($cfg['AvailableCharsets'] AS $id => $tmpcharset) { foreach($cfg['AvailableCharsets'] AS $id => $tmpcharset) {
@@ -555,59 +513,46 @@ if (isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding']
. '<option value="' . $tmpcharset . '"' . $selected . '>' . $tmpcharset . '</option>' . "\n"; . '<option value="' . $tmpcharset . '"' . $selected . '>' . $tmpcharset . '</option>' . "\n";
} }
?> ?>
</select> </select>
<noscript><input type="submit" value="Go" /></noscript> <noscript><input type="submit" value="Go" /></noscript>
</form> </form>
</td> </li>
</tr>
<?php <?php
} elseif (PMA_MYSQL_INT_VERSION >= 40100) { } elseif (PMA_MYSQL_INT_VERSION >= 40100) {
echo ' <tr>' . "\n" echo ' <li>' . "\n"
. ' <td valign="baseline"><img src="' . $item_img . '" width="7" height="7" alt="item" /></td>' . "\n"
. ' <td nowrap="nowrap">' . "\n"
. ' ' . $strMySQLCharset . ':' . "\n" . ' ' . $strMySQLCharset . ':' . "\n"
. ' ' . $mysql_charsets_descriptions[$mysql_charset_map[strtolower($charset)]] . "\n" . ' ' . $mysql_charsets_descriptions[$mysql_charset_map[strtolower($charset)]] . "\n"
. ' (' . $mysql_charset_map[strtolower($charset)] . ')' . "\n" . ' (' . $mysql_charset_map[strtolower($charset)] . ')' . "\n"
. ' </td>' . "\n" . ' </li>' . "\n";
. ' </tr>' . "\n";
} }
echo "\n"; echo "\n";
?> ?>
<!-- Documentation --> <!-- Documentation -->
<tr> <li>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td> <a href="Documentation.html" target="documentation"><b><?php echo $strPmaDocumentation; ?></b></a>
<td> </li>
<a href="Documentation.html" target="documentation"><b><?php echo $strPmaDocumentation; ?></b></a>
</td>
</tr>
<?php <?php
if ($is_superuser || $cfg['ShowPhpInfo']) { if ($is_superuser || $cfg['ShowPhpInfo']) {
?> ?>
<!-- PHP Information --> <!-- PHP Information -->
<tr> <li>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td> <a href="phpinfo.php?<?php echo PMA_generate_common_url(); ?>" target="_blank"><?php echo $strShowPHPInfo; ?></a>
<td> </li>
<a href="phpinfo.php?<?php echo PMA_generate_common_url(); ?>" target="_blank"><?php echo $strShowPHPInfo; ?></a>
</td>
</tr>
<?php <?php
} }
echo "\n"; echo "\n";
?> ?>
<!-- phpMyAdmin related urls --> <!-- phpMyAdmin related urls -->
<tr> <li>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td> <a href="http://www.phpMyAdmin.net/" target="_blank"><?php echo $strHomepageOfficial; ?></a><br />
<td> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<a href="ChangeLog" target="_blank">ChangeLog</a>]
<a href="http://www.phpMyAdmin.net/" target="_blank"><?php echo $strHomepageOfficial; ?></a><br /> &nbsp;&nbsp;&nbsp;[<a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmyadmin/phpMyAdmin/" target="_blank">CVS</a>]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<a href="ChangeLog" target="_blank">ChangeLog</a>] &nbsp;&nbsp;&nbsp;[<a href="http://sourceforge.net/mail/?group_id=23067" target="_blank">Lists</a>]
&nbsp;&nbsp;&nbsp;[<a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmyadmin/phpMyAdmin/" target="_blank">CVS</a>] </li>
&nbsp;&nbsp;&nbsp;[<a href="http://sourceforge.net/mail/?group_id=23067" target="_blank">Lists</a>] </ul>
</td>
</tr>
</table>
</td> </td>
</tr> </tr>