PageRenderTime 22ms CodeModel.GetById 13ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/phpmyadmin/libraries/server_links.inc.php

https://bitbucket.org/adarshj/convenient_website
PHP | 124 lines | 74 code | 25 blank | 25 comment | 11 complexity | 4eb6369aed7ef5933224f560be248ed4 MD5 | raw file
  1<?php
  2/* vim: set expandtab sw=4 ts=4 sts=4: */
  3/**
  4 *
  5 * @package PhpMyAdmin
  6 */
  7if (! defined('PHPMYADMIN')) {
  8    exit;
  9}
 10
 11/**
 12 * Check parameters
 13 */
 14require_once './libraries/common.inc.php';
 15require_once './libraries/server_common.inc.php';
 16
 17PMA_checkParameters(array('is_superuser', 'url_query'), true, false);
 18
 19// Don't print all these links if in an Ajax request
 20if (!$GLOBALS['is_ajax_request']) {
 21    /**
 22     * Counts amount of navigation tabs
 23     */
 24    $server_links_count_tabs = 0;
 25
 26
 27    /**
 28     * Put something in $sub_part
 29     */
 30    if (! isset($sub_part)) {
 31        $sub_part = '';
 32    }
 33
 34
 35    /**
 36     * Displays tab links
 37     * Put the links we assume are used less, towards the end
 38     */
 39    $tabs = array();
 40
 41    $tabs['databases']['icon'] = 's_db.png';
 42    $tabs['databases']['link'] = 'server_databases.php';
 43    $tabs['databases']['text'] = __('Databases');
 44
 45    $tabs['sql']['icon'] = 'b_sql.png';
 46    $tabs['sql']['link'] = 'server_sql.php';
 47    $tabs['sql']['text'] = __('SQL');
 48
 49    $tabs['status']['icon'] = 's_status.png';
 50    $tabs['status']['link'] = 'server_status.php';
 51    $tabs['status']['text'] = __('Status');
 52
 53    /*$tabs['process']['icon'] = 's_process.png';
 54    $tabs['process']['link'] = 'server_processlist.php';
 55    $tabs['process']['text'] = __('Processes');*/
 56
 57    if ($is_superuser && !PMA_DRIZZLE) {
 58        $tabs['rights']['icon'] = 's_rights.png';
 59        $tabs['rights']['link'] = 'server_privileges.php';
 60        $tabs['rights']['text'] = __('Users');
 61    }
 62
 63    $tabs['export']['icon'] = 'b_export.png';
 64    $tabs['export']['link'] = 'server_export.php';
 65    $tabs['export']['text'] = __('Export');
 66
 67    $tabs['import']['icon'] = 'b_import.png';
 68    $tabs['import']['link'] = 'server_import.php';
 69    $tabs['import']['text'] = __('Import');
 70
 71    $tabs['settings']['icon'] = 'b_tblops.png';
 72    $tabs['settings']['link'] = 'prefs_manage.php';
 73    $tabs['settings']['text'] = __('Settings');
 74    $tabs['settings']['active'] = in_array(basename($GLOBALS['PMA_PHP_SELF']),
 75        array('prefs_forms.php', 'prefs_manage.php'));
 76
 77    $tabs['synchronize']['icon'] = 's_sync.png';
 78    $tabs['synchronize']['link'] = 'server_synchronize.php';
 79    $tabs['synchronize']['text'] = __('Synchronize');
 80
 81    if (! empty($binary_logs)) {
 82        $tabs['binlog']['icon'] = 's_tbl.png';
 83        $tabs['binlog']['link'] = 'server_binlog.php';
 84        $tabs['binlog']['text'] = __('Binary log');
 85    }
 86
 87    if ($is_superuser && !PMA_DRIZZLE) {
 88        $tabs['replication']['icon'] = 's_replication.png';
 89        $tabs['replication']['link'] = 'server_replication.php';
 90        $tabs['replication']['text'] = __('Replication');
 91    }
 92
 93    $tabs['vars']['icon'] = 's_vars.png';
 94    $tabs['vars']['link'] = 'server_variables.php';
 95    $tabs['vars']['text'] = __('Variables');
 96
 97    $tabs['charset']['icon'] = 's_asci.png';
 98    $tabs['charset']['link'] = 'server_collations.php';
 99    $tabs['charset']['text'] = __('Charsets');
100
101    if (PMA_DRIZZLE) {
102        $tabs['plugins']['icon'] = 'b_engine.png';
103        $tabs['plugins']['link'] = 'server_plugins.php';
104        $tabs['plugins']['text'] = __('Plugins');
105    } else {
106        $tabs['engine']['icon'] = 'b_engine.png';
107        $tabs['engine']['link'] = 'server_engines.php';
108        $tabs['engine']['text'] = __('Engines');
109    }
110
111    echo PMA_generate_html_tabs($tabs, array());
112    unset($tabs);
113
114
115
116    /**
117     * Displays a message
118     */
119    if (!empty($message)) {
120        PMA_showMessage($message);
121        unset($message);
122    }
123}// end if ($GLOBALS['is_ajax_request'] == true)
124?>