Permalink
Switch branches/tags
RELEASE_3_5_0 RELEASE_3_5_0RC2 RELEASE_3_5_0RC1 RELEASE_3_5_0BETA1 RELEASE_3_5_0ALPHA1 RELEASE_3_4_11 RELEASE_3_4_11RC1 RELEASE_3_4_10_2 RELEASE_3_4_10_1 RELEASE_3_4_10 RELEASE_3_4_10RC1 RELEASE_3_4_9 RELEASE_3_4_9RC1 RELEASE_3_4_8 RELEASE_3_4_8RC1 RELEASE_3_4_7_1 RELEASE_3_4_7 RELEASE_3_4_7RC1 RELEASE_3_4_6 RELEASE_3_4_6RC1 RELEASE_3_4_5 RELEASE_3_4_5RC1 RELEASE_3_4_4 RELEASE_3_4_4RC1 RELEASE_3_4_3_2 RELEASE_3_4_3_1 RELEASE_3_4_3 RELEASE_3_4_3RC1 RELEASE_3_4_2 RELEASE_3_4_2RC1 RELEASE_3_4_1 RELEASE_3_4_1RC1 RELEASE_3_4_0 RELEASE_3_4_0RC2 RELEASE_3_4_0RC1 RELEASE_3_4_0BETA4 RELEASE_3_4_0BETA3 RELEASE_3_4_0BETA2 RELEASE_3_4_0BETA1 RELEASE_3_4_0ALPHA2 RELEASE_3_4_0ALPHA1 RELEASE_3_3_10_5 RELEASE_3_3_10_4 RELEASE_3_3_10_3 RELEASE_3_3_10_2 RELEASE_3_3_10_1 RELEASE_3_3_10 RELEASE_3_3_10RC1 RELEASE_3_3_9_2 RELEASE_3_3_9_1 RELEASE_3_3_9 RELEASE_3_3_9RC1 RELEASE_3_3_8_1 RELEASE_3_3_8 RELEASE_3_3_8RC1 RELEASE_3_3_7 RELEASE_3_3_7RC1 RELEASE_3_3_6 RELEASE_3_3_6RC1 RELEASE_3_3_5_1 RELEASE_3_3_5 RELEASE_3_3_5RC1 RELEASE_3_3_4 RELEASE_3_3_4RC1 RELEASE_3_3_3 RELEASE_3_3_3RC1 RELEASE_3_3_2 RELEASE_3_3_2RC1 RELEASE_3_3_1 RELEASE_3_3_1RC1 RELEASE_3_3_0 RELEASE_3_3_0RC3 RELEASE_3_3_0RC2 RELEASE_3_3_0RC1 RELEASE_3_3_0BETA1 RELEASE_3_3_0ALPHA1 RELEASE_3_2_5 RELEASE_3_2_5RC2 RELEASE_3_2_5RC1 RELEASE_3_2_4 RELEASE_3_2_4RC1 RELEASE_3_2_3 RELEASE_3_2_3RC1 RELEASE_3_2_2_1 RELEASE_3_2_2 RELEASE_3_2_2RC1 RELEASE_3_2_0_1 RELEASE_3_2_0 RELEASE_3_2_0RC1 RELEASE_3_2_0BETA1 RELEASE_3_1_5 RELEASE_3_1_5RC1 RELEASE_3_1_4 RELEASE_3_1_4RC2 RELEASE_3_1_4RC1 RELEASE_3_1_3_2 RELEASE_3_1_3_1 RELEASE_3_1_3 RELEASE_3_1_3RC1 RELEASE_3_1_2
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
145 lines (123 sloc) 4.32 KB
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* handle row specifc actions like edit, delete, export
*
* @package PhpMyAdmin
*/
/**
*
*/
require_once 'libraries/common.inc.php';
require_once 'libraries/mysql_charsets.lib.php';
/**
* No rows were selected => show again the query and tell that user.
*/
if (! PMA_isValid($_REQUEST['rows_to_delete'], 'array')
&& ! isset($_REQUEST['mult_btn'])) {
$disp_message = __('No rows selected');
$disp_query = '';
include 'sql.php';
include 'libraries/footer.inc.php';
}
if (isset($_REQUEST['submit_mult'])) {
$submit_mult = $_REQUEST['submit_mult'];
// workaround for IE problem:
} elseif (isset($_REQUEST['submit_mult_delete_x'])) {
$submit_mult = 'row_delete';
} elseif (isset($_REQUEST['submit_mult_change_x'])) {
$submit_mult = 'row_edit';
} elseif (isset($_REQUEST['submit_mult_export_x'])) {
$submit_mult = 'row_export';
}
// If the 'Ask for confirmation' button was pressed, this can only come
// from 'delete' mode, so we set it straight away.
if (isset($_REQUEST['mult_btn'])) {
$submit_mult = 'row_delete';
}
switch($submit_mult) {
case 'row_delete':
case 'row_edit':
case 'row_export':
// leave as is
break;
case 'export':
$submit_mult = 'row_export';
break;
case 'delete':
$submit_mult = 'row_delete';
break;
default:
case 'edit':
$submit_mult = 'row_edit';
break;
}
if (!empty($submit_mult)) {
switch($submit_mult) {
case 'row_edit':
// As we got the rows to be edited from the
// 'rows_to_delete' checkbox, we use the index of it as the
// indicating WHERE clause. Then we build the array which is used
// for the tbl_change.php script.
$where_clause = array();
foreach ($_REQUEST['rows_to_delete'] as $i_where_clause => $del_query) {
$where_clause[] = urldecode($i_where_clause);
}
$active_page = 'tbl_change.php';
include 'tbl_change.php';
break;
case 'row_export':
// Needed to allow SQL export
$single_table = true;
// As we got the rows to be exported from the
// 'rows_to_delete' checkbox, we use the index of it as the
// indicating WHERE clause. Then we build the array which is used
// for the tbl_change.php script.
$where_clause = array();
foreach ($_REQUEST['rows_to_delete'] as $i_where_clause => $del_query) {
$where_clause[] = urldecode($i_where_clause);
}
$active_page = 'tbl_export.php';
include 'tbl_export.php';
break;
case 'row_delete':
default:
$action = 'tbl_row_action.php';
$err_url = 'tbl_row_action.php' . PMA_generate_common_url($GLOBALS['url_params']);
if (! isset($_REQUEST['mult_btn'])) {
$original_sql_query = $sql_query;
if (! empty($url_query)) {
$original_url_query = $url_query;
}
}
include 'libraries/mult_submits.inc.php';
$_url_params = $GLOBALS['url_params'];
$_url_params['goto'] = 'tbl_sql.php';
$url_query = PMA_generate_common_url($_url_params);
/**
* Show result of multi submit operation
*/
// sql_query is not set when user does not confirm multi-delete
if ((!empty($submit_mult) || isset($_REQUEST['mult_btn'])) && ! empty($sql_query)) {
$disp_message = __('Your SQL query has been executed successfully');
$disp_query = $sql_query;
}
if (isset($original_sql_query)) {
$sql_query = $original_sql_query;
}
if (isset($original_url_query)) {
$url_query = $original_url_query;
}
// this is because sql.php could call tbl_structure
// which would think it needs to call mult_submits.inc.php:
unset($submit_mult, $_REQUEST['mult_btn']);
$active_page = 'sql.php';
include 'sql.php';
/**
* Displays the footer
*/
include 'libraries/footer.inc.php';
break;
}
}
?>