'; #include '../include/dyn_css.php'; ?> wfs_conf
WFS Configuration

edit WFS Configuration

Select WFS:  getallwfs(); function toImage($text) { $angle = 90; if (extension_loaded("gd2")) { return ""; } return $text; } /* save wfs_conf properties */ if(isset($_REQUEST["save"])){ db_select_db($DB,$con); $sql = "INSERT INTO wfs_conf (wfs_conf_abstract,fkey_wfs_id,fkey_featuretype_id,g_label,g_label_id,g_button,g_button_id,g_style,g_buffer,g_res_style,g_use_wzgraphics) VALUES("; $sql .= "'".$_REQUEST["wfs_conf_abstract"]."',"; $sql .= "'".$_REQUEST["wfs"]."',"; $sql .= "'".$_REQUEST["featuretype"]."',"; $sql .= "'".$_REQUEST["g_label"]."',"; $sql .= "'".$_REQUEST["g_label_id"]."',"; $sql .= "'".$_REQUEST["g_button"]."',"; $sql .= "'".$_REQUEST["g_button_id"]."',"; $sql .= "'".$_REQUEST["g_style"]."',"; $sql .= "'".$_REQUEST["g_buffer"]."',"; $sql .= "'".$_REQUEST["g_res_style"]."',"; if(!empty($_REQUEST["g_use_wzgraphics"])){ $sql .= "'1'"; }else{$sql .= "'0'";} $sql .= "); "; $res = db_query($sql); $wfsID = db_insert_id($con,'wfs_conf','wfs_conf_id'); for($i=0; $i<$_REQUEST["num"]; $i++){ $sql = "INSERT INTO wfs_conf_element (fkey_wfs_conf_id,f_id,f_search,f_pos,f_style_id,f_toupper,f_label,f_label_id,f_show,f_respos,f_edit,f_form_element_html,f_mandatory) VALUES("; $sql .= "'".$wfsID."',"; $sql .= "'".$_REQUEST["f_id".$i]."',"; if(!empty($_REQUEST["f_search".$i])){ $sql .= "'1',"; }else{$sql .= "'0',";} $sql .= "'".$_REQUEST["f_pos".$i]."',"; $sql .= "'".$_REQUEST["f_style_id".$i]."',"; if(!empty($_REQUEST["f_toupper".$i])){ $sql .= "'1',"; }else{$sql .= "'0',";} $sql .= "'".$_REQUEST["f_label".$i]."',"; $sql .= "'".$_REQUEST["f_label_id".$i]."',"; if(!empty($_REQUEST["f_show".$i])){ $sql .= "'1',"; }else{$sql .= "'0',";} $sql .= "'".$_REQUEST["f_respos".$i]."'"; $sql .= ","; if(!empty($_REQUEST["f_edit".$i])){ $sql .= "'1',"; }else{$sql .= "'0',";} $sql .= "'".$_REQUEST["f_form_element_html".$i]."',"; if(!empty($_REQUEST["f_mandatory".$i])){ $sql .= "'1'"; }else{$sql .= "'0'";} // $sql .= ", "; // $sql .= "'".addslashes($_REQUEST["f_auth_varname".$i]); // $sql .= "'"; $sql .= "); "; $res = db_query($sql); } if (isset($_REQUEST["f_geom"])) { $sql = "UPDATE wfs_conf_element SET "; $sql .= "f_geom = 1"; $sql .= " WHERE fkey_wfs_conf_id = ".$wfsID." AND f_id = ".$_REQUEST["f_geom"].";"; $res = db_query($sql); } echo ""; } /* end save wfs_conf properties */ /* select wfs */ if(isset($_REQUEST["wfs"]) && $_REQUEST["wfs"] == ""){ unset($_REQUEST["wfs"]); unset($_REQUEST["featuretype"]); } echo ""; echo ""; /* end select wfs */ /* select featuretype */ if(isset($_REQUEST["wfs"])){ for($i=0; $iwfs_id);$i++){ if($aWFS->wfs_id[$i] == $_REQUEST["wfs"]){ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
ID:".$aWFS->wfs_id[$i]."
Name:".$aWFS->wfs_name[$i]."
Title:".$aWFS->wfs_title[$i]."
Abstract:".$aWFS->wfs_abstract[$i]."
Capabilities:".$aWFS->wfs_getcapabilities[$i]."
FeatureTypes:".$aWFS->wfs_describefeaturetype[$i]."
Feature:".$aWFS->wfs_getfeature[$i]."
"; } } $aWFS->getfeatures($_REQUEST["wfs"]); echo ""; for($i=0; $ifeatures->featuretype_id); $i++){ echo ""; echo ""; echo ""; echo ""; } echo "
features->featuretype_id[$i]){ echo "checked "; } echo "/>".$aWFS->features->featuretype_name[$i]."
"; } /* end select featuretype */ /* configure elements */ if(isset($_REQUEST["featuretype"])){ for($i=0; $ifeatures->featuretype_id); $i++){ if($_REQUEST["featuretype"] == $aWFS->features->featuretype_id[$i]){ echo "
SRS: ".$aWFS->features->featuretype_srs[$i]; } } /* set featuretype options */ echo ""; echo "" ; echo "" ; echo "" ; echo "" ; echo "" ; echo "" ; echo "" ; echo "" ; echo ""; echo "
Abstract:
Label:
Label_id:
Button:
Button_id:
Style:
Buffer:
ResultStyle:
WZ-Graphics:
"; /* set element options */ $aWFS->getelements($_REQUEST["featuretype"]); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; // echo ""; echo ""; for($i=0; $ielements->element_id); $i++){ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; // echo ""; echo ""; } echo "
" . toImage('ID') . "" . toImage('name / type') . "" . toImage('geom') . "" . toImage('search') . "" . toImage('pos') . "" . toImage('style_id') . "" . toImage('upper') . "" . toImage('label') . "" . toImage('label_id') . "" . toImage('show') . "" . toImage('position') . "" . toImage('mandatory') . "" . toImage('edit') . "" . toImage('html') . "" . toImage('auth') . "
".$aWFS->elements->element_id[$i]."".$aWFS->elements->element_name[$i]."
".$aWFS->elements->element_type[$i]."
"; echo ""; echo ""; } /* end configure elements */ ?>