|
ASP的程序,你看看是否还需要<!--#include file="Inc/Initialize.asp"-->文件
[CODE]
<!--#include file="Inc/Initialize.asp"-->
<%
Select Case lcase(Request("o"))
Case "search":Call Search()
Case Else:Call ShowIP()
End Select
Sub ShowIP()
CSB.strStatus="分类信息大类选择"
'如果没有缓存则载入缓存
dPageHtml=CSB.doPage(true,"IP.htm",false,"IPShow")
dPageHtml=Replace(dPageHtml,"{$MyIP}",CSB.GetIP())
dPageHtml=Replace(dPageHtml,"{$IPAddress}",CSB.GetIPAddress(CSB.GetIP()))
dPageHtml=Replace(dPageHtml,"{$ShowIP}","")
dPageHtml=CSB.ProcessCustomTags(dPageHtml)
CSB.DoOutput(dPageHtml)
End Sub
Sub Search()
Dim IP
IP=CSB.chk39(Trim(Request("IP")))
If IP="" Then CSB.AddErr("未知的IP参数!")
'Response.Write 0 < 0
'Response.End()
If UBound(Split(IP,"."))<>3 Then
'判断是否正确IP地址
CSB.AddErr("非法的IP参数!")
Else
'判断是否合理IP地址
If Not CSB.IsInt(Split(IP,".")(0)) Or Not CSB.IsInt(Split(IP,".")(1)) Or Not CSB.IsInt(Split(IP,".")(2)) Or Not CSB.IsInt(Split(IP,".")(3)) Then
CSB.AddErr("非法的IP参数!")
Else
'判断是否合理IP是否在合理数字范围内
If Split(IP,".")(0)>255 Or Split(IP,".")(1)>255 Or Split(IP,".")(2)>255 Or Split(IP,".")(3)>255 Then CSB.AddErr("非法的IP参数!")
If Split(IP,".")(0)< 0 Or Split(IP,".")(1)< 0 Or Split(IP,".")(2)< 0 Or Split(IP,".")(3)< 0 Then CSB.AddErr("非法的IP参数!")
End If
End If
Call CSB.ChkError()
dPageHtml=CSB.doPage(true,"IP.htm",false,"IPSearch")
dPageHtml=Replace(dPageHtml,"{$MyIP}",IP)
dPageHtml=Replace(dPageHtml,"{$IPAddress}",CSB.GetIPAddress(IP))
dPageHtml=Replace(dPageHtml,"{$ShowIP}",CSB.doPage(true,"ShowIP.htm",false,"ShowIP"))
dPageHtml=CSB.ProcessCustomTags(dPageHtml)
CSB.DoOutput(dPageHtml)
End Sub
%>
[CODE]