move outer variables inside function
This commit is contained in:
@@ -216,9 +216,6 @@ class PMA_User_Schema
|
|||||||
. ' AND pdf_page_number = \'' . PMA_sqlAddslashes($this->choosenPage) . '\'';
|
. ' AND pdf_page_number = \'' . PMA_sqlAddslashes($this->choosenPage) . '\'';
|
||||||
$page_rs = PMA_query_as_controluser($page_query, FALSE, $query_default_option);
|
$page_rs = PMA_query_as_controluser($page_query, FALSE, $query_default_option);
|
||||||
$array_sh_page = array();
|
$array_sh_page = array();
|
||||||
$draginit = '';
|
|
||||||
$reset_draginit = '';
|
|
||||||
$i = 0;
|
|
||||||
while ($temp_sh_page = @PMA_DBI_fetch_assoc($page_rs)) {
|
while ($temp_sh_page = @PMA_DBI_fetch_assoc($page_rs)) {
|
||||||
$array_sh_page[] = $temp_sh_page;
|
$array_sh_page[] = $temp_sh_page;
|
||||||
}
|
}
|
||||||
@@ -229,7 +226,7 @@ class PMA_User_Schema
|
|||||||
if (!isset($_POST['with_field_names']) && !isset($_POST['showwysiwyg'])) {
|
if (!isset($_POST['with_field_names']) && !isset($_POST['showwysiwyg'])) {
|
||||||
$with_field_names = TRUE;
|
$with_field_names = TRUE;
|
||||||
}
|
}
|
||||||
$this->_displayScratchboardTables($array_sh_page,$draginit,$reset_draginit);
|
$this->_displayScratchboardTables($array_sh_page);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form method="post" action="schema_edit.php" name="edcoord">
|
<form method="post" action="schema_edit.php" name="edcoord">
|
||||||
@@ -464,7 +461,7 @@ class PMA_User_Schema
|
|||||||
* @return void
|
* @return void
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
private function _displayScratchboardTables($array_sh_page,$draginit,$reset_draginit)
|
private function _displayScratchboardTables($array_sh_page)
|
||||||
{
|
{
|
||||||
global $with_field_names,$cfg,$db;
|
global $with_field_names,$cfg,$db;
|
||||||
?>
|
?>
|
||||||
@@ -475,12 +472,15 @@ class PMA_User_Schema
|
|||||||
</form>
|
</form>
|
||||||
<div id="pdflayout" class="pdflayout" style="visibility: hidden;">
|
<div id="pdflayout" class="pdflayout" style="visibility: hidden;">
|
||||||
<?php
|
<?php
|
||||||
|
$draginit = '';
|
||||||
|
$draginit2 = '';
|
||||||
|
$reset_draginit = '';
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($array_sh_page as $key => $temp_sh_page) {
|
foreach ($array_sh_page as $key => $temp_sh_page) {
|
||||||
$drag_x = $temp_sh_page['x'];
|
$drag_x = $temp_sh_page['x'];
|
||||||
$drag_y = $temp_sh_page['y'];
|
$drag_y = $temp_sh_page['y'];
|
||||||
|
|
||||||
$draginit2 = ' Drag.init(getElement("table_' . $i . '"), null, 0, parseInt(myid.style.width)-2, 0, parseInt(myid.style.height)-5);' . "\n";
|
$draginit2 .= ' Drag.init(getElement("table_' . $i . '"), null, 0, parseInt(myid.style.width)-2, 0, parseInt(myid.style.height)-5);' . "\n";
|
||||||
$draginit .= ' getElement("table_' . $i . '").onDrag = function (x, y) { document.edcoord.elements["c_table_' . $i . '[x]"].value = parseInt(x); document.edcoord.elements["c_table_' . $i . '[y]"].value = parseInt(y) }' . "\n";
|
$draginit .= ' getElement("table_' . $i . '").onDrag = function (x, y) { document.edcoord.elements["c_table_' . $i . '[x]"].value = parseInt(x); document.edcoord.elements["c_table_' . $i . '[y]"].value = parseInt(y) }' . "\n";
|
||||||
$draginit .= ' getElement("table_' . $i . '").style.left = "' . $drag_x . 'px";' . "\n";
|
$draginit .= ' getElement("table_' . $i . '").style.left = "' . $drag_x . 'px";' . "\n";
|
||||||
$draginit .= ' getElement("table_' . $i . '").style.top = "' . $drag_y . 'px";' . "\n";
|
$draginit .= ' getElement("table_' . $i . '").style.top = "' . $drag_y . 'px";' . "\n";
|
||||||
|
Reference in New Issue
Block a user