$sval) {
switch ($what) {
case 'row_delete':
$full_query .= htmlspecialchars(urldecode($sval))
. ';
';
break;
case 'drop_db':
$full_query .= 'DROP DATABASE '
. PMA_backquote(htmlspecialchars(urldecode($sval)))
. ';
';
break;
case 'drop_tbl':
$current = urldecode($sval);
if (!empty($views) && in_array($current, $views)) {
$full_query_views .= (empty($full_query_views) ? 'DROP VIEW ' : ', ')
. PMA_backquote(htmlspecialchars($current));
} else {
$full_query .= (empty($full_query) ? 'DROP TABLE ' : ', ')
. PMA_backquote(htmlspecialchars($current));
}
break;
case 'empty_tbl':
if (PMA_MYSQL_INT_VERSION >= 40000) {
$full_query .= 'TRUNCATE ';
} else {
$full_query .= 'DELETE FROM ';
}
$full_query .= PMA_backquote(htmlspecialchars(urldecode($sval)))
. ';
';
break;
case 'primary_fld':
if ($full_query == '') {
$full_query .= 'ALTER TABLE '
. PMA_backquote(htmlspecialchars($table))
. '
DROP PRIMARY KEY,'
. '
ADD PRIMARY KEY('
. '
'
. PMA_backquote(htmlspecialchars(urldecode($sval)))
. ',';
} else {
$full_query .= '
'
. PMA_backquote(htmlspecialchars(urldecode($sval)))
. ',';
}
if ($i == $selected_cnt-1) {
$full_query = preg_replace('@,$@', ');
', $full_query);
}
break;
case 'drop_fld':
if ($full_query == '') {
$full_query .= 'ALTER TABLE '
. PMA_backquote(htmlspecialchars($table))
. '
DROP '
. PMA_backquote(htmlspecialchars(urldecode($sval)))
. ',';
} else {
$full_query .= '
DROP '
. PMA_backquote(htmlspecialchars(urldecode($sval)))
. ',';
}
if ($i == $selected_cnt-1) {
$full_query = preg_replace('@,$@', ';
', $full_query);
}
break;
} // end switch
$i++;
}
if ($what == 'drop_tbl') {
if (!empty($full_query)) {
$full_query .= ';
' . "\n";
}
if (!empty($full_query_views)) {
$full_query .= $full_query_views . ';
' . "\n";
}
unset($full_query_views);
}
// Displays the form
?>
' : ''); echo $strDoYouReally . ': ' . "\n"; ?> |
---|
' . $full_query . ' ? ' . "\n"; ?> |