package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
public final class viewproduct_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
static {
_jspx_dependants = new java.util.Vector(2);
_jspx_dependants.add("/header.html");
_jspx_dependants.add("/bottom.jsp");
}
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("<html>\n");
out.write(" <head>\n");
out.write(" <meta content=\"text/html;charset=gb2312\" />\n");
out.write(" <title></title>\n");
out.write(" </head>\n");
out.write(" <body>\n");
out.write(" <center><b><font color=\"red\" size=\"+6\" face=\"\">Êé¼®ÐÇϵ</font></b></center>\n");
out.write(" </body>\n");
out.write("</html>\n");
out.write("\r\n");
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>\r\n");
out.write("²é¿´²úÆ·ÐÅÏ¢\r\n");
out.write("</title>\r\n");
String titleid=request.getParameter("prodid");
String title=null;
String type=null;
String price=null;
String publisher=null;
String pages=null;
out.write("\r\n");
out.write("</head>\r\n");
out.write("<body bgcolor=\"#ffffff\">\r\n");
out.write("<h3>\r\n");
out.write("²úÆ·ÐÅÏ¢\r\n");
out.write("</h3>\r\n");
out.write("»¶Ó<b>");
out.print(session.getAttribute("userid") );
out.write(",</b>²é¿´²úÆ·ÐÅÏ¢¡£<br />\r\n");
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("Jdbc:Odbc:dlc","sa","");
PreparedStatement s=con.prepareStatement("select * from Books_details where TitleId = ? ");
s.setString(1,titleid);
ResultSet rs=s.executeQuery();
while(rs.next())
{
title=rs.getString(2);
type=rs.getString(3);
price=rs.getString(4);
publisher=rs.getString(5);
pages=rs.getString(6);
}
}
catch(Exception e)
{
}
out.write("\r\n");
out.write("<form method=\"post\" action=\"orderproduct.jsp?titleid=");
out.print(titleid );
out.write("\">\r\n");
out.write(" <table>\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"150\"><b>±êÌâ Id£º</b></td><td>");
out.print(titleid );
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td><b>±êÌ⣺</b></td><td>");
out.print(title );
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td><b>ÖÖÀࣺ</b></td><td>");
out.print(type );
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td><b>¼Û¸ñ£º</b></td><td>");
out.print(price);
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td><b>³ö°æÉÌ£º</b></td><td>");
out.print(publisher );
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td><b>Ò³Êý£º</b></td><td>");
out.print(pages );
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td><b>ÊýÁ¿£º</b></td><td><input type=\"text\" name=\"quantity\" size=\"5\" maxlength=\"2\"/></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td><b></b></td><td><input type=\"submit\" value=\"¹ºÂò\"/></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write("<fieldset>\r\n");
out.write("<legend><b>Á´½Ó</b></legend>\r\n");
out.write("<b>µ¥»÷´ËÁ´½Ó²é¿´ <a href=\"/JspModule/controllerservlet?page=viewdetails\">¿Í»§ÐÅÏ¢</a><br/>\r\n");
out.write("<b>µ¥»÷´ËÁ´½Ó²é¿´<a href=\"/JspModule/controllerservlet?page=productdetails\">²úÆ·ÐÅÏ¢</a><br/>\r\n");
out.write("<b>µ¥»÷´ËÁ´½Ó²é¿´<a href=\"/JspModule/controllerservlet?page=orderdetails\">¶©µ¥ÐÅÏ¢</a><br />\r\n");
out.write("<b>Í˳öµÇ¼²¢×ªÖÁ<a href=\"index.html\">Ö÷Ò³</a><br />\r\n");
out.write("</fieldset>\r\n");
out.write("\r\n");
out.write("</form>\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}