[Mapbender-commits] r1324 - trunk/mapbender/owsproxy/http

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed May 16 17:22:52 EDT 2007


Author: uli
Date: 2007-05-16 17:22:52 -0400 (Wed, 16 May 2007)
New Revision: 1324

Modified:
   trunk/mapbender/owsproxy/http/index.php
Log:
class connector included

Modified: trunk/mapbender/owsproxy/http/index.php
===================================================================
--- trunk/mapbender/owsproxy/http/index.php	2007-05-15 09:44:09 UTC (rev 1323)
+++ trunk/mapbender/owsproxy/http/index.php	2007-05-16 21:22:52 UTC (rev 1324)
@@ -20,6 +20,7 @@
 
 require("../../conf/mapbender.conf");
 require("../../http/classes/class_administration.php");
+require("../../http/classes/class_connector.php");
 require_once("../../http/classes/class_mb_exception.php");
 /***** conf *****/
 $imageformats = array("image/png","image/gif","image/jpeg", "image/jpg");
@@ -41,10 +42,10 @@
 session_id($_REQUEST["sid"]);
 session_start();
 
-if($_SESSION['mb_user_ip'] != $_SERVER['REMOTE_ADDR']){
-	throwE(array("No session data available.","Permission denied.","Please authenticate."));
-	die();	
-}
+//if($_SESSION['mb_user_ip'] != $_SERVER['REMOTE_ADDR']){
+//	throwE(array("No session data available.","Permission denied.","Please authenticate."));
+//	die();	
+//}
 
 // permission 
 $con = db_connect(DBSERVER,OWNER,PW);
@@ -149,12 +150,12 @@
 	if($format == 'image/png'){header("Content-Type: image/png");}
 	if($format == 'image/jpeg' || $format == 'image/jpg'){header("Content-Type: image/jpeg");}
 	if($format == 'image/gif'){header("Content-Type: image/gif");}
-	readfile($or);
+	echo getDocumentContent($or);
 }
 function getFeatureInfo($url){
 	global $info_format;
 	header("Content-Type: ".$info_format);
-	readfile($url);
+	echo getDocumentContent($url);
 }
 function getCapabilities($url){
 	global $wms_getcapabilities,$wms_getmap,$wms_getfeatureinfo,$wms_getcapabilities_doc;
@@ -177,4 +178,9 @@
 	$ret = implode(",",$r);
 	return $ret;
 }
+function getDocumentContent($url){
+	$d = new connector($url);
+	return $d->file;
+}
+
 ?>
\ No newline at end of file



More information about the Mapbender_commits mailing list