[Mapbender-commits] r2202 - branches/2.5/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Mar 6 10:58:22 EST 2008


Author: christoph
Date: 2008-03-06 10:58:22 -0500 (Thu, 06 Mar 2008)
New Revision: 2202

Modified:
   branches/2.5/http/php/mod_editElements.php
Log:
added 
import_request_variables(PG)
changed e_id to e_id_

Modified: branches/2.5/http/php/mod_editElements.php
===================================================================
--- branches/2.5/http/php/mod_editElements.php	2008-03-06 15:38:16 UTC (rev 2201)
+++ branches/2.5/http/php/mod_editElements.php	2008-03-06 15:58:22 UTC (rev 2202)
@@ -17,6 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+import_request_variables("PG");
 require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
 require_once(dirname(__FILE__)."/../classes/class_administration.php");
 ?>
@@ -162,7 +163,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);
@@ -170,7 +171,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);
 	
@@ -184,7 +185,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,e_title) ";
 		$sql .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22)";
-		$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,$e_title);
 		$t = array('s','s','i','i','s','s','s','s','i','i','i','i','i','s','s','s','s','s','s','s','s','s');
@@ -202,7 +203,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){
@@ -223,10 +224,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 = "";
@@ -318,17 +319,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;
       }
@@ -341,7 +342,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();
@@ -360,7 +361,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);
@@ -538,7 +539,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";
@@ -563,7 +564,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