00001 <?php
00002
00003
00004
00005
00006
00007
00008 require_once('./libraries/common.lib.php');
00009
00010 PMA_checkParameters(array('db', 'table'));
00011
00015 require_once('./libraries/bookmark.lib.php');
00016 $book_sql_query = PMA_queryBookmarks($db, $GLOBALS['cfg']['Bookmark'], '\'' . PMA_sqlAddslashes($table) . '\'', 'label');
00017
00021 $tabs = array();
00022
00023 $tabs['browse']['icon'] = 'b_browse.png';
00024 $tabs['browse']['text'] = $strBrowse;
00025
00026 $tabs['structure']['icon'] = 'b_props.png';
00027 $tabs['structure']['link'] = 'tbl_properties_structure.php';
00028 $tabs['structure']['text'] = $strStructure;
00029
00030 $tabs['sql']['icon'] = 'b_sql.png';
00031 $tabs['sql']['link'] = 'tbl_properties.php';
00032 $tabs['sql']['text'] = $strSQL;
00033
00034 $tabs['search']['icon'] = 'b_search.png';
00035 $tabs['search']['text'] = $strSearch;
00036
00037 $tabs['insert']['icon'] = 'b_insrow.png';
00038 $tabs['insert']['link'] = 'tbl_change.php';
00039 $tabs['insert']['text'] = $strInsert;
00040
00044 if (!$tbl_is_view) {
00045 $tabs['export']['icon'] = 'b_tblexport.png';
00046 $tabs['export']['link'] = 'tbl_properties_export.php';
00047 $tabs['export']['args']['single_table'] = 'true';
00048 $tabs['export']['text'] = $strExport;
00049
00050 $tabs['operation']['icon'] = 'b_tblops.png';
00051 $tabs['operation']['link'] = 'tbl_properties_operations.php';
00052 $tabs['operation']['text'] = $strOperations;
00053
00054 if ($table_info_num_rows > 0) {
00055 $ln8_stt = (PMA_MYSQL_INT_VERSION >= 40000)
00056 ? 'TRUNCATE TABLE '
00057 : 'DELETE FROM ';
00058 $tabs['empty']['link'] = 'sql.php';
00059 $tabs['empty']['args']['sql_query'] = $ln8_stt . PMA_backquote($table);
00060 $tabs['empty']['args']['zero_rows'] = sprintf($strTableHasBeenEmptied, htmlspecialchars($table));
00061 $tabs['empty']['attr'] = 'onclick="return confirmLink(this, \'' . $ln8_stt . PMA_jsFormat($table) . '\')"';
00062 $tabs['empty']['class'] = 'caution';
00063 }
00064 $tabs['empty']['icon'] = 'b_empty.png';
00065 $tabs['empty']['text'] = $strEmpty;
00066 }
00067 $tabs['drop']['icon'] = 'b_deltbl.png';
00068 $tabs['drop']['link'] = 'sql.php';
00069 $tabs['drop']['text'] = $strDrop;
00070 $tabs['drop']['args']['reload'] = 1;
00071 $tabs['drop']['args']['purge'] = 1;
00072 $tabs['drop']['args']['sql_query'] = 'DROP ' . ($tbl_is_view ? 'VIEW' : 'TABLE') . ' ' . PMA_backquote($table);
00073 $tabs['drop']['args']['zero_rows'] = sprintf($strTableHasBeenDropped, htmlspecialchars($table));
00074 $tabs['drop']['attr'] = 'onclick="return confirmLink(this, \'DROP TABLE ' . PMA_jsFormat($table) . '\')"';
00075 $tabs['drop']['class'] = 'caution';
00076
00077 if ($table_info_num_rows > 0 || $tbl_is_view) {
00078 $tabs['browse']['link'] = 'sql.php';
00079 $tabs['browse']['args']['sql_query'] = isset($book_sql_query) && $book_sql_query != FALSE ? $book_sql_query : 'SELECT * FROM ' . PMA_backquote($table);
00080 $tabs['browse']['args']['pos'] = 0;
00081 $tabs['search']['link'] = 'tbl_select.php';
00082 }
00083
00084 echo PMA_getTabs( $tabs );
00085 unset( $tabs );
00086
00090 if (!empty($message)) {
00091 PMA_showMessage($message);
00092 unset($message);
00093 }
00094
00095 ?><br />