Ensured that the correct font families are used.
[phpmyadmin/crack.git] / tbl_properties_options.php3
blob08b24aaf8200937c902d0a6b3c783d4f2fdf7798
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
6 /**
7 * Runs common work
8 */
9 require('./tbl_properties_common.php3');
10 $url_query .= '&amp;goto=tbl_properties_options.php3&amp;back=tbl_properties_options.php3';
13 /**
14 * Updates table comment, type and options if required
16 if (isset($submitcomment)) {
17 if (empty($prev_comment) || urldecode($prev_comment) != $comment) {
18 $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . ' COMMENT = \'' . PMA_sqlAddslashes($comment) . '\'';
19 $result = PMA_mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url);
20 $message = $strSuccess;
23 if (isset($submittype)) {
24 $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . ' TYPE = ' . $tbl_type;
25 $result = PMA_mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url);
26 $message = $strSuccess;
28 if (isset($submitoptions)) {
29 $sql_query = 'ALTER TABLE ' . PMA_backquote($table)
30 . (isset($pack_keys) ? ' pack_keys=1': ' pack_keys=0')
31 . (isset($checksum) ? ' checksum=1': ' checksum=0')
32 . (isset($delay_key_write) ? ' delay_key_write=1': ' delay_key_write=0');
33 $result = PMA_mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url);
34 $message = $strSuccess;
37 // Displays a message if a query had been submitted
38 if (isset($message)) {
39 PMA_showMessage($message);
43 /**
44 * Gets tables informations and displays top links
46 require('./tbl_properties_table_info.php3');
49 /**
50 * Displays form controls
52 if (PMA_MYSQL_INT_VERSION >= 32322) {
54 <ul>
55 <!-- Table comments -->
56 <li>
57 <form method="post" action="tbl_properties_options.php3">
58 <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
59 <?php echo $strTableComments; ?>&nbsp;:&nbsp;
60 <input type="hidden" name="prev_comment" value="<?php echo urlencode($show_comment); ?>" />&nbsp;
61 <input type="text" name="comment" maxlength="60" size="30" value="<?php echo htmlspecialchars($show_comment); ?>" class="textfield" style="vertical-align: middle" onfocus="this.select()" />&nbsp;
62 <input type="submit" name="submitcomment" value="<?php echo $strGo; ?>" style="vertical-align: middle" />
63 </form>
64 </li>
66 <!-- Table type -->
67 <?php
68 // modify robbat2 code - staybyte - 11. June 2001
69 $query = 'SHOW VARIABLES LIKE \'have_%\'';
70 $result = PMA_mysql_query($query);
71 if ($result != FALSE && mysql_num_rows($result) > 0) {
72 while ($tmp = PMA_mysql_fetch_array($result)) {
73 if (isset($tmp['Variable_name'])) {
74 switch ($tmp['Variable_name']) {
75 case 'have_bdb':
76 if ($tmp['Value'] == 'YES') {
77 $tbl_bdb = TRUE;
79 break;
80 case 'have_gemini':
81 if ($tmp['Value'] == 'YES') {
82 $tbl_gemini = TRUE;
84 break;
85 case 'have_innodb':
86 if ($tmp['Value'] == 'YES') {
87 $tbl_innodb = TRUE;
89 break;
90 case 'have_isam':
91 if ($tmp['Value'] == 'YES') {
92 $tbl_isam = TRUE;
94 break;
95 } // end switch
96 } // end if isset($tmp['Variable_name'])
97 } // end while
98 } // end if $result
100 mysql_free_result($result);
101 echo "\n";
103 <li>
104 <form method="post" action="tbl_properties_options.php3">
105 <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
106 <?php echo $strTableType; ?>&nbsp;:&nbsp;
107 <select name="tbl_type" style="vertical-align: middle">
108 <option value="MYISAM"<?php if ($tbl_type == 'MYISAM') echo ' selected="selected"'; ?>>MyISAM</option>
109 <option value="HEAP"<?php if ($tbl_type == 'HEAP') echo ' selected="selected"'; ?>>Heap</option>
110 <?php
111 $tbl_types = "\n";
112 if (isset($tbl_bdb)) {
113 $tbl_types .= ' <option value="BDB"'
114 . (($tbl_type == 'BERKELEYDB') ? ' selected="selected"' : '')
115 . '>Berkeley DB</option>' . "\n";
117 if (isset($tbl_gemini)) {
118 $tbl_types .= ' <option value="GEMINI"'
119 . (($tbl_type == 'GEMINI') ? ' selected="selected"' : '')
120 . '>Gemini</option>' . "\n";
122 if (isset($tbl_innodb)) {
123 $tbl_types .= ' <option value="INNODB"'
124 . (($tbl_type == 'INNODB') ? ' selected="selected"' : '')
125 . '>INNO DB</option>' . "\n";
127 if (isset($tbl_isam)) {
128 $tbl_types .= ' <option value="ISAM"'
129 . (($tbl_type == 'ISAM') ? ' selected="selected"' : '')
130 . '>ISAM</option>' . "\n";
133 echo $tbl_types;
135 <option value="MERGE"<?php if ($tbl_type == 'MRG_MYISAM') echo ' selected="selected"'; ?>>Merge</option>
136 </select>&nbsp;
137 <input type="submit" name="submittype" value="<?php echo $strGo; ?>" style="vertical-align: middle" />&nbsp;
138 <?php echo PMA_showMySQLDocu('Table_types', 'Table_types') . "\n"; ?>
139 </form>
140 </li>
142 <!-- Table options -->
143 <li style="vertical-align: top">
144 <table border="0" cellspacing="0" cellpadding="0" style="vertical-align: top">
145 <tr>
146 <td valign="top">
147 <form method="post" action="tbl_properties_options.php3">
148 <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
150 <table border="0" cellspacing="0" cellpadding="0">
151 <tr>
152 <td>
153 <input type="checkbox" name="pack_keys" id="pack_keys_opt"
154 <?php echo (isset($pack_keys) && $pack_keys == 1) ? ' checked="checked"' : ''; ?> />
155 <label for="pack_keys_opt">pack_keys</label>&nbsp;&nbsp;
156 <br />
157 <input type="checkbox" name="checksum" id="checksum_opt"
158 <?php echo (isset($checksum) && $checksum == 1) ? ' checked="checked"' : ''; ?> />
159 <label for="checksum_opt">checksum</label>&nbsp;&nbsp;
160 <br />
161 <input type="checkbox" name="delay_key_write" id="delay_key_write_opt"
162 <?php echo (isset($delay_key_write) && $delay_key_write == 1) ? ' checked="checked"' : ''; ?> />
163 <label for="delay_key_write_opt">delay_key_write</label>&nbsp;&nbsp;
164 &nbsp;&nbsp;
165 </td>
166 <td>
167 <input type="submit" name="submitoptions" value="<?php echo $strGo; ?>" />
168 </td>
169 </tr>
170 </table>
171 </form>
172 </td>
173 </tr>
174 </table>
175 </li>
176 </ul>
177 <?php
178 } // end if (PMA_MYSQL_INT_VERSION >= 32322)
182 * Displays the footer
184 echo "\n";
185 require('./footer.inc.php3');