PHP popup
This is the PHP that will make the popup, it is more or less prepared for when the WFS is installed:
<?php
/* This PHP will generate the HTML code for the final submission of the request
The Javascript calling string is :
url_str='popup.php?service='+OWS_service+'&request=getCoverage&COVERAGE='+OWS_name+'&CRS='+CRS+'&BBOX='+BBOX.join(",")+'&RESX='+RESX[0]+'&RESY='+(-1*parseFloat(RESY[1]))+'&FORMAT='+FORMAT; */
?>
<body>
<table width="350px" border="0">
<tbody>
<tr bgcolor="#CFCFCF" >
<td><?php echo(strtoupper($_GET["service"])); ?> name:</td>
<!--getting the name of layer -->
<?php if (strnatcasecmp ($_GET["service"],'wcs') == 0){
$OWS_name=$_GET["COVERAGE"];
}
?>
<td align="center" ><?php echo($OWS_name); ?></td>
</tr>
<tr>
<td>CRS (projection):</td>
<td align="center"><?php echo($_GET["CRS"]); ?></td>
</tr>
<tr bgcolor="#CFCFCF">
<!-- getting the bbox back to array -->
<?php
$BBOX=explode(",",$_GET["BBOX"]); ?>
<td>BBOX minX:</td>
<td align="center"><?php echo($BBOX[0]); echo(" º N"); ?></td>
</tr>
<tr>
<td>BBOX minY:</td>
<td align="center"><?php echo($BBOX[1]); echo(" º N"); ?></td>
</tr>
<tr bgcolor="#CFCFCF">
<td>BBOX maxX:</td>
<td align="center"><?php echo($BBOX[2]); echo(" º W"); ?></td>
</tr>
<tr>
<td>BBOX maxY:</td>
<td align="center"><?php echo($BBOX[3]); echo(" º W"); ?></td>
</tr>
<tr bgcolor="#CFCFCF">
<td>ResX:</td>
<td align="center"><?php echo($_GET["RESX"]); ?></td>
</tr>
<tr>
<td>ResY:</td>
<td align="center"><?php echo("-"); echo($_GET["RESY"]); ?></td>
</tr>
<tr bgcolor="#CFCFCF">
<td>Format:</td>
<td align="center"><?php echo($_GET["FORMAT"]); ?></td>
</tr>
</tbody>
</table>
<!--building request-->
<?php
//checking the service
if (strnatcasecmp ($_GET["service"],'wcs') == 0) {
//start of form
echo('<FORM action="ows.php" method="GET"><input type="hidden" name="service" value="WCS"><input type="hidden" name="request" value="getCoverage"><input type="hidden" name="coverage" value="');echo($OWS_name);echo('">');
//mid section
echo('<input type="hidden" name="CRS" value="');echo($_GET["CRS"]);echo('">');
echo('<input type="hidden" name="BBOX" value="');echo($_GET["BBOX"]);echo('">');
echo('<input type="hidden" name="RESX" value="');echo($_GET["RESX"]);echo('">');
echo('<input type="hidden" name="RESY" value="');echo($_GET["RESY"]);echo('">');
echo('<input type="hidden" name="FORMAT" value="');echo($_GET["FORMAT"]);echo('">');
//final secion
echo('<p align="center"><INPUT type="submit" value="Request Coverage"></p></FORM>');
}
?>