diff options
author | Marc Delisle <marc@infomarc.info> | 2007-01-02 17:39:22 +0300 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2007-01-02 17:39:22 +0300 |
commit | af31d1e079a34e628213040b7c8e19b7fbe1c6f8 (patch) | |
tree | 15652a337e0327d07fb77ea5a1ffc6ca8ad31323 /pmd_save_pos.php | |
parent | 6ac319f1594e5163398ad5c60efec0801c3aefad (diff) |
designer: support for MSIE 6 and various fixes
Diffstat (limited to 'pmd_save_pos.php')
-rw-r--r-- | pmd_save_pos.php | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/pmd_save_pos.php b/pmd_save_pos.php index b4bf4cc600..4f41a43971 100644 --- a/pmd_save_pos.php +++ b/pmd_save_pos.php @@ -18,27 +18,41 @@ while ($tab_name = @PMA_DBI_fetch_row($alltab_rs)) { if ( ! $seen_pmd_table) { PMD_err_sav(); } - -foreach ($t_x as $key => $value) { - list($DB,$TAB) = explode(".", $key); - PMA_query_as_cu("DELETE FROM ".$GLOBALS['cfgRelation']['designer_coords']." - WHERE `db_name`='$DB' AND `table_name` = '$TAB'",FALSE,PMA_DBI_QUERY_STORE) or PMD_err_sav(); - PMA_query_as_cu("INSERT INTO ".$GLOBALS['cfgRelation']['designer_coords']." + +foreach ($t_x as $key => $value) { + $KEY = empty($IS_AJAX) ? urldecode($key) : $key; // table name decode (post PDF exp/imp) + list($DB,$TAB) = explode(".", $KEY); + PMA_query_as_cu('DELETE FROM '.$GLOBALS['cfgRelation']['designer_coords'].' + WHERE `db_name` = \'' . PMA_sqlAddslashes($DB) . '\' + AND `table_name` = \'' . PMA_sqlAddslashes($TAB) . '\'', 1, PMA_DBI_QUERY_STORE); + + PMA_query_as_cu('INSERT INTO '.$GLOBALS['cfgRelation']['designer_coords'].' (db_name, table_name, x, y, v, h) - VALUES ('$DB','$TAB','$t_x[$key]','$t_y[$key]','$t_v[$key]','$t_h[$key]')",FALSE,PMA_DBI_QUERY_STORE) or PMD_err_sav(); + VALUES (' + . '\'' . PMA_sqlAddslashes($DB) . '\', ' + . '\'' . PMA_sqlAddslashes($TAB) . '\', ' + . '\'' . PMA_sqlAddslashes($t_x[$key]) . '\', ' + . '\'' . PMA_sqlAddslashes($t_y[$key]) . '\', ' + . '\'' . PMA_sqlAddslashes($t_v[$key]) . '\', ' + . '\'' . PMA_sqlAddslashes($t_h[$key]) . '\'' + . ')', 1 ,PMA_DBI_QUERY_STORE); } //---------------------------------------------------------------------------- function PMD_err_sav() { global $die_save_pos; // if this file included if (! empty($die_save_pos)) { - die('<root act="save_pos" return="Problem on table ' . $GLOBALS['cfgRelation']['designer_coords'] . '"></root>'); + header("Content-Type: text/xml; charset=utf-8"); + header("Cache-Control: no-cache"); + die('<root act="save_pos" return="strErrorSaveTable"></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 $strModifications; ?>'></root> +<root act='save_pos' return='<?php echo 'strModifications'; ?>'></root> <? } ?> |