2 /* vim: set expandtab sw=4 ts=4 sts=4: */
5 * @package phpMyAdmin-Designer
11 include_once 'pmd_common.php';
13 $cfgRelation = PMA_getRelationsParam();
15 if (! $cfgRelation['designerwork']) {
19 foreach ($t_x as $key => $value) {
20 $KEY = empty($IS_AJAX) ?
urldecode($key) : $key; // table name decode (post PDF exp/imp)
21 list($DB,$TAB) = explode(".", $KEY);
22 PMA_query_as_controluser('DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['designer_coords']) . '
23 WHERE `db_name` = \'' . PMA_sqlAddslashes($DB) . '\'
24 AND `table_name` = \'' . PMA_sqlAddslashes($TAB) . '\'', true, PMA_DBI_QUERY_STORE
);
26 PMA_query_as_controluser('INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['designer_coords']) . '
27 (db_name, table_name, x, y, v, h)
29 . '\'' . PMA_sqlAddslashes($DB) . '\', '
30 . '\'' . PMA_sqlAddslashes($TAB) . '\', '
31 . '\'' . PMA_sqlAddslashes($t_x[$key]) . '\', '
32 . '\'' . PMA_sqlAddslashes($t_y[$key]) . '\', '
33 . '\'' . PMA_sqlAddslashes($t_v[$key]) . '\', '
34 . '\'' . PMA_sqlAddslashes($t_h[$key]) . '\''
35 . ')', true, PMA_DBI_QUERY_STORE
);
37 //----------------------------------------------------------------------------
39 function PMD_err_sav() {
40 global $die_save_pos; // if this file included
41 if (! empty($die_save_pos)) {
42 header("Content-Type: text/xml; charset=utf-8");
43 header("Cache-Control: no-cache");
44 die('<root act="save_pos" return="' . __('Error saving coordinates for Designer.') . '"></root>');
48 if(! empty($die_save_pos)) {
49 header("Content-Type: text/xml; charset=utf-8");
50 header("Cache-Control: no-cache");
52 <root act
='save_pos' return='<?php echo __('Modifications have been saved
'); ?>'></root
>