📄 book.asp
字号:
<!--#include file="inc/conn.asp"-->
<%
dim i
set rs=server.CreateObject("adodb.recordset")
%>
<html>
<head>
<style type="text/css">
<!--
body {
font-size:10pt;
}
td {font-size:9pt}
table{font-size:9pt}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<!--#include file="head.asp"-->
<table width="980" border="0" cellpadding="0" cellspacing="0" align="center">
<!--DWLayoutTable-->
<tr>
<td height="14" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="990" height="14"> </td>
</tr>
</table></td>
</tr>
<tr>
<td width="228" rowspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="137" height="206"><!--#include file="left1.htm"--></td>
</tr>
</table></td>
<td width="752" height="65" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="762" height="27">
<table width="100%">
<tr>
<td width="14%" bgcolor="#F9AE86">书名</td>
<td width="13%" bgcolor="#F9AE86">图书编号</td>
<td width="8%" bgcolor="#F9AE86">作者</td>
<td width="16%" bgcolor="#F9AE86">出版社</td>
<td width="13%" bgcolor="#F9AE86"> 添加日期</td>
<td width="11%" bgcolor="#F9AE86">图书类别</td>
<td width="13%" bgcolor="#F9AE86">是否借出</td>
<td width="12%" bgcolor="#F9AE86">删除</td>
</tr>
<%
rs.open "select top 8 bookid,brief,author,name,pdate,class,iflend,press from book order by pdate desc",conn,1,1
if rs.eof and rs.bof then
response.write "对不起,暂时还没有图书!"
end if
i=0
do while not rs.eof
%>
<tr>
<td bgcolor="#E8E8E8"><%=rs("name")%></td>
<td bgcolor="#E8E8E8"><%=rs("bookid")%></td>
<td bgcolor="#E8E8E8"><%=rs("author")%></td>
<td bgcolor="#E8E8E8"><%=rs("press")%></td>
<td bgcolor="#E8E8E8"><%=rs("pdate")%></td>
<td bgcolor="#E8E8E8"><%=rs("class")%></td>
<td bgcolor="#E8E8E8" align="center">
<%
if rs("iflend")=0 then
%>
<font color="red">未借</font>
<%
end if
if rs("iflend")=1 then
Response.Write "已借"
end if
%>
</td>
<td bgcolor="#E8E8E8"><font color="#663333">
<%
if rs("iflend")=0 then
%>
<a href="delete.asp?bookid=<%=rs("bookid")%>"><font color="#663333">删除</font></a>
<%
end if
%>
</font></td>
</tr>
<%
i=i+1
if i>=12 then exit do
if not rs.eof then rs.movenext
loop
Response.Write("图书馆中共有" & rs.recordcount & "本书。")
rs.close
%>
</table>
<table width="100%">
<tr>
<td><hr></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="183"> </td>
</tr>
</table>
<!--#include file="foot.htm"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -