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

📄 searchbook.jsp

📁 基于jsp的图书管理系统的功能和实现
💻 JSP
字号:
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="java.sql.*"%>
<%@ page import="data.LoginData"%>
<html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<%
 Connection conn=null;
 Statement stmt=null;
 ResultSet rs=null;
 String strSql="";
 String path="";
 int n=3;
 LoginData loginData = new LoginData(); 
 conn = loginData.getConn();
 String str =request.getParameter("id");
 if(str==null)str="1";
 try{
 stmt=conn.createStatement();
 strSql= "select * FROM STOREBOOK where BOOKID="+str;
 rs = stmt.executeQuery(strSql);
 if(rs.next()){
  
 }
 else{
  }
 }catch(SQLException e){
  System.out.println(e.getMessage());
 }
 
%>
<%
 if(request.getParameter("id")!=null){
   
 }
%>
<table width="92%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#999999">
  <tr> 
    <td width="22%" height="46"> <div align="center"><font color="#993333" size="+2">2-07-2006</font></div></td>
    <td width="78%" height="46"><font color="#000000"> <img src="img/003.gif" width="16" height="19"> 
      </font><font size="2"><a href="secusse.jsp" title="VIP">VIP</a></font> <img src="img/004.gif" width="15" height="18"> 
      <a href="secusse.jsp" title="购物指南"><font size="2">购物指南</font></a> <img src="img/005.gif" width="15" height="15"> 
      <a href="secusse.jsp" title="付款方式"><font size="2">付款方式</font></a> <img src="img/003.gif" width="16" height="19"> 
      <font size="2"><a href="secusse.jsp" title="我的帐户">我的帐户</a> <img src="img/001.gif" width="23" height="17"> 
      <a href="secusse.jsp" title="购物车">购物车</a> <img src="img/002.gif" width="20" height="15"> 
      <a href="secusse.jsp" title="忘记密码">忘记密码</a> <img src="img/006.gif" width="15" height="18"> 
      <a href="secusse.jsp" title="在线答疑">在线答疑</a> <img src="img/008.gif" width="15" height="15"> 
      <a href="secusse.jsp" title="求购登记">求购登记</a></font></td>
  </tr>
  <tr> 
    <td height="675"> 
      <table width="92%" height="501" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
        <tr> 
          <td height="200" bordercolor="#993333" bgcolor="#FFFFFF"><form action="search" method="post" name="SearchForm" id="SearchForm">
              <table width="100%" height="181" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#6633CC">
                <tr> 
                  <td height="47" bordercolor="#FFFFFF" bgcolor="#6633CC"><font color="#CCCCCC">书目搜索&gt;&gt;</font></td>
                </tr>
                <tr> 
                  <td height="54" bgcolor="#FFCC00"><select name="SelectKid" size="1">
                      <option value="书目" selected>书目</option>
                      <option value="编号">编号</option>
                      <option value="作者">作者</option>
                    </select> </td>
                </tr>
                <tr> 
                  <td height="73" bgcolor="#FFCC00"> <input name="InfoKid" type="text" size="13"> 
                    <input type="submit" name="serach" value="GO"> <br> </td>
                </tr>
              </table>
              </form></td>
        </tr>
        <tr> 
          <td height="16" bordercolor="#990099">&nbsp;</td>
        </tr>
        <tr> 
          <td height="282" bordercolor="#FFFFFF"> 
            <table width="100%" height="221" border="0" bordercolor="#FFFFFF">
              <tr> 
                <td height="197" bgcolor="#FFFFFF"><table width="96%" height="189" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
                    <tr> 
                      <td height="37" bordercolor="#FFFFFF"> <div align="left"><a href="ShowBook.jsp?id=1" title="1"> 
                          小说</a></div></td>
                    </tr>
                    <tr> 
                      <td height="37" bordercolor="#FFFFFF"> <div align="left"><a href="ShowBook.jsp?id=2" title="2"> 
                          散文</a></div></td>
                    </tr>
                    <tr> 
                      <td height="31" bordercolor="#FFFFFF"> <div align="left"><a href="ShowBook.jsp?id=3" title="3"> 
                          科学</a></div></td>
                    </tr>
                    <tr> 
                      <td height="37" bordercolor="#FFFFFF"><a href="ShowBook.jsp?id=4" title="4">杂志</a></td>
                    </tr>
                    <tr> 
                      <td height="16" bordercolor="#FFFFFF" ><a href="ShowBook.jsp?id=6" title="5">计算机</a></td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td height="18">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table>
      <p>&nbsp;</p>
      <p>&nbsp; </p>
      <p>&nbsp;</p></td>
    <td> <div align="left"> 
        <table width="90%" border="0">
          <tr> 
            <td height="164"> <table width="84%" height="149" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#9933CC">
                <tr> 
                  <td width="32%" height="147"> 
                    <div align="center"><font color="#CCCCCC"> 
                      <%
                    path=rs.getString("IMAGE"); 
				    
                  %>
                      </font></div></td>
                  <td width="68%"> <div align="left"><font size="4" color="#000000"> 
                      <%
                
                   out.print("数名: ");
                   out.print(rs.getString("NAME"));
                   out.print("<br>");
                   out.print("作者: ");
                   out.print(rs.getString("AUTHOR"));
                   out.print("<br>");
                   out.print("价格: ");
                   out.print(rs.getString("PRICE")+"元");
                   out.print("<br>");
                   out.print("会员/VIP价格: ");
                   out.print(rs.getString("SALEPRICE")+"元");
                
                   %>
                      </font> </div></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td height="363"> 
              <div align="left"><font color="#000000"> </font> 
                <table width="99%" border="0" align="center">
                  <tr>
                    <td height="205"><font color="#000000"> 
                      <%
                      out.print(rs.getString("DESCRIPT"));
             %>
                    </font></td>
                  </tr>
                  <tr> 
                    <td height="35"> <div align="center">
                    <a href="jiushi1.jsp" title="继续购物">继续购物</a> 
                        <a href="ShowCat.jsp?id=" title="查看购物车"> 查看购物车</a> 
                        <a href=cart_add.jsp?ID=<%=rs.getInt("BOOKID")%> title="购买">购买</a></div>
                    </td>
                  </tr>
                </table>
                <font color="#000000"> </font></div></td>
          </tr>
        </table>
      </div></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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