- unified spaces between icons
- cleaned html and php code
- display of querywindow-icon now follows
$cfg['QueryFrame']
- always use no_js=1 if $cfg['QueryFrameJS'] == true
This commit is contained in:
Marc Delisle
2005-08-04 13:43:07 +00:00
parent 9ffa729c41
commit 2d72c05ced

View File

@@ -155,110 +155,86 @@ function set_focus_to_nav() {
</head> </head>
<body id="body_queryFrame" bgcolor="<?php echo $cfg['LeftBgColor']; ?>"<?php echo ((isset($js_frame_onload) && $js_frame_onload!='') ? $js_frame_onload : ''); ?>> <body id="body_queryFrame" bgcolor="<?php echo $cfg['LeftBgColor']; ?>"<?php echo ((isset($js_frame_onload) && $js_frame_onload!='') ? $js_frame_onload : ''); ?>>
<div id="qfcontainer"> <div id="qfcontainer">
<div align="center">
<?php <?php
if ($cfg['LeftDisplayLogo']) { if ($cfg['LeftDisplayLogo']) {
?> echo '<!-- phpMyAdmin logo -->' . "\n";
<!-- phpMyAdmin logo --> echo ' <a href="http://www.phpmyadmin.net/" target="_blank">';
<?php if (@file_exists($GLOBALS['pmaThemeImage'] . 'logo_left.png')) {
if (@file_exists($pmaThemeImage . 'logo_left.png')) { echo '<img src="' . $GLOBALS['pmaThemeImage'] . 'logo_left.png" alt="phpMyAdmin" border="0" />';
?> } else if (@file_exists($GLOBALS['pmaThemeImage'] . 'pma_logo2.png')) {
echo '<img src="' . $GLOBALS['pmaThemeImage'] . 'pma_logo2.png" alt="phpMyAdmin" border="0" />';
<div align="center">
<a href="http://www.phpmyadmin.net" target="_blank"><img src="<?php echo '' . $pmaThemeImage . 'logo_left.png'; ?>" alt="phpMyAdmin" vspace="3" border="0" /></a>
</div>
<?php
} else { } else {
echo ' ' echo 'phpMyAdmin';
. '<div align="center"><a href="http://www.phpmyadmin.net" target="_blank">'
. '<img src="' . $GLOBALS['pmaThemeImage'] . 'pma_logo2.png' .'" alt="phpMyAdmin" border="0" />'
. '</a></div>' . "\n";
} }
echo '<hr id="hr_first" />'; echo '</a>' . "\n";
echo ' <hr id="hr_first" />' . "\n";
} // end of display logo } // end of display logo
if ($cfg['MainPageIconic']) { ?>
$str_spacer_links='';
} else{
$str_spacer_links=' - ';
}
?>
<!-- Link to the welcome page --> <!-- Link to the welcome page -->
<div align="center">
<?php <?php
echo '<a class="item" href="main.php?' . PMA_generate_common_url() . '" target="phpmain' . $hash . '">' echo ' <a class="item" href="main.php?' . PMA_generate_common_url() . '" target="phpmain' . $hash . '">' . "\n"
. ($cfg['MainPageIconic'] . ($cfg['MainPageIconic']
? '<img src="' . $pmaThemeImage . 'b_home.png" width="16" height="16" border="0" hspace="2" alt="' . $strHome . '" title="' . $strHome . '"' ? ' <img src="' . $pmaThemeImage . 'b_home.png" width="16" height="16" border="0" hspace="2" alt="' . $strHome . '" title="' . $strHome . '"'
.' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />' .' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />'
: '<b>' . $strHome . '</b>') : ' <b>' . $strHome . '</b>') . "\n"
. '</a>'; . ' </a>' . "\n";
// if we have chosen server // if we have chosen server
if ($server != 0) { if ($server != 0) {
// Logout for advanced authentication // Logout for advanced authentication
if ($cfg['Server']['auth_type'] != 'config') { if ($cfg['Server']['auth_type'] != 'config') {
echo $str_spacer_links; echo ($cfg['MainPageIconic'] ? '' : ' - ');
echo '<a class="item" href="index.php?' . PMA_generate_common_url() . '&amp;old_usr=' . urlencode($PHP_AUTH_USER) . '" target="_parent">' echo '<a class="item" href="index.php?' . PMA_generate_common_url() . '&amp;old_usr=' . urlencode($PHP_AUTH_USER) . '" target="_parent">' . "\n"
. ($cfg['MainPageIconic'] . ($cfg['MainPageIconic']
? '<img src="' . $pmaThemeImage . 's_loggoff.png" width="16" height="16" border="0" hspace="2" alt="' . $strLogout . '" title="' . $strLogout . '"' ? '<img src="' . $pmaThemeImage . 's_loggoff.png" width="16" height="16" border="0" hspace="2" alt="' . $strLogout . '" title="' . $strLogout . '"'
.' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />' .' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />'
: '<b>' . $strLogout . '</b>') : '<b>' . $strLogout . '</b>') . "\n"
. '</a>'; . '</a>' . "\n";
} // end if } // end if ($cfg['Server']['auth_type'] != 'config'
$anchor = 'querywindow.php?' . PMA_generate_common_url('', ''); if ($cfg['QueryFrame']) {
if ($cfg['QueryFrameJS']) { $anchor = 'querywindow.php?' . PMA_generate_common_url('', '');
$href = $anchor;
$target = ''; if ($cfg['MainPageIconic']) {
$onclick = 'onclick="javascript:open_querywindow(this.href); return false;"'; $query_frame_link_text = '<img src="' . $pmaThemeImage . 'b_selboard.png" border="0" hspace="1" width="16" height="16" alt="' . $strQueryFrame . '" title="' . $strQueryFrame . '"'
} else { .' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />';
$href = $anchor; } else {
$target = 'target="phpmain' . $hash . '"'; echo '<br />' . "\n";
$onclick = ''; $query_frame_link_text = '<b>' . $strQueryFrame . '</b>';
} }
if ($cfg['MainPageIconic']) { ?>
$query_frame_link_text = '<img src="' . $pmaThemeImage . 'b_selboard.png" border="0" hspace="1" width="16" height="16" alt="' . $strQueryFrame . '" title="' . $strQueryFrame . '"' <a href="<?php echo $anchor; ?>&amp;no_js=true" target="phpmain<?php echo $hash; ?>" class="item"
.' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />'; <?php echo ($cfg['QueryFrameJS'] ? 'onclick="javascript:open_querywindow(\'' . $anchor . '\'); return false;"' : ''); ?>>
} else { <?php echo $query_frame_link_text; ?>
echo ($str_spacer_links != '' ? '<br />' : ''); </a>
$query_frame_link_text = '<b>' . $strQueryFrame . '</b>'; <?php
} } // end if ($cfg['QueryFrame'])
?> } // end if ($server != 0)
<script type="text/javascript">
<!--
document.writeln('<a href="<?php echo $href; ?>" <?php echo $target . ' ' . $onclick; ?> class="item"><?php echo addslashes($query_frame_link_text); ?><\/a>');
//-->
</script>
<noscript>
<a href="<?php echo $href; ?>&amp;no_js=true" <?php echo $target . ' ' . $onclick; ?> target="phpmain<?php echo $hash; ?>" class="item"><?php echo $query_frame_link_text; ?></a>
</noscript>
<?php
}
if ($cfg['MainPageIconic']) { if ($cfg['MainPageIconic']) {
echo '<img src="' .$GLOBALS['pmaThemeImage'] . 'spacer.png' .'" width="2" height="1" border="0" alt="" />' echo ' <a href="Documentation.html" target="documentation" class="item">' . "\n"
. '<a href="Documentation.html" target="documentation" class="item">' . ' <img src="' . $pmaThemeImage . 'b_docs.png" border="0" hspace="1" width="16" height="16" alt="' . $strPmaDocumentation . '" title="' . $strPmaDocumentation . '"'
. '<img src="' . $pmaThemeImage . 'b_docs.png" border="0" hspace="1" width="16" height="16" alt="' . $strPmaDocumentation . '" title="' . $strPmaDocumentation . '"' . ' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />' . "\n"
. ' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />' . ' </a>' . "\n";
. '</a>'; echo ' <a href="' . $cfg['MySQLManualBase'] . '" target="documentation" class="item">' . "\n"
echo '' . ' <img src="' . $pmaThemeImage . 'b_sqlhelp.png" border="0" hspace="1" width="16" height="16" alt="MySQL - ' . $strDocu . '" title="MySQL - ' . $strDocu . '"'
. '<a href="' . $cfg['MySQLManualBase'] . '" target="documentation" class="item">' .' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />' . "\n"
. '<img src="' . $pmaThemeImage . 'b_sqlhelp.png" border="0" hspace="1" width="16" height="16" alt="MySQL - ' . $strDocu . '" title="MySQL - ' . $strDocu . '"' . ' </a>' . "\n";
.' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />'
. '</a>';
} }
?>
</div>
<hr id="hr_second" />
?> <?php
</div>
<hr id="hr_second" />
<?php
if ($cfg['LeftDisplayServers']){ if ($cfg['LeftDisplayServers']){
$show_server_left = TRUE; $show_server_left = TRUE;
include('./libraries/select_server.lib.php'); include('./libraries/select_server.lib.php');
} // end if LeftDisplayServers } // end if LeftDisplayServers
?> ?>
<!-- Databases list --> <!-- Databases list -->
<?php <?php
/** /**
* Get the list and number of available databases. * Get the list and number of available databases.
* Skipped if no server selected: in this case no database should be displayed * Skipped if no server selected: in this case no database should be displayed