📄 admin_main.asp
字号:
<%
if session("admin_name")="" then
response.redirect "index.asp"
end if
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/copy.inc"-->
<!--#include file="inc/checkpro.asp"-->
<%
Dim Returned,RentTimeout,RentCount,RentBooked
Dim UserCount,AdminCount
Dim BookCount,BookunRent
'数据库路径
set rs=server.CreateObject("adodb.recordset")
sql="SELECT * FROM [book] WHERE Status=2"
rs.open sql,conn,1,3
RentBooked=rs.RecordCount
rs.Close
strSQL="SELECT *FROM [book] WHERE Status=1"
rs.Open strSQL,conn,1,3
Returned=rs.RecordCount
rs.Close
strSQL="SELECT ID FROM [user]"
rs.Open strSQL,conn,1,3
UserCount=rs.RecordCount
rs.Close
'管理员人数
strSQL="SELECT * FROM [manager]"
rs.Open strSQL,conn,1,3
AdminCount=rs.RecordCount
rs.Close
'图书总数
strSQL="SELECT * FROM [book]"
rs.Open strSQL,conn,1,3
BookCount=rs.RecordCount
rs.Close
'未租出的图书数
strSQL="SELECT * FROM [book] WHERE Status=0"
rs.Open strSQL,conn,1,3
BookunRent=rs.RecordCount
rs.Close
'释放资源,关闭数据库链接
Set rs=Nothing
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查看系统设置</title>
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style3 {
font-size: 14pt;
font-weight: bold;
color: #FFFFFF;
}
-->
</style>
</head>
<body>
<table width=97% height=25% border="1" align=center cellpadding=3 cellspacing=1 bordercolor="#99CCFF" class=tableborder1>
<tr><td height=25 colspan=2 align=center bgcolor="#9900FF"><span class="style3">系统信息</span></td>
</tr>
<tr><td class=TableBody2 colspan=2> </td>
</tr>
<tr>
<td class=TableBody2 colspan=2><b>借阅信息</b></td>
</tr>
<tr><td width=15% align=right class=TableBody2 >预订的的借阅:</td>
<td class=TableBody1 align=left>共有 <b><font color=red><%=RentBooked%></font></b> 本图书被预订</td>
</tr>
<tr><td width=15% align=right class=TableBody2 >进行的借阅:</td>
<td class=TableBody1 align=left>共有 <b><font color=red><%=Returned%></font></b> 本图书正在进行</td>
</tr>
<tr><td class=TableBody2 colspan=2><b>用户信息</b></td></tr>
<tr>
<td class=TableBody2 align=right width=15% >管理员人数:</td>
<td class=TableBody1 align=left>共有 <b><font color=red><%=AdminCount%></font></b> 个管理员</td>
<td width="1%"></td></tr>
<tr>
<td class=TableBody2 align=right width=15% >用户人数:</td>
<td class=TableBody1 align=left>共有 <b><font color=red><%=UserCount%></font></b> 个用户</td>
</tr>
<tr>
<td class=TableBody2 colspan=2><b>图书信息</b></td>
</tr>
<tr>
<td class=TableBody2 align=right width=15% >总图书数:</td>
<td class=TableBody1 align=left>共有 <b><font color=red><%=BookCount%></font></b> 部图书</td>
</tr>
<tr>
<td class=TableBody2 align=right width=15% >未借阅书数:</td>
<td class=TableBody1 align=left>共有 <b><font color=red><%=BookunRent%></font></b> 本图书未租</td>
</tr>
<tr><td class=TableBody2 colspan=2><b>系统信息</b></td></tr>
<tr><td class=TableBody2 align=right width=15% >系统使用者:</td><td class=TableBody1 align=left><b><font color=red>405工作室</font></b></td></tr>
<tr><td class=TableBody2 align=right width=15% >系统版权拥有者:</td>
<td class=TableBody1 align=left><b><font color=red>405工作室</font></b></td>
</tr>
<tr><td class=TableBody2 align=right width=15% >系统描述:</td>
<td class=TableBody1 align=left> <b><font color=red>图书馆管理系统</font></b> </td>
</tr>
<tr><td class=TableBody2 align=right width=15% >联系人:</td>
<td class=TableBody1 align=left> <b><font color=red>张洪华</font></b> </td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -