<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <%option explicit response.charset="utf-8"%> <% Dim IPArr,showtime,mo,da,icpdf,rs3v,ic4V,icpdfPath,fs,fname id=request("id") If Not IsNumeric(id) Or id="" Then response.end sql="select bt,fname from pdf_file where id="&id set rs=server.CreateObject("adodb.recordset") rs.open sql,conn2,1,1 If rs.eof Then rs.close Set rs=Nothing response.write "" response.end End if fname=rs("bt") & "/" & rs("fname") icpdf="https://www.ic611.com/pdf_file/" & fname rs.close Set rs=Nothing CloseData() Response.redirect(icpdf) Response.End icpdfPath="E:\pdffile\" & fname Set fs = CreateObject("scripting.filesystemobject") if Not fs.FileExists(icpdfPath) Then conn2.execute("update pdf_file set htm=2 where id=" & id) response.write("抱歉,"& fname &" PDF文件不存在,我们会尽快处理!") response.end End If Set fs=nothing IPArr=getIP() showtime=Date() mo=month(showtime) da=day(showtime) if int(mo)<10 then mo="0" & mo if int(da)<10 then da="0" & da showtime=year(showtime)& mo & da sql="select * from pdf_download where ic1='"&IPArr&"' and ic2="&showtime set rs=server.CreateObject("adodb.recordset") rs.open sql,conn2,1,3 If Not rs.eof Then rs3v=rs("ic3") ic4V=rs("ic4") If ic4V="" Or IsNull(ic4V) Then ic4V=" " If InStr(ic4V,"|"&id&"|")=0 Then If rs3v<100 Then rs("ic3")=rs3v+1 rs("ic4")=ic4V & "|"&id&"|" rs.update Else rs.close Set rs=Nothing response.write("对不起,每天只能限制下载100个PDF文件!") response.end End If End if Else rs.addnew rs("ic1")=IPArr rs("ic2")=showtime rs("ic3")=1 rs("ic4")="|"&id&"|" rs.update End if rs.close Set rs=Nothing response.redirect(icpdf) %>