[Mapbender-commits] r1838 - branches/mapbender_sld/http/frames
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Nov 23 08:46:53 EST 2007
Author: christoph
Date: 2007-11-23 08:46:53 -0500 (Fri, 23 Nov 2007)
New Revision: 1838
Modified:
branches/mapbender_sld/http/frames/index.php
Log:
updated frames
Modified: branches/mapbender_sld/http/frames/index.php
===================================================================
--- branches/mapbender_sld/http/frames/index.php 2007-11-23 13:45:36 UTC (rev 1837)
+++ branches/mapbender_sld/http/frames/index.php 2007-11-23 13:46:53 UTC (rev 1838)
@@ -1,5 +1,5 @@
<?php
-#$Id$
+# $Id$
# http://www.mapbender.org/index.php/index.php
#
# Copyright (C) 2002 CCGIS
@@ -19,15 +19,30 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
session_start();
+mb_internal_encoding("UTF-8");
-require("../php/mb_validateSession.php");
-$_SESSION["mb_user_gui"] = $_REQUEST["gui_id"];
-require_once("../../conf/mapbender.conf");
+require(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+require_once(dirname(__FILE__)."/../classes/class_locale.php");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+
+#$e = new mb_notice("index.php: arguments: GML: " . $_SESSION["GML"]);
+#$e = new mb_notice("index.php: arguments: Zoom to layer: " . $_REQUEST["zoomToLayer"]);
+#$e = new mb_notice("index.php: arguments: portal_services: " . $_REQUEST["portal_services"]);
+#$e = new mb_notice("index.php: arguments: portal_services_wfs: " . $_REQUEST["portal_services_wfs"]);
+#$e = new mb_notice("index.php: arguments: layer_preview: " . $_REQUEST["layer_preview"]);
+
$con = db_connect(DBSERVER,OWNER,PW);
db_select_db(DB,$con);
-$pattern = '/sessionID/';
+$pattern = "/sessionID/";
+$_SESSION["mb_user_gui"] = $_REQUEST["gui_id"];
+
+$localeObj = new Mb_locale($_SESSION["mb_lang"]);
+
+
+
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
@@ -69,12 +84,13 @@
?>
-->
</style>
-
-<script type='text/javascript' src="../extensions/json.js"></script>
+<script type='text/javascript' src="../extensions/jquery.js"></script>
+<script type='text/javascript' src="../extensions/jqjson.js"></script>
<script type='text/javascript' src="../javascripts/point.js"></script>
<script type='text/javascript' src="../javascripts/map_obj.js"></script>
<script type='text/javascript' src="../javascripts/wfs_obj.js"></script>
<?php
+//echo "<script type='text/javascript' src='../javascripts/map.php?gui_id=".$_REQUEST["gui_id"]."&zoomToLayer=".$_REQUEST["zoomToLayer"]."&portal_services=".$_REQUEST['portal_services']."&portal_services_wfs=".$_REQUEST['portal_services_wfs']."&layer_preview=".$_REQUEST['layer_preview']."&".strip_tags(SID)."&mb_myBBOX=".$_REQUEST["mb_myBBOX"]."'></script>";
echo "<script type='text/javascript' src='../javascripts/map.php?gui_id=".$_REQUEST["gui_id"]."&".strip_tags(SID)."&mb_myBBOX=".$_REQUEST["mb_myBBOX"]."'></script>";
echo "<script type='text/javascript' src='../php/mod_createJSObjFromDB.php?". strip_tags (SID)."'></script>";
/*********************************************/
@@ -88,16 +104,18 @@
$cnt = 0;
while($row = db_fetch_array($res)){
if($row["e_mb_mod"] != ""){
- echo "<script type='text/javascript' src='../javascripts/".trim($row["e_mb_mod"])."?gui_id=".$_REQUEST["gui_id"]."'></script> ";
+ echo "<script type='text/javascript' src='../javascripts/".trim($row["e_mb_mod"])."?gui_id=".$_REQUEST["gui_id"]."&". strip_tags (SID)."'></script> ";
}
$cnt++;
}
?>
</head>
<?php
-$sql = "SELECT * FROM gui_element WHERE e_public = 1 AND fkey_gui_id = $1 ORDER BY e_pos";
-$v = array($_REQUEST["gui_id"]);
-$t = array('s');
+$sql = "SELECT fkey_gui_id,e_id,e_pos,e_public,e_comment,gettext($1, e_title) as e_title, e_element,";
+$sql .= "e_src,e_attributes,e_left,e_top,e_width,e_height,e_z_index,e_more_styles,";
+$sql .= "e_content,e_closetag,e_js_file,e_mb_mod,e_target,e_requires,e_url FROM gui_element WHERE e_public = 1 AND fkey_gui_id = $2 ORDER BY e_pos";
+$v = array($_SESSION["mb_lang"], $_REQUEST["gui_id"]);
+$t = array('s', 's');
$res = db_prep_query($sql,$v,$t);
$i = 0;
while(db_fetch_row($res)){
@@ -110,10 +128,13 @@
if(db_result($res,$i,"e_attributes") != ""){
echo " ".stripslashes(preg_replace($pattern,$replacement,db_result($res,$i,"e_attributes")));
}
+ if(db_result($res,$i,"e_title") != ""){
+ echo " title='".db_result($res,$i,"e_title")."' ";
+ }
if(db_result($res,$i,"e_src") != ""){
if(db_result($res,$i,"e_closetag") == "iframe" && db_result($res,$i,"e_id") != 'loadData'){
echo " src = '".preg_replace($pattern,$replacement,db_result($res,$i,"e_src"));
- if(strpos(db_result($res,$i,"e_src"), "?")) {
+ if(mb_strpos(db_result($res,$i,"e_src"), "?")) {
echo "&";
}
else {
More information about the Mapbender_commits
mailing list