<table width="100%" cellpadding="0" cellspacing="0" border="0">
	<tr><td class="nav"><a href="index.php?section=home">Home</a>&nbsp;&gt;&nbsp;<a href="index.php?section=geo">Geo-Positioning</a></td></tr>
	<tr><td>&nbsp;</td></tr>
	<tr><td><table cellpadding="2" cellspacing="2" border="0" align="center" width="400">
		<tr><td class="lined blue_bcg white_body padded" colspan="3" align="center">Install New DB</td></tr>
		<tr><td class="form_cell" colspan="3"><table cellpadding="2" cellspacing="2" border="0" align="center" width="100%">
		<form action="index.php" method="post">
		<input type="hidden" name="section" value="geo">
		<input type="hidden" name="action" value="install_db">		
		<?php if(count($data["files"]) == 0){ ?>
			<tr><td class="body">No files found under <?php echo DOC_ROOT."/import/geo"; ?></td></tr>
		<?php 
		}//if
		else {
			?><tr><td valign="top" width="50%"><table cellpadding="0" cellspacing="2" border="0"><?php
			?><tr><td colspan="2" class="body">Select File:</td></tr><?php
			foreach($data["files"] as $file){
				?><tr><td class="highlight"><?php
				admin_form_element( array ("type" => "radio", "name" => "file", "ovalue" => $file["file"]) );
				?></td><td class="highlight"><?php echo $file["file"]; ?> (<?php echo $file["size"]; ?>)</td></tr><?php
			}//foreach
			?>
			</table></td><td valign="top"><table cellpadding="0" cellspacing="2" border="0">
			<tr><td class="body" colspan="2">Settings:</td></tr>
			<tr><td class="highlight" valign="top"><?php
			admin_form_element( array ("type" => "radio", "name" => "replace", "ovalue" => "complete", "value" => "complete") );
			?></td><td class="highlight">completely replace current geo DB</td></tr>
			<tr><td class="highlight" valign="top"><?php
			admin_form_element( array ("type" => "radio", "name" => "replace", "ovalue" => "countries") );
			?></td><td class="highlight">replace matching countries and all data under them (states, cities, zip/postal codes)</td></tr>
			<tr><td class="highlight" valign="top"><?php
			admin_form_element( array ("type" => "radio", "name" => "replace", "ovalue" => "states") );
			?></td><td class="highlight">replace matching states and all data under them (cities, zip/postal codes)</td></tr>
			<tr><td class="highlight" valign="top"><?php
			admin_form_element( array ("type" => "radio", "name" => "replace", "ovalue" => "cities") );
			?></td><td class="highlight">replace matching cities and all data under them (zip/postal codes)</td></tr>
			<tr><td class="highlight" valign="top"><?php
			admin_form_element( array ("type" => "radio", "name" => "replace", "ovalue" => "codes") );
			?></td><td class="highlight">replace matching zip/postal codes</td></tr>
			<tr><td class="highlight" valign="top"><?php
			admin_form_element( array ("type" => "radio", "name" => "replace", "ovalue" => "none") );
			?></td><td class="highlight">do not replace matching entries</td></tr>
			</table></td></tr>
			<tr><td colspan="2" align="center"><?php
			admin_form_element( array ("type" => "button", "value" => "Install") );
			?></td></tr>
			<?php
		}//else
		?>
		</form>
		</table>
		</td></tr>
		<tr><td class="lined blue_bcg white_body padded" colspan="3" align="center">Geo-Positioning DB</td></tr>
		<tr><td width="100%" class="list_header" align="center">Country</td>
		<td class="list_header" align="center" nowrap>Level of Geo-Positioning</td>
		<td class="list_header" align="center">Action</td></tr>
		<?php
		foreach($data["countries"] as $country){
			?><tr>
			<td class="list_cell"><a name="<?php echo $country["con_id"]; ?>"></a><?php echo $country["name"]; ?></td>
			<td class="list_cell"><?php echo ($country["codes_support"]) ? "Zip/Postal Codes" : "Cities"; ?></td>
			<td class="list_cell"><?php
			admin_output_image("buttons/but_edit_small.gif","index.php?section=geo&action=edit_country&con_id=".$country["con_id"],0,"edit country");
			admin_output_image("buttons/but_delete_small.gif","index.php?section=geo&action=delete_country&con_id=".$country["con_id"],0,"delete country");
			?></td>
			</tr><?php
		}//foreach
		?>
	</table></td></tr>
</table>