[Mapbender-commits] r1791 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Nov 9 09:30:22 EST 2007


Author: christoph
Date: 2007-11-09 09:30:22 -0500 (Fri, 09 Nov 2007)
New Revision: 1791

Modified:
   trunk/mapbender/http/classes/class_wfs.php
Log:
added function getallwfs

Modified: trunk/mapbender/http/classes/class_wfs.php
===================================================================
--- trunk/mapbender/http/classes/class_wfs.php	2007-11-09 12:20:40 UTC (rev 1790)
+++ trunk/mapbender/http/classes/class_wfs.php	2007-11-09 14:30:22 UTC (rev 1791)
@@ -671,6 +671,40 @@
     }
 }
 /** end createObjfromDB **/
+
+	public function getallwfs($userid){
+		$this->wfs_id = array();
+		$this->wfs_name = array();
+		$this->wfs_title = array();
+		$this->wfs_abstract = array();
+		
+		global $DBSERVER,$DB,$OWNER,$PW;
+		$con = db_connect($DBSERVER,$OWNER,$PW);
+		db_select_db($DB,$con);
+		if($userid){
+		 	$sql = "SELECT * FROM wfs WHERE wfs_owner = $1";
+			$v = array($userid);
+			$t = array('i');
+			$res = db_prep_query($sql,$v,$t);
+		}
+		else{
+		 	$sql = "SELECT * FROM wfs";
+			$res = db_query($sql);
+		}
+		
+		$cnt = 0;
+		while ($row = db_fetch_array($res)){
+			$this->wfs_version[$cnt] = $row["wfs_version"];
+			$this->wfs_id[$cnt] = $row["wfs_id"];
+			$this->wfs_name[$cnt] = $row["wfs_name"];
+			$this->wfs_title[$cnt] = $row["wfs_title"];
+			$this->wfs_abstract[$cnt] = $row["wfs_abstract"];
+			$this->wfs_getcapabilities[$cnt] = $row["wfs_getcapabilities"];
+			$this->wfs_describefeaturetype[$cnt] = $row["wfs_describefeaturetype"];
+			$this->wfs_getfeature[$cnt] = $row["wfs_getfeature"];
+			$cnt++;
+		}	
+	}
 }
 
 



More information about the Mapbender_commits mailing list