%
set conn=server.CreateObject("adodb.connection")
conn.open "Driver={Microsoft Access Driver (*.mdb)}; dbq="&server.MapPath("../admin3130jyfy.mdb")
set rs=server.createobject("adodb.recordset")
Sub NiceError(text)
conn.close
set conn=nothing
Response.Write "
" & text
Response.End
End Sub
sub openrs(rs, sql,i,j)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql,conn,i,j
end sub
function ChkString(strValue,strType)
if IsNull(strValue) or trim(strValue)="" then
ChkString = " "
else
if strType="unhtml" then
strValue=RTrim(strValue)
strValue=replace(strValue,"''","'")
strValue=replace(strValue," "," ")
strValue=replace(strValue,"<","<")
strValue=replace(strValue,vbCrLf," ")
ChkString = strValue
exit function
end if
if strType="replymail" then
strValue=RTrim(strValue)
strValue=replace(strValue," "," ")
strValue=replace(strValue,vbCrLf," ")
ChkString = strValue
exit function
end if
if strType="unhtml1" then
strValue=RTrim(strValue)
strValue=replace(strValue,"''","'")
strValue=replace(strValue," "," ")
strValue=replace(strValue,"<","<")
strValue=replace(strValue,vbCrLf," ")
strValue=replace(strValue,"|"," ")
ChkString = strValue
exit function
end if
if strType="save" then
strValue=RTrim(strValue)
strValue=replace(strValue,"'","''")
ChkString = strValue
exit function
end if
if strType="unreplace" then
strValue=RTrim(strValue)
strValue=replace(strValue,"''","'")
ChkString = strValue
exit function
end if
if strType="save1" then
strValue=RTrim(strValue)
strValue=replace(strValue,"'","''")
strValue=replace(strValue," ","|")
ChkString = strValue
exit function
end if
end if
end function
function ToURL(strValue)
if IsNull(strValue) then strValue = ""
ToURL = Server.URLEncode(strValue)
end function
function DateToFilename(dtDateTime)
DateToFilename = year(dtDateTime) & doublenum(Month(dtdateTime)) & doublenum(Day(dtdateTime)) & doublenum(Hour(dtdateTime)) & doublenum(Minute(dtdateTime)) & doublenum(Second(dtdateTime)) &".htm"
end function
function doublenum(fNum)
if fNum > 9 then
doublenum = fNum
else
doublenum = "0"& fNum
end if
end function
sub strDelete(strID,Forum,Pro)
if not isempty(strID) then
if instr(strID,",")>0 then
dim idarr
idArr=split(strID,",")
dim id
for i = 0 to ubound(idarr)
id=idarr(i)
del id,Forum,Pro
next
else
del strID,Forum,Pro
end if
end if
set conn=nothing
end sub
sub del(id,F,P)
sql="delete from "& F &" where "& P & id
conn.execute sql
End sub
%>
ybzx