Bug: Live query chart always zero
[phpmyadmin/tyronm.git] / libraries / server_links.inc.php
blob19ee5d7d064d81ecda50cc1c15dc1cad510ffa58
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package phpMyAdmin
6 */
7 if (! defined('PHPMYADMIN')) {
8 exit;
11 /**
12 * Check parameters
14 require_once './libraries/common.inc.php';
15 require_once './libraries/server_common.inc.php';
17 PMA_checkParameters(array('is_superuser', 'url_query'), true, false);
19 // Don't print all these links if in an Ajax request
20 if (!$GLOBALS['is_ajax_request']) {
21 /**
22 * Counts amount of navigation tabs
24 $server_links_count_tabs = 0;
27 /**
28 * Put something in $sub_part
30 if (! isset($sub_part)) {
31 $sub_part = '';
35 /**
36 * Displays tab links
37 * Put the links we assume are used less, towards the end
39 $tabs = array();
41 $tabs['databases']['icon'] = 'ic_s_db';
42 $tabs['databases']['link'] = 'server_databases.php';
43 $tabs['databases']['text'] = __('Databases');
45 $tabs['sql']['icon'] = 'ic_b_sql';
46 $tabs['sql']['link'] = 'server_sql.php';
47 $tabs['sql']['text'] = __('SQL');
49 $tabs['status']['icon'] = 'ic_s_status';
50 $tabs['status']['link'] = 'server_status.php';
51 $tabs['status']['text'] = __('Status');
53 /*$tabs['process']['icon'] = 's_process.png';
54 $tabs['process']['link'] = 'server_processlist.php';
55 $tabs['process']['text'] = __('Processes');*/
57 if ($is_superuser) {
58 $tabs['rights']['icon'] = 'ic_s_rights';
59 $tabs['rights']['link'] = 'server_privileges.php';
60 $tabs['rights']['text'] = __('Privileges');
63 $tabs['export']['icon'] = 'ic_b_export';
64 $tabs['export']['link'] = 'server_export.php';
65 $tabs['export']['text'] = __('Export');
67 $tabs['import']['icon'] = 'ic_b_import';
68 $tabs['import']['link'] = 'server_import.php';
69 $tabs['import']['text'] = __('Import');
71 $tabs['settings']['icon'] = 'ic_b_tblops';
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'));
77 $tabs['synchronize']['icon'] = 'ic_s_sync';
78 $tabs['synchronize']['link'] = 'server_synchronize.php';
79 $tabs['synchronize']['text'] = __('Synchronize');
81 if (! empty($binary_logs)) {
82 $tabs['binlog']['icon'] = 'ic_s_tbl';
83 $tabs['binlog']['link'] = 'server_binlog.php';
84 $tabs['binlog']['text'] = __('Binary log');
87 if ($is_superuser) {
88 $tabs['replication']['icon'] = 'ic_s_replication';
89 $tabs['replication']['link'] = 'server_replication.php';
90 $tabs['replication']['text'] = __('Replication');
93 $tabs['vars']['icon'] = 'ic_s_vars';
94 $tabs['vars']['link'] = 'server_variables.php';
95 $tabs['vars']['text'] = __('Variables');
97 $tabs['charset']['icon'] = 'ic_s_asci';
98 $tabs['charset']['link'] = 'server_collations.php';
99 $tabs['charset']['text'] = __('Charsets');
101 $tabs['engine']['icon'] = 'ic_b_engine';
102 $tabs['engine']['link'] = 'server_engines.php';
103 $tabs['engine']['text'] = __('Engines');
105 echo PMA_generate_html_tabs($tabs, array());
106 unset($tabs);
111 * Displays a message
113 if (!empty($message)) {
114 PMA_showMessage($message);
115 unset($message);
117 }// end if ($GLOBALS['is_ajax_request'] == true)