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

📄 bookright.asp

📁 在线图书销售系统
💻 ASP
字号:
<%@ language=vbscript %>
<% option explicit

 session("salecomplete") = false
   dim connstr,conn,rs,sql,mode,itemno 
   connstr="dbq="+server.MapPath("mdb/bookshop.mdb")+";defaultdir=;driver={microsoft access driver (*.mdb)};" 
   set conn=server.CreateObject("adodb.connection") 
   conn.Open connstr 
   set rs=server.CreateObject("adodb.recordset") 
   sql="select * from book" 
   rs.open sql,conn,1,1 %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>书籍一览</title>
<script>
  function openwin(id) { window.open("shopcart.asp?mode=add&itemno="+id,"","height=250,width=450,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=yes,location=no");} 
</script>
</head>

<body>
 <table border="0" width="100%">
  <tr>
    <td width="30%" valign="top">
      <table border="0" width="87%" height="156">
        <tr>
          <td width="100%" height="106">
            <form method="post" action="usercheck.asp">
              <table border="1" width="100%" bordercolor="#000000" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="100%" bgcolor="#000080"><font color="#ffffff">用户登录</font></td>
                </tr>
                <tr>
                  <td width="100%" bgcolor="#ffffcc">昵称<input name="user1" size="14" >
                    <p>密码<input type="password" name="user2" size="14"></p>
                    <input type="submit" value="提交" name="B1"></td>
                </tr>
              </table>
            </form>
          </td>
        </tr>
        <tr>
          <td width="100%" height="16">
            <form method="post" action="newusercheck.asp">
              <table border="1" width="100%" bordercolor="#000000" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="100%" bgcolor="#000080"><font color="#ffffff">新用户注册</font></td>
                </tr>
                <tr>
                  <td width="100%" bgcolor="#ffffcc">昵称<input name="newusername" size="15" >
                    <p><input type="submit" value="提交" name="B1"></p>
                  </td>
                </tr>
              </table>
            </form>
          </td>
        </tr>
        <tr>
          <td width="100%" height="16">
            <table border="1" width="100%" bordercolor="#000000" cellspacing="0" cellpadding="0">
              <tr>
                <td width="100%" bgcolor="#000080"><font color="#ffffff">图书分类查询</font></td>
              </tr>
              <tr>
                <td width="100%" bgcolor="#ffffcc">
                  <form method="post" action="search.asp">
                    
                    <p>分类<select size="1" name="class2">
                      <option selected>教育类</option>
                      <option>烹饪类</option>
                      <option>企业类</option>
                      <option>法律类</option>
                      <option>其他</option>
                    </select><br>
                    <input type="submit" value="提交" name="B1"></p>
                  </form>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td width="100%" height="16">
            <table border="1" width="100%" bordercolor="#000000" cellspacing="0" cellpadding="0">
              <tr>
                <td width="100%" bgcolor="#000080"><font color="#ffffff">管理员登录</font></td>
              </tr>
              <tr>
                <td width="100%" bgcolor="#ffffcc">
                  <form method="post" action="check.asp">
                    <p>身份<input name="T1" size="14"><br>
                    密码<input type="password" name="T2" size="14"><br>
                    <input type="submit" value="提交" name="B1">
					<input type="reset" value="全部重写" name="B2"></p>
                  </form>
                </td>
              </tr>
            </table>
             </td>
        </tr>
      </table>
    </td>
    <td width="70%" valign="top">
    <table border="1" width="520" bordercolor="#008000">
              <tr>
                <td width="426" bgcolor="#008080" style="BACKGROUND-COLOR: #6699cc"><font color="white" style="BACKGROUND-COLOR: #6699cc">书籍一览</font></td>
                <td width="78"></td>
              </tr>
              <% do while not (rs.EOF or err)%>
              <tr>
                <td width="426">
                <% if rs("photo")<>"" then response.write "<img border='0' src='" & rs("photo") & "' align='left'>"%><br>
                书名:<%=rs(1)%><br>
				作者:<%=rs("author")%><br>
				单价:<%=rs(3)%><br>
				简介:<%=rs("memo")%>
				</td>
                <td width="78">
                <% Response.Write "<a href='javascript:openwin("+cstr(rs(0))+")'>购买</a>"%>
                </td>
              </tr>
              <% rs.MoveNext 
                 loop %>
              <tr>
                <td width="510" colSpan="2"> </td>
              </tr>
            </table>

    </td>
  </tr>
 </table>
  
</body>

</html>
<% rs.Close
   set rs=nothing
   conn.Close 
   set conn=nothing%>

⌨️ 快捷键说明

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