<!-- #include file="../conn.asp" -->
<!-- #include file="admin.asp" -->
<%Call Head()%>
<%
dim sql,rs1,sql1,id,lid,idd,TP
TP=trim(request.querystring("TP"))
id=request.QueryString("id")
if id="" or IsNumeric(id)=False then
  Call Error("<card title=""ID无效""><p>ID无效！")
  end if
lid=request.QueryString("lid")
if lid="" or IsNumeric(lid)=False then
  Call Error("<card title=""ID无效""><p>ID无效！")
  end if
idd=request.QueryString("idd")
if idd="" or IsNumeric(idd)=False then
  Call Error("<card title=""ID无效""><p>ID无效！")
  end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select * from xzfile where ID="&id
rs.open sql,conn,1,3
if rs.eof then
  rs.close
  set rs=Nothing
  Call Error("<card title=""ID无效""><p>ID无效！")
end if

call saycarda("预览文件")







If Not rs.eof	Then
Dim gopage,PS,conlen,page,pagecount,ys,startc
rs("hit")=rs("hit")+1
rs.update()
end if
Response.Write	""&ubb(rs("name"))&"<br/>"
if rs("pic")<>"" then
response.write"<img src='"&rs("pic")&"' alt='load...'/><br/>"
response.write"<a href='"&rs("pic")&"'>测试下载截图</a><br/>"
end if
Response.Write	"[来源]:"&ubb1(rs("laiy"))&"<br/>"
Response.Write	"[人气]:"&ubb1(rs("hit"))&"<br/>"
response.write"[星级]:"
if rs("very")="1" then response.write"<img src='/img/1star.gif' alt='1'/><br/>"
if rs("very")="2" then response.write"<img src='/img/2star.gif' alt='2'/><br/>"
if rs("very")="3" then response.write"<img src='/img/3star.gif' alt='3'/><br/>"
if rs("very")="4" then response.write"<img src='/img/4star.gif' alt='4'/><br/>"
if rs("very")="5" then response.write"<img src='/img/5star.gif' alt='5'/><br/>"
Response.Write	"[下载]:"&ubb(rs("down"))&"<br/>"
Response.Write	"[更新]:"&ubb(fordate(rs("times")))&"<br/>"
Response.Write	"[大小]:"&rs("YD_size")&"KB<br/>"
Response.Write	"[格式]:"&ubb(rs("format"))&"<br/>"
Response.Write	"[文件地址]:"&ubb(rs("url"))&"<br/>"

If right(ubb(rs("url")),3)="gif" Or right(ubb(rs("url")),3)="jpg" Or right(ubb(rs("url")),3)="png" Or right(ubb(rs("url")),3)="bmp" Then
%><img src="<%=ubb(rs("url"))%>" alt=""/><br/><%
End if

urldz=ubb(rs("url"))
if request.querystring("o")<>1 then
dim pageWordNum,StartWord,Content,Length,PageAll,i,ii
pageWordNum=800
StartWord = 1
Content=rs("title")
Length=len(Content)
PageAll=(Length+PageWordNum-1)\PageWordNum
ii=clng(request("ii"))
i=clng(request("i"))
if ii<>0 then i=ii-1
if isnull(i) or i="" then i=0

	dim ccc,sss
	ccc=instr(content,"||")
	if ccc>0 then
	sss=split(content,"||")
	PageAll=ubound(sss)+1
		if i>PageAll-1 then i=PageAll-1
	content = sss(i)

	else
		if clng(i)>int(PageAll) then i=PageAll-1
	Content = mid(Content,StartWord+i*PageWordNum,PageWordNum)
	end if
response.write("-----------<br/>" & ubb1(content) & "")
if 0<=i<PageAll then
       Response.Write "<br/>"
end if
   if cint(i)<cint(PageAll)-1 then
       Response.Write "<a href='softview.asp?lid="&lid&"&amp;id=" &  rs("id") & "&amp;i=" & i+1 & "&amp;idd="&idd&"&amp;pa=" & pa & "&amp;saytk="&saytk&"&amp;sid="&sid&"'>下页</a>"
   End if
   if cint(i)>0 then 
   Response.Write "&nbsp;" & "<a href='softview.asp?lid="&lid&"&amp;id=" &  rs("id") & "&amp;i=" & i-1 & "&amp;idd="&idd&"&amp;pa=" & pa & "&amp;saytk="&saytk&"&amp;sid="&sid&"'>上页</a>"
		if  i<pageall-1 then Response.Write "&nbsp;<a href='softview.asp?lid="&lid&"&amp;id=" &  rs("id") & "&amp;i=" & PageAll & "&amp;idd="&idd&"&amp;pa=" & pa & "&amp;saytk="&saytk&"&amp;sid="&sid&"'>尾页</a>"
   End if
if PageAll>1 then
response.write ("&nbsp;<a href='softview.asp?id=" &  rs("id") & "&amp;lid="&lid&"&amp;idd="&idd&"&amp;pa="&pa&"&amp;o=1&amp;saytk="&saytk&"&amp;sid="&sid&"'>全文</a>")
       response.write "(" & i+1 & "/" & PageAll & ")"
%>
<br/>第<input name="i<%=minute(now)%><%=second(now)%>" title="页码" type="text" format="*N" emptyok="true" size="2" value="<%response.write(i+2)%>" maxlength="2"/>
<anchor>跳页
    <go href="softview.asp?id=<%=id%>&amp;idd=<%=idd%>&amp;lid=<%=lid%>&amp;p=<%=p%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>" accept-charset='utf-8'>
        <postfield name="ii" value="$(i<%=minute(now)%><%=second(now)%>)"/>
    </go>
</anchor>
<%
end if
else
response.write("-----------<br/>" & ubb1(rs("title")) & "")
response.write ("<br/><a href='softview.asp?id=" &  rs("id") & "&amp;lid="&lid&"&amp;idd="&idd&"&amp;pa="&pa&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>分页查看内容</a><br/>")
end if 

response.write"[检查]:"&ubb(rs("green"))&"<br/>"
response.write"[资费]:"&ubb(rs("pay"))&"<br/>"
response.write"[平台]:"&ubb(rs("type"))&"<br/>"
response.write"[适用]:"&ubb(rs("leibie"))&"<br/>"
response.write"<a href='"&urldz&"'>测试下载链接</a> "
response.write"<a href='err.asp?id="&id&"&amp;lid="&lid&"&amp;idd="&idd&"&amp;pa=" & pa & "&amp;saytk="&saytk&"&amp;sid="&sid&"'>报错记录</a><br/>"
rs.close
set rs=nothing
conn.close   
set conn=nothing
response.write"----------<br/>"%>
<%if TP="1" then%>
<a href='wjpassor.asp?id=<%=id%>&amp;lid=<%=lid%>&amp;idd=<%=idd%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>'>[返回上级]</a><br/>
<a href='wjpass.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[文件审核]</a><br/>
<%elseif TP="pass" then%>
<a href='wjpass.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[返回上级]</a><br/>
<a href='wjpass.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[文件审核]</a><br/>
<%else
if idd<>"" then%>
<a href='wjlist.asp?lid=<%=lid%>&amp;idd=<%=idd%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>'>[返回上级]</a><br/>
<a href='wjdl.asp?idd=<%=idd%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>'>[文件小类]</a><br/>
<%end if%>
<a href='wjclass.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[文件分类]</a><br/>
<%end if%>
<a href='wjcl.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[文件管理]</a><br/>
<a href="../index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[后台管理]</a>

<%
call headsay()
%>
