Fix for the Open in New Window in Patient/Client->Patients search gui, take 2.
[openemr.git] / phpmyadmin / libraries / server_common.inc.php
blob07005ffe2f3b7099cb00c5a5cf4973009e307fa9
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$
12 if (! defined('PHPMYADMIN')) {
13 exit;
16 /**
17 * Gets some core libraries
19 require_once './libraries/common.inc.php';
21 /**
22 * Handles some variables that may have been sent by the calling script
23 * Note: this can be called also from the db panel to get the privileges of
24 * a db, in which case we want to keep displaying the tabs of
25 * the Database panel
27 if (empty($viewing_mode)) {
28 $db = $table = '';
31 /**
32 * Set parameters for links
34 $url_query = PMA_generate_common_url($db);
36 /**
37 * Defines the urls to return to in case of error in a sql statement
39 $err_url = 'main.php' . $url_query;
41 /**
42 * Displays the headers
44 require_once './libraries/header.inc.php';
46 /**
47 * @global boolean Checks for superuser privileges
49 $is_superuser = PMA_isSuperuser();
51 // now, select the mysql db
52 if ($is_superuser) {
53 PMA_DBI_select_db('mysql', $userlink);
56 /**
57 * @global array binary log files
59 $binary_logs = PMA_DBI_fetch_result('SHOW MASTER LOGS', 'Log_name', null, null,
60 PMA_DBI_QUERY_STORE);