<form action="statics_product.manage.php" method="get" name="form_p_list" id="form_p_list" onsubmit="return ajax_list();">
<table width="680" class="from_table">
	<input type="hidden" name="action" value="ajax_list" />
	<input name="searchcate" type="hidden" id="searchcate" value="0" />
	<input type="hidden" name="curpage" value="1" />
	<input type="hidden" name="searchtype" value="1" />
	<tr>
	<th><tpl> $langSysSClass </tpl>：</th>
		<td width="480" class="td1"><select name="c1" id="c1" style="WIDTH: 110px">
		<option value=""></option>
		<tpl>foreach item = parent from = $ProductCateArray</tpl>
		<option value="<tpl>$parent.id</tpl>||<tpl>$parent[5]</tpl>"><tpl>$parent.name</tpl></option>
		<tpl>/foreach</tpl>
		</select>
		<select name="c2" id="c2" style="WIDTH: 110px">
		</select>
		<select name="c3" id="c3" style="WIDTH: 110px">
		</select>
		<select name="c4" id="c4" style="WIDTH: 110px">
		</select> 
		</td>
	</tr>
	<tr>
	<th><tpl> $langSysSMerchandiseType </tpl>：</th>
		<td width="530" class="td1"><tpl> foreach from=$p_type key=key item=one </tpl>
		<input name="p_type[]" type="checkbox" value="<tpl> $key </tpl>"/><tpl> $one </tpl>
		<tpl> /foreach </tpl>		</td>
	</tr>
	<tr>
	<th><tpl> $langSysSPriceBound </tpl>：</th>
		<td width="480" class="td1"><input size="10" class="txtinput_short"  name="price_min" id="price_min" value="" />
		<tpl> $langCYuan </tpl> <tpl> $langSysSTo </tpl>
		<input size="10" class="txtinput_short"  name="price_max" id="price_max" value="" />
		<tpl> $langCYuan </tpl> 
		</td>
	</tr>
	<tr>
	<th><tpl> $langSysSBuyType </tpl>：</th>
		<td width="480" class="td1"><select name="sell_type" id="sell_type">
		<option <tpl> if $product_condition.sell_type eq 'all' </tpl> selected="selected" <tpl> /if </tpl> value="all"><tpl> $langSysSAll </tpl></option>
		<option <tpl> if $product_condition.sell_type eq '0' </tpl> selected="selected" <tpl> /if </tpl> value="0"><tpl> $langSysSAuction </tpl></option>
		<option <tpl> if $product_condition.sell_type eq '1' </tpl> selected="selected" <tpl> /if </tpl> value="1"><tpl> $langSysSOnePrice </tpl></option>
		<option <tpl> if $product_condition.sell_type eq '2' </tpl> selected="selected" <tpl> /if </tpl> value="2"><tpl> $langSysSGroupBuy </tpl></option>
		</select>
		</td>
	</tr>
	<tr><td class="td1"></td>
	<td width="480"><span class="btn_left">
	  <input name="submit" value="<tpl> $langSysSSeach </tpl>" type="submit" class="btn_submit"/></span></td>
	</tr>
</table>
</form>
<tpl> $statics_flash </tpl>
<script language="JavaScript">
function setGraphType(type) {
	return;
}

function tonext(whos) {
	$(whos).change(
	function(){
		var valarray=$(this).val().split('||');
		$('#searchcate').val(valarray[0]);
		if (valarray[1]=='1') {
			$(this).next().attr('disabled','true').html('<option value="" selected="selected"><tpl> $langCDataToLoading </tpl></option>');
			$.get('../member/own_productcate.php',{action:'list',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($(whos).next());
			})} else {$(whos).nextAll().html('').attr('disabled','true');
			};
	})
};
$().ready(function() {
	tonext('#c1');
});
function ajax_list(){
	/* 取表单参数 */var queryString=$("#form_p_list").formSerialize();

	$.ajax({
		url: "statics_product.manage.php",
		data: queryString,
		type:'post',
		dataType:"html",
		beforeSubmit:  showLoading(showText),   // 提交之前执行的方法
		success: function(msg){
			$("#result_content").html(msg);
			hideLoading();
		}
	});
	return false;
}
</script>