home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
221.214.14.186
/
221.214.14.186.tar
/
221.214.14.186
/
wh
/
qim
/
Ft_conn.asp
< prev
next >
Wrap
Text File
|
2006-06-01
|
3KB
|
101 lines
<%
'==================================
'=╬─ ╝■ ├√ú║conn.asp
'=╩╩╙├░µ▒╛ú║FeitecCMS AC V1.3 Free
'=╣ª ─▄ú║═°╒╛╩²╛▌┐Γ┴¼╜╙╝░╣½╙├╣²│╠╗≥║»╩²
'=╫≈ ╒▀ú║╙Ω│╟[From to FeitecStudio]
'=╚╒ ╞┌ú║2006-2-19 18:09
'=░µ ╚¿ú║http://www.feitec.com/
'=╝╝╩⌡╠╓┬█ú║6602510íó14040543ú¿╨┬╩╓╚║ú⌐
'==================================
on error resume next
'╩²╛▌┐Γ╡╪╓╖╔Φ╓├ú¼╕∙╛▌╧α╙ª╟Θ┐÷╫≈╕ⁿ╕─ú¼├√│╞╘╜╕┤╘╙╘╜║├íú
dim conn,connstr,db
db="data#v390/feitec#data.asa"
connstr="provider=microsoft.jet.oledb.4.0;data source=" & server.mappath(db)
set conn = server.createobject("adodb.connection")
conn.open connstr
if err then
err.clear
set conn = nothing
response.write "╩²╛▌┐Γ┴¼╜╙│÷┤φú¼╟δ╝∞▓Θ┴¼╜╙╫╓┤«íú"
response.end
end if
'╣╪▒╒╩²╛▌┐Γ┴¼╜╙║»╩²
function closedatabase
conn.close
set conn = nothing
end function
'==================================
'=║» ╩² ├√ú║checksql(name,str,attrib,num)
'=╣ª ─▄ú║╖╔╠┌╣ñ╫≈╩╥│¼╟┐╩²╛▌╝∞▓Γ╣²┬╦║»╩²ú¼▒╛╒╛╘¡┤┤
'=╩╣╙├╦╡├≈ú║name-▓╬╩²├√ú¿╙├╙┌┤φ╬≤╧╘╩╛ú⌐ú¼str-▓╬╩²╓╡ú¿╙├╙┌┼╨╢╧ú⌐ú¼attrib-▓╬╩²└α╨═ú¿1╬¬╫╓╖√╨═ú¼0╬¬╩²╫╓╨═ú⌐ú¼num-▓╬╩²╓╡╫╓╖√╩²┴┐ú¿╫╓╖√╨═╓╨0▒φ╩╛▓╗╧▐╓╞ú¼╩²╫╓╨═╚╬║╬╟Θ┐÷╧┬╢╝╙╨╧▐╓╞ú⌐
'==================================
Function checksql(name,str,attrib,num)
dim founderr,errmsg
founderr=false
errmsg=""
dim sqlname
sqlname=name
if attrib=1 then
if str="<P> </P>" or str="<P></P>" or str="<BR>" then
str=""
else
str=trim(replace(str,"'",""))
end if
if str="" then
founderr=true
errmsg=errmsg+"<br><li>"&sqlname&"▓╗─▄╬¬┐╒úí</li>"
elseif num<>0 then
dim Bword(12)
Bword(0)="--"
Bword(1)=";"
Bword(2)=">"
Bword(3)="<"
Bword(4)="chr(32)"
Bword(5)="í»"
Bword(6)="í▒í▒"
Bword(7)="chr(9)"
Bword(8)="%"
Bword(9)="$"
Bword(10)="'"
Bword(11)="chr(34)"
Bword(12)="|"
for i= 0 to ubound(Bword)
if instr(str,Bword(i))<>0 then
founderr=true
errmsg=errmsg+"<br><li>"&sqlname&"╓╨║¼╙╨╖╟╖¿╫╓╖√ú¿╕≈╓╓╖√║┼ú⌐úí</li>"
end if
next
if len(str)>num then
founderr=true
errmsg=errmsg+"<br><li>"&sqlname&"▓╗─▄│¼╣²"&num&"╫╓╖√úí</li>"
end if
elseif instr(str,"'")<>0 then
founderr=true
errmsg=errmsg+"<br><li>"&sqlname&"╓╨╙╨╖╟╖¿╫╓╖√úí</li>"
end if
elseif attrib=0 then
if str="" then
founderr=true
errmsg=errmsg+"<br><li>"&sqlname&"▓╗─▄╬¬┐╒úí</li>"
elseif not isnumeric(str) then
founderr=true
errmsg=errmsg+"<br><li>"&sqlname&"▓╗╩╟╩²╫╓╨═úí</li>"
elseif len(str)>num then
founderr=true
errmsg=errmsg+"<br><li>"&sqlname&"╩²╫╓╨═▓╬╩²╬╗╩²▓╗─▄│¼╣²"&num&"╬╗úí</li>"
end if
else
founderr=true
errmsg=errmsg+"<br><li>╣²┬╦║»╩²╡≈╙├┤φ╬≤úí</li>"
end if
if founderr then
response.redirect("showerr.asp?errmsg="&errmsg&"")
response.end
end if
checksql=str
End Function
%>