spjj.jsp
上传用户:xjrzjk
上传日期:2022-07-31
资源大小:1585k
文件大小:6k
- <%@ page contentType="text/html; charset=GBK" %>
- <%@ page import="java.sql.*"%>
- <%
- try{
- //数据库连接
- Class.forName("oracle.jdbc.driver.OracleDriver");
- String strUrl = "jdbc:oracle:thin:@slight:1521:LOCAL";
- String strUser = "eshop";
- String strPassword = "eshop";
- Connection con = DriverManager.getConnection(strUrl, strUser, strPassword);
- Statement st = con.createStatement();
- //得到商品号
- long longNum = Long.parseLong(request.getParameter("ProductNO"));
- //更改商品点击次数
- String sql = "update Product set look_count = look_count+1 where product_no ="
- + longNum;
- System.out.println(sql);
- st.executeUpdate(sql);
- sql = "select * from Product where product_no =" + longNum;
- ResultSet rs = st.executeQuery(sql);
- if (rs.next()){
- %>
- <html>
- <head>
- <title>
- 商品简介
- </title>
- <script>
- function openbag(id) { window.open("eshop.asp?cpbm="+id,"","height=400,width=630,left=200,top=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");}
- </script>
- <link rel="stylesheet" type="text/css" href="style.css">
- </head>
- <body leftmargin="0">
- <div align="center">
- <center>
- <table width="580" border="0" cellSpacing="1" bgcolor="#336699">
- <tbody>
- <tr align="left" bgColor="#eeeeee">
- <td class="bighead" bgColor="#336699" colSpan="5" height="24"> <font class="105v" color="#ffffff">商品信息</font></td>
- </tr>
- <tr bgColor="#eeeeee">
- <td colSpan="5" bgcolor="#336699">
- <table border="0" cellpadding="10" cellspacing="0" width="100%" height="92" bgcolor="#FFFFFF">
- <tr>
- <td width="100%" height="22" valign="middle"> <a href="index.jsp">首页</a>
- >><a href="splb.jsp?spdl=<%=rs.getString("Class_1")%>&spxl=<%=rs.getString("Class_2")%>"><%=rs.getString("Class_1")%> - <%=rs.getString("Class_2")%></a>>>
- <%=rs.getString("Product_Name")%>
- <hr size="1" color="#336699">
- </td>
- </tr>
- <tr>
- <td width="100%" height="70">
- <div align="center">
- <table border="0" cellpadding="2" cellspacing="0" width="100%" height="44">
- <tr>
- <td width="44%" height="22" align="center"><b> </b></td>
- <td width="56%" height="22" align="center"></td>
- </tr>
- <tr>
- <td width="44%" height="22" align="center"><img border="0" src="<%=rs.getString("P_Full_Pic")%>"></td>
- <td width="56%" height="33" align="center" rowspan="2">
- <p align="left" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><b>[商品名称]</b>:<%=rs.getString("Product_Name")%><p align="left" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"> <p align="left" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><b>[市场价格]</b>:<strike><%=rs.getDouble("P_OldPrice")%>元</strike>
- <p align="left" style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
- <p align="left" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><b>[会员价格]</b><font color="#FF0000">:<%=rs.getDouble("P_NewPrice")%>元
- 立即节省:<%=rs.getDouble("P_OldPrice")-rs.getDouble("P_NewPrice")%>元</font>
- <p align="left" style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
- <p align="left" style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
- <b>[商品简介]</b>:<%=rs.getString("Product_Intro")%></p>
- <p align="left" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"> </p>
- <p align="left" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><b>[商品说明]</b>:<%=rs.getString("Product_Show")%></p>
- <p align="left" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"> </p>
- <p align="left" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><b>[支付方式]</b>:<a href="http://">请看详细说明!</a>
- </td>
- </tr>
- <tr>
- <td width="44%" height="58" align="center" valign="top"><br>
- [本图例仅供参考]
- <p>浏览次数:<%=rs.getLong("Look_Count")%>
- <p><a href="javascript:openbag(<%=rs.getString("Product_Id")%>)"><img border="0" src="images/mybuy.gif"></a>
- </td>
- </tr>
- <tr>
- <td width="100%" height="58" align="center" valign="top" colspan="2">
- <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
- <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
- <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">如果你是第一次购物请看《购物指导》
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </center>
- </div>
- <div align="center">
- <center>
- <table border="0" cellpadding="0" cellspacing="0" width="550" height="80">
- <tr>
- <td width="100%" height="62" valign="top"></td>
- </tr>
- </table>
- </center>
- </div>
- </body>
- </html>
- <%
- }
- }catch(Exception e){
- //错误处理
- throw (e);
- }
- %>