<!-- {include file="header.html"} -->
<link href="../static/scripts/jquery/colorpicker.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../static/scripts/jquery/colorpicker.js"></script>
<script>
var arr = [{$colors}];
</script>
<!--{literal}-->
<script>
jQuery(document).ready(function($) {
	$.fn.colorPicker.defaultColors = arr;
	$('#color1').colorPicker();
})
</script>
<!--{/literal}-->
<div id="currentPosition">
	<p>{lang your_current_position} {lang setting_global} &raquo; {lang area}</p>
</div>
<div id="rightTop"> 
    <h3>{lang area}</h3> 
    <ul class="subnav">
		<li><a href="area.php">{lang management}</a></li>
        <li><a class="btn1" href="area.php?do=edit"><span>{lang add_or_edit}</span></a></li>
        <li><a href="area.php?do=country">{lang country}</a></li>
        <li><a href="areatype.php">{lang sorts}</a></li>
        <li><a href="area.php?do=clear">{lang clearing}</a></li>
        <li><a href="area.php?do=refresh">{lang update_cache}</a></li>
    </ul>
</div>
<div class="info">
  <form method="post" action="area.php" id="EditFrm" name="edit_frm">
    <table class="infoTable">
    {if $smarty.get.id}
      <input type="hidden" name="id" value="{$smarty.get.id}" />
      <input type="hidden" name="page" value="{$smarty.get.page}" />
      <tr>
        <th class="paddingT15"> {lang serial_number}{lang colon}</th>
        <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" name="data[area][id]" value="{$item.id}" type="text" />        </td>
      </tr>
      <tr>
        <th class="paddingT15"> {lang the_area}{lang naming_n}</th>
        <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" name="data[area][name]" value="{$item.name}" type="text" />&nbsp;{lang bold}<input type="checkbox" name="highlight[style][1]" {if $hl.bold}checked{/if}>&nbsp;{lang italic}<input type="checkbox" name="highlight[style][2]" {if $hl.italic}checked{/if}>&nbsp;{lang underline}<input type="checkbox" name="highlight[style][3]" {if $hl.underline}checked{/if}>&nbsp;<input type="text" name="highlight[color]" id="color1" value="{$hl.color}" title="">
		<label class="field_notice">{lang top_category_name_not_support_special_sign}</label></td>
      </tr>
    {else}
      <tr>
        <th class="paddingT15"> {lang the_area}{lang naming_n}</th>
        <td class="paddingT15 wordSpacing5"><textarea name="data[names]" id="dataNames"></textarea><label class="field_notice">{lang add_more_than_one_line_on_behalf_of_a_record}</label></td>
      </tr>
    {/if}
      <tr>
        <th class="paddingT15"> {lang parent_categories}{lang colon}</th>
        <td class="paddingT15 wordSpacing5">
        <select name="data[area][parent_id]" id="dataParentId">
        <option value="0">{lang no}</option>
        {$CacheItems}
        </select>
       </td>
      </tr>
      <tr>
        <th class="paddingT15"> {lang param_type}</th>
        <td class="paddingT15 wordSpacing5">
         <select name="data[area][areatype_id]" id="dataTypeId">
			<option value="0">{lang no}</option>
            <!--{foreach from=$Types key=key3 item=item3}-->
            <option value="{$key3}" {if $key3==$item.areatype_id}selected="selected"{/if}>{$item3}</option>
            <!--{/foreach}-->
        </select>   
        </td>
      </tr>
      <tr>
        <th class="paddingT15"> {lang link_url}</th>
        <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" name="data[area][url]" value="{$item.url}" type="text" /><label class="field_notice">{lang empty_will_be_default_url}</label>        
		</td>
      </tr>
      <tr>
        <th class="paddingT15"> {lang whether_or}{lang show_it}{lang colon}</th>
        <td class="paddingT15 wordSpacing5"><!--{html_radios name="data[area][available]" options=$AskAction checked=$item.available|default:1 separator=""}--></td>
      </tr>
      <tr>
        <th class="paddingT15"> {lang display_order}</th>
        <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" name="data[area][display_order]" type="text" value="{$item.display_order|default:0}"></td>
      </tr>
      <tr>
        <th></th>
        <td class="ptb20">
			<input class="formbtn" type="submit" name="save" value="{lang save}" />		</td>
      </tr>
    </table>
  </form>
</div>
<script>
var parent_id = "{$item.parent_id|default:0}";
var areatype_id = "{$item.areatype_id|default:0}";
</script>
<!--{literal}-->
<script>
jQuery(document).ready(function($) {
	$('#dataParentId').val(parent_id);
	$('#dataTypeId').val(areatype_id);
})
</script>
<!--{/literal}-->
<!-- {include file="footer.html"} -->