Documentation TYPO3 par Ameos

tbl_row_delete.php

00001 <?php
00002 /* $Id: tbl_row_delete.php,v 2.4.4.1 2004/01/25 12:30:09 lem9 Exp $ */
00003 // vim: expandtab sw=4 ts=4 sts=4:
00004 require_once('./libraries/grab_globals.lib.php');
00005 require_once('./libraries/common.lib.php');
00006 require_once('./libraries/mysql_charsets.lib.php');
00007 
00012 // workaround for IE problem:
00013 if (isset($submit_mult_x)) {
00014     $submit_mult = 'row_delete';
00015 } elseif (isset($submit_mult_edit_x)) {
00016     $submit_mult = 'row_edit';
00017 }
00018 
00019 // garvin: If the 'Ask for confirmation' button was pressed, this can only come from 'delete' mode,
00020 // so we set it straight away.
00021 if (isset($mult_btn)) {
00022     $submit_mult = 'row_delete';
00023 }
00024 
00025 if ($submit_mult == 'row_edit') {
00026     $js_to_run = 'tbl_change.js';
00027 }
00028 
00029 if ($submit_mult == 'row_delete') {
00030     $js_to_run = 'functions.js';
00031 }
00032 
00033 require_once('./header.inc.php');
00034 
00035 if (!empty($submit_mult)) {
00036     switch($submit_mult) {
00037         case 'row_edit':
00038             if (isset($rows_to_delete) && is_array($rows_to_delete)) {
00039                 $primary_key = array();
00040                 // garvin: As we got the fields to be edited from the 'rows_to_delete' checkbox, we use the index of it as the
00041                 // indicating primary key. Then we built the array which is used for the tbl_change.php script.
00042                 foreach($rows_to_delete AS $i_primary_key => $del_query) {
00043                     $primary_key[] = urldecode($i_primary_key);
00044                 }
00045                 
00046                 include './tbl_change.php';
00047             }
00048             break;
00049         
00050         case 'row_delete':
00051         default:
00052             if ((isset($rows_to_delete) && is_array($rows_to_delete))
00053                 || isset($mult_btn)) {
00054                 $action = 'tbl_row_delete.php';
00055                 $err_url = 'tbl_row_delete.php?' . PMA_generate_common_url($db, $table);
00056                 if (!isset($mult_btn)) {
00057                     $original_sql_query = $sql_query;
00058                     $original_url_query = $url_query;
00059                     $original_pos       = $pos;
00060                 }
00061                 require('./mult_submits.inc.php');
00062             }
00063             $url_query = PMA_generate_common_url($db, $table)
00064                        . '&amp;goto=tbl_properties.php';
00065             
00066             
00070             if ((!empty($submit_mult) && isset($rows_to_delete))
00071                 || isset($mult_btn)) {
00072                 PMA_showMessage($strSuccess);
00073             }
00074             
00075             if (isset($original_sql_query)) {
00076                 $sql_query = $original_sql_query;
00077             }
00078             
00079             if (isset($original_url_query)) {
00080                 $url_query = $original_url_query;
00081             }
00082             
00083             if (isset($original_pos)) {
00084                 $pos       = $original_pos;
00085             }
00086             
00087             require('./sql.php');
00088             
00092             require_once('./footer.inc.php');
00093         break;
00094     }
00095 }
00096 ?>


Généré par L'expert TYPO3 avec  doxygen 1.4.6