<SCRIPT LANGUAGE="JavaScript">
function checknull(){
  var ipArray,ip,j;
	ip = document.form1.ip.value;
	ipArray = ip.split(".");
	j = ipArray.length
	if(j!=4)
		{
			alert("不是正确的IP");
			document.ipform.ip.focus();
			return false;
		}
else{
		window.form1.submit();
		}

}
</SCRIPT>	


<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="65"> <form name="form1" method="post" action="">
        <p>&nbsp;</p>
        <table width="39%" border=1 align="center" cellPadding=2 borderColor=#999999 style="BORDER-COLLAPSE: collapse">
          <tr> 
            <td width="22%">IP地址</td>
            <td width="61%"><input type="text" name="ip"></td>
            <td width="17%"><input type="button" name="button" value="提交" onclick="checknull()"></td>
          </tr>
        </table>
      </form></td>
  </tr>
  <tr> 
    <td> &nbsp; &nbsp; {/if $HasIpinfo!="" /} 
      <table width="80%" border=1 align="center" cellPadding=4 borderColor=#999999 style="BORDER-COLLAPSE: collapse">
        <tr class=titlefont> 
          <td width="15%">国家</td>
          <td width="20%">省份</td>
          <td width="20%">城市</td>
          <td width="55%">地区</td>
        </tr>
		{/foreach item=Item key=Key from=$Ipinfo/} 
        <tr> 
          <td width="20%"><div align="center">{/$Item.country/}</div></td>
          <td><div align="center">{/$Item.province/}</div></td>
          <td><div align="center">{/$Item.city/}</div></td>
          <td width="40%"><div align="center">{/$Item.address/}</div></td>
        </tr>
		 {//foreach/}
      </table>
      {/else/}
      <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td>{/$Ipinfo/}</td>
        </tr>
      </table> 
   {//if/} </td>
  </tr>
</table>
<p>&nbsp;</p><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr class=titlefont_02> 
    <td>&nbsp;&nbsp;帮助信息</td>
  </tr>
  <tr> 
    <td><table style="BORDER-COLLAPSE: collapse" borderColor=#999999 cellPadding=2 width="100%" border=1>
        <tr> 
          <td><strong>友好提示</strong><br>
            IP地址的地理信息查，分别为国家，省份，城市，地区四类信息。<br> <br></td>
        </tr>
      </table></td>
  </tr>
</table>
