Translation update done using Pootle.
[phpmyadmin/sankalp_k.git] / libraries / tbl_links.inc.php
blobbc72d2152aa8c9036e798e1000f986128aa78fe4
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';
16 PMA_checkParameters(array('db', 'table'));
18 /**
19 * Prepares links
21 require_once './libraries/bookmark.lib.php';
24 /**
25 * Set parameters for links
27 $url_params = array();
28 $url_params['db'] = $db;
29 $url_params['table'] = $table;
31 /**
32 * Defines the urls to return to in case of error in a sql statement
34 $err_url_0 = $cfg['DefaultTabDatabase'] . PMA_generate_common_url(array('db' => $db,));
35 $err_url = $cfg['DefaultTabTable'] . PMA_generate_common_url($url_params);
37 /**
38 * Displays headers
40 require_once './libraries/header.inc.php';
42 /**
43 * Displays links
45 $tabs = array();
47 $tabs['browse']['icon'] = 'b_browse.png';
48 $tabs['browse']['text'] = __('Browse');
49 $tabs['browse']['link'] = 'sql.php';
50 $tabs['browse']['args']['pos'] = 0;
52 $tabs['structure']['icon'] = 'b_props.png';
53 $tabs['structure']['link'] = 'tbl_structure.php';
54 $tabs['structure']['text'] = __('Structure');
56 $tabs['sql']['icon'] = 'b_sql.png';
57 $tabs['sql']['link'] = 'tbl_sql.php';
58 $tabs['sql']['text'] = __('SQL');
60 $tabs['search']['icon'] = 'b_search.png';
61 $tabs['search']['text'] = __('Search');
62 $tabs['search']['link'] = 'tbl_select.php';
64 if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
65 $tabs['insert']['icon'] = 'b_insrow.png';
66 $tabs['insert']['link'] = 'tbl_change.php';
67 $tabs['insert']['text'] = __('Insert');
70 $tabs['export']['icon'] = 'b_tblexport.png';
71 $tabs['export']['link'] = 'tbl_export.php';
72 $tabs['export']['args']['single_table'] = 'true';
73 $tabs['export']['text'] = __('Export');
75 /**
76 * Don't display "Import" and "Operations"
77 * for views and information_schema
79 if (! $tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_schema)) {
80 $tabs['import']['icon'] = 'b_tblimport.png';
81 $tabs['import']['link'] = 'tbl_import.php';
82 $tabs['import']['text'] = __('Import');
84 $tabs['operation']['icon'] = 'b_tblops.png';
85 $tabs['operation']['link'] = 'tbl_operations.php';
86 $tabs['operation']['text'] = __('Operations');
88 if(PMA_Tracker::isActive()) {
89 $tabs['tracking']['icon'] = 'eye.png';
90 $tabs['tracking']['text'] = __('Tracking');
91 $tabs['tracking']['link'] = 'tbl_tracking.php';
93 if (! $tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_schema)) {
96 /**
97 * Views support a limited number of operations
99 if ($tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_schema)) {
100 $tabs['operation']['icon'] = 'b_tblops.png';
101 $tabs['operation']['link'] = 'view_operations.php';
102 $tabs['operation']['text'] = __('Operations');
105 if ($table_info_num_rows == 0 && !$tbl_is_view) {
106 $tabs['browse']['warning'] = __('Table seems to be empty!');
107 $tabs['search']['warning'] = __('Table seems to be empty!');
110 echo PMA_generate_html_tabs($tabs, $url_params);
111 unset($tabs);
113 if(PMA_Tracker::isActive() and PMA_Tracker::isTracked($GLOBALS["db"], $GLOBALS["table"]))
115 $msg = PMA_Message::notice('<a href="tbl_tracking.php?'.$url_query.'">'.sprintf(__('Tracking of %s.%s is activated.'), $GLOBALS["db"], $GLOBALS["table"]).'</a>');
116 $msg->display();
120 * Displays a message
122 if (!empty($message)) {
123 PMA_showMessage($message);
124 unset($message);