PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/phpmyadmin/libraries/server_common.inc.php

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