Translation update done using Pootle.
[phpmyadmin-themes.git] / pmd_save_pos.php
blob90c20cc1d8ee489d371f483fc07f354d290d803c
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @version $Id$
6 * @package phpMyAdmin-Designer
7 */
9 /**
12 include_once 'pmd_common.php';
13 require_once './libraries/relation.lib.php';
15 $cfgRelation = PMA_getRelationsParam();
17 if (! $cfgRelation['designerwork']) {
18 PMD_err_sav();
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_controluser('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_controluser('INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['designer_coords']) . '
29 (db_name, table_name, x, y, v, h)
30 VALUES ('
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>
55 <?php