Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/mdaeo.org/usr/plugins/AMP/Action.php on line 388
ASP+MSSQL防火墙的设计

Mdaeo'Blog

ASP+MSSQL防火墙的设计







ASP+MSSQL FIREWALL--zhengjiangyuan





<%


remoteip=request.serverVariables("REMOTE_ADDR")

stip=cstr(remoteip)

for i=1 to 2

stip=right(stip,len(stip)-instr(1,stip,"."))

next

stip=left(stip,instr(1,stip,".")-1)

if(left(remoteip,5)<>"10.10" or stip<"1"or stip>"97")then

username=request.form("t1")

username=request.form("t2")

set fs=CreateObject("scripting.FileSytemObject")

set thisfile=fs.opentextfile("dsn.txt")

db_loc=thisfile.readline

thisfile.close

cnstr=db_loc&&"uid="&&username&&";"&&"pid="&&password on error resume next

set cn=server.createobject("adodb.connection")

cn.open cnstr

if err=3709 then %>

对不起,用户:<%=username %>没有访问权限,或者密码不正确!



用户名:口令:
type="password" name="T2" size="20" >

name="B2" />




<%end if

cn.close

set cn=nothing %>

<%else %>
恭喜你,你通过了验证,可以直接实用本站点的资源!

<%end if %>








当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »

因本文不是用Markdown格式的编辑器书写的,转换的页面可能不符合AMP标准。