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

📄 bwsd.jsp.bak

📁 一个完整JSP连接数据库的程序.包括连接
💻 BAK
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*,java.lang.*,java.sql.*" %>
<html>
<title>小小的太阳</title>
<body style="color: #0000000">
<div align="center">
  <table border="3" borderColor="#ffffff" borderColorDark="#ffffff" borderColorLight="#ffffff" cellSpacing="0" height="1008" style="BORDER-BOTTOM-COLOR: #ffffff; BORDER-BOTTOM-STYLE: solid; BORDER-LEFT-COLOR: #ffffff; BORDER-LEFT-STYLE: solid; BORDER-RIGHT-COLOR: #ffffff; BORDER-RIGHT-STYLE: solid; BORDER-TOP-COLOR: #ffffff; BORDER-TOP-STYLE: solid" width="892">
    <tbody>
      <tr>
        <td align="middle" bgColor="#ccccff" height="1" width="80%" colspan="2">
        <%@ include file="head.html" %>
        </td>
      </tr>
      <tr>
        <td align="center" bgcolor="#fccccc" height="1" width="80%" colspan="2">
          <jsp:include page="head.jsp" />
          </jsp:include>
        </td>
      </tr>
      <tr>
        <td align="middle" bgColor="#ccffff" height="557" width="884" colspan="2">
        <br>
          <% 
            String Param = request.getParameter("Param");
            if (Param != null)
            {
            if (Param.equals("ReBack"))
            {
              out.println("<p align=\"center\" ><font color=\"#FF6600\" size=6>请注意!!!!!!</font></P>");
              out.println("<p align=\"center\" ><font color=\"#aaaaa\" size=4>您买入入数量超过了库存数量</font></P>");
            }
            else if(Param.equals("Empty"))
            {
              out.println("<div align=\"center\" ><p><font color=\"#FF6600\" size=6>您还没有买入任何东西!</font></p><font \"#123456\" size=4>买入数量不能超过库存数量</font></P> ");            
            }
            }
            else
            {
              out.println("<p align=\"center\" ><font color=\"#123456\" size=4>买入数量不能超过库存数量</font></P> ");          
            }
          %>
        <table border="1" width="90%" height="1" bordercolorlight="#f308080" style="border-style: solid" bordercolordark="#f308080" bordercolor="#f308080" cellspacing="1" cellpadding="0" > 
            <tr>
              <td align="left" height="1" width="10%"><b><font color="#FFCC00">书名代号</font></b></td>
              <td align="left" height="1" width="20%"><b><font color="#FFCC00">书    名</font></b></td>
              <td align="left" height="1" width="12%"><b><font color="#FFCC00">作    者</font></b></td>
              <td align="left" height="1" width="20%"><b><font color="#FFCC00">出版社</font></b></td>
              <td align="left" height="1" width="12%"><b><font color="#FFCC00">出版时间</font></b></td>
              <td align="left" height="1" width="7%"><b><font color="#FFCC00">价 格(元)</font></b></td>
              <td align="left" height="1" width="7%"><b><font color="#FFCC00">数    量</font></b></td>
              <td align="left" height="1" width="12%"><b><font color="#FFCC00">买入数量</font></b></td>
              
            </tr>
        <jsp:useBean id="DbLink" scope="page" class="MyBook.DbLink" />
        <%
          String YHM = request.getParameter("YHM");
          String GLCS = request.getParameter("GLCS");
        %>
        <form method="post" action="MROK.jsp?YHM=<%= YHM %> &GLCS=<%= GLCS %>">
        <%
            DbLink.DbLink("sa","123456","MyDataBase");
            ResultSet rs = DbLink.DbQuery("select SM,ZBDH,ZZ,JG,SL,CBS,CBSJ,BZ from Book"); 
            while(rs.next())
            {
              String SM =rs.getString("SM");
              String ZBDH = rs.getString("ZBDH");
              String ZZ =rs.getString("ZZ");
              float JG = rs.getFloat("JG");
              int SL = rs.getInt("SL");              
              String CBS =rs.getString("CBS");
              String CBSJ = rs.getString("CBSJ").substring(0,10);
              String BZ = rs.getString("BZ");
              out.println("<tr><font color=#000000 size=3><td align=\"left\" height=\"1\" width=\"10%\">"
                             + ZBDH 
                             +"</td><td align=\"left\" height=\"1\" width=\"20%\">"
                             + SM 
                             +"</td><td align=\"left\" height=\"1\" width=\"12%\">"
                             +ZZ
                             +"</td><td align=\"left\" height=\"1\" width=\"20%\">"
                             +CBS
                             +"</td><td align=\"left\" height=\"1\" width=\"12%\">"
                             +CBSJ+
                             "</td><td align=\"left\" height=\"1\" width=\"7%\">"
                             + JG 
                             +"</td><td align=\"left\" height=\"1\" width=\"7%\">"
                             + SL
                             +"</td><td align=\"center\" height=\"1\" width=\"12%\">"
                             +"  </td></font></tr>"
                             +"<tr><font color=#000000 size=3><td align=\"left\" height=\"1\" width=\"10%\">"
                             +"详细信息"
                             +"</td><td align=\"left\" height=\"1\" colspan=\"6\"><font color=\"#FF6600\">"
                             +BZ
                             +"</font></td><td align=\"center\"  rolspan=\"2\" width=\"12%\">"
                             +"<input type=\"text\" size=\"8\" value=\"0\" name=\""
                             +ZBDH
                             +"\"></td></font></tr>");
            }
            rs.close(); 
        %>     
        <tr>
          <td height="1" colspan="8" align="center">
           <input type="submit" value="确定买如">&nbsp;&nbsp;
           <input type="reset" value="重新选择">
          </td>
        </tr>
        </form>
        </table>
        </td>
      </tr>
      <tr>
        <td align="middle" bgColor="#ccccff" height="1" width="80%" colspan="2">
       <%@ include file = "botton.html" %>
        </td>
      </tr>
    </tbody>
  </table>
</div>
</body>
</html>

⌨️ 快捷键说明

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