K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / share / phpmyadmin /
server ip : 172.67.156.115

your ip : 172.70.80.134

H O M E


Filename/usr/share/phpmyadmin/pmd_save_pos.php
Size2.39 kb
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 10:12
Last modified05-Dec-2013 01:44
Last accessed05-Jul-2025 18:12
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
*
* @package PhpMyAdmin-Designer
*/

/**
*
*/
require_once './libraries/common.inc.php';
require_once 'libraries/pmd_common.php';

$cfgRelation = PMA_getRelationsParam();

if (! $cfgRelation['designerwork']) {
PMD_err_sav();
}

/**
* Sets globals from $_POST
*/
$post_params = array(
'IS_AJAX',
'die_save_pos',
'server',
't_h',
't_v',
't_x',
't_y'
);

foreach ($post_params as $one_post_param) {
if (isset($_POST[$one_post_param])) {
$GLOBALS[$one_post_param] = $_POST[$one_post_param];
}
}

foreach ($t_x as $key => $value) {
// table name decode (post PDF exp/imp)
$KEY = empty($IS_AJAX) ? urldecode($key) : $key;
list($DB,$TAB) = explode(".", $KEY);
PMA_queryAsControlUser(
'DELETE FROM ' . PMA_Util::backquote($GLOBALS['cfgRelation']['db'])
. '.' . PMA_Util::backquote($GLOBALS['cfgRelation']['designer_coords'])
. ' WHERE `db_name` = \'' . PMA_Util::sqlAddSlashes($DB) . '\''
. ' AND `table_name` = \'' . PMA_Util::sqlAddSlashes($TAB) . '\'',
true, PMA_DBI_QUERY_STORE
);

PMA_queryAsControlUser(
'INSERT INTO ' . PMA_Util::backquote($GLOBALS['cfgRelation']['db'])
. '.' . PMA_Util::backquote($GLOBALS['cfgRelation']['designer_coords'])
. ' (db_name, table_name, x, y, v, h)'
. ' VALUES ('
. '\'' . PMA_Util::sqlAddSlashes($DB) . '\', '
. '\'' . PMA_Util::sqlAddSlashes($TAB) . '\', '
. '\'' . PMA_Util::sqlAddSlashes($t_x[$key]) . '\', '
. '\'' . PMA_Util::sqlAddSlashes($t_y[$key]) . '\', '
. '\'' . PMA_Util::sqlAddSlashes($t_v[$key]) . '\', '
. '\'' . PMA_Util::sqlAddSlashes($t_h[$key]) . '\')',
true, PMA_DBI_QUERY_STORE
);
}
//----------------------------------------------------------------------------

function PMD_err_sav()
{
global $die_save_pos; // if this file included
if (! empty($die_save_pos)) {
header("Content-Type: text/xml; charset=utf-8");
header("Cache-Control: no-cache");
die('<root act="save_pos" return="' . __('Error saving coordinates for Designer.') . '"></root>');
}
}

if (! empty($die_save_pos)) {
header("Content-Type: text/xml; charset=utf-8");
header("Cache-Control: no-cache");
?>
<root act='save_pos' return='<?php echo __('Modifications have been saved'); ?>'></root>
<?php
}
?>