| [ Index ] |
|
Code source de phpMyAdmin 2.10.3 |
1 <?php 2 /* $Id: pmd_save_pos.php 9929 2007-02-06 09:56:31Z cybot_tm $ */ 3 // vim: expandtab sw=4 ts=4 sts=4: 4 5 include_once 'pmd_common.php'; 6 require_once './libraries/relation.lib.php'; 7 8 $alltab_rs = PMA_query_as_cu('SHOW TABLES FROM '.PMA_backquote($cfg['Server']['pmadb']),FALSE,PMA_DBI_QUERY_STORE) or PMD_err_sav(); 9 10 $seen_pmd_table = false; 11 while ($tab_name = @PMA_DBI_fetch_row($alltab_rs)) { 12 if (stristr($tab_name[0],$GLOBALS['cfgRelation']['designer_coords'])) { 13 $seen_pmd_table = true; 14 break; 15 } 16 } 17 18 if ( ! $seen_pmd_table) { 19 PMD_err_sav(); 20 } 21 22 foreach ($t_x as $key => $value) { 23 $KEY = empty($IS_AJAX) ? urldecode($key) : $key; // table name decode (post PDF exp/imp) 24 list($DB,$TAB) = explode(".", $KEY); 25 PMA_query_as_cu('DELETE FROM '.$GLOBALS['cfgRelation']['designer_coords'].' 26 WHERE `db_name` = \'' . PMA_sqlAddslashes($DB) . '\' 27 AND `table_name` = \'' . PMA_sqlAddslashes($TAB) . '\'', 1, PMA_DBI_QUERY_STORE); 28 29 PMA_query_as_cu('INSERT INTO '.$GLOBALS['cfgRelation']['designer_coords'].' 30 (db_name, table_name, x, y, v, h) 31 VALUES (' 32 . '\'' . PMA_sqlAddslashes($DB) . '\', ' 33 . '\'' . PMA_sqlAddslashes($TAB) . '\', ' 34 . '\'' . PMA_sqlAddslashes($t_x[$key]) . '\', ' 35 . '\'' . PMA_sqlAddslashes($t_y[$key]) . '\', ' 36 . '\'' . PMA_sqlAddslashes($t_v[$key]) . '\', ' 37 . '\'' . PMA_sqlAddslashes($t_h[$key]) . '\'' 38 . ')', 1 ,PMA_DBI_QUERY_STORE); 39 } 40 //---------------------------------------------------------------------------- 41 42 function PMD_err_sav() { 43 global $die_save_pos; // if this file included 44 if (! empty($die_save_pos)) { 45 header("Content-Type: text/xml; charset=utf-8"); 46 header("Cache-Control: no-cache"); 47 die('<root act="save_pos" return="strErrorSaveTable"></root>'); 48 } 49 } 50 51 if(! empty($die_save_pos)) { 52 header("Content-Type: text/xml; charset=utf-8"); 53 header("Cache-Control: no-cache"); 54 ?> 55 <root act='save_pos' return='<?php echo 'strModifications'; ?>'></root> 56 <?php 57 } 58 ?>
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 |
|