Translation update done using Pootle.
[phpmyadmin/sankalp_k.git] / libraries / db_links.inc.php
blob7eaf343a4e4fea4219659173b286d39c873f3977
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package phpMyAdmin
6 */
7 if (! defined('PHPMYADMIN')) {
8 exit;
11 /**
14 require_once './libraries/common.inc.php';
16 /**
17 * Gets the relation settings
19 $cfgRelation = PMA_getRelationsParam();
21 /**
22 * If coming from a Show MySQL link on the home page,
23 * put something in $sub_part
25 if (empty($sub_part)) {
26 $sub_part = '_structure';
29 /**
30 * Checks for superuser privileges
32 $is_superuser = PMA_isSuperuser();
34 /**
35 * Prepares links
38 /**
39 * export, search and qbe links if there is at least one table
41 if ($num_tables == 0) {
42 $tab_qbe['warning'] = __('Database seems to be empty!');
43 $tab_search['warning'] = __('Database seems to be empty!');
44 $tab_export['warning'] = __('Database seems to be empty!');
47 $tab_structure['link'] = 'db_structure.php';
48 $tab_structure['text'] = __('Structure');
49 $tab_structure['icon'] = 'b_props.png';
51 $tab_sql['link'] = 'db_sql.php';
52 $tab_sql['args']['db_query_force'] = 1;
53 $tab_sql['text'] = __('SQL');
54 $tab_sql['icon'] = 'b_sql.png';
56 $tab_export['text'] = __('Export');
57 $tab_export['icon'] = 'b_export.png';
58 $tab_export['link'] = 'db_export.php';
60 $tab_search['text'] = __('Search');
61 $tab_search['icon'] = 'b_search.png';
62 $tab_search['link'] = 'db_search.php';
64 if(PMA_Tracker::isActive())
66 $tab_tracking['text'] = __('Tracking');
67 $tab_tracking['icon'] = 'eye.png';
68 $tab_tracking['link'] = 'db_tracking.php';
71 $tab_qbe['text'] = __('Query');
72 $tab_qbe['icon'] = 's_db.png';
73 $tab_qbe['link'] = 'db_qbe.php';
75 if ($cfgRelation['designerwork']) {
76 $tab_designer['text'] = __('Designer');
77 $tab_designer['icon'] = 'b_relations.png';
78 $tab_designer['link'] = 'pmd_general.php';
81 if (! $db_is_information_schema) {
82 $tab_import['link'] = 'db_import.php';
83 $tab_import['text'] = __('Import');
84 $tab_import['icon'] = 'b_import.png';
85 $tab_operation['link'] = 'db_operations.php';
86 $tab_operation['text'] = __('Operations');
87 $tab_operation['icon'] = 'b_tblops.png';
88 if ($is_superuser) {
89 $tab_privileges['link'] = 'server_privileges.php';
90 $tab_privileges['args']['checkprivs'] = $db;
91 // stay on database view
92 $tab_privileges['args']['viewing_mode'] = 'db';
93 $tab_privileges['text'] = __('Privileges');
94 $tab_privileges['icon'] = 's_rights.png';
98 /**
99 * Displays tab links
101 $tabs = array();
102 $tabs[] =& $tab_structure;
103 $tabs[] =& $tab_sql;
104 $tabs[] =& $tab_search;
105 $tabs[] =& $tab_qbe;
106 $tabs[] =& $tab_export;
107 if (! $db_is_information_schema) {
108 $tabs[] =& $tab_import;
109 $tabs[] =& $tab_operation;
110 if ($is_superuser) {
111 $tabs[] =& $tab_privileges;
114 if (PMA_Tracker::isActive()) {
115 $tabs[] =& $tab_tracking;
117 if (! $db_is_information_schema) {
118 if ($cfgRelation['designerwork']) {
119 $tabs[] =& $tab_designer;
123 $url_params['db'] = $db;
125 echo PMA_generate_html_tabs($tabs, $url_params);
126 unset($tabs);
129 * Displays a message
131 if (!empty($message)) {
132 PMA_showMessage($message);
133 unset($message);