getWfsByWfsOwner($_SESSION["mb_user_id"]); #need admin functions: getWmsLogTag, getWmsPrice, setWmsLogTag, setWmsPrice #can set log only when proxy on, can set price only when log on #read out the request function array2str($array, $pre = '', $pad = '', $sep = ', ') { $str = ''; if(is_array($array)) { if(count($array)) { foreach($array as $v) { $str .= $pre.$v.$pad.$sep; } $str = substr($str, 0, -strlen($sep)); } } else { $str .= $pre.$array.$pad; } return $str; } function validateint($inData) { $intRetVal = 0; $IntValue = intval($inData); $StrValue = strval($IntValue); if($StrValue == $inData) { $intRetVal = $IntValue; } return $intRetVal; } if(isset($_REQUEST["save"])){ #if(isset($_REQUEST["wms_id"]) && isset($_REQUEST["status"])){ #$admin->setWMSOWSstring(intval($_REQUEST["wms_id"]),$_REQUEST["status"]); #print_r($_POST); #TODO deactivate proxy, logs and prices for all owned wms #TODO #$wms_list=array2str($ownwms); #print $wms_list; //$admin->unsetWmsProxy($wms_list);#TODO not delete owsproxy urls but update each entry! -> this would not delete log or usage of proxy!!! #serialize ownwms - to list and do sql #for the definitions in the form set the params #sequentialy read out the post variables if(isset($_POST["save"])) { } foreach ($_POST as $var => $value) { #select those which are relevant (hidden fields for proxy and log) #identify them $parts=explode("_",$var); #echo "All vars:
"; #echo $var." = ".$value."
"; $value=validateint($value); if ($parts[0]!= 'status' && $parts[2]=='price'){ #for the pricing in the textfield if($parts[0] == "wfs") { $admin->setWfsPrice(intval($value),intval($parts[1])); } } #check the hidden fields if some log should be set if ($parts[2]=='log' && $parts[0]=='status'){ #set the log value to 1 or 0 if($parts[2]=='log'){ $admin->setWfsLogTag(intval($parts[1]),$value); } #if value is 0 then set the price to 0 to. there would be is no sense to have a price set - maybe change this behavior if ($value==0) { if($parts[2]=='log'){ $admin->setWfsPrice(intval($value),intval($parts[1])); } } #echo "log: $var = $value
"; } #check proxy fields if ($parts[0]=='status' && $parts[2]=='proxy'){ #echo ("proxy settings identified: WMS_ID: ".intval($parts[1])." Value: ".$value."
"); #echo ("Is active?: "); #if ($admin->getWMSOWSstring(intval($parts[1]))=="") {echo " no";} else {echo " yes";} #echo ("
"); #check if proxy should be activated and is not set if ($value==1 && $admin->getWFSOWSstring(intval($parts[1])) == "") { #activate it! $admin->setWFSOWSstring(intval($parts[1]),$value); #echo "Activate Proxy for ".intval($parts[1])."
"; } #check if active proxy should be deactivated if ($value==0 && $admin->getWFSOWSstring(intval($parts[1])) !== "") { #deactivate it $admin->setWFSOWSstring(intval($parts[1]),$value); #echo "Deactivate Proxy for ".intval($parts[1])."
"; } } } } ?> '; ?> OWS Security Proxy Warning: Toggle proxy changes the url of the secured services!
"; for($i=0; $igetWFSOWSstring($ownwfs[$i]) == false){ $status_proxy = 0 ;} else {$status_proxy = 1;}; if($admin->getWfsLogTag($ownwfs[$i]) == 1){$status_log=1;} else {$status_log=0;}; if ($admin->getWfsPrice($ownwfs[$i]) != 0 ){$status_price=$admin->getWfsPrice($ownwfs[$i]);} else {$status_price=0;}; $auth = $admin->getAuthInfoOfWFS($ownwfs[$i]); if($auth['auth_type'] == ''){$status_auth = 0;} else {$status_auth = 1;}; echo ""; echo ""; echo "".$admin->getWfsTitleByWfsId($ownwfs[$i]); echo ""; #for logging echo ""; #for pricing echo ""; if($status_log == 1){ echo ""; } echo ""; } echo "
WFS ID WFS Title Proxy GetFeature Log GetFeature Price(cent/feature) Show detailed Usage
".$ownwfs[$i].""; #for owsproxy echo ""; #initialize hidden field for status proxy: echo ""; echo " to activate echo ">"; #initialize hidden field for status log: echo ""; echo "getWmsPrice($ownwms[$i]) != 0){ echo "disabled"; } echo ">"; #initialize hidden field for status price: echo ""; echo "
"; echo "
"; echo "
Service with authentication information
"; echo ""; ?>