[Mapbender-commits] r1772 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Oct 29 09:12:49 EDT 2007
Author: christoph
Date: 2007-10-29 09:12:49 -0400 (Mon, 29 Oct 2007)
New Revision: 1772
Modified:
trunk/mapbender/http/javascripts/map.php
Log:
imported from Geoportal
Modified: trunk/mapbender/http/javascripts/map.php
===================================================================
--- trunk/mapbender/http/javascripts/map.php 2007-10-29 12:52:00 UTC (rev 1771)
+++ trunk/mapbender/http/javascripts/map.php 2007-10-29 13:12:49 UTC (rev 1772)
@@ -17,9 +17,38 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+include(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+
+session_start();
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+/*
+// may be added at a later stage
+$gui_changed=0;
+$new_wmc=0;
+
+if (!$_REQUEST["layer_preview"] && isset($_SESSION["mb_user_gui"]) && $_SESSION["mb_user_gui"] != $_REQUEST["gui_id"]) {
+ $gui_changed=1;
+}
+
+if (!isset($_SESSION['mb_wmc']) || ($gui_changed==1) || ($_REQUEST['layer_preview'] && $_REQUEST['portal_services'])) {
+ $new_wmc=1;
+}
+
+if (isset($_REQUEST['layer_preview']) && $_REQUEST['layer_preview'] != 0) {
+ $_SESSION['layer_preview'] = $_REQUEST['portal_services'];
+}
+else {
+ $_SESSION['layer_preview'] = 0;
+}
+*/
+$_SESSION["mb_user_gui"] = $_REQUEST["gui_id"];
+
+session_write_close();
ob_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-session_start();
header('Content-type: application/x-javascript');
echo "var mb_nr = '".session_id()."';";
More information about the Mapbender_commits
mailing list