%
dim sql_injdata
SQL_injdata = "'|exec|insert|select|delete|update|chr|mid|master|truncate|char|declare"
SQL_inj = split(SQL_Injdata,"|")
If Request.QueryString<>"" Then
For Each SQL_Get In Request.QueryString
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.QueryString(SQL_Get),Sql_Inj(Sql_DATA))>0 Then
Response.Write ""
Response.end
end if
next
Next
End If
If Request.Form<>"" Then
For Each Sql_Post In Request.Form
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.Form(Sql_Post),Sql_Inj(Sql_DATA))>0 Then
Response.Write ""
Response.end
end if
next
next
end if
%>
<%
dim bigname
bigname=array("","常用网址","行业信息分类","国内网址分类","便民服务")
dim keywordsdescription
keywordsdescription=",成都网址大全,成都便民网,成都实用大全,成都旅游大全,成都企业大全,成都大全,成都美食大全,成都吃喝大全,成都腐败大全,成都医院大全,成都小吃大全,成都教育大全,公交线路查询,成都天气预报,车辆违章查询,社保医疗查询,体育彩票查询, 租房买房卖房 ,美容按摩健身,求职招聘中介,成都便民网站,成都网址,成都企业库,成都休闲"
dim baseurl
baseurl="/"
dim Conn,Rs,Sql,ConnStr,DBPat
'On Error Resume Next
Sub DBConnBegin()
If IsObject(Conn) = True Then Exit Sub
ConnStr="Provider=MicroSoft.JET.OLEDB.4.0; Data Source="
'ConnStr = "driver={Microsoft Access Driver (*.mdb)};dbq="
DBPath = Server.MapPath(baseurl&"inc/gasdasdaads.mdb")
Set Conn=Server.CreateObject ("ADODB.Connection")
On Error Resume Next
Conn.Open ConnStr & DBpath
Set rs1 = Server.CreateObject( "ADODB.Recordset" )
rs1.ActiveConnection = Conn
rs1.CursorType =1
rs1.LockType =3
Set rs = Server.CreateObject( "ADODB.Recordset" )
rs.ActiveConnection = Conn
rs.CursorType =1
rs.LockType =3
End Sub
Sub DBConnEnd()
Rs.Close
Set Rs = Nothing
Conn.Close
Set Conn = Nothing
End Sub
Sub Header()
Response.Write "
"
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""'oncontextmenu='return false' >"
Response.Write ""
End Sub
Sub Footer()
Response.Write ""
End Sub
Function checktime(str)
checktime=replace(str,chr(34),"")
checktime=replace(checktime,chr(39),"")
checktime=replace(checktime," ","")
checktime=replace(checktime,"<","<")
checktime=replace(checktime,">",">")
checktime=replace(checktime,"","")
checktime=replace(checktime,"-","")
checktime=replace(checktime,":","")
checktime=replace(checktime,"下午","")
checktime=replace(checktime,"上午","")
checktime=checktime
End Function
'''''''''''''为空或数字
Function checknum(str)
if str="" or not isnumeric(str) then
response.Write ("")
response.end
end if
checknum=str
End Function
Function checkStr(str)
checkStr=replace(str,chr(34),"")
checkstr=replace(checkstr,chr(39),"")
checkstr=replace(checkstr," ","")
checkstr=replace(checkstr,"<","<")
checkstr=replace(checkstr,">",">")
checkstr=replace(checkstr,"","")
checkstr=replace(checkstr,"-","")
checkstr=replace(checkstr,":","")
checkstr=replace(checkstr,"下午","")
checkstr=replace(checkstr,"上午","")
End Function
Function checkcontent(str)
str=server.htmlencode(str)
errorchar=array("","","#","`","|","alert","script","<",">")
for i=0 to ubound(errorchar)
if instr(str,errorchar(i))>0 then
response.Write ("")
response.end
'exit for
end if
next
checkcontent=str
End Function
'日期处理
Function Qdate(strTemp)
yyyy=datepart("yyyy",strTemp)
if len(datepart("m",strTemp))<2 then mm="0"&datepart("m",strTemp) else mm=datepart("m",strTemp) end if
if len(datepart("d",strTemp))<2 then dd="0"&datepart("d",strTemp) else dd=datepart("d",strTemp) end if
Qdate=int(yyyy&mm&dd)
End Function
dbconnbegin()
%>
<%
'验证数据提交路径是否合法
sub ActionErr
server_v1=Cstr(Request.ServerVariables("SERVER_NAME"))
server_v2=Cstr(Request.ServerVariables("HTTP_REFERER"))
if server_v1<>mid(server_v2,8,len(server_v1)) then
response.write("")
response.end
end if
end sub
'日期处理
'去掉-,: 不足两位的补0
Function Qdate(strTemp)
yyyy=datepart("yyyy",strTemp)
if len(datepart("m",strTemp))<2 then mm="0"&datepart("m",strTemp) else mm=datepart("m",strTemp) end if
if len(datepart("d",strTemp))<2 then dd="0"&datepart("d",strTemp) else dd=datepart("d",strTemp) end if
if len(datepart("h",strTemp))<2 then hh="0"&datepart("h",strtemp) else hh=datepart("h",strTemp) end if
if len(datepart("n",strTemp))<2 then nn="0"&datepart("n",strtemp) else nn=datepart("n",strTemp) end if
if len(datepart("s",strTemp))<2 then ss="0"&datepart("s",strtemp) else ss=datepart("s",strTemp) end if
Qdate=int(yyyy&mm&dd&hh&nn&ss)
End Function
'验证email
Function IsValidEmail(email)
Dim names, name, i, c
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 CheckStr(Str)
ErrStr=Array(" "," ","",""," ","","","#","`","|","%","&","+",";","@","!")
For i=0 to Ubound(ErrStr)
If Instr(Str,ErrStr(i)) > 0 then
ErrFlag = False
Exit For
Else
ErrFlag = True
End If
Next
CheckStr = ErrFlag
End Function
Sub IsMastor
If session("User_Admin_Id")="" or session("User_Admin_Pass")<>md5(session("User_Admin_Id")) Then
Response.Redirect("login.asp")
Response.End()
End If
End Sub
Sub mastor
If session("purview")<>10 Then
Response.Write("")
Response.End()
End If
End Sub
sub userlogin
if session("userid")="" or session("username")="" then
response.Write("")
response.End()
end if
end sub
sub myself(userid)
'response.Write(userid&session("admin_id"))
'response.End()
if session("admin_id")<>userid then
response.Write("")
response.end
end if
end sub
function emptys(typenamevalue,typenames)
if typenamevalue="" then
response.Write("")
response.end
end if
emptys=typenamevalue
end function
sub rseof(aa)
if aa.eof then
response.Write("")
response.end
end if
end sub
%>
<%
sub sizeshow(p,prspagesize)
rs.pagesize=rspagesize
if p<>"" then
p=cint(p)
if p<1 then p=1 end if
if p-trim(rs.pagecount)>0 then p=trim(rs.pagecount) end if
else
p=1
end if
'rs.absolutepage=p
end sub
sub pageshow(p,action)
%>
共<%=rs.recordcount%>条记录 当前第<%=p%>/<%=rs.pagecount%>条
<%if p<>1 and not rs.bof then%>
第一页上页
<%end if
if p<>trim(rs.pagecount) and rs.pagecount<>1 and not rs.eof then
%>
下页最后一页
<%end if%>
<%
end sub
sub pagesz(counts,p)
rs.pagesize=counts
p=trim(p)
if p<>"" then
p=cint(checknum(p))
if p<1 then p=1 end if
if p-trim(rs.pagecount)>0 then p=trim(rs.pagecount) end if
else
p=1
end if
rs.absolutepage=p
end sub
''''''''''''
sub pageshow(p,action)
response.Write("
")
response.Write("共有:"&rs.recordcount&" 条 当前页:"&p&"/"&rs.pagecount&"")
if p<>1 and not rs.bof then
response.Write(" 首页上页")
end if
if p<>trim(rs.pagecount) and rs.pagecount<>1 and not rs.eof then
response.Write(" 下页末页")
end if
response.Write("
")
if rs.pagecount<>1 and rs.pagecount<>0 then
response.write("
")
else
response.write(" ")
end if
response.write("
")
end sub
%>
成都网址大全-->网站登录
<%
dname = Trim(Request("dname"))
xname = Trim(Request("xname"))
cid=2
set rs=server.createobject("adodb.recordset")
sql = "select * from types_xtype where cid=2 order by num asc,ID asc"
rs.open sql,conn,1,1
%>
<%
dim action
action=trim(request("action"))
select case action
case "addok"
addok
case else
add
end select
sub add
%>
<%
end sub
sub addok
dname=request.form("dname")
xname=request.form("xname")
title=checkcontent(request.form("title"))
Price1=checkcontent(request.form("Price1"))
content=checkcontent(request.form("content"))
contact=checkcontent(request.form("contact"))
phone=checkcontent(request.form("phone"))
website=request.form("website")
if dname="" then
response.write("")
response.end
end if
if xname="" then
response.write("")
response.end
end if
if title="" then
response.write("")
response.end
end if
if contact="" then
response.write("")
response.end
end if
if phone="" then
response.write("")
response.end
end if
if website="yes" then
if price1="" then
response.write("")
response.end
end if
if content<>"" and len(content)>200 then
response.write("")
response.end
end if
else
if content="" then
response.write("")
response.end
end if
end if
if website="yes" then
weburl=Price1
else
weburl="/www/"&checktime(now)&".html"
end if
rs.open "select * from products_info",conn,1,3
rs.addnew
rs("cid")=2
rs("dname")=dname
rs("xname")=xname
rs("title")=title
rs("Price1")=weburl
if webseite="yes" then
rs("content")=content
else
rs("mb")=content
end if
rs("contact")=contact
rs("phone")=phone
rs("posttime")=now()
rs.update
response.write("")
end sub
%>