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 / server_common.inc.php < prev    next >
Encoding:
PHP Script  |  2007-12-20  |  1.3 KB  |  59 lines

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