2 /* vim: set expandtab sw=4 ts=4 sts=4: */
6 * @package phpMyAdmin-Designer
12 include_once 'pmd_common.php';
13 require_once './libraries/relation.lib.php';
15 $cfgRelation = PMA_getRelationsParam();
17 if (! $cfgRelation['designerwork']) {
21 foreach ($t_x as $key => $value) {
22 $KEY = empty($IS_AJAX) ?
urldecode($key) : $key; // table name decode (post PDF exp/imp)
23 list($DB,$TAB) = explode(".", $KEY);
24 PMA_query_as_cu('DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['designer_coords']) . '
25 WHERE `db_name` = \'' . PMA_sqlAddslashes($DB) . '\'
26 AND `table_name` = \'' . PMA_sqlAddslashes($TAB) . '\'', true, PMA_DBI_QUERY_STORE
);
28 PMA_query_as_cu('INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['designer_coords']) . '
29 (db_name, table_name, x, y, v, h)
31 . '\'' . PMA_sqlAddslashes($DB) . '\', '
32 . '\'' . PMA_sqlAddslashes($TAB) . '\', '
33 . '\'' . PMA_sqlAddslashes($t_x[$key]) . '\', '
34 . '\'' . PMA_sqlAddslashes($t_y[$key]) . '\', '
35 . '\'' . PMA_sqlAddslashes($t_v[$key]) . '\', '
36 . '\'' . PMA_sqlAddslashes($t_h[$key]) . '\''
37 . ')', true, PMA_DBI_QUERY_STORE
);
39 //----------------------------------------------------------------------------
41 function PMD_err_sav() {
42 global $die_save_pos; // if this file included
43 if (! empty($die_save_pos)) {
44 header("Content-Type: text/xml; charset=utf-8");
45 header("Cache-Control: no-cache");
46 die('<root act="save_pos" return="strErrorSaveTable"></root>');
50 if(! empty($die_save_pos)) {
51 header("Content-Type: text/xml; charset=utf-8");
52 header("Cache-Control: no-cache");
54 <root act
='save_pos' return='<?php echo 'strModifications
'; ?>'></root
>