[ Index ] |
|
Code source de phpMyAdmin 2.10.3 |
1 <?php 2 /* $Id: tbl_move_copy.php 9657 2006-11-02 10:51:57Z nijel $ */ 3 // vim: expandtab sw=4 ts=4 sts=4: 4 5 /** 6 * Gets some core libraries 7 */ 8 require_once './libraries/common.lib.php'; 9 require_once './libraries/Table.class.php'; 10 11 // Check parameters 12 13 PMA_checkParameters(array('db', 'table')); 14 15 /** 16 * Defines the url to return to in case of error in a sql statement 17 */ 18 $err_url = 'tbl_sql.php?' . PMA_generate_common_url($db, $table); 19 20 21 /** 22 * Selects the database to work with 23 */ 24 PMA_DBI_select_db($db); 25 26 /** 27 * A target table name has been sent to this script -> do the work 28 */ 29 if (isset($new_name) && trim($new_name) != '') { 30 if ($db == $target_db && $table == $new_name) { 31 $message = (isset($submit_move) ? $strMoveTableSameNames : $strCopyTableSameNames); 32 } else { 33 PMA_Table::moveCopy($db, $table, $target_db, $new_name, $what, isset($submit_move), 'one_table'); 34 $js_to_run = 'functions.js'; 35 $message = (isset($submit_move) ? $strMoveTableOK : $strCopyTableOK); 36 $message = sprintf($message, htmlspecialchars($table), htmlspecialchars($new_name)); 37 $reload = 1; 38 /* Check: Work on new table or on old table? */ 39 if (isset($submit_move)) { 40 $db = $target_db; 41 $table = $new_name; 42 } else { 43 $pma_uri_parts = parse_url($cfg['PmaAbsoluteUri']); 44 if (isset($switch_to_new) && $switch_to_new == 'true') { 45 PMA_setCookie('pma_switch_to_new', 'true'); 46 $db = $target_db; 47 $table = $new_name; 48 } else { 49 PMA_removeCookie('pma_switch_to_new'); 50 } 51 } 52 } 53 require_once './libraries/header.inc.php'; 54 } // end is target table name 55 56 57 /** 58 * No new name for the table! 59 */ 60 else { 61 require_once './libraries/header.inc.php'; 62 PMA_mysqlDie($strTableEmpty, '', '', $err_url); 63 } 64 65 66 /** 67 * Back to the calling script 68 */ 69 70 require './tbl_sql.php'; 71 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 15:18:20 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |