wfs_id); $i++) { $obj[$this->wfs_id[$i]] = $this->wfs_title[$i];; } return $obj; } function getallwfs(){ $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); $sql = "SELECT * FROM wfs"; // include permission handling $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++; } } function getfeatures($wfsid){ $this->features = new features($wfsid); } function getelements($feature){ $this->elements = new elements($feature); } function getnamespaces($feature){ $this->namespaces = new namespaces($feature); } } class features extends wfs_conf{ var $featuretype_id; var $featuretype_name; var $featuretype_title; var $featuretype_srs; function features($id){ $featuretype_id = array(); $featuretype_name = array(); $featuretype_title = array(); $featuretype_srs = array(); global $DBSERVER,$DB,$OWNER,$PW; $con = db_connect($DBSERVER,$OWNER,$PW); db_select_db($DB,$con); $sql = "SELECT * FROM wfs_featuretype WHERE fkey_wfs_id = ".$id; $res = db_query($sql); $cnt = 0; while ($row = db_fetch_array($res)){ $this->featuretype_id[$cnt] = $row["featuretype_id"]; $this->featuretype_name[$cnt] = $row["featuretype_name"]; $this->featuretype_title[$cnt] = $row["featuretype_title"]; $this->featuretype_srs[$cnt] = $row["featuretype_srs"]; $cnt++; } } } class elements extends wfs_conf{ var $element_id; var $element_name; var $element_type; function elements($fid){ $element_id = array(); $element_name = array(); $element_type = array(); global $DBSERVER,$DB,$OWNER,$PW; $con = db_connect($DBSERVER,$OWNER,$PW); db_select_db($DB,$con); $sql = "SELECT * FROM wfs_element WHERE fkey_featuretype_id = ".$fid; $res = db_query($sql); $cnt = 0; while ($row = db_fetch_array($res)){ $this->element_id[$cnt] = $row["element_id"]; $this->element_name[$cnt] = $row["element_name"]; $this->element_type[$cnt] = $row["element_type"]; $cnt++; } } } class namespaces extends wfs_conf{ var $namespace_name; var $namespace_location; function namespaces($fid){ $namespace_name = array(); $namespace_location = array(); global $DBSERVER,$DB,$OWNER,$PW; $con = db_connect($DBSERVER,$OWNER,$PW); db_select_db($DB,$con); $sql = "SELECT * FROM wfs_featuretype_namespace WHERE fkey_featuretype_id = ".$fid; $res = db_query($sql); $cnt = 0; while ($row = db_fetch_array($res)){ $this->namespace_name[$cnt] = $row["namespace"]; $this->namespace_location[$cnt] = $row["namespace_location"]; $cnt++; } } } ?>