[Mapbender-commits] r2847 - branches/nimix_dev/http/frames
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Aug 18 10:17:35 EDT 2008
Author: nimix
Date: 2008-08-18 10:17:34 -0400 (Mon, 18 Aug 2008)
New Revision: 2847
Removed:
branches/nimix_dev/http/frames/jquery.html
Modified:
branches/nimix_dev/http/frames/index.php
branches/nimix_dev/http/frames/login.php
Log:
merge
Modified: branches/nimix_dev/http/frames/index.php
===================================================================
--- branches/nimix_dev/http/frames/index.php 2008-08-18 14:16:40 UTC (rev 2846)
+++ branches/nimix_dev/http/frames/index.php 2008-08-18 14:17:34 UTC (rev 2847)
@@ -18,10 +18,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-mb_internal_encoding("UTF-8");
require("../php/mb_validateSession.php");
require_once(dirname(__FILE__)."/../classes/class_locale.php");
+require_once(dirname(__FILE__)."/../classes/class_gui.php");
+$_SESSION["mb_user_gui"] = $gui_id;
+
//
// check if user is allowed to access current GUI;
// if not, return to login screen
@@ -31,21 +33,6 @@
header("Location: ".LOGIN);
die();
}
-
-#$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"]);
-
-$pattern = "/sessionID/";
-
-$_SESSION["mb_user_gui"] = $gui_id;
-
-$localeObj = new Mb_locale($_SESSION["mb_lang"]);
-
-
-
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
@@ -59,11 +46,9 @@
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
+<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;?>">
+<title><?php echo $gui_id;?> - presented by Mapbender</title>
<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title><?php echo $gui_id;?> - presented by Mapbender</title>
-<?php
$sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = 'body' AND fkey_gui_id = $1 and var_type='file/css'";
$v = array($gui_id);
$t = array('s');
@@ -87,84 +72,11 @@
?>
-->
</style>
-<?php
-/*********************************************/
-$frame = "";
-/*********************************************/
-
-echo "<script type='text/javascript' src='../javascripts/core.php'></script>";
-?>
+<script type='text/javascript' src='../javascripts/core.php'></script>
</head>
<?php
-$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"], $gui_id);
-$t = array('s', 's');
-$res = db_prep_query($sql,$v,$t);
-$i = 0;
-while(db_fetch_row($res)){
- $replacement = $urlParameters."&elementID=".db_result($res,$i,"e_id");
- echo "<".db_result($res,$i,"e_element")." ";
- if(db_result($res,$i,"e_id") != ""){
- echo " id='".db_result($res,$i,"e_id")."'";
- echo " name='".db_result($res,$i,"e_id")."'";
- }
- 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(mb_strpos(db_result($res,$i,"e_src"), "?")) {
- echo "&";
- }
- else {
- echo "?";
- }
- echo "e_id_css=".db_result($res,$i,"e_id")."&e_id=".db_result($res,$i,"e_id") .
- "&e_target=".db_result($res,$i,"e_target").
- "&" . $urlParameters . "'";
- }
- else{
- echo " src = '".preg_replace($pattern,$replacement,db_result($res,$i,"e_src"))."'";
- }
- }
- echo " style = '";
- if(db_result($res,$i,"e_left") != "" && db_result($res,$i,"e_top") != ""){
- echo "position:absolute;";
- echo "left:".db_result($res,$i,"e_left").";";
- echo "top:".db_result($res,$i,"e_top").";";
- }
- if(db_result($res,$i,"e_width") != "" && db_result($res,$i,"e_height") != ""){
- echo "width:".db_result($res,$i,"e_width").";";
- echo "height:".db_result($res,$i,"e_height").";";
- }
- if(db_result($res,$i,"e_z_index") != ""){
- echo "z-index:".db_result($res,$i,"e_z_index").";";
- }
- if(db_result($res,$i,"e_more_styles") != ""){
- echo db_result($res,$i,"e_more_styles");
- }
- echo "' >";
- if(db_result($res,$i,"e_content") != ""){
- echo " ".stripslashes(db_result($res,$i,"e_content"));
- }
- if(db_result($res,$i,"e_closetag") != "" && db_result($res,$i,"e_closetag") != "body"){
- echo " </".db_result($res,$i,"e_closetag").">";
- }
- $i++;
-}
-?>
-<form id='sendData' name='sendData' action='' method='POST' target='loadData' style='position:absolute;left:800px'>
-<input type='hidden' name='data'>
-</form>
-<?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>";
+$currentApplication = new gui($gui_id);
+echo $currentApplication->toHtml();
echo "<script type='text/javascript' src='../javascripts/map.php?".$urlParameters."&mb_myBBOX=".$_REQUEST["mb_myBBOX"]."'></script>";
?>
-</body>
</html>
\ No newline at end of file
Deleted: branches/nimix_dev/http/frames/jquery.html
===================================================================
--- branches/nimix_dev/http/frames/jquery.html 2008-08-18 14:16:40 UTC (rev 2846)
+++ branches/nimix_dev/http/frames/jquery.html 2008-08-18 14:17:34 UTC (rev 2847)
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<title>Untitled</title>
-<script type='text/javascript' src="../extensions/jquery.js"></script>
-</head>
-<body>
-
-</body>
-</html>
Modified: branches/nimix_dev/http/frames/login.php
===================================================================
--- branches/nimix_dev/http/frames/login.php 2008-08-18 14:16:40 UTC (rev 2846)
+++ branches/nimix_dev/http/frames/login.php 2008-08-18 14:17:34 UTC (rev 2847)
@@ -17,10 +17,8 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
ob_start();
-include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
require_once(dirname(__FILE__) . "/../classes/class_administration.php");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
+require_once(dirname(__FILE__)."/../../core/globalSettings.php");
function setSession(){
More information about the Mapbender_commits
mailing list