home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 February (DVD) / PCWorld_2008-02_DVD.iso / v cisle / PHP / PHP.exe / xampp-win32-1.6.5-installer.exe / phpMyAdmin / libraries / navigation_header.inc.php < prev    next >
Encoding:
PHP Script  |  2007-12-20  |  4.0 KB  |  104 lines

  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4.  * displays the pma logo, links and db and server selection in left frame
  5.  *
  6.  * @version $Id: navigation_header.inc.php 10868 2007-10-20 17:19:39Z lem9 $
  7.  */
  8.  
  9. /**
  10.  *
  11.  */
  12. if (empty($query_url)) {
  13.     $query_url = PMA_generate_common_url($db, $table);
  14. }
  15.  
  16. // display Logo, depending on $GLOBALS['cfg']['LeftDisplayLogo']
  17. if ($GLOBALS['cfg']['LeftDisplayLogo']) {
  18.     $logo = 'phpMyAdmin';
  19.     if (@file_exists($GLOBALS['pmaThemeImage'] . 'logo_left.png')) {
  20.         $logo = '<img src="' . $GLOBALS['pmaThemeImage'] . 'logo_left.png" '
  21.             .'alt="' . $logo . '" id="imgpmalogo" />';
  22.     } elseif (@file_exists($GLOBALS['pmaThemeImage'] . 'pma_logo2.png')) {
  23.         $logo = '<img src="' . $GLOBALS['pmaThemeImage'] . 'pma_logo2.png" '
  24.             .'alt="' . $logo . '" id="imgpmalogo" />';
  25.     }
  26.  
  27.     echo '<div id="pmalogo">' . "\n"
  28.         .'<a href="' . $GLOBALS['cfg']['LeftLogoLink'];
  29.     switch ($GLOBALS['cfg']['LeftLogoLinkWindow']) {
  30.         case 'new':
  31.             echo '" target="_blank"';
  32.             break;
  33.         case 'main':
  34.             // do not add our parameters for an external link
  35.             if (substr(strtolower($GLOBALS['cfg']['LeftLogoLink']), 0, 4) !== 'http') {
  36.                 echo '?' . $query_url . '" target="frame_content"';
  37.             } else {
  38.                 echo '"';
  39.             }
  40.     }
  41.     echo '>' . $logo . '</a>' . "\n"
  42.         .'</div>' . "\n";
  43. } // end of display logo
  44. ?>
  45. <div id="leftframelinks">
  46. <?php
  47.     echo '<a href="main.php?' . $query_url . '"'
  48.         .' title="' . $strHome . '">'
  49.         .($GLOBALS['cfg']['MainPageIconic']
  50.             ? '<img class="icon" src="' . $pmaThemeImage . 'b_home.png" width="16" '
  51.                 .' height="16" alt="' . $strHome . '" />'
  52.             : $strHome)
  53.         .'</a>' . "\n";
  54.     // if we have chosen server
  55.     if ($server != 0) {
  56.         // Logout for advanced authentication
  57.         if ($GLOBALS['cfg']['Server']['auth_type'] != 'config') {
  58.             echo ($GLOBALS['cfg']['MainPageIconic'] ? '' : ' - ');
  59.             echo '<a href="index.php?' . $query_url . '&old_usr='
  60.                 .urlencode($PHP_AUTH_USER) . '" target="_parent"'
  61.                 .' title="' . $strLogout . '" >'
  62.                 .($GLOBALS['cfg']['MainPageIconic']
  63.                     ? '<img class="icon" src="' . $pmaThemeImage . 's_loggoff.png" '
  64.                      .' width="16" height="16" alt="' . $strLogout . '" />'
  65.                     : $strLogout)
  66.                 .'</a>' . "\n";
  67.         } // end if ($GLOBALS['cfg']['Server']['auth_type'] != 'config'
  68.  
  69.         $anchor = 'querywindow.php?' . PMA_generate_common_url($db, $table);
  70.  
  71.         if ($GLOBALS['cfg']['MainPageIconic']) {
  72.             $query_frame_link_text =
  73.                 '<img class="icon" src="' . $pmaThemeImage . 'b_selboard.png"'
  74.                 .' width="16" height="16" alt="' . $strQueryFrame . '" />';
  75.         } else {
  76.             echo '<br />' . "\n";
  77.             $query_frame_link_text = $strQueryFrame;
  78.         }
  79.         echo '<a href="' . $anchor . '&no_js=true"'
  80.             .' title="' . $strQueryFrame . '"';
  81.         echo ' onclick="javascript:if (window.parent.open_querywindow()) return false;"';
  82.         echo '>' . $query_frame_link_text . '</a>' . "\n";
  83.     } // end if ($server != 0)
  84.  
  85. if ($GLOBALS['cfg']['MainPageIconic']) {
  86.     echo '    <a href="Documentation.html" target="documentation"'
  87.         .' title="' . $strPmaDocumentation . '" >'
  88.         .'<img class="icon" src="' . $pmaThemeImage . 'b_docs.png" width="16" height="16"'
  89.         .' alt="' . $strPmaDocumentation . '" /></a>' . "\n";
  90.     echo '    ' . PMA_showMySQLDocu('', '', TRUE) . "\n";
  91. }
  92. echo '</div>' . "\n";
  93.  
  94. /**
  95.  * Displays the MySQL servers choice form
  96.  */
  97. if ($GLOBALS['cfg']['LeftDisplayServers'] && (count($GLOBALS['cfg']['Servers']) > 1 || $server == 0 && count($GLOBALS['cfg']['Servers']) == 1)) {
  98.     echo '<div id="serverinfo">';
  99.     include './libraries/select_server.lib.php';
  100.     PMA_select_server(true, true);
  101.     echo '</div><br />';
  102. } // end if LeftDisplayServers
  103. ?>
  104.