📄 billadddepitem_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import java.util.*;
public final class billAddDepItem_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=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", 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");
out.write("\r\n");
if(session.getAttribute("username")==null){
response.sendRedirect("Welcome.htm");}else
out.write("\r\n");
out.write("<Script Langeage=\"JavaScript\" src=\"shopscript.js\">\r\n");
out.write("</Script>\r\n");
out.write("<HTML><HEAD><TITLE>bill add</TITLE>\r\n");
out.write("<META http-equiv=Content-Type content=\"text/html; charset=GBK\">\r\n");
out.write("<style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write("font {\r\n");
out.write("\tfont-style: normal;\r\n");
out.write("\tfont-weight: bold;\r\n");
out.write("}\r\n");
out.write(".STYLE13 {font-size: 10px}\r\n");
out.write(".STYLE15 {font-size: 12}\r\n");
out.write(".STYLE17 {font-size: 14px; font-weight: bold; }\r\n");
out.write(".STYLE20 {font-size: 14px; font-weight: bold; color: #FF66CC; }\r\n");
out.write(".STYLE21 {color: #9999FF}\r\n");
out.write(".STYLE22 {color: #333333}\r\n");
out.write("select {\r\n");
out.write("\tbackground-color: #FFCC66;\r\n");
out.write("\ttext-align: left;\r\n");
out.write("\twidth: 180px;\r\n");
out.write("}\r\n");
out.write(".STYLE24 {color: #333333; font-size: 12px; }\r\n");
out.write("-->\r\n");
out.write("</style>\r\n");
out.write("</HEAD>\r\n");
bean.AccessBean dept = null;
synchronized (_jspx_page_context) {
dept = (bean.AccessBean) _jspx_page_context.getAttribute("dept", PageContext.PAGE_SCOPE);
if (dept == null){
dept = new bean.AccessBean();
_jspx_page_context.setAttribute("dept", dept, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
request.setCharacterEncoding("GBK");
ResultSet DeptRs=dept.query("select * from table_dept ");
String bill_date= request.getParameter("bill_date");
String bill_due_date=request.getParameter("bill_due_date");
String vendor_name= request.getParameter("vendor");
out.write("\r\n");
out.write("<BODY vLink=#ffcc33 aLink=#ffcc33 link=#993333 bgColor=#ffffcc leftMargin=0 \r\n");
out.write("topMargin=0 rightMargin=0 MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\">\r\n");
out.write("<CENTER>\r\n");
out.write("<TABLE cellSpacing=0 cellPadding=0 width=750 border=0>\r\n");
out.write(" <TBODY>\r\n");
out.write(" <TR>\r\n");
out.write(" <TD width=172><IMG height=62 alt=\"Captain Fresh Seafood Supermarket\" \r\n");
out.write(" src=\"imges/home_top_left.jpg\" width=172 border=0></TD>\r\n");
out.write(" <TD width=253><IMG height=62 alt=\"Captain Fresh Seafood Supermarket\" \r\n");
out.write(" src=\"imges/home_top_mid.jpg\" width=253 border=0></TD>\r\n");
out.write(" <TD width=225><IMG height=62 alt=\"Captain Fresh Seafood Supermarket\" \r\n");
out.write(" src=\"imges/home_top_right.jpg\" width=225 \r\n");
out.write("border=0></TD>\r\n");
out.write(" </TR></TBODY></TABLE>\r\n");
out.write("<TABLE cellSpacing=0 cellPadding=0 width=750 background=main.files/top_band.gif \r\n");
out.write("border=0>\r\n");
out.write(" <TBODY>\r\n");
out.write(" <TR>\r\n");
out.write(" <TD width=\"322\" height=25 align=right background=\"imges/home_bot_right2.jpg\"><div align=\"left\"><span class=\"STYLE20\"><FONT face=Verdana,Arial,Helvetica><a href=\"loginout.jsp\"> <span class=\"STYLE21\"> </span></a></FONT><a href=\"loginout.jsp\"><span class=\"STYLE22\">注销</span></a><span class=\"STYLE22\"></span></span></div></TD>\r\n");
out.write(" <TD width=\"428\" align=right background=\"imges/home_bot_right2.jpg\"><FONT face=Verdana,Arial,Helvetica \r\n");
out.write(" size=1>");
/*Date today = new Date();
int hours = today.getHours();
int minute = today.getMinutes();
if(hours>=0 && hours<12){
out.println("早上好!");
}else{
out.println("下午好!");
}
String[] weekdays = {"日","一","二","三","四","五","六"};
out.println("\n今天是" + (today.getYear()+1900) + "年" + (today.getMonth()+1) + "月" + (today.getDate()) + "日星期" + weekdays[today.getDay()]);*/
out.write("\r\n");
out.write(" </FONT></TD>\r\n");
out.write(" </TR></TBODY></TABLE>\r\n");
out.write("<TABLE height=537 cellSpacing=0 cellPadding=0 width=748 border=0>\r\n");
out.write(" <TBODY>\r\n");
out.write(" <TR>\r\n");
out.write(" <TD vAlign=center borderColor=#993333 borderColorLight=#800000 width=181 \r\n");
out.write(" bgColor=#fdcc64 height=47><p align=\"left\" class=\"STYLE17\"> <A \r\n");
out.write(" href=\"http://192.168.1.35/shop/income.jsp\"><FONT color=#993333>Income management</A></p></TD>\r\n");
out.write(" <TD vAlign=middle width=558 height=333 \r\n");
out.write(" rowSpan=7> \r\n");
out.write("\r\n");
out.write(" <DIV align=center>\r\n");
out.write("\t <form name=\"billItemform\" action=\"AddBill.jsp\" method=\"post\">\r\n");
out.write("\t <input type=\"hidden\" name=\"bill_date\" value=\"");
out.print( bill_date );
out.write("\">\r\n");
out.write("\t\t\t <input type=\"hidden\" name=\"bill_due_date\" value=\"");
out.print( bill_due_date );
out.write("\">\r\n");
out.write("\t\t\t <input type=\"hidden\" name=\"vendor_name\" value=\"");
out.print( vendor_name );
out.write("\">\r\n");
out.write("\t <p align=\"center\"><strong>Bill date:");
out.print( bill_date );
out.write(" Vendor:");
out.print( vendor_name );
out.write("</strong></p>\r\n");
out.write("\t <DIV align=\"center\">\r\n");
out.write(" <CENTER>\r\n");
out.write(" <TABLE borderColor=\"#800000\" width=\"80%\" border=\"1\">\r\n");
out.write(" <TBODY>\r\n");
out.write(" <TR>\r\n");
out.write(" <TD width=\"31%\" bgColor=\"#fdcc64\"><p align=\"center\"><strong>Department Name</strong></p></TD>\r\n");
out.write(" <TD width=\"42%\" bgColor=\"#fdcc64\"><p align=\"center\"><strong>Amount</strong></p></TD>\r\n");
out.write(" <TD width=\"27%\" bgColor=\"#fdcc64\"><p align=\"center\"><strong>Confirm</strong></p></TD>\r\n");
out.write(" </TR>\r\n");
out.write(" ");
while(DeptRs.next()){
String dept_name=DeptRs.getString("dept_name");
out.write("\r\n");
out.write(" <TR><input type=\"hidden\" name=\"dept_id\" value=\"");
out.print( DeptRs.getString("dept_id") );
out.write("\">\t\r\n");
out.write("\t\t\t\t <input type=\"hidden\" name=\"dept_name\" value=\"");
out.print( dept_name );
out.write("\">\t\t\t \r\n");
out.write(" <TD align=\"middle\" width=\"31%\">");
out.print( dept_name );
out.write("</TD>\t\t\t\t \r\n");
out.write(" <TD align=\"middle\" width=\"42%\"><input type=\"text\" name=\"expense\">$</TD>\r\n");
out.write(" <TD align=\"middle\" width=\"27%\"> \r\n");
out.write(" <INPUT type=\"checkbox\" name=\"check\" onClick=\"changeTotal()\"></TD></TR>\r\n");
out.write("\t\t\t ");
} DeptRs.close();
out.write("\r\n");
out.write(" <TR>\r\n");
out.write(" <TD align=\"middle\" width=\"31%\" bgColor=\"#fdcc64\">sum</TD>\r\n");
out.write(" <TD align=\"middle\" width=\"42%\" bgColor=\"#fdcc64\"><input type=\"text\" name=\"total\">$</TD>\r\n");
out.write(" <TD align=\"letf\" width=\"27%\" bgColor=\"#fdcc64\"><span class=\"STYLE24\">全选/反选</span><INPUT type=\"checkbox\" name=\"sumCheck\" onClick=\"isAllChecked()\"></TD>\r\n");
out.write(" </TR>\r\n");
out.write(" </TBODY>\r\n");
out.write(" </TABLE>\r\n");
out.write(" <input type=\"hidden\" name=\"action\" value=\"addBill\">\r\n");
out.write(" <INPUT type=\"button\" value=\"Submit\" name=\"billbutton\" onClick=\"submitbill()\">\r\n");
out.write("\t </CENTER>\r\n");
out.write("\t </DIV>\r\n");
out.write("\t </FORM>\r\n");
out.write(" <P>\r\n");
out.write(" </DIV></TD></TR>\r\n");
out.write(" <TR>\r\n");
out.write(" <TD vAlign=center borderColor=#993333 borderColorLight=#800000 width=181 \r\n");
out.write(" bgColor=#fdcc64 height=47>\r\n");
out.write(" <P align=left class=\"STYLE17\"> <A \r\n");
out.write(" href=\"http://192.168.1.35/shop/department.jsp\"><FONT color=#993333>Dept \r\n");
out.write(" management</FONT></A> </P></TD></TR>\r\n");
out.write(" <TR>\r\n");
out.write(" <TD vAlign=center borderColor=#993333 borderColorLight=#800000 width=181 \r\n");
out.write(" bgColor=#fdcc64 height=47>\r\n");
out.write(" <P align=left class=\"STYLE17\"> <A \r\n");
out.write(" href=\"http://192.168.1.35/shop/report.jsp\"><FONT color=#993333>Report \r\n");
out.write(" management</FONT></A> </P></TD></TR>\r\n");
out.write(" <TR>\r\n");
out.write(" <TD vAlign=center borderColor=#993333 borderColorLight=#800000 width=181 \r\n");
out.write(" bgColor=#fdcc64 height=48>\r\n");
out.write(" <P align=left class=\"STYLE17\"> <A \r\n");
out.write(" href=\"http://192.168.1.35/shop/vendor.jsp\"><FONT color=#993333>Vendor \r\n");
out.write(" management</FONT></A> </P></TD></TR>\r\n");
out.write(" <TR>\r\n");
out.write(" <TD vAlign=center borderColor=#993333 borderColorLight=#800000 width=181 \r\n");
out.write(" bgColor=#fdcc64 height=48>\r\n");
out.write(" <P align=left class=\"STYLE17\"> <A \r\n");
out.write(" href=\"billAdd.jsp\"><FONT color=#993333>Bill \r\n");
out.write(" management</FONT></A> </P></TD></TR>\r\n");
out.write(" <TR>\r\n");
out.write(" <TD vAlign=center borderColor=#993333 borderColorLight=#800000 width=181 \r\n");
out.write(" bgColor=#fdcc64 height=48>\r\n");
out.write(" <P align=left class=\"STYLE17\"> <A \r\n");
out.write(" href=\"http://192.168.1.35/shop/billPaymentMain.jsp\"><FONT \r\n");
out.write(" color=#993333>Bill Payment</FONT></A> </P></TD></TR>\r\n");
out.write(" <TR>\r\n");
out.write(" <TD vAlign=center borderColor=#993333 borderColorLight=#800000 width=181 \r\n");
out.write(" bgColor=#fdcc64 height=48>\r\n");
out.write(" <P align=left class=\"STYLE17\"> <A \r\n");
out.write(" href=\"http://192.168.1.35/shop/backup.jsp\"><FONT \r\n");
out.write(" color=#993333>Backup</FONT></A> </P></TD></TR>\r\n");
out.write(" <TR>\r\n");
out.write(" <TD vAlign=bottom width=746 colSpan=2 height=1></TD></TR>\r\n");
out.write(" <TR>\r\n");
out.write(" <TD vAlign=bottom width=746 colSpan=2 height=122>\r\n");
out.write(" <P><IMG height=132 alt=\"Captain Fresh Seafood Supermarket\" \r\n");
out.write(" src=\"imges/home_bot_right.jpg\" width=746 border=0></P></TD></TR>\r\n");
out.write(" <TR>\r\n");
out.write(" <TD vAlign=top align=middle width=746 colSpan=2 height=380><div align=\"center\"><IMG height=1 \r\n");
out.write(" alt=\"\" src=\"main.files/dot_clear.gif\" width=1 border=0><BR>\r\n");
out.write(" <span class=\"STYLE13\"><FONT \r\n");
out.write(" face=Verdana,Arial,Helvetica><span class=\"STYLE15\">copyright ?004 Captain Fresh Seafood \r\n");
out.write(" Supermarket<BR>\r\n");
out.write(" designed and programmed by <A \r\n");
out.write(" href=\"http://it.neworiental.org/\" target=_blank>neworienta</A><A \r\n");
out.write(" href=\"http://it.neworiental.org/\" target=_blank></A></span><A \r\n");
out.write(" href=\"http://it.neworiental.org/\" target=_blank>l</A></FONT> \r\n");
out.write(" \r\n");
out.write(" </span> </div></TD></TR></TBODY></TABLE>\r\n");
out.write("</CENTER></BODY></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);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -