⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ambook.asp

📁 一个简单的图书馆代码
💻 ASP
字号:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<!--对用户登录身份进行判断,非法用户返回登录页面-->
<%if not session("user_session_id")=Session.SessionID then%>
    <SCRIPT LANGUAGE=javascript>
    parent.window.location.href="../default.asp"
</SCRIPT>
<%end if%>
<HEAD>
<TITLE>图书馆管理系统</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="../css/scss.css" type=text/css rel=stylesheet>
<title>图书馆管理系统</title>
</head>
<SCRIPT LANGUAGE=javascript>
<!--
function cli(book_id)
{
    open("mbook.asp?book_id="+book_id,"newwin","toolbar=no,width=400,height=500,status=no,location=no,resizable=1,scrollbars=1;menubar=no,left=80,top=25")
}
function clik(book_id)
{
    open("del_book.asp?book_id="+book_id,"newwin","toolbar=no,width=400,height=500,status=no,location=no,resizable=1,scrollbars=1;menubar=no,left=80,top=25")
}
//-->
</SCRIPT>
<body leftMargin=0 topMargin=0>
<!--#include file=../inc/top.asp-->
<br>
<table width="750" height="371" border="0" align="center" 
cellpadding="0" cellspacing="0">
    <tr> 
        <td valign=top width=160 height="390"> 
            <table border="1" cellpadding="0"  bordercolor="#111111"
            cellspacing="0" width="100" align="center">
                <tr align=center> 
                    <td height=30>
                    <a href="book.asp?if=add">书籍信息添加</a>
                    </td>
                </tr>		         
                <tr align=center> 
                    <td height=30>
                    <a href="ambook.asp?if=mod">书籍信息修改</a>
                    </td>
                </tr>
                <tr align=center> 
                    <td height=30>
                    <a href="ambook.asp?if=del">书籍信息删除</a>
                    </td>
                </tr>		        
            </table>     
            <p><br></p>
        </td>
        <td width="1" valign="top" bgcolor="#00CC00" height="390"> 
        </td>
        <td width="565" valign="top" height="390">    
<%
if Request.QueryString ("if")<>"add" then
'接收数据	
'查询图书信息
sql="select * from library_book "
sql=sql&" order by book_id"
set rs=session("cn").execute(sql)		
%>               
            <table cellpadding=0  align=right  
            bordercolor="#006666" width=538>
                <tr bgcolor=#cccccf> 
                    <th width="79">书籍编号</th>
                    <th width="120">书籍名称</th>
                    <th width=60>书籍作者</th>
                    <th width="90">出版社名</th>
                    <th width="80">图书类别</th>
                    <th width="110">图书位置</th>
                    <th width="40">是否返还</th>
                </tr>
<%
do while not rs.eof
'查找书籍的组
sql="select book_team from library_team where team_id="&rs("team_id")
set team=session("cn").execute(sql)
book_team=team(0)
set team=nothing
%>       
                <tr align=left bgcolor=#e4eaef> 
<%if rs("sf_return")="" or rs("sf_return")="N" then%>
    <%if Request.QueryString ("if")="mod" then%>
                    <td><a href="javascript:cli('<%=rs("book_id")%>')">
                    <%=rs("book_id")%></td>
    <%else%>
                    <td><a href="javascript:clik('<%=rs("book_id")%>')">
                    <%=rs("book_id")%></td>
    <%end if%>
<%else%> 
                    <td><%=rs("book_id")%></td>
<%end if%>
                    <td><%=rs("book_name")%></td>
                    <td><%=rs("book_author")%></td>
                    <td><%=rs("book_concern")%></td>
                    <td><%=book_team%></td>
                    <td><%=rs("stand")%>架<%=rs("floor")%>层</td>
                    <td>
                    <%if rs("sf_return")="" or rs("sf_return")="N" then%>
                    <%else%>
                    <%end if%>
                   </td>
               </tr>
<%
rs.movenext
loop
rs.close()
set rs=nothing
%>      
          </table>
<%end if%>
      </td>
   </tr>
</table> 
<hr width=700 color=green size=1>
</body>
</html>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -