[Mapbender-commits] r2184 - branches/2.4.5/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Mar 6 05:49:57 EST 2008
Author: christoph
Date: 2008-03-06 05:49:57 -0500 (Thu, 06 Mar 2008)
New Revision: 2184
Modified:
branches/2.4.5/http/php/mod_editElements.php
Log:
changed global var e_id to e_id_
conflict with global var from validateSession
Modified: branches/2.4.5/http/php/mod_editElements.php
===================================================================
--- branches/2.4.5/http/php/mod_editElements.php 2008-03-05 17:13:05 UTC (rev 2183)
+++ branches/2.4.5/http/php/mod_editElements.php 2008-03-06 10:49:57 UTC (rev 2184)
@@ -18,13 +18,9 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
require(dirname(__FILE__)."/../php/mb_validatePermission.php");
require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
$sParams = SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
@@ -169,7 +165,7 @@
if ($mySave == '1'){
//copy element vars
$sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2";
- $v = array($e_id,$_POST["originGuiOfSelectedElement"]);
+ $v = array($e_id_,$_POST["originGuiOfSelectedElement"]);
$t = array('s','s');
$c = 0;
$res_vars = db_prep_query($sql,$v,$t);
@@ -177,7 +173,7 @@
db_begin();
$sql = "DELETE FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2 ";
- $v = array($e_id,$guiList1);
+ $v = array($e_id_,$guiList1);
$t = array('s','s');
$res = db_prep_query($sql,$v,$t);
@@ -191,7 +187,7 @@
$sql .= "e_attributes,e_left,e_top,e_width,e_height,e_z_index,e_more_styles,e_content,";
$sql .= "e_closetag,e_js_file,e_mb_mod,e_target,e_requires,e_url) ";
$sql .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21)";
- $v = array($guiList1,$e_id,$e_pos,$e_public,$e_comment,$e_element,$e_src,$e_attributes,$e_left,
+ $v = array($guiList1,$e_id_,$e_pos,$e_public,$e_comment,$e_element,$e_src,$e_attributes,$e_left,
$e_top,$e_width,$e_height,$e_z_index,$e_more_styles,$e_content,$e_closetag,$e_js_file,
$e_mb_mod,$e_target,$e_requires,$e_url);
$t = array('s','s','i','i','s','s','s','s','i','i','i','i','i','s','s','s','s','s','s','s','s');
@@ -209,7 +205,7 @@
$r = array();
$sql[$c] = "INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) ";
$sql[$c] .= "VALUES ($1,$2,$3,$4,$5,$6)";
- $v[$c] = array($guiList1,$e_id,$row["var_name"],$row["var_value"],$row["context"],$row["var_type"]);
+ $v[$c] = array($guiList1,$e_id_,$row["var_name"],$row["var_value"],$row["context"],$row["var_type"]);
$t[$c] = array('s','s','s','s','s','s');
$r[$c] = db_prep_query($sql[$c],$v[$c],$t[$c]);
if(!$r){
@@ -230,10 +226,10 @@
}
if(isset($myDelete) && $myDelete == '1'){
$sql = "DELETE FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2";
- $v = array($e_id,$guiList1);
+ $v = array($e_id_,$guiList1);
$t = array('s','s');
$res = db_prep_query($sql,$v,$t);
- $e_id = ""; $e_pos = ""; $e_public = ""; $e_comment = ""; $e_element = "";
+ $e_id_ = ""; $e_pos = ""; $e_public = ""; $e_comment = ""; $e_element = "";
$e_src = ""; $e_attributes = ""; $e_left = ""; $e_top = ""; $e_width = ""; $e_height = ""; $e_z_index = "";
$e_more_styles = ""; $e_content = ""; $e_closetag = ""; $e_js_file = ""; $e_mb_mod = "";
$e_target = ""; $e_requires = ""; $e_url = "";
@@ -325,17 +321,17 @@
}
}
function thisSave(){
- if(document.form1.e_id.value == ""){
+ if(document.form1.e_id_.value == ""){
alert("ID ? ");
- document.form1.e_id.focus();
+ document.form1.e_id_.focus();
return;
}
var permission = false;
var isElement = false;
for(var i=0; i<guiIDs.length; i++){
clearRadio();
- if(document.form1.e_id.value == guiIDs[i]){
- permission = confirm("update: " + document.form1.e_id.value + " ?");
+ if(document.form1.e_id_.value == guiIDs[i]){
+ permission = confirm("update: " + document.form1.e_id_.value + " ?");
isElement = true;
break;
}
@@ -348,7 +344,7 @@
function thisDelete(){
clearRadio();
- var permission = confirm("delete: " + document.form1.e_id.value + " ?");
+ var permission = confirm("delete: " + document.form1.e_id_.value + " ?");
if(permission == true){
document.form1.myDelete.value = 1;
document.form1.submit();
@@ -368,7 +364,7 @@
}
function thisExport(){
- window.open("mod_exportElement.php?element=" + document.forms[0].e_id.value+ "&gui=" +document.forms[0].guiList1.value ,"","");
+ window.open("mod_exportElement.php?element=" + document.forms[0].e_id_.value+ "&gui=" +document.forms[0].guiList1.value ,"","");
}
function editDesc(){
var newDesc = prompt("Enter new GUI description", document.form1.guiDesc.value);
@@ -546,7 +542,7 @@
$t = array();
$res = db_prep_query($sql,$v,$t);
if($row = db_fetch_array($res)){
- echo "<tr><td>ID: </td><td><input type='text' class='textfield' name='e_id' value='".$row["e_id"]."'></td></tr>\n";
+ echo "<tr><td>ID: </td><td><input type='text' class='textfield' name='e_id_' value='".$row["e_id"]."'></td></tr>\n";
echo "<tr><td>Position: </td><td><input type='text' class='textfield' name='e_pos' value='".$row["e_pos"]."'></td></tr>\n";
echo "<tr><td>ON/OFF: </td><td><input type='text' class='textfield' name='e_public' value='".$row["e_public"]."'></td></tr>\n";
echo "<tr><td>Comment: </td><td><textarea cols='32' rows='5' name='e_comment' >".stripslashes($row["e_comment"])."</textarea></td></tr>\n";
@@ -570,7 +566,7 @@
echo "</table>";
}
else if(isset($guiList1)){
- echo "<tr><td>ID: </td><td><input type='text' class='textfield' name='e_id' value='".$e_id."'></td></tr>\n";
+ echo "<tr><td>ID: </td><td><input type='text' class='textfield' name='e_id_' value='".$e_id_."'></td></tr>\n";
echo "<tr><td>Position: </td><td><input type='text' class='textfield' name='e_pos' value='".$e_pos."'></td></tr>\n";
echo "<tr><td>ON/OFF: </td><td><input type='text' class='textfield' name='e_public' value='".$e_public."'></td></tr>\n";
echo "<tr><td>Comment: </td><td><textarea cols='32' rows='5' name='e_comment' >".stripslashes($e_comment)."</textarea></td></tr>\n";
More information about the Mapbender_commits
mailing list