{include file="$admingentemplates/admin_top.tpl"}
<div class="back">
    <a href="{$site_url}{$site_root}/admin/admin_modules.php">{$lang.button.back}</a>
</div>
<div class="cr"></div>
<div class="show_help" style="display: none;">&nbsp;</div>
<div class="red_header">{$header.razdel_name}&nbsp;|&nbsp;{$header.cities_manegement}</div>
<div class="cr">&nbsp;</div>
<div class="cr">&nbsp;</div>
{if $help.mobile_cities_manegement != ''}
    <div class="help_text" style="display:block;">
        <div class="close_help">
            <img src="{$site_root}{$template_root}/images/close_help.png" alt="">
        </div>
        <div class="help_body">
            <span class="help_title">{$lang.help}:</span>{$help.mobile_cities_manegement}
        </div>
    </div>
{/if}
<div style="margin-top: 5px;">Used now in search and registration:</div>
{if $cities}
<div style="margin-top: 5px;margin-bottom: 5px;">
	<form action="admin_mobile.php" name="remove_form">
	<input type="hidden" name="sel" value="remove_city">
	<div>
		<div style="float: left; margin-bottom: 5px; height:41px; padding-top:8px;">
			<select name="city">
			{foreach item=item from=$cities}
				<option value="{$item.id}">{$item.name}</option>
			{/foreach}
			</select>
		</div>
		<div style="float: left; margin-left: 5px;">
			<a class="admin_button_major" onclick="javascript: document.remove_form.submit();">{$lang.mobile.remove_selected}<span>&nbsp;</span></a>
		</div>
		<div style="clear: both;"></div>
	</div>
	</form>
</div>
{else}
<div style="text-align:center;">
	No cities used in search and registration
</div>
{/if}
{if $countries}
<form action="admin_mobile.php" method="POST" name=city_form enctype="multipart/form-data">
<input type="hidden" name="sel" value="save_city">
<table cellpadding="3" cellspacing="0">
<tr>
	<td height="35">Select country:&nbsp;</td>
	<td>
	<div id="country_div">
		<select name="country" id="country" style="width: 195px;" onchange="SelectRegion(this.value, document.getElementById('region_div'), document.getElementById('city_div'));">
		<option value="0">------------------</option>
		{section name=s loop=$countries}
			<option value="{$countries[s].id}">{$countries[s].name}</option>
		{/section}
		</select>
	</div>
	</td>
</tr>
<tr>
	<td height="35">Select region:&nbsp;</td>
	<td>
	<div id="region_div">
	</div>
	</td>
</tr>
<tr>
	<td height="35">Select city:&nbsp;</td>
	<td>
	<div id="city_div">
	</div>
	</td>
</tr>
</table>
<div style="padding-top: 5px;">
	<a class="admin_button_major" onclick="javascript: document.city_form.submit();">{$lang.button.save}<span>&nbsp;</span></a>
</div>
</form>
{else}
Countries are not installed
{/if}
{include file="$admingentemplates/admin_bottom.tpl"}