📄 left_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import java.util.*;
import com.domain.AfficheForm;
import com.domain.MemberForm;
import com.domain.GoodsForm;
public final class left_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
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; charset=gb2312");
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("\r\n\r\n\r\n\r\n\r\n\r\n");
com.dao.AfficheDao affiche = null;
synchronized (_jspx_page_context) {
affiche = (com.dao.AfficheDao) _jspx_page_context.getAttribute("affiche", PageContext.PAGE_SCOPE);
if (affiche == null){
affiche = new com.dao.AfficheDao();
_jspx_page_context.setAttribute("affiche", affiche, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
com.dao.GoodsDao goods = null;
synchronized (_jspx_page_context) {
goods = (com.dao.GoodsDao) _jspx_page_context.getAttribute("goods", PageContext.PAGE_SCOPE);
if (goods == null){
goods = new com.dao.GoodsDao();
_jspx_page_context.setAttribute("goods", goods, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
java.util.Date date=new java.util.Date();
out.write('\r');
out.write('\n');
List afficheList=(List)affiche.selectAffiche();
out.write("\r\n<script language=\"javascript\">\r\nfunction checkEmpty(form){\r\nfor(i=0;i<form.length;i++){\r\nif(form.elements[i].value==\"\"){\r\nalert(\"表单信息不能为空\");\r\nreturn false;\r\n}\r\n}\r\n}\r\nfunction quit() {\r\n if(confirm(\"没有要买的东西了吗?\")){\r\n window.location.href=\"loginOut.jsp\";\r\n\t}\r\n }\r\n\r\n</script>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n\r\n<table width=\"93%\" height=\"847\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n <tr>\r\n <td height=\"118\">\r\n\t\t\t");
if(session.getAttribute("id")==null||session.getAttribute("form")==null){
out.write("\r\n\t\t\t<form name=\"form\" method=\"post\" action=\"memberAction.do?action=1\" onSubmit=\"return checkEmpty(form)\">\r\n\t\t\t <div align=\"center\">会员登录\r\n\t\t </div><br>\r\n\t\t\t <table width=\"95%\" height=\"122\" border=\"1\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" bordercolorlight=\"#FFFFFF\" bordercolordark=\"#819BBC\">\r\n <tr>\r\n <td width=\"32%\" height=\"33\"><div align=\"center\">用户名</div></td>\r\n <td width=\"68%\"> \r\n <input name=\"name\" type=\"text\" size=\"13\">\r\n </td>\r\n </tr>\r\n <tr>\r\n <td height=\"33\"><div align=\"center\">密 码</div></td>\r\n <td> \r\n <input name=\"password\" type=\"password\" size=\"13\">\r\n </td>\r\n </tr>\r\n <tr>\r\n <td height=\"33\" colspan=\"2\">\r\n <div align=\"center\">\r\n <input type=\"submit\" name=\"Submit2\" value=\"提交\">\r\n");
out.write(" \r\n <input type=\"reset\" name=\"Submit3\" value=\"重置\">\r\n </div></td>\r\n </tr>\r\n <tr>\r\n <td height=\"21\" colspan=\"2\"><div align=\"center\"><a href=\"member/memberRegister.jsp\">注册</a> <a href=\"member/findOne.jsp\">找回密码</a></div></td>\r\n </tr>\r\n </table>\r\n </form>\r\n\r\n\r\n\r\n\t\t\t");
}else{
out.write("\r\n ");
MemberForm form=(MemberForm)session.getAttribute("form");
out.write("\r\n\t\t\t<div align=\"center\">欢迎您回来\r\n\t\t </div><br>\r\n\t\t\t <table width=\"95%\" height=\"122\" border=\"1\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" bordercolorlight=\"#FFFFFF\" bordercolordark=\"#819BBC\">\r\n <tr>\r\n <td align=\"center\"> 今天是");
out.print(date.getYear()+1900);
out.write('年');
out.print(date.getMonth()+1);
out.write('月');
out.print(date.getDate());
out.write("日</td>\r\n </tr>\r\n\t\t\t\t <tr>\r\n <td width=\"100%\" align=\"center\"> 会员账号:");
out.print(form.getName());
out.write(" </td>\r\n\r\n </tr>\r\n <tr>\r\n <td align=\"center\">会员姓名:");
out.print(form.getReallyName());
out.write("</td>\r\n </tr>\r\n\t\t\t\t \r\n <tr>\r\n <td align=\"center\"> <a href=\"#\" onClick=\"quit()\">安全退出</a></td>\r\n </tr>\r\n </table>\r\n\r\n \t");
}
out.write("\r\n</td>\r\n </tr>\r\n <tr>\r\n <td height=\"142\" align=\"center\" valign=\"top\">\t\t\t<div align=\"center\">商场公告\r\n </div>\r\n <br> <table width=\"95%\" height=\"114\" border=\"1\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" bordercolorlight=\"#FFFFFF\" bordercolordark=\"#819BBC\" >\r\n <tr>\r\n <td height=\"114\" valign=\"top\">\r\n \r\n\t\t\t\t\t<MARQUEE direction=\"up\" height=\"114\" onmouseout=\"this.start()\" \r\n onmouseover=\"this.stop()\" scrollAmount=\"1\" scrollDelay=\"1\">\t \r\n\t\t ");
for(int i=0;i<afficheList.size();i++){
AfficheForm afficheForm=(AfficheForm)afficheList.get(i);
out.write("\r\n\t\t\t\t\t\t<div align=\"center\"><a href=\"#\" onClick=\"window.open('afficheSelect.jsp?id=");
out.print(afficheForm.getId());
out.write("','','width=500,height=400');\">");
out.print(afficheForm.getName());
out.write("</a></div><br><br>\r\n\t\t\t\t\t\t");
}
out.write("\r\n </marquee> </td>\r\n </tr>\r\n </table></td>\r\n </tr>\r\n <tr>\r\n <td height=\"236\" valign=\"middle\">\r\n\r\n\t\t\t<div align=\"center\">商品销售排行\r\n </div> <br>\r\n\r\n <table width=\"95%\" height=\"153\" border=\"1\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" bordercolorlight=\"#FFFFFF\" bordercolordark=\"#819BBC\">\r\n ");
List goodsList =goods.selectGoodsNumber();
int number=goodsList.size();
if(number>6){
number=5;
}
for(int account=0;account<number;account++){
GoodsForm form=(GoodsForm)goodsList.get(account);
out.write("\r\n <tr align=\"center\">\r\n ");
if(form.getNumber().equals(new Integer(0))){
out.write("\r\n <td colspan=\"2\">没有商品排名</td>\r\n ");
}else{
out.write("\r\n <td width=\"34%\">第");
out.print(account+1);
out.write("名</td>\r\n <td width=\"66%\">\r\n\r\n <a href=\"sell_result.jsp?id=");
out.print(form.getId());
out.write("&account=");
out.print(account+1);
out.write('"');
out.write('>');
out.print(form.getName());
out.write("</a>\r\n\r\n\r\n </td>");
}
out.write("\r\n </tr>\r\n ");
}
out.write("\r\n </table>\r\n\r\n\t\t\t</td>\r\n </tr>\r\n </table>\r\n\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);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -