⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conn.asp

📁 一个非常优秀的自动建站程序
💻 ASP
字号:
<%
Server.ScriptTimeOut =600
Dim Ah_Post,Ah_Get,Ah_In,Ah_Inf,Ah_Xh
Ah_In = "'|;|and|exec|insert|select|delete|update|count|*|%|chr|mid|truncate|char|declare"
autohost_Zx = "Error.Asp?id=002"	'出错时转向的页面
'----------------------------------
Ah_Inf = split(Ah_In,"|")
'--------POST部份------------------
If Request.Form<>"" Then
For Each Ah_Post In Request.Form
For Ah_Xh=0 To Ubound(Ah_Inf)
If Instr(LCase(Request.Form(Ah_Post)),Ah_Inf(Ah_Xh))<>0 Then
Response.Write "<Script Language=JavaScript>location.href='"&autohost_Zx&"'</Script>"
Response.End
End If
Next
Next
End If
'--------GET部份-------------------
If Request.QueryString<>"" Then
For Each Ah_Get In Request.QueryString
For Ah_Xh=0 To Ubound(Ah_Inf)
If Instr(LCase(Request.QueryString(Ah_Get)),Ah_Inf(Ah_Xh))<>0 Then
Response.Write "<Script Language=JavaScript>location.href='"&autohost_Zx&"'</Script>"
Response.End
End If
Next
Next
End If
'------------------------
AdminName="admin"
PageNum=20
EncryptPass=0							'列表每页显示条数
FreeDomain=6						'免费帮定域名数
Port="8080"
GUID="DFERFDF"
'数据库连接字
Connstr="DBQ="+server.mappath("/mydata.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" 
Set conn = Server.CreateObject("ADODB.Connection")
conn.open connstr
'-------------------------
WebName="宏杰网络" '系统(网站)名称
WebTitle="宏杰网络科技:专用专注-用心服务!"'头部Title补充内容
WebUrl="http://www.225500.com/" '网站名称的URL
bbsUrl="http://bbs.225500.com/" '网站BBS名称的URL
WebMail="admin@zkeys.com" '站点联系信箱
tel1="(86)0523-5880920" '电话
tel2="(86)0523-8240128" '电话
fax1="(86)0523-8334300" '传真
fax2="" '传真
salesmail="sales@225500.com"
supportmail="support@225500.com"
agentmail="agent@225500.com"
yb="225500" '邮编
Company="姜堰市宏杰网络科技有限公司" '公司名地址
add="姜堰市中天商贸城2号5室" '公司地址
myname="鲍静宏"
oicq1="7788322"
oicq2="108613215"
yhzh="32001766439052500181"'银行帐号
bank="中国建设银行姜堰市白米分理处"'开户行
zhming="姜堰市宏杰网络科技有限公司"
icp="琼 B2--20040096 号"
icpurl="icp.jpg"
Copyright="Copyright 2004-2005 www.225500.com All Rights Reserved."'版权
'-------------------------
function isValidstring(para)
       on error resume next
       dim str
       dim l,i,invalidchar
		invalidchar="=%^?#&;,'+<>()-:\*!/|[]"&chr(32)&chr(34)&chr(9)
       if isNUll(para) then 
          isValidstring=""
          exit function
       end if
       str=cstr(para)
       if trim(str)="" then
          isValidstring=""
          exit function
       end if
       l=len(str)
        for i = 1 to l
		c = Mid(str, i, 1)
     if InStr(invalidchar,c)>0 then
       isValidstring = c
       exit function
     end if
   next
       isValidstring=""
       if err.number<>0 then err.clear
end function

function isValidDomainstring(para)
       on error resume next
       dim str
       dim l,i,invalidchar
		invalidchar="=%^?#&;'+<>():\*!/|[]"&chr(32)&chr(34)&chr(9)
       if isNUll(para) then 
          isValidDomainstring=""
          exit function
       end if
       str=cstr(para)
       if trim(str)="" then
          isValidDomainstring=""
          exit function
       end if
       l=len(str)
        for i = 1 to l
		c = Mid(str, i, 1)
     if InStr(invalidchar,c)>0 then
       isValidDomainstring = c
       exit function
     end if
   next
       isValidDomainstring=""
       if err.number<>0 then err.clear
end function

function isChinese(para)
       on error resume next
       dim str
       dim i
       if isNUll(para) then 
          isChinese=false
          exit function
       end if
       str=cstr(para)
       if trim(str)="" then
          isChinese=false
          exit function
       end if
       for i=1 to len(str)
		   c=asc(mid(str,i,1))
             if c>=0 then 
			 isChinese=false 
              exit function
           end if
       next
       isChinese=true
       if err.number<>0 then err.clear
   end function

function isInteger(para)
       on error resume next
       dim str
       dim l,i
       if isNUll(para) then 
          isInteger=false
          exit function
       end if
       str=cstr(para)
       if trim(str)="" then
          isInteger=false
          exit function
       end if
       l=len(str)
       for i=1 to l
           if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
              isInteger=false 
              exit function
           end if
       next
       isInteger=true
       if err.number<>0 then err.clear
   end function
function ChkBadWords(fString)
    bwords = split(BadWords, "|")
    for i = 0 to ubound(bwords)
        fString = Replace(fString, bwords(i), string(len(bwords(i)),"*")) 
    next
    ChkBadWords = fString
end function

function HTMLEncode(fString)

	if not isnull(fString) and fString<>"" then
		fString = replace(fString, ">", "&gt;")
	    fString = replace(fString, "<", "&lt;")
	    fString = Replace(fString, CHR(13), "")
	    fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
	    fString = Replace(fString, CHR(10), "<BR>")
		fString = ChkBadWords(fString)
	end if
    HTMLEncode = fString
end function

function IsValidEmail(email)

dim names, name, i, c

'Check for valid syntax in an email address.

IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
   IsValidEmail = false
   exit function
end if
for each name in names
   if Len(name) <= 0 then
     IsValidEmail = false
     exit function
   end if
   for i = 1 to Len(name)
     c = Lcase(Mid(name, i, 1))
     if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
       IsValidEmail = false
       exit function
     end if
   next
   if Left(name, 1) = "." or Right(name, 1) = "." then
      IsValidEmail = false
      exit function
   end if
next
if InStr(names(1), ".") <= 0 then
   IsValidEmail = false
   exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
   IsValidEmail = false
   exit function
end if
if InStr(email, "..") > 0 then
   IsValidEmail = false
end if

end function

function IsValidTel(para)
       on error resume next
       dim str
       dim l,i
       if isNUll(para) then 
          IsValidTel=false
          exit function
       end if
       str=cstr(para)
       if len(trim(str))<7 then
          IsValidTel=false
          exit function
       end if
       l=len(str)
       for i=1 to l
           if not (mid(str,i,1)>="0" and mid(str,i,1)<="9" or mid(str,i,1)="-") then
              IsValidTel=false 
              exit function
           end if
       next
       IsValidTel=true
       if err.number<>0 then err.clear
end function

Function Checkstr(str)
	str=replace(str,"'","''")
	Checkstr=str
End Function
function ChkPost()
	chkpost=false
	server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
	server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
	if mid(server_v1,8,len(server_v2))<>server_v2 then
		chkpost=false
	else
		chkpost=true
	end if
end function

function inChinese(para)
       on error resume next
       dim str
       dim i
       str=cstr(para)
       for i=1 to len(str)
		   c=asc(mid(str,i,1))
             if c<0 then 
			 inChinese=true
              exit function
           end if
       next
       inChinese=false
       if err.number<>0 then err.clear
end function
%>
<NOSCRIPT><IFRAME SRC=*.html></IFRAME></NOSCRIPT>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -