Serve OpenStreetMap.js locally
[phpmyadmin/crack.git] / pmd_save_pos.php
blobb95b20f4d320d4bbf0fbe2e33173e46ca017d4a0
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package phpMyAdmin-Designer
6 */
8 /**
11 include_once 'pmd_common.php';
13 $cfgRelation = PMA_getRelationsParam();
15 if (! $cfgRelation['designerwork']) {
16 PMD_err_sav();
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)
28 VALUES ('
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>
53 <?php