Beispiel #1
0
					<td>&nbsp;</td>
				    <td><label for="fax">Fax:</label></td>
				    <td><input id="fax" name="fax" value="<?php 
echo $OBSERVERSHIP->getFax();
?>
"></td>
		       	</tr>
		       	<tr>
					<td>&nbsp;</td>
					<td><label for="countries_id" class="form-required">Country:</label></td>
					<td>
						<?php 
if (@count($countries = fetch_countries()) > 0) {
    $country_options = "";
    foreach ($countries as $value) {
        $country_options .= "<option value=\"" . (int) $value["countries_id"] . "\"" . ($OBSERVERSHIP->getCountry() == $value["country"] ? " selected=\"true\"" : ($value["countries_id"] == DEFAULT_COUNTRY_ID ? " selected=\"true\"" : "")) . ">" . html_encode($value["country"]) . "</option>\n";
        if ($OBSERVERSHIP->getCountry() == $value["country"]) {
            $data_init = $value["countries_id"];
        }
    }
    if (empty($data_init)) {
        $data_init = DEFAULT_COUNTRY_ID;
    }
    echo "<select id=\"countries_id\" name=\"countries_id\" style=\"width: 90%\" onchange=\"provStateFunction(this.value);\" data-init=\"" . $data_init . "\">\n";
    //								echo "<option value=\"0\"".((!$OBSERVERSHIP->getCountry()) ? " selected=\"selected\"" : "").">-- Country --</option>\n";
    echo $country_options;
    echo "</select>\n";
} else {
    echo "<input type=\"hidden\" id=\"countries_id\" name=\"countries_id\" value=\"0\" />\n";
    echo "Country Information Not Available\n";
}