update
[phpmyadmin/crack.git] / tbl_properties_links.php3
blobcd728e17380b9160b813ee1ca2289f87759eff90
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
6 /**
7 * Sets error reporting level
8 */
9 // (removed to avoid path disclosure, not sure about why this was here)
10 // error_reporting(E_ALL);
13 // Check parameters
15 if (!defined('PMA_COMMON_LIB_INCLUDED')) {
16 include('./libraries/common.lib.php3');
19 PMA_checkParameters(array('db'));
21 /**
22 * Count amount of navigation tabs
24 $db_details_links_count_tabs = 0;
27 /**
28 * Prepares links
30 include('./libraries/bookmark.lib.php3');
31 $book_sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], '\'' . PMA_sqlAddslashes($table) . '\'', 'label');
33 if ($table_info_num_rows > 0) {
34 $lnk2 = 'sql.php3';
35 $arg2 = $url_query
36 . '&amp;sql_query=' . (isset($book_sql_query) && $book_sql_query != FALSE ? urlencode($book_sql_query) : urlencode('SELECT * FROM ' . PMA_backquote($table)))
37 . '&amp;pos=0';
38 $lnk4 = 'tbl_select.php3';
39 $arg4 = $url_query;
40 $ln6_stt = (PMA_MYSQL_INT_VERSION >= 40000)
41 ? 'TRUNCATE TABLE '
42 : 'DELETE FROM ';
43 $lnk6 = 'sql.php3';
44 $arg6 = $url_query . '&amp;sql_query='
45 . urlencode($ln6_stt . PMA_backquote($table))
46 . '&amp;zero_rows='
47 . urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table)));
48 $att6 = 'class="drop" onclick="return confirmLink(this, \'' . $ln6_stt . PMA_jsFormat($table) . '\')"';
49 } else {
50 $lnk2 = '';
51 $arg2 = '';
52 $lnk4 = '';
53 $arg4 = '';
54 $lnk6 = '';
55 $arg6 = '';
56 $att6 = '';
59 $arg7 = $url_query . '&amp;reload=1&amp;purge=1&amp;sql_query=' . urlencode('DROP TABLE ' . PMA_backquote($table) ) . '&amp;zero_rows=' . urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table)));
60 $att7 = 'class="drop" onclick="return confirmLink(this, \'DROP TABLE ' . PMA_jsFormat($table) . '\')"';
63 /**
64 * Displays links
67 if ($cfg['LightTabs']) {
68 echo '&nbsp;';
69 } else {
70 echo '<table border="0" cellspacing="0" cellpadding="3" width="100%" class="tabs">
71 <tr>
72 <td width="8">&nbsp;</td>';
75 echo PMA_printTab($strStructure, 'tbl_properties_structure.php3', $url_query);
76 echo PMA_printTab($strBrowse, $lnk2, $arg2);
77 echo PMA_printTab($strSQL, 'tbl_properties.php3', $url_query);
78 echo PMA_printTab($strSelect, $lnk4, $arg4);
79 echo PMA_printTab($strInsert, 'tbl_change.php3', $url_query);
80 echo PMA_printTab($strExport, 'tbl_properties_export.php3', $url_query . '&amp;single_table=true');
81 echo PMA_printTab($strOperations, 'tbl_properties_operations.php3', $url_query);
82 echo PMA_printTab($strEmpty, $lnk6, $arg6, $att6);
83 echo PMA_printTab($strDrop, 'sql.php3', $arg7, $att7);
84 echo "\n";
86 if (!$cfg['LightTabs']) {
87 echo '</tr></table>';
88 } else {
89 echo '<br />';
92 ?><br />