%
Dim key,icstype
HitThisA(6)="1"
key=request("key")
If key="" Then key=request("ic1")
icstype=request("icstype")
If icstype<>"" Then icstype="&icstype=1"
If key="" Then
response.write ""
response.End
elseIf Len(key)<4 Then
response.write ""
response.End
End if
Function Func_Title()
Dim KeyName
KeyName=request("key")
Func_Title="
"&KeyName&" PDF资料,datasheet技术资料,下载"&KeyName&"PDF资料,雷动天科技!"&vbCrLf&""&vbCrLf & ""&vbCrLf&""
End Function
%>
<%
function showaction()
Dim sql,SType,sqlW
if request("page")<>"" And IsNumeric(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end If
SType=request("typeid")
If SType<>"" And IsNumeric(SType) Then
sqlW=" and p.xgid1="&SType
filename=filename&"typeid="&SType&"&"
End If
If icstype<>"" Then
sql="select p.id,p.icname,p.ic1,p.ic2,f.filepage,f.filesize from pdf_info p,pdf_file f where p.pdfid=f.id and p.icname='"&Func_like(key)&"' "&sqlW&" and f.filesize is not null order by p.id desc"
Else
sql="select p.id,p.icname,p.ic1,p.ic2,f.filepage,f.filesize from pdf_info p,pdf_file f where p.pdfid=f.id and p.icname like '"&Func_like(key)&"%' "&sqlW&" and f.filesize is not null order by p.id desc"
End If
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn2,1,1
if rs.eof and rs.bof Then
response.write("
·目前还没有内容!
")
else
totalPut=rs.recordcount
if currentpage<1 then currentpage=1
if (currentpage-1)*listnum>totalput then
if (totalPut mod listnum)=0 then
currentpage=totalPut \ listnum
else
currentpage=totalPut \ listnum + 1
end if
end if
if currentPage=1 then
showContent()
showpage totalput,listnum,filename
else
if (currentPage-1)*listnum
"
response.write "共 "&n&" 页 | 第 "&CurrentPage&" 页 | "
if CurrentPage<2 then
response.write "首页 上一页 "
else
response.write "首页 "
response.write "上一页 "
end if
if n-currentpage<1 then
response.write "下一页 尾页"
else
response.write "下一页 "
response.write "尾页"
end if
response.write " 转到:"
response.write "
"
end Function
function showContent()
dim classi,t,filesize,rs2
for t=1 to listnum
if rs.eof then exit for
if t mod 2=1 then
classi=1
else
classi=2
end If
' set rs2=server.CreateObject("adodb.recordset")
' sql="select top 1 filepage,filesize from pdf_file where id="&rs("pdfid")
' rs2.open sql,conn2,1,1
' If Not rs.eof then
filesize=rs("filesize")
filepage=rs("filepage")
' Else
' filesize=""
' filepage=""
' End if
' rs2.close
' set rs2=nothing
%>