📄 disp.asp
字号:
<%@ Language=VBScript %>
<!--#include file="../VAR.asp"-->
<%DbPath=DB()%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<base TARGET="_top">
<title>访客留言簿</title>
<style>
<!--
p,div,td,a {font-size:9pt; line-height:14pt; font-family:宋体;}
.p1{font-size:9pt;font-family:宋体;}
.p2{font-size:11pt;font-family:宋体;}
a:hover{font-size:9pt;color:red;}
a.t1:visited{font-size:9pt;color:red;}
-->
</style>
</head>
<body TEXT="#000000" BGCOLOR="#FFFFFF" LINK=" #3366CC" VLINK=" #3366CC" ALINK="#FF0000"
background="guestpic/sgback.jpg" bgproperties="fixed">
<!--start-->
<P><%
Tauthor=request("author")
Tcatalog=request("catalog")
Tshowsub=request("showsub")
Tshowauthor=request("showauthor")
PgSz=10
pageNo=request("JumpPage")
set Conn=server.CreateObject("ADODB.Connection")
set rs=server.CreateObject("ADODB.Recordset")
'Response.Write dbpath
'Response.End
Conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DbPath
if Tauthor<>"" then
sql="Select * From thesis "
if Tshowauthor="1" then
where="Where author1 ='"&Tauthor&"' "
end if
if cint(Tshowauthor)>=3 then
where="Where author1 ='"&Tauthor&"' or author2 = '"&Tauthor&"' or author_other like '%"&Tauthor&"%' "
end if
if Tshowauthor="2" or Tshowauthor="" then
where="Where author1 ='"&Tauthor&"' or author2 = '"&Tauthor&"' "
end if
order="Order By type,id desc"
sql=sql&where&order
'Response.Write sql
end if
if Tcatalog<>"" then
if Tshowsub="1" then
sql="select id from catalog where catalog_name='"&Tcatalog&"'"
set rs1=conn.Execute(sql)
if not rs1.eof then
id=clng(rs1(0))
else
id=-1
end if
rs1.close
sql="Select thesis.* From thesis,catalog,relation "
where="Where relation.thesis_id=thesis.id and relation.catalog_id=catalog.id "
where=where&"and (catalog.id="&id&" or catalog.father_id) "
order="Order By thesis.type,thesis.id desc"
else
sql="Select thesis.* From thesis,catalog,relation "
where="Where relation.thesis_id=thesis.id and relation.catalog_id=catalog.id "
where=where&"and catalog.catalog_name='"&Tcatalog&"' "
order="Order By thesis.type,thesis.id desc"
end if
sql=sql&where&order
'Response.Write sql
'Response.End
end if
'Response.Write sql
'Response.End
rs.Open sql,Conn,3
if rs.EOF then
Response.Write "此处没有相关文章!"
Response.end
end if
rs.PageSize=cint(PgSz)
all_page=rs.PageCount
total=rs.RecordCount
if pageNo<>"" then
rs.AbsolutePage =pageNo
RcoNo=1
else
rs.AbsolutePage =1
rs.movefirst
pageNo=1
end if %>
<table width="100%" border="0">
<tr align="center" bgcolor="#000066">
<td width="28%"><font color="#E4E7F1">题目</font></td>
<td width="5%" align="center"><font color="#E4E7F1"><%
if Tauthor<>"" then
Response.Write "第x作者"
else
Response.Write "作者"
end if
%></font></td>
<td width="27%"><font color="#E4E7F1">发表刊物</font></td>
<td width="40%"><font color="#E4E7F1">主要内容介绍</font></td>
</tr>
<%
for iPage=1 to rs.Pagesize
RecNo=(pageNo-1)*PgSz+iPage
Tid=trim(rs("id"))
Tchi_title=trim(rs("chi_title"))
' Ten_title=trim(rs("en_title"))
Tauthor1=trim(rs("author1"))
Tauthor2=trim(rs("author2"))
Tauthor_other=trim(rs("author_other"))
Tintro=trim(rs("intro"))
Tchi_abstract=trim(rs("chi_abstract"))
Ten_abstract=trim(rs("en_abstract"))
Ttype=cint(rs("type"))
if Tintro="" then
Tintro=Tchi_abstract
end if
if Tintro="" then
Tintro=Ten_abstract
end if
' Ten_abstract=trim(rs("en_abstract"))
' Tchi_keywords=trim(rs("chi_keywords"))
' Ten_keywords=trim(rs("en_keywords"))
' Tloc_doc=trim(rs("loc_doc"))
' Tloc_pdf=trim(rs("loc_pdf"))
' Tpublish_time=trim(rs("publish_time"))
Tpublisher=trim(rs("publisher"))
' Thit_times=trim(rs("hit_times"))
' Tmemo=trim(rs("memo"))
%>
<tr bgcolor="<%if Ttype=0 then%>#CCCCF2<%else%>#B7DDBA<%end if%>">
<td><a href="detail.asp?id=<%=Tid%>" target="_blank"><%=Tchi_title%><%if Ttype=1 then%>(程序)<%end if%></a></td>
<td align="center"><%if Tauthor1=Tauthor then
Response.Write "1"
end if
if instr(Tauthor_other,Tauthor)>0 then
Response.Write "3,4"
end if
if Tauthor2=Tauthor and Tauthor<>"" then
Response.Write "2"
end if
if Tauthor="" then
Response.Write Tauthor1
end if
%></td>
<td><%=Tpublisher%></td>
<td><%=Tintro%></td>
</tr>
<%rs.MoveNext
if RecNo=total or rs.eof then
exit for
end if
next%>
</table>
<div align=center>
<%
response.write "<div align='right'>共有 <font color='ff00f0'>"&rs.recordcount&"</font> 个纪录(文章或程序)</div>"
if pageNo<>"" then
response.write "第"&pageNo&"页/ 共"&all_page&"页"
else
response.write "第1页 / 共"&all_page&"页"
end if
rs.close%>
<%if pageNo>1 then%>
<a href="disp.asp?JumpPage=<%=pageNo-1%>&author=<%=tauthor%>&catalog=<%=Tcatalog%>&showsub=<%=Tshowsub%>" target=_self>上一页</a>
<%end if%>
<%if pageNo-all_page<0 or pageNo="" then%>
<a href="disp.asp?JumpPage=<%=pageNo+1%>&author=<%=tauthor%>&catalog=<%=Tcatalog%>&showsub=<%=Tshowsub%>" target=_self>下一页</a>
<%end if%>
</div>
<!--end-->
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -