<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<tpl> $NCharset </tpl>" />
<title><tpl> $langCShopNCSystem </tpl></title>
<tpl>include file ='sys_head_config.html'</tpl>
</head>

<body style=" overflow:inherit;*overflow:visible;_overflow:inherit;">
<div class="tabbar">
  <ul class="tab_btns" id="COPYYH2">
    <li class="current"><a href="shop.manage.php?action=list"><span><tpl> $langSysShopManageAllShop </tpl></span></a></li>
  </ul>
	<div class="tab_notes" id="copyyh0">
		<ul class="notesbg block"><span><h4><tpl> $langSysShopManageOperatorLook </tpl></h4></span></ul>
	</div>
	<!-- 显示提示信息 -->
	<div id="message"></div>
	<!-- 显示提示信息end -->
</div>

<div id="product-help" class="admincp_form" style="top:88px;">
<form action="shop.manage.php" method="post" id="form_p_list">
 <table class="from_table">
  <tr>
  <th><tpl> $langSysShopName </tpl>：</th>
    <td width="265" class="td1"><input type="hidden" name="action" value="ajax_list" />
      <input name="txtShopName" type="text" class="txtinput" id="txtShopName" value="<tpl>$shop_text_shopname</tpl>" /></td>
  <th><tpl> $langSysShopClass </tpl>：</th>
    <td width="265" class="td1"><tpl> $shop_select_category </tpl></td>
    </tr>
  <tr>
  <th><tpl> $langSysShopBound </tpl>：</th>
    <td width="265" class="td1"><input name="txtSaleRange" type="text" class="txtinput" id="txtSaleRange" value="<tpl>$shop_text_salerange</tpl>" /></td>
  <th><tpl> $langSysShopEstate </tpl>：</th>
    <td width="265" class="td1"><select name="ischeck">
			<option value=""><tpl> $langSysShopPleaseSelect </tpl></option>
			<option value="0"><tpl> $langSysShopApply </tpl></option>
			<option value="1"><tpl> $langSysShopPass </tpl></option>
			<option value="2"><tpl> $langSysShopClose </tpl></option>
		</select>
	</td>
  </tr>
  <tr>
	  <tpl> if $sys_group_info.sys_group_area_id eq "" </tpl>
	  <th><tpl> $langSysShopAreaSeach </tpl>：</th>
		<td width="265" class="td1" colspan="2">
			<input type="hidden" name="shop_area_id" id="shop_area_id" />
			<select id="area_c1" class="searchformselect" name="area_c1" style="width: 120px">
				<option valus="" selected></option>
				<tpl> foreach item = parent from = $area_array </tpl>
				<option value="<tpl>$parent.area_id</tpl>||<tpl>$parent.is_parent</tpl>"><tpl> $parent.area_name </tpl></option>
				<tpl> /foreach </tpl>
			</select>
			<select class="searchformselect" id="area_c2" style="width: 120px" name="area_c2">
			</select>
			<select class="searchformselect" id="area_c3" style="width: 120px" name="area_c3">
			</select>
			<select class="searchformselect" id="area_c4" style="width: 120px" name="area_c4">
			</select>
		</td>
	  <tpl> else </tpl>
	  <th colspan="3"></td>
	  <tpl> /if </tpl>
		<td width="265">      <span class="btn_left">
	    <input type="submit" name="Submit" value="<tpl> $langSysShopSeach </tpl>" class="btn_submit"/></span></td>
    </tr>
	  
</table> </form>
<div id="result_content">
			<span class="zhl_shop"><p><tpl> $langSysCToLoading </tpl></p>
	<img src="../templates/system_new/images/rel_interstitial_loading.gif" />
	</span>
</div>
</div>
<!-- 帮助菜单 -->
<tpl> include file='sys_right_help.html' </tpl>
<!-- 帮助菜单END -->
</body>
</html>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
	ShowDiv = 'result_content';
	getPageContent('shop.manage.php?action=ajax_list');
	
	//搜索	
	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
							hideLoading();
							$('#result_content').html(msg);
						},
		type:      'post',
		dataType:  'html'
	};
	
	//对添加表单做的验证定义
	$("#form_p_list").validate({
		errorClass: "wrong",
		rules: {
		},
		messages: {
		},
		submitHandler: function() {
			$('#form_p_list').ajaxSubmit(options);
		}
	});
});
//地区选择
function tonext_area(whos) {
	$(whos).change(
		function(){
			var valarray=$(this).val().split('||');	
			$('#shop_area_id').val(valarray[0]);
			if (valarray[1]=='1') {
				$(this).next().attr('disabled','true').html('<option value="" selected="selected"><tpl> $langCDataToLoading </tpl></option>');
				$.get(
					'../home/tohtml.php',
					{action:'get_area',id:valarray[0],random_number:Math.random()},
					function(data){
						DataArray = data.split("|||");
						var a='';
						for (var i = 0; i<DataArray.length-1; i++) {
							att=DataArray[i].split("||");
							id=att[0];
							cla=att[2];
							a+='<option value="'+id+'||'+cla+'">'+att[1]+((cla=='1')?' ->':'')+'</option>';
						}
						
					$(whos).next().removeAttr('disabled').html('<option value="" selected="selected"></option>'+a).nextAll().html('');
					tonext_area($(whos).next());
					}
				)
			} else {
				$(whos).nextAll().html('').attr('disabled','true');
			};
		}
	)
};
$(document).ready(function() {
	tonext_area('#area_c1');
});
</script>