Fixed bugs in show error message ine multi row change in table structure
[phpmyadmin/madhuracj.git] / libraries / db_links.inc.php
blobd1579e9f427ee07d55b4e366f173e11fb8ffd6a2
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';
96 $tab_routines['link'] = 'db_routines.php';
97 $tab_routines['text'] = __('Routines');
98 $tab_routines['icon'] = 'b_routines.png';
100 $tab_events['link'] = 'db_events.php';
101 $tab_events['text'] = __('Events');
102 $tab_events['icon'] = 'b_events.png';
104 $tab_triggers['link'] = 'db_triggers.php';
105 $tab_triggers['text'] = __('Triggers');
106 $tab_triggers['icon'] = 'b_triggers.png';
110 * Displays tab links
112 $tabs = array();
113 $tabs[] =& $tab_structure;
114 $tabs[] =& $tab_sql;
115 $tabs[] =& $tab_search;
116 $tabs[] =& $tab_qbe;
117 $tabs[] =& $tab_export;
118 if (! $db_is_information_schema) {
119 $tabs[] =& $tab_import;
120 $tabs[] =& $tab_operation;
121 if ($is_superuser) {
122 $tabs[] =& $tab_privileges;
124 if (PMA_MYSQL_INT_VERSION >= 50002 && ! PMA_DRIZZLE) {
125 $tabs[] =& $tab_routines;
127 if (PMA_MYSQL_INT_VERSION >= 50106 && ! PMA_DRIZZLE) {
128 // Temporarily hiding this unfinished feature
129 // $tabs[] =& $tab_events;
131 if (PMA_MYSQL_INT_VERSION >= 50002 && ! PMA_DRIZZLE) {
132 // Temporarily hiding this unfinished feature
133 // $tabs[] =& $tab_triggers;
136 if (PMA_Tracker::isActive()) {
137 $tabs[] =& $tab_tracking;
139 if (! $db_is_information_schema) {
140 if ($cfgRelation['designerwork']) {
141 $tabs[] =& $tab_designer;
145 $url_params['db'] = $db;
147 echo PMA_generate_html_tabs($tabs, $url_params);
148 unset($tabs);
151 * Displays a message
153 if (!empty($message)) {
154 PMA_showMessage($message);
155 unset($message);