svn commit: r60 - trunk/mapbender/http/include

uli at osgeo.org uli at osgeo.org
Fri Apr 14 04:34:06 EDT 2006


Author: uli
Date: 2006-04-14 08:34:06+0000
New Revision: 60

Added:
   trunk/mapbender/http/include/dyn_js.php
   trunk/mapbender/http/include/dyn_php.php

Log:
import Mapbender source without history

Added: trunk/mapbender/http/include/dyn_js.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/include/dyn_js.php?view=auto&rev=60
==============================================================================
--- (empty file)
+++ trunk/mapbender/http/include/dyn_js.php	2006-04-14 08:34:06+0000
@@ -0,0 +1,25 @@
+<?php
+if(isset($gui_id))
+{
+	$sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = '".$e_id_css."' AND fkey_gui_id = '".$gui_id."' and var_type='var'";
+   	$res = db_query($sql);
+	$arrays = array();
+	echo "\n";
+	while($row = db_fetch_array($res))
+	{
+		if (strpos($row["var_name"], "[")) {
+			$arrayname = substr($row["var_name"], 0, strpos($row["var_name"], "["));
+			
+			if (!in_array($arrayname, $arrays)) {
+				$i++;
+				$arrays[$i] = $arrayname;
+				echo "var " . $arrayname  . " = new Array();\n";
+			}
+		}
+		else {
+			echo "var ";
+		}
+		echo $row["var_name"]." = '".stripslashes($row["var_value"])."';\n";
+	}
+}
+?>
\ No newline at end of file

Added: trunk/mapbender/http/include/dyn_php.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/include/dyn_php.php?view=auto&rev=60
==============================================================================
--- (empty file)
+++ trunk/mapbender/http/include/dyn_php.php	2006-04-14 08:34:06+0000
@@ -0,0 +1,14 @@
+<?php
+if(isset($gui_id))
+{
+	$sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = '".$gui_id."' and var_type='php_var'";
+   	$res = db_query($sql);
+
+	echo "\n";
+	while($row = db_fetch_array($res))
+	{
+		$$row["var_name"] = stripslashes($row["var_value"]);
+		echo "\n";
+	}
+}
+?>
\ No newline at end of file




More information about the Mapbender_commits mailing list