- 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

@@ -156,97 +156,73 @@ function set_focus_to_nav() {
<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'
if ($cfg['QueryFrame']) {
$anchor = 'querywindow.php?' . PMA_generate_common_url('', ''); $anchor = 'querywindow.php?' . PMA_generate_common_url('', '');
if ($cfg['QueryFrameJS']) {
$href = $anchor;
$target = '';
$onclick = 'onclick="javascript:open_querywindow(this.href); return false;"';
} else {
$href = $anchor;
$target = 'target="phpmain' . $hash . '"';
$onclick = '';
}
if ($cfg['MainPageIconic']) { 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 . '"' $query_frame_link_text = '<img src="' . $pmaThemeImage . 'b_selboard.png" border="0" hspace="1" width="16" height="16" alt="' . $strQueryFrame . '" title="' . $strQueryFrame . '"'
.' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />'; .' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />';
} else { } else {
echo ($str_spacer_links != '' ? '<br />' : ''); echo '<br />' . "\n";
$query_frame_link_text = '<b>' . $strQueryFrame . '</b>'; $query_frame_link_text = '<b>' . $strQueryFrame . '</b>';
} }
?> ?>
<script type="text/javascript"> <a href="<?php echo $anchor; ?>&amp;no_js=true" target="phpmain<?php echo $hash; ?>" class="item"
<!-- <?php echo ($cfg['QueryFrameJS'] ? 'onclick="javascript:open_querywindow(\'' . $anchor . '\'); return false;"' : ''); ?>>
document.writeln('<a href="<?php echo $href; ?>" <?php echo $target . ' ' . $onclick; ?> class="item"><?php echo addslashes($query_frame_link_text); ?><\/a>'); <?php echo $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 <?php
} } // end if ($cfg['QueryFrame'])
} // end if ($server != 0)
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" />' . ' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />' . "\n"
. '</a>'; . ' </a>' . "\n";
echo '' echo ' <a href="' . $cfg['MySQLManualBase'] . '" target="documentation" class="item">' . "\n"
. '<a href="' . $cfg['MySQLManualBase'] . '" target="documentation" class="item">'
. ' <img src="' . $pmaThemeImage . 'b_sqlhelp.png" border="0" hspace="1" width="16" height="16" alt="MySQL - ' . $strDocu . '" title="MySQL - ' . $strDocu . '"' . ' <img src="' . $pmaThemeImage . 'b_sqlhelp.png" border="0" hspace="1" width="16" height="16" alt="MySQL - ' . $strDocu . '" title="MySQL - ' . $strDocu . '"'
.' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />' .' onmouseover="this.style.backgroundColor=\'#ffffff\';" onmouseout="this.style.backgroundColor=\'\';" align="middle" />' . "\n"
. '</a>'; . ' </a>' . "\n";
} }
?> ?>
</div> </div>
<hr id="hr_second" /> <hr id="hr_second" />