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

📄 sel_card.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>
<style TYPE="text/css"> 
<!-- 
.in 
{
BORDER-RIGHT: rgb(127,127,127) 1px solid;
BORDER-TOP: rgb(127,127,127) 1px solid;
FONT-SIZE: 9pt; 
BORDER-LEFT: rgb(127,127,127) 1px solid; 
BORDER-BOTTOM: rgb(127,127,127) 1px solid;
BACKGROUND-COLOR: #ffffff
}
//--> 
</STYLE>
<SCRIPT LANGUAGE=javascript>
<!--
function cli(card_id)
{
open("mod_card.asp?card_id="+card_id,"newwin","toolbar=no,width=500,height=550,status=no,location=no,resizable=1,scrollbars=1;menubar=no,left=80,top=25")
}
function check()
{
if(document.form1.card_id.value=="" && document.form1.card_name.value=="")
{
alert("请填写会员的搜索信息!")
return false;
}
document.form1.submit()	
}
//-->
</SCRIPT>
<title>图书馆管理系统</title>
</head>
<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"> 
            <form name="form1" method="post" action="sel_card.asp">
            <br>&nbsp;&nbsp; 输入要查找的条件<p>
                <table border="0" cellpadding="0"  bordercolor="#111111" 
                cellspacing="0"  width="160" align="center">
                    <tr> 
                        <td width="65">卡片编号:</td>
                        <td width="86"> 
                            <input class=in type="text" name="card_id"
                             size="12" maxlength="20" >
                        </td>
                    </tr>
                    <tr>
                        <td width="65">名&nbsp;&nbsp;&nbsp;&nbsp;称:</td>
                        <td width="86"> 
                        <input class=in type="text" name="card_name" 
                        size="12" maxlength="20" >
                        </td>
                    </tr>           
                    <tr> 
                        <td align="center" colspan="2"  height=40> 
                        <input type="hidden"  name=hid value="ok">
                        <input type="button" name="Submit" 
                        value="查看" class=in 
                        onclick="javascript:check()">
                        </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.Form("hid")<>"" then
'查找符合条件的信息
    card_id=Request.Form("card_id")
    card_name=Request.Form("card_name")					
    sql="select * from card where"
    if card_id<>"" then
        sql=sql&" card_id='"&card_id&"'"
    end if
    if card_name<>"" and card_id<>"" then
        sql=sql&" and card_name='"&card_name&"'"
    end if
    if card_name<>"" and card_id="" then
        sql=sql&" card_name='"&card_name&"'"
    end if
        sql=sql&" order by card_name"
    set rs=session("cn").execute(sql)		
%>                   
          <table cellpadding=0  align=right  
          bordercolor="#006666" width=538>
          <tr bgcolor=#cccccf> 
              <th >会员编号</th>
              <th>会员名称</th>
              <th >身份证件号</th>
              <th >联系方式</th>         
          </tr>
<%
do while not rs.eof
'将所有的信息列出
%>       
          <tr align=left bgcolor=#e4eaef> 
              <td>
              <a href="javascript:cli('<%=rs("card_id")%>')">
              <%=rs("card_id")%></a>
              </td>
              <td><%=rs("card_name")%></td>
              <td><%=rs("status_id")%></td>
              <td><%=rs("phone")%></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 + -