<% Dim ConnString,rs,n,conn office_administer="test1" ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath("irbvip.mdb") '########################################################################################### Set conn = Server.CreateObject("ADODB.Connection") conn.Open ConnString 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 DateToStr(dtDateTime) DateToStr = year(dtDateTime) & doublenum(Month(dtdateTime)) & doublenum(Day(dtdateTime)) & doublenum(Hour(dtdateTime)) & doublenum(Minute(dtdateTime)) & doublenum(Second(dtdateTime)) & "" end function function doublenum(fNum) if fNum > 9 then doublenum = fNum else doublenum = "0"& fNum end if end function %>