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

📄 myorder_detail.jsp

📁 采用TOMCAT+SQL编程
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage=""%>
<jsp:useBean id="conndb" scope="page" class="beans.connDB"/>
<jsp:useBean id="chstr" scope="page" class="beans.chStr"/>
<HTML>
<HEAD>
<TITLE>Site Title</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">

<style type="../../web/text/css">
<!--
@import url("../../web/css_link.css");
@import url("../../web/text.css");
@import url("../../web/css_link.css");
-->
</style>

</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table width="100%" height="397" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="386" valign="top"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="189" height="397" valign="top" background="../../web/images/side_back.jpg"> 
            <table width="100%" height="398" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="398" valign="top" background="../../web/images/home_side.jpg">&nbsp; 
                </td>
              </tr>
            </table></td>
          <td valign="top" bgcolor="#FFFFFF"><table width="100%" height="397" border="0" cellpadding="2" cellspacing="2">
              <tr> 
                <td height="312" valign="top"> 
				<br>
				<br>
<%if(request.getParameter("ID")!=null){
  int ID=Integer.parseInt(request.getParameter("ID"));
  String bookid="";
  String bookname="";
  float price=0;
  int number=0;
  float total=0;
  float sum=0;
  ResultSet rs=conndb.executeQuery("select * from V_order where orderID='"+ID+"'");
  if(rs.next()){
%>
                  <table width="80%" border="0" cellspacing="1" cellpadding="1" align="center">
                    <tr valign="middle"> 
                      <td width="152"><div align="center"><strong><font size="2">书名</font></strong></div></td>
                      <td width="82"><div align="center"><strong><font size="2">定价</font></strong></div></td>
                      <td width="85"><div align="center"><strong><font size="2">数量</font></strong></div></td>
                      <td width="92"><div align="center"><strong><font size="2">小计</font></strong></div></td>
                    </tr>
<%do
    {bookname=chstr.chStr(rs.getString("bookname"));
     price=rs.getFloat("price");
	 number=rs.getInt("number");
	 total=price*number;
	 sum=sum+total;
%>
                    <tr bgcolor="E0E0E0" valign="middle"> 
                      <td bgcolor="E0E0E0"><div align="center"><font size="2"><%=bookname%></font></div></td>
                      <td bgcolor="E0E0E0"><div align="center"><font size="2"><%=price%></font></div></td>
                      <td bgcolor="E0E0E0"><div align="center"><font size="2"><%=number%></font></div></td>
                      <td bgcolor="E0E0E0"><div align="center"><font size="2"><%=total%></font></div></td>
                    </tr>
<%}while(rs.next());%>
                    <tr bgcolor="E0E0E0" valign="top"> 
                      <td bgcolor="E0E0E0">&nbsp;</td>
                      <td bgcolor="E0E0E0">&nbsp;</td>
                      <td valign="middle" bgcolor="E0E0E0">
<div align="right"><font size="2">合计:</font></div></td>
                      <td valign="middle" bgcolor="E0E0E0"><div align="left"><font size="2">¥ 
                          <%=sum%>元</font></div></td>
                    </tr>
                  </table>
                  <table width="100%" align="center">
                    <tr> 
                      <td width="100%"><div align="center"> 
                          <input name="submit5" type="button" id="submit5" value="返回" onClick="history.back(1);">
                          </div></td>
                    </tr>
                  </table>
<%}}else{response.sendRedirect("myorder.jsp");}%> 
                </td>
              </tr>
            </table>
            
          </td>
        </tr>
      </table></td>
  </tr>
</table>
<div align="center"></div>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="1%" height="19" valign="top" background="../../web/images/link_bar_hold.jpg"><img src="../../web/images/link_bar_hold.jpg" width="9" height="23"></td>
    <td width="99%" background="../../web/images/link_bar_hold.jpg"><div align="center">: 
        <a href="#">License Agreemen</a>t : <a href="#">Jobs</a> : <a href="#">Site 
        Map</a> :</div></td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000">
  <tr>
    <td height="34" bgcolor="#000000"><div align="center">
        <p class="smWhite">2003 Copyright Information or webmaster information</p>
      </div></td>
  </tr>
</table>
</BODY>
</HTML>

⌨️ 快捷键说明

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