[ Index ]
 

Code source de phpMyAdmin 2.10.3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/libraries/ -> server_common.inc.php (source)

   1  <?php
   2  /* $Id: server_common.inc.php 9057 2006-05-18 16:53:40Z lem9 $ */
   3  // vim: expandtab sw=4 ts=4 sts=4:
   4  
   5  /**
   6   * Gets some core libraries
   7   */
   8  require_once ('./libraries/common.lib.php');
   9  
  10  /**
  11   * Handles some variables that may have been sent by the calling script
  12   * Note: this can be called also from the db panel to get the privileges of
  13   *       a db, in which case we want to keep displaying the tabs of
  14   *       the Database panel
  15   */
  16  if (empty($viewing_mode)) {
  17      unset($db, $table);
  18  }
  19  
  20  /**
  21   * Set parameters for links
  22   */
  23  $url_query = PMA_generate_common_url((isset($db) ? $db : ''));
  24  
  25  /**
  26   * Defines the urls to return to in case of error in a sql statement
  27   */
  28  $err_url = 'main.php' . $url_query;
  29  
  30  /**
  31   * Displays the headers
  32   */
  33  require_once ('./libraries/header.inc.php');
  34  
  35  /**
  36   * Checks for superuser privileges
  37   */
  38  
  39  $is_superuser  = PMA_isSuperuser();
  40  
  41  // now, select the mysql db
  42  if ($is_superuser) {
  43      PMA_DBI_select_db('mysql', $userlink);
  44  }
  45  
  46  $has_binlogs = FALSE;
  47  $binlogs = PMA_DBI_try_query('SHOW MASTER LOGS', null, PMA_DBI_QUERY_STORE);
  48  if ($binlogs) {
  49      if (PMA_DBI_num_rows($binlogs) > 0) {
  50          $binary_logs = array();
  51          while ($row = PMA_DBI_fetch_array($binlogs)) {
  52              $binary_logs[] = $row[0];
  53          }
  54          $has_binlogs = TRUE;
  55      }
  56      PMA_DBI_free_result($binlogs);
  57  }
  58  unset($binlogs);
  59  ?>


Généré le : Mon Nov 26 15:18:20 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics