updates
[phpmyadmin/crack.git] / tbl_properties_links.php3
bloba495c6eeab589289bb12db576d4c2a59b453eff7
1 <?php
2 /* $Id$ */
5 /**
6 * Sets error reporting level
7 */
8 error_reporting(E_ALL);
11 /**
12 * Count amount of navigation tabs
14 $db_details_links_count_tabs = 0;
17 /**
18 * Prepares links
20 if ($table_info_num_rows > 0) {
21 $lnk2 = 'sql.php3';
22 $arg2 = $url_query
23 . '&amp;sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($table))
24 . '&amp;pos=0';
25 $lnk4 = 'tbl_select.php3';
26 $arg4 = $url_query;
27 $ln6_stt = (PMA_MYSQL_INT_VERSION >= 40000)
28 ? 'TRUNCATE TABLE '
29 : 'DELETE FROM ';
30 $lnk6 = 'sql.php3';
31 $arg6 = $url_query . '&amp;sql_query='
32 . urlencode($ln6_stt . PMA_backquote($table))
33 . '&amp;zero_rows='
34 . urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table)));
35 $att6 = 'class="drop" onclick="return confirmLink(this, \'' . $ln6_stt . PMA_jsFormat($table) . '\')"';
36 } else {
37 $lnk2 = '';
38 $arg2 = '';
39 $lnk4 = '';
40 $arg4 = '';
41 $lnk6 = '';
42 $arg6 = '';
43 $att6 = '';
46 // The use of $sub_part when setting $arg7 would work if all sub-pages scripts
47 // were prefixed by "tbl_properties", but this is not the case for now.
48 // The 'back' is supposed to be set to the current sub-page. This is necessary
49 // when you have js deactivated, you click on Drop, then click cancel, and want
50 // to get back to the same sub-page.
51 if (!isset($sub_part)) {
52 $sub_part = '';
55 $arg7 = ereg_replace('tbl_properties.php3$', 'db_details.php3', $url_query) . '&amp;back=tbl_properties' . $sub_part . '.php3&amp;reload=1&amp;sql_query=' . urlencode('DROP TABLE ' . PMA_backquote($table) ) . '&amp;zero_rows=' . urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table)));
56 $att7 = 'class="drop" onclick="return confirmLink(this, \'DROP TABLE ' . PMA_jsFormat($table) . '\')"';
59 /**
60 * Displays links
63 <table border="0" cellspacing="0" cellpadding="3" width="100%" class="tabs">
64 <tr>
65 <td width="8">&nbsp;</td>
66 <?php
67 echo PMA_printTab($strStructure, 'tbl_properties_structure.php3', $url_query);
68 echo PMA_printTab($strBrowse, $lnk2, $arg2);
69 echo PMA_printTab($strSQL, 'tbl_properties.php3', $url_query);
70 echo PMA_printTab($strSelect, $lnk4, $arg4);
71 echo PMA_printTab($strInsert, 'tbl_change.php3', $url_query);
72 echo PMA_printTab($strExport, 'tbl_properties_export.php3', $url_query);
73 echo PMA_printTab($strOperations, 'tbl_properties_operations.php3', $url_query);
74 if (PMA_MYSQL_INT_VERSION >= 32322) {
75 echo PMA_printTab($strOptions, 'tbl_properties_options.php3', $url_query);
77 echo PMA_printTab($strEmpty, $lnk6, $arg6, $att6);
78 echo PMA_printTab($strDrop, 'sql.php3', $arg7, $att7);
79 echo "\n";
81 </tr>
82 </table>
83 <br />