<form action="" method="post" id="form_p_list"  onsubmit="return ajax_list();">
      <input type="hidden" name="action" value="ajax_list" />
<table width="680" class="from_table">
	   <tr>
	   <th width="205"><tpl> $langSysSFashion </tpl>：</th>
			<td width="280" class="td1"><select name="type" id="type">
			<option value="" <tpl> if $type eq '' </tpl> selected="selected" <tpl> /if </tpl>><tpl> $langSysSPleaseSelect </tpl></option>
			<option value="y" <tpl> if $type eq 'Y' </tpl> selected="selected" <tpl> /if </tpl>><tpl> $langSysSOnYear </tpl></option>
			<option value="m" <tpl> if $type eq 'm' </tpl> selected="selected" <tpl> /if </tpl>><tpl> $langSysSOnMonth </tpl></option>
			<option value="d" <tpl> if $type eq 'd' </tpl> selected="selected" <tpl> /if </tpl>><tpl> $langSysSOnDay </tpl></option>
		</select></td>
		<td width="250"></td>
	  </tr>
	  <tr>
	  <th><tpl> $langSysStaticsTimeSegment </tpl>：</th>
			<td width="280" class="td1"><input type="text" name="start_date" id="s_date" style="border:solid 1px #B0DF82;cursor:pointer; width:100px; background:url(../js/calendar/blue/cal_btn.gif) no-repeat right; height:18px; padding-right:19px;" readonly="readonly" value="<tpl> $input.start_date </tpl>" /> <tpl> $langSysSTo </tpl>
  	    <input type="text" name="end_date" id="e_date" style="border:solid 1px #B0DF82;cursor:pointer; width:100px; background:url(../js/calendar/blue/cal_btn.gif) no-repeat right; height:18px; padding-right:19px; " readonly="readonly" value="<tpl> $input.end_date </tpl>" /></td><td width="250"  class="vtop tips2"> <tpl> $langSysSBeginTimeEndTime </tpl></td>
      </tr>
	  <tr><td class="td1"></td>
	  <td width="280"><span class="btn_left">
	    <input name="submit3" value="<tpl> $langSysSSeach </tpl>" type="submit" class="btn_submit"/></span></td>
	  <td width="250" ></td>
      </tr>
</table>
</form>
<tpl> $statics_flash </tpl>
<script language="JavaScript">
function setGraphType(type) {
	return;
}
$(function(){
   $("#s_date").datepicker();
   $("#e_date").datepicker();
})
function ajax_list(){
	
	num = check_date($("#s_date").val(),$("#e_date").val());
	num = num+0;
	if(num>60 || num <0	){
		alert("<tpl> $langSysSTwoTimeExceed </tpl>");
		return false;
	}
	
	/* 取表单参数 */var queryString=$("#form_p_list").formSerialize();

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

/* 判断两时间相差天数，time格式为xxxx-(x)x-(x)x
time1开始时间time2结束时间
 */function check_date(time1,time2){
	line1 = time1.split('-');
	line2 = time2.split('-');
	line1[1] = line1[1]-1;
	line2[1] = line2[1]-1;
	var date1 = new Date();
	date1.setFullYear(line1[0],line1[1],line1[2]);
	var date2 = new Date();
	date2.setFullYear(line2[0],line2[1],line2[2]);
	
	line = Date.parse(date2)/1000 - Date.parse(date1)/1000;
	daynum = line/24/60/60;
	return daynum;
}
</script>