Documentation TYPO3 par Ameos

tbl_move_copy.php

00001 <?php
00002 /* $Id: tbl_move_copy.php,v 2.13 2005/03/06 21:10:53 nijel Exp $ */
00003 // vim: expandtab sw=4 ts=4 sts=4:
00004 
00008 require_once('./libraries/grab_globals.lib.php');
00009 require_once('./libraries/common.lib.php');
00010 
00011 // Check parameters
00012 
00013 PMA_checkParameters(array('db', 'table'));
00014 
00015 require_once('./libraries/tbl_move_copy.php');
00016 
00020 $err_url = 'tbl_properties.php?' . PMA_generate_common_url($db, $table);
00021 
00022 
00026 PMA_DBI_select_db($db);
00027 
00031 if (isset($new_name) && trim($new_name) != '') {
00032     if ($db == $target_db && $table == $new_name) {
00033         $message   = (isset($submit_move) ? $strMoveTableSameNames : $strCopyTableSameNames);
00034     } else {
00035         PMA_table_move_copy($db, $table, $target_db, $new_name, $what, isset($submit_move));
00036         $js_to_run = 'functions.js';
00037         $message   = (isset($submit_move) ? $strMoveTableOK : $strCopyTableOK);
00038         $message   = sprintf($message, htmlspecialchars($table), htmlspecialchars($new_name));
00039         $reload    = 1;
00040         /* Check: Work on new table or on old table? */
00041         if (isset($submit_move)) {
00042             $db        = $target_db;
00043             $table     = $new_name;
00044         } else {
00045             $pma_uri_parts = parse_url($cfg['PmaAbsoluteUri']);
00046             if (isset($switch_to_new) && $switch_to_new == 'true') {
00047                 setcookie('pma_switch_to_new', 'true', 0, $GLOBALS['cookie_path'], '' , $GLOBALS['is_https']);
00048                 $db        = $target_db;
00049                 $table     = $new_name;
00050             } else {
00051                 setcookie('pma_switch_to_new', '', 0, $GLOBALS['cookie_path'], '' , $GLOBALS['is_https']);
00052             }
00053         }
00054     }
00055     require_once('./header.inc.php');
00056 } // end is target table name
00057 
00058 
00062 else {
00063     require_once('./header.inc.php');
00064     PMA_mysqlDie($strTableEmpty, '', '', $err_url);
00065 }
00066 
00067 
00072 require('./tbl_properties.php');
00073 ?>


Généré par Les experts TYPO3 avec  doxygen 1.4.6