<% Response.Expires = -10000 Server.ScriptTimeOut = 300 Set fso = Server.CreateObject("Scripting.FileSystemObject") code = Request("code") seq = Request("seq") uid = Request("number") mime = Request("mime") 'If Session("AMemID") = "" Then ' nothingmsg ("파일 다운로드는 회원만 가능합니다 ") ' Response.End 'End If '************************************************************************************************** '* 다운로드 이력에 기록 (일반회원만 기록 : level = 0 ) '************************************************************************************************** 'If Session("AMemLevel") = "0" Then call db_conn() call checkPK("bbs_file", "code='"&code&"' AND uid='"&uid&"' AND seq='"&seq&"'") query = "select userfile from bbs_file where code='"&code&"' AND uid='"&uid&"' AND seq='"&seq&"'" call cnt(query, userfile) userfile = funRetChk(userfile) 'End If '************************************************************************************************** '* 다운로드 '************************************************************************************************** 'If instr(filename,"zip") Then ' Response.redirect("/"&DataSaveRoot&"/intra/"&code&"/"&filename) 'Else If code <> "" and userfile <> "" Then 'Response.ContentType = "application/octet-str" Response.ContentType = "application/unknown" Response.AddHeader "Content-Disposition","attachment; filename="&userfile Set objStream = Server.CreateObject("ADODB.Stream") objStream.Open objStream.Type = 1 objStream.LoadFromFile Server.MapPath("/data/bbs/"&code)&"\"&uid&"-"&seq&"."&mime '절대경로 입니다. download = objStream.Read Response.BinaryWrite download Set objstream = nothing End IF Set fso = nothing %>