<%@ LANGUAGE="VBSCRIPT"%> <%option explicit%> <% Dim rsEBook, cid, id, strClassName, bLog cid = trim(request("cid")) if not IsNumeric(cid) then cid=0 id = trim(request("id")) if not IsNumeric(id) then id=0 bLog = false Response.Status="301 Moved Permanently" Response.AddHeader "Location","http://dl.21ic.com/ebook-" & id & ".html" ' response.redirect "http://dl.21ic.com/ebook-" & id & ".html" response.end Dim UserName,LoginTime,UserPassword Dim Ret Dim From Dim Key,CheckFlag CheckFlag = Request("CheckFlag") Key = Request("Key") ' Dim o ' set o = server.createobject("flybird.encrypt") From = "http://cn.21ic.com/" & request.servervariables("path_info") & "?" & Request.servervariables("QUERY_STRING") & "&f=1" ret = getLoginCookie(UserName,LoginTime,UserPassword) %> <%=strWebName%>
<% set rsEBook=server.CreateObject("adodb.recordset") ConnectDatabase ' 打开数据库 rsEBook.Open "select ec.classname,(select classname from ebook_class ec_root (nolock) where id=ec.parentid) as classname_root from ebook_class ec (nolock) where ec.id=" & cid, myconn, 0, 1 if not rsEBook.EOF then strClassName = rsEBook("classname") if not isnull(rsEBook("classname_root")) then '不是顶级分类 strClassName = rsEBook("classname_root") & " -> " & strClassName & "" end if end if rsEBook.Close %>

首页 -> <%=strClassName%>

<% rsEBook.Open "select e.*,ec.* from ebook e (nolock) left join ebook_company ec (nolock) on e.companyid=ec.id where e.id=" & id, myconn, 0, 1 if rsEBook.EOF then rsEBook.Close response.write "没有找到该数据!" else if rsEBook("islog") or rsEBook("isbest") then bLog = true %> <% if len(rsEBook("filename"))>5 then %> <% end if %> <% if len(rsEBook("filename"))>5 then %> <% end if %>
<% if len(rsEBook("titlepic"))<5 then %> 没有封面 <% else %> " width="130" height="120" alt="<%=rsEBook("title")%>" class="titlepic" /> <% end if %> <%=rsEBook("title")%>
上传日期:<%=formatdatetime(rsEBook("addtime"),2)%> 浏览次数:<%=rsEBook("show")%>
文件格式:<%=rsEBook("format")%> 文件大小:<%=rsEBook("length")%>
发布公司:<%=rsEBook("companyname")%> 官方网站:"http://" then%>http://<%end if%><%=rsEBook("companyweb")%>" target="_blank"><%=rsEBook("companyweb")%>
<%if bLog then%> <%if ret = false or UserName = "" then%>(需要登录,如果您没有注册请先注册)<%end if%><%else'不需要记录下载名单%>" class="download"><%end if%><%if id=520 or id=789 or id=896 or id=924 then%>   印刷版申请<%end if%>
<%=rsEBook("abstract")%>

<% rsEBook.Close myconn.execute("update ebook set show=show+1 where id=" & id) %> <% rsEBook.open "select top 20 * from ebook_remark (nolock) where nid=" & id & " order by id desc",myconn,0,1 do while not rsEBook.eof %> <% rsEBook.movenext loop rsEBook.close %>
用户评论:
<%=rsEBook("userid")%>: <%=rsEBook("content")%> (<%=rsEBook("addtime")%>)
<% if ret = false or UserName = "" then 'response.redirect "http://bbs.21ic.com/passport/checkstatus.asp?from=" & Server.UrlEncode(From) %> 请先登录。 <% else %>
<%=UserName%> 发表评论:
<% end if ' set o = nothing end if set rsEBook=nothing CloseDatabase ' 关闭数据库 %>