IP.Asp
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:2k
- <!--#Include File="../Inc/Head.Asp"--><%
- Private FangWen
- Set FangWen=New xkon_FangWen
- FangWen.FangWen()
- FangWen.IP()
- Set FangWen=Nothing
- Private c,s
- Set c=New xkon_Response
- Set s=New xkon_Request
- Private Sub LieBiao()
- Dim FSO,FS
- Set FSO=Server.CreateObject("Scripting.FileSystemObject")
- If FSO.FileExists(Server.Mappath("SZ_IP.xkon.cn")) Then
- Set FS=FSO.OpenTextFile(Server.Mappath("SZ_IP.xkon.cn"))
- Dim NeiRong
- NeiRong=FS.ReadAll()
- FS.Close
- Set FS=Nothing
- End If
- Set FSO=Nothing
- If NeiRong<>"" Then
- Dim NeiRong2
- NeiRong2=Split(NeiRong,",")
- Dim i
- For i=1 To Ubound(NeiRong2)
- c.Writeln(NeiRong2(i)&"<a href=""IP.Asp?l=s&ip="&NeiRong2(i)&""">删除</a>")
- Next
- Else
- c.Write("还没有任何IP被屏蔽")
- End If
- End Sub
- Private Sub Jia()
- c.Write("<form method=""post"" action=""IP.Asp?l=j"">IP:<input type=""text"" name=""IP"" /><input type=""submit"" value=""增加""/></form>")
- End Sub
- Private Sub Jia2()
- Dim IP
- IP=s.Form("IP")
- If IP="" Then
- Call xkon_Error("IP不能为空")
- Else
- Dim FSO,FS
- Set FSO=Server.CreateObject("Scripting.FileSystemObject")
- Set FS=FSO.OpenTextFile(Server.Mappath("SZ_IP.xkon.cn"),8,True)
- FS.Write(","&IP)
- c.Writeln("增加成功")
- End If
- End Sub
- Private Sub Delete()
- Dim IP
- IP=s.QueryString("IP")
- Dim FSO,FS,FS2
- Set FSO=Server.CreateObject("Scripting.FileSystemObject")
- Set FS=FSO.OpenTextFile(Server.Mappath("SZ_IP.xkon.cn"))
- Dim NeiRong
- NeiRong=FS.ReadAll()
- FS.Close
- Set FS=Nothing
- Set FS=FSO.OpenTextFile(Server.Mappath("SZ_IP.xkon.cn"),2,True)
- NeiRong=Replace(NeiRong,","&IP,"")
- FS.Write(NeiRong)
- FS.Close
- Set FS=Nothing
- Set FSO=Nothing
- End Sub
- Call H_Title("屏蔽IP")
- Dim l
- l=s.QueryString("l")
- Select Case l
- Case "j"
- Call Jia2()
- Case "s"
- Call Delete()
- End Select
- Call LieBiao()
- Call Jia()
- Call H_End()
- Set c=Nothing
- Set s=Nothing
- %>