<table width="680" border="0" cellspacing="0" cellpadding="0"  class="from_table">
  <tr>
    <th colspan="3" style=" text-align:left">　<tpl> $langSysSIpFlux </tpl> | <a href="javascript:;" onclick="ajax_link('');"><tpl> $langSysSIpFluxDirection </tpl></a></th>
  </tr>
  <tr>
    <th width="150"><tpl> $langSysSPleaseSelectTime </tpl>：</th>
    <td width="280" align="left"><input name="time" type="radio" value="1" <tpl> if $input.time eq '' || $input.time eq '1' </tpl>checked="checked"<tpl> /if </tpl> onclick="ajax_list(this.value);" /><tpl> $langSysSToday </tpl>
<input name="time" type="radio" value="2" <tpl> if $input.time eq '2' </tpl>checked="checked"<tpl> /if </tpl> onclick="ajax_list(this.value);" /><tpl> $langSysSYesterday </tpl>
<input name="time" type="radio" value="3" <tpl> if $input.time eq '3' </tpl>checked="checked"<tpl> /if </tpl> onclick="ajax_list(this.value);" /><tpl> $langSysSBeforeYesterday </tpl>
<input type="text" name="txt_time" id="txt_time" style="border:solid 1px #B0DF82; width:100px; background:url(../js/calendar/blue/cal_btn.gif) no-repeat right; height:18px; padding-right:19px; cursor:pointer;" size="15" readonly="readonly" value="<tpl> if $input.time neq '1' && $input.time neq '2'  && $input.time neq '3' </tpl><tpl> $input.time </tpl><tpl> /if </tpl>"/> </td>
    <td  align="left"><span class="btn_left"><input type="button" id="button" class="btn_submit" onclick="ajax_list($('#txt_time').val());" value="<tpl> $langSysSSubmit </tpl>" /></span></td>
  </tr>

</table>



<table width="680" border="0" cellspacing="0" cellpadding="0" class="from_table2">
 
  <tr>
    <th width="284"><tpl> $langSysSNonceTimeSegment </tpl>：</th>
	<td width="530"><tpl> $time </tpl></td>
  </tr>
</table>





<table  class="from_table2_one">
	  <thead>
	  <tr class="area_ajax_list_title">
		  <th class="pd-left" width="150">IP</th>
          <th width="150">PV</th>
	      <th width="150"><tpl> $langSysSPercent </tpl></th>
	      <th width="150"><tpl> $langSysSDirection </tpl></th>
      </tr>
	  </thead>
      <tpl> if $ip_array[0].ip neq '' </tpl>
	  <tpl> section name=loop loop=$ip_array </tpl>
			<tpl> if $smarty.section.loop.rownum <= '20' </tpl>
	  <tr>
	    <td class="pd-left" width="150" align="left"><tpl> $ip_array[loop].ip </tpl></td>
		  <td width="150" align="left"><tpl> $ip_array[loop].num </tpl></td>
		  <td width="150" align="left"><tpl> $ip_array[loop].num/$ip_num*100|string_format:'%.2f' </tpl>%</td>
		  <td width="150" align="left"><a href="javascript:;" onclick="ajax_link('<tpl> $ip_array[loop].ip </tpl>');">
	    <tpl> $langSysSDirection </tpl></a></td>
	  </tr>
			<tpl> /if </tpl>
	        <tpl> /section </tpl>
	        <tpl> else </tpl>
	  <tr>
		  <td align="center" colspan="4" valign="middle"><tpl> $langSysSThisTimeNotData </tpl></td>
	  </tr>
		<tpl> /if </tpl>
</table>
<script type="text/javascript" language="javascript"> 
//普通日历
$(function(){
//datepicker
$("#txt_time").datepicker();
})

function ajax_list(time){
	document.getElementById('button').disabled = true;
	$.ajax({
		url: "statics_ip.manage.php",
		data: 'action=list&time='+time,
		type:'get',
		dataType:"html",
		beforeSubmit:  showLoading(showText),   // 提交之前执行的方法
		success: function(msg){
			$("#result_content").html(msg);
			hideLoading();
		}
	});
	return false;
}

/* 切换页面 */function ajax_link(str){
	$.ajax({
		url: "statics_ip.manage.php",
		data: 'action=trend&ip='+str,
		type:'get',
		dataType:"html",
		beforeSubmit:  showLoading(showText),   // 提交之前执行的方法
		success: function(msg){
			$("#result_content").html(msg);
			hideLoading();
		}
	});
	return false;
}
</script>
