Пример #1
0
<?php

/*
 * zip_form.php
 * output form elements for zip html form input field
 */
$zipCode = null;
if (isset($_REQUEST['zip'])) {
    $zipCode = $_REQUEST['zip'];
}
if (isset($_REQUEST['us']) && $_REQUEST['us'] == 1) {
    printForUS($zipCode);
} else {
    printForInt();
}
function printForUS($zip = null)
{
    ?>
	<div class="label">Zip:</div>
	<div class="formInput">
		<input id="zip" name="zip" type="text" value="
		<?php 
    if (isset($zip)) {
        echo $zip;
    }
    ?>
		"></input>
	</div>
	<br />
	<br />
	<br />
Пример #2
0
<?php

/*
 * latlon_form.php
 * output form elements for lat/lon html form input field
 */
$lat = $lon = null;
if (isset($_REQUEST['lat'])) {
    $lat = $_REQUEST['lat'];
}
if (isset($_REQUEST['lon'])) {
    $lon = $_REQUEST['lon'];
}
if (isset($_REQUEST['us']) && $_REQUEST['us'] == 1) {
    printForUS($lat, $lon);
} else {
    printForInt();
}
function printForUS($lat = null, $lon = null)
{
    if (isset($myReseller->nValid_message['latlong'])) {
        echo $myReseller->nValid_message['latlong'];
    }
    ?>
	<div class="label">Latitude:</div>
	<div class="formInput">
		<input id="lat" name="lat" type="text" value="
		<?php 
    if (isset($lat)) {
        echo $lat;
    }