📄 index_jsp.java
字号:
out.write(" <td width=\"206\" bgcolor=\"#FFFFFF\"> \r\n");
out.write(" <table width=\"193\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#CCCCCC\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"206\" bgcolor=\"#FFFFFF\"><table width=\"193\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"189\" bgcolor=\"eeeeee\" class=\"moduletitle\">会员登陆</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td bgcolor=\"#FFFFFF\">\r\n");
if ( !memberMgr.memberIsLogin(session) )
{
out.write("\r\n");
out.write("\t\t\t\t <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\r\n");
out.write(" <form name=\"login_form\" onsubmit=\"return checkLogin(this)\" method=\"post\" action=\"");
out.print(ConfigBean.getStringValue("systenFolder"));
out.write("appController/memberLogin\">\r\n");
out.write(" <input type=\"hidden\" name=\"backurl\" value=\"");
out.print(StringUtil.getString(request,"backurl"));
out.write("\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"30%\" align=\"right\" valign=\"middle\">帐 号</td>\r\n");
out.write(" <td width=\"70%\"><input name=\"account\" type=\"text\" id=\"account3\" size=\"9\" style=\"width:100px\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td align=\"right\" valign=\"middle\">密 码 </td>\r\n");
out.write(" <td><input name=\"pwd\" type=\"password\" id=\"pwd5\" style=\"width:100px\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td align=\"right\" valign=\"middle\">验证码 </td>\r\n");
out.write(" <td><input name=\"licence\" type=\"text\" id=\"licence4\" size=\"9\" style=\"width:50px\"> \r\n");
out.write(" <img src=\"");
out.print(ConfigBean.getStringValue("systenFolder"));
out.write("loginLicence\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td colspan=\"2\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"62%\" align=\"center\"><a href=\"member/register.jsp\"><font color=\"#FF0000\">注册会员</font></a> \r\n");
out.write(" <a href=\"member/forget_pwd.jsp\"><font color=\"#666666\">忘记密码</font></a>? \r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"38%\"><font color=\"#666666\">\r\n");
out.write(" <input type=\"submit\" name=\"Submit\" value=\"登 陆\">\r\n");
out.write(" </font></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </form>\r\n");
out.write(" </table>\r\n");
out.write(" ");
}
else
{
out.write("\r\n");
out.write(" <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">\r\n");
out.write("\t\t\t\t <form name=\"logout_form\" action=\"");
out.print(ConfigBean.getStringValue("systenFolder"));
out.write("appController/memberLogout\" method=\"post\">\r\n");
out.write(" <tr align=\"center\" valign=\"middle\"> \r\n");
out.write(" <td height=\"34\" colspan=\"2\"><em>您好</em>, \r\n");
out.write(" ");
out.print(memberMgr.getStringMemberInfoFromSession(session,"account"));
out.write("\r\n");
out.write(" !</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td><img src=\"imgs/item.gif\" width=\"11\" height=\"11\"><a href=\"member/member_center.jsp\" class=\"mlogin\"> \r\n");
out.write(" 会员中心</a></td>\r\n");
out.write(" <td><img src=\"imgs/item.gif\" width=\"11\" height=\"11\"><a href=\"javascript:memberLogout()\" class=\"mlogin\"> \r\n");
out.write(" 退出登录</a></td>\r\n");
out.write(" </tr>\r\n");
out.write("\t\t\t\t\t</form>\r\n");
out.write(" </table> \r\n");
out.write(" ");
}
out.write("\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" <br>\r\n");
out.write(" ");
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n");
out.write("<title>Turbo CWCShop</title>\r\n");
out.write("<link href=\"style.css\" rel=\"stylesheet\" type=\"text/css\">\r\n");
out.write("<style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write(".unnamed1 {\r\n");
out.write("\tcolor: #CCCCCC;\r\n");
out.write("}\r\n");
out.write("-->\r\n");
out.write("</style>\r\n");
out.write("</head>\r\n");
out.write("<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\r\n");
out.write("<table width=\"193\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#CCCCCC\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"206\" bgcolor=\"#FFFFFF\"><table width=\"193\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"189\" bgcolor=\"eeeeee\" class=\"moduletitle\">购物车</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td bgcolor=\"#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\r\n");
out.write(" ");
float total = 0;
DBRow cartPro[] = productMgr.getProductsFromCart(request);
for (int i=0; i<cartPro.length; i++)
{
total += (cartPro[i].get("quantity",0f)*cartPro[i].get("shop_price",0f));
out.write("\r\n");
out.write(" <tr> \r\n");
out.write(" <td> · <span title=\"");
out.print(cartPro[i].getString("name"));
out.write("\"> \r\n");
out.write(" ");
out.print(StringUtil.cutString(cartPro[i].getString("name"),15,"..."));
out.write("\r\n");
out.write(" x \r\n");
out.write(" ");
out.print(cartPro[i].getString("quantity"));
out.write("\r\n");
out.write(" </span> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
}
if (cartPro.length==0)
{
out.println("<tr><td colspan='2' align='center' valign='middle' style='padding-top:7px;padding-bottom:3px;color:#999999'>暂 没 商 品</td></tr>");
}
out.write("\r\n");
out.write(" <tr> \r\n");
out.write(" <td><hr width=\"100%\" size=\"1\" noshade class=\"unnamed1\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"60%\" align=\"right\"><font color=\"#666666\">合计 \r\n");
out.write(" ¥</font><font color=\"#FF0000\"> ");
out.print(StringUtil.formatNumber("#0.00",total));
out.write("\r\n");
out.write(" </font></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write("</table>\r\n");
out.write("</body>\r\n");
out.write("</html>");
out.write("\r\n");
out.write(" <br>\r\n");
out.write(" <table width=\"193\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#CCCCCC\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"206\" bgcolor=\"#FFFFFF\"><table width=\"193\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"189\" bgcolor=\"eeeeee\" class=\"moduletitle\">热卖商品</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td bgcolor=\"#FFFFFF\" class=\"td-padding\"> \r\n");
out.write(" ");
PageCtrl hotProPc = new PageCtrl();
hotProPc.setPageNo(1);
hotProPc.setPageSize(10);
DBRow hotSell[] = productMgr.getHotSellProducts(hotProPc);
for (int i=0; i<hotSell.length; i++)
{
out.write("\r\n");
out.write(" <img src=\"imgs/item.gif\" width=\"11\" height=\"11\"> <a target=\"_blank\" href=\"product/detail-");
out.print(hotSell[i].getString("pid"));
out.write(".html\" class=\"catalog\">\r\n");
out.write(" ");
out.print(hotSell[i].getString("name"));
out.write("\r\n");
out.write(" </a><br><br>\r\n");
out.write(" ");
}
out.write("\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" <br>\r\n");
out.write(" <table width=\"193\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#CCCCCC\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"206\" bgcolor=\"#FFFFFF\"><table width=\"193\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"189\" bgcolor=\"eeeeee\" class=\"moduletitle\">商品分类</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td bgcolor=\"#FFFFFF\" class=\"td-padding\"> \r\n");
out.write(" ");
DBRow sonCatalog[];
DBRow catalog[] = catalogMgr.getCatalogByParentId(0l,null);
boolean importColor=false;
for (int i=0; i<catalog.length; i++)
{
out.write("\r\n");
out.write(" · <a class=\"catalog\" href=\"catalog/list-p-");
out.print(catalog[i].getString("parentid"));
out.write('-');
out.print(catalog[i].getString("id"));
out.write(".html\"> \r\n");
out.write(" <font color=\"#003399\"> \r\n");
out.write(" ");
out.print(catalog[i].getString("title"));
out.write("\r\n");
out.write(" </font> </a><br> \r\n");
out.write(" ");
sonCatalog = catalogMgr.getCatalogByParentId(catalog[i].get("id",0),null);
for (int j=0; j<sonCatalog.length; j++)
{
if (sonCatalog[j].get("imp_color",0)==1)
{
importColor = true;
}
else
{
importColor = false;
}
out.println("<a class='catalog' href='catalog/list-s-"+sonCatalog[j].getString("parentid")+"-"+sonCatalog[j].getString("id")+".html'>"+StringUtil.withColor(sonCatalog[j].getString("title"),"red",importColor)+"</a> | ");
}
out.write("\r\n");
out.write(" <br> <br> \r\n");
out.write(" ");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -