📄 admin.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="Cls_vbsPage.asp"-->
<%
'-----------------------------------------------------------------------------------------------
'On Error Resume Next
DIM startime,endtime
'统计执行时间
startime=timer()
'连接数据库
'-----------------------------------------------------------------------------------------------
%>
<html>
<head>
<title>管理界面</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
table { font-size: 12px}
a { font-size: 12px; color: #000000; text-decoration: none}
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div align="center"><table width="760" border="0">
<tr>
<td><div align="center"><a href="usermanage.asp">用户管理</a></div></td>
<td><div align="center"><a href="admin.asp">稿件管理</a></div></td>
<td><div align="center"><a href="lygg.asp">录用公告</a></div></td>
</tr>
</table>
<br>
</div>
<table width="760" border="1" cellspacing="0" cellpadding="4" align="center" bordercolordark="#FFFFFF" bordercolorlight="#CCCCCC">
<tr align="center">
<td width="300"><a>文章题目</a></td>
<td>第一作者</td>
<td>联系人</td>
<td>投稿时间</td>
<td>状态</td>
<td>操作</td>
</tr>
<%
Dim ors
Set ors=new Cls_vbsPage '创建对象
Set ors.Conn=conn '得到数据库连接对象
With ors
.PageSize=13 '每页记录条数
.PageName="Pages" 'cookies名称
.DbType="AC"
'数据库类型,AC为access,MSSQL为sqlserver2000存储过程版,MYSQL为mysql,PGSQL为PostGreSql
.RecType=0
'记录总数(>0为另外取值再赋予或者固定值,0执行count设置存cookies,-1执行count不设置cookies)
.JsUrl="" 'Cls_jsPage.js的路径
.Pkey="ID" '主键
.Field="filename,title,authorname,username,date,id,user,zt"
.Table="file"
.Condition="authorname<>''" '条件,不需要where
.OrderBy="ID DESC" '排序,不需要order by,需要asc或者desc
End With
iRecCount=ors.RecCount()'记录总数
iRs=ors.ResultSet() '返回ResultSet
If iRecCount<1 Then%>
<tr bgcolor="">
<td width="300" >暂无记录</td>
</tr>
<%
Else
For i=0 To Ubound(iRs,2)%>
<tr bgcolor="#FFFFFF" align="center">
<td width="300" ><a href="showfile.asp?id=<%=iRs(5,i)%>"><%=iRs(1,i)%></a></td>
<td><a href="showauthor.asp?id=<%=iRs(5,i)%>"><%=iRs(2,i)%></a></td>
<td><a href="showuser.asp?username=<%=iRs(6,i)%>"><%=iRs(3,i)%></a></td>
<td><%=iRs(4,i)%></td>
<td>
<%
'状态判断
if iRs(7,i)=2 then
response.Write "未处理!"
elseif iRs(7,i)=3 then
response.Write "已下载!"
elseif iRs(7,i)=6 then
response.Write "已录用!"
elseif iRs(7,i)=5 then
response.Write "已退稿!"
elseif iRs(7,i)=4 then
response.Write "联系修改!"
elseif iRs(7,i)=7 then
response.Write "修改返回!"
end if
%>
</td>
<% if iRs(7,i)=2 or iRs(7,i)=7 then %>
<td><a href="download.asp?id=<%=iRs(5,i)%>">下载文件</a></td>
<%elseif iRs(7,i)=3 then %>
<td><a href="file_ly.asp?id=<%=iRs(5,i)%>">录用</a> <a href="file_tg.asp?id=<%=iRs(5,i)%>">退稿</a> <a href="file_yj.asp?id=<%=iRs(5,i)%>">修改意见</a>|<a href="download.asp?id=<%=iRs(5,i)%>">重复下载</a>
<%elseif iRs(7,i)=4 then %>
<td><a href="file_yj.asp?id=<%=iRs(5,i)%>">修改意见</a></td>
<%else%>
<td> </td>
</tr>
<%
end if
Next
End If
%>
</table>
<table width="760" border="0" cellspacing="2" cellpadding="2" align="center">
<tr>
<td>
<div align="center">
<%ors.ShowPage()%>
</div></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td align="center">
<%endtime=timer()%>
本页面执行时间:<%=FormatNumber((endtime-startime)*1000,3)%>毫秒</td>
</tr>
</table>
</body>
</html>
<%
iRs=NULL
ors=NULL
Set ors=NoThing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -