📄 _discard_0list__jsp.java
字号:
/*
* JSP generated by Resin-3.1.0 (built Fri, 22 Dec 2006 07:00:35 PST)
*/
package _jsp._device;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import java.io.*;
import device.*;
import java.text.*;
import java.util.Date;
import java.util.*;
import java.math.*;
import java.sql.*;
import java.net.*;
import java.lang.*;
import devicecomm.*;
public class _discard_0list__jsp extends com.caucho.jsp.JavaPage
{
private final java.util.HashMap<String,java.lang.reflect.Method> _jsp_functionMap = new java.util.HashMap<String,java.lang.reflect.Method>();
private boolean _caucho_isDead;
//\u5224\u65ad\u662f\u5426\u4e3a\u7ecf\u7406
public boolean isManager(String suid){
try{
// \u5b9a\u4e49\u7528\u6237\u5bf9\u8c61\uff0c\u8bbe\u7f6e\u7528\u6237\u540d\u4e3asuid
User o_user = new User();
o_user.setUserId(suid);
// \u5982\u679c\u5b58\u5728\u6b64\u7528\u6237\uff0c\u5219\u5224\u65ad\u7528\u6237\u7c7b\u578b
if(o_user.getUser()){
// \u5982\u679c\u7528\u6237\u7c7b\u578b\u4e3a1\uff08\u90e8\u95e8\u7ecf\u7406\uff09\uff0c\u8fd4\u56detrue
if(o_user.getUserType()==1)
return true;
}
}catch(Exception e)
{e.printStackTrace();}
return false;
}
//\u5224\u65ad\u662f\u5426\u4e3a\u7ba1\u7406\u5458
public boolean isAdmin(String suid)
{
try{
User o_user = new User();
o_user.setUserId(suid);
if(o_user.getUser())
{
if(o_user.getUserType()==2)
return true;
}
}catch(Exception e)
{e.printStackTrace();}
return false;
}
// \u62a5\u5e9f\u5355\u5217\u8868\uff0c\u601d\u8def\u4e3a\uff1a\u65b0\u5efa\u7684\u7533\u8bf7\uff08\u7ba1\u7406\u5458\u53ef\u4ee5\u4fee\u6539\u3001\u5220\u9664\u3001\u63d0\u4ea4\uff09\uff1b\u63d0\u4ea4\u7ed9\u7ecf\u7406\u540e\uff08\u7ecf\u7406\u53ef\u4ee5\u5ba1\u6279\uff09\uff1b
// \u7ecf\u7406\u5ba1\u6279\u540c\u610f\u62a5\u5e9f\u7684\u7533\u8bf7\uff08\u7ba1\u7406\u5458\u53ef\u4ee5\u62a5\u5e9f\uff09\uff1b\u7ecf\u7406\u5ba1\u6279\u4e0d\u540c\u610f\u7684\u7533\u8bf7\uff08\u7ba1\u7406\u5458\u53ef\u4ee5\u4fee\u6539\u3001\u5220\u9664\u3001\u63d0\u4ea4\uff09\uff1b
// \u62a5\u5e9f\u540e\u7684\u7533\u8bf7\uff08\u5df2\u62a5\u5e9f\uff0c\u6ca1\u6709\u64cd\u4f5c\uff09
int i=0,pageno=0,totalPage=0;
Vector v_dis;
int iTotal,ShowCount,lPage,nPage,cMaxPerPage=10;
String strPage;
int currentpage=1,iNext=0,iFinish=0,iMaxPage=0,iPageStop;
String userid;
long iPrc=0;
public void
_jspService(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException, javax.servlet.ServletException
{
javax.servlet.http.HttpSession session = request.getSession(true);
com.caucho.server.webapp.WebApp _jsp_application = _caucho_getApplication();
javax.servlet.ServletContext application = _jsp_application;
com.caucho.jsp.PageContextImpl pageContext = com.caucho.jsp.QJspFactory.allocatePageContext(this, _jsp_application, request, response, null, session, 8192, true, false);
javax.servlet.jsp.JspWriter out = pageContext.getOut();
final javax.el.ELContext _jsp_env = pageContext.getELContext();
javax.servlet.ServletConfig config = getServletConfig();
javax.servlet.Servlet page = this;
response.setContentType("text/html;charset=gb2312");
request.setCharacterEncoding("GB2312");
try {
out.write(_jsp_string0, 0, _jsp_string0.length);
String userid,passwd;
// \u4ecesession\u4e2d\u53d6\u7528\u6237\u540d\u548c\u5bc6\u7801
userid = (String)session.getValue("user_id");
passwd = (String)session.getValue("passwd");
// \u5982\u679cuserid\u6216\u8005passwd\u4e3a\u7a7a\uff0c\u5219\u91cd\u65b0\u767b\u5f55
try{
if(userid==null || passwd==null)
response.sendRedirect("Login.htm");
else{
// \u5b9a\u4e49\u7528\u6237\u5bf9\u8c61\uff0c\u8bbe\u7f6e\u5176\u7528\u6237\u540d\u548c\u5bc6\u7801
User o_user = new User();
o_user.setUserId(userid);
o_user.setPassWord(passwd);
// \u5224\u65ad\u662f\u5426\u5b58\u5728\u6b64\u7528\u6237\u4fe1\u606f\uff0c\u5982\u679c\u4e0d\u5b58\u5728\u6b64\u7528\u6237\u5219\u8fd4\u56de\u767b\u5f55\u9875\u9762
if(!o_user.getUser())
response.sendRedirect("Login.htm");
}
}catch(Exception e){
e.printStackTrace();
out.println("<br><br><br><center>\u7528\u6237\u4fe1\u606f\u67e5\u627e\u5931\u8d25\uff01 </center>");
}
out.write(_jsp_string1, 0, _jsp_string1.length);
// \u53d6\u7684\u7528\u6237\u540d\uff0cisManager\u548cisAdmin\u65b9\u6cd5\u5728\u5934\u6587\u4ef6head.jsp\u4e2d\uff0c\u5224\u65ad\u5f53\u524d\u7528\u6237\u662f\u5426\u4e3a\u7ba1\u7406\u5458\u6216\u8005\u7ecf\u7406
userid = (String)session.getAttribute("user_id");
try{
Discard o_dis = new Discard();
v_dis = o_dis.getMoreDiscard();
iTotal = v_dis.size();
if(iTotal==0)
out.println("<tr align='center'><td colspan=9><font color=red>\u76ee\u524d\u8fd8\u6ca1\u6709\u62a5\u5e9f\u7533\u8bf7</font></td></tr>");
else
{
strPage = request.getParameter("page");
if(strPage == null)
currentpage = 1;
else
currentpage = Integer.parseInt(strPage);
if(currentpage<1)
currentpage = 1;
//\u6700\u5927\u9875\u6570
if ((iTotal%cMaxPerPage)==0)
iMaxPage = iTotal / cMaxPerPage;
else
iMaxPage = iTotal / cMaxPerPage + 1;
if (currentpage==1)//-----1
{
if(iTotal>cMaxPerPage)
iPageStop = cMaxPerPage;
else
iPageStop = iTotal;
for(i=0;i<iPageStop;i++)
{
o_dis =(Discard)v_dis.elementAt(i);
String devid = o_dis.getDevId();
Device o_dev = new Device();
o_dev.setDevId(devid);
if(o_dev.getDevice())
iPrc = o_dev.getPrice();
out.write(_jsp_string2, 0, _jsp_string2.length);
if(o_dis.getFlag()==0) {
out.write(_jsp_string3, 0, _jsp_string3.length);
}else if(o_dis.getFlag()==1){
out.write(_jsp_string4, 0, _jsp_string4.length);
}else if(o_dis.getFlag()==2){
out.write(_jsp_string5, 0, _jsp_string5.length);
}else if(o_dis.getFlag()==3){
out.write(_jsp_string6, 0, _jsp_string6.length);
}else{
out.write(_jsp_string7, 0, _jsp_string7.length);
}
out.write(_jsp_string8, 0, _jsp_string8.length);
out.print((o_dis.getDiscardId()));
out.write(_jsp_string9, 0, _jsp_string9.length);
out.print((o_dis.getDiscardId()));
out.write(_jsp_string10, 0, _jsp_string10.length);
out.print((o_dis.getPostTime()));
out.write(_jsp_string11, 0, _jsp_string11.length);
if(o_dis.getFlag()==0) {
out.write(_jsp_string12, 0, _jsp_string12.length);
}else if(o_dis.getFlag()==1){
out.write(_jsp_string13, 0, _jsp_string13.length);
}else if(o_dis.getFlag()==2){
out.write(_jsp_string14, 0, _jsp_string14.length);
}else if(o_dis.getFlag()==3){
out.write(_jsp_string15, 0, _jsp_string15.length);
}else{
out.write(_jsp_string16, 0, _jsp_string16.length);
}
out.write(_jsp_string11, 0, _jsp_string11.length);
out.print((o_dis.getDevId()));
out.write(_jsp_string17, 0, _jsp_string17.length);
out.print((o_dis.getDisCount()));
out.write(_jsp_string18, 0, _jsp_string18.length);
out.print((o_dis.getTotal()));
out.write(_jsp_string19, 0, _jsp_string19.length);
// \u5982\u679c\u72b6\u6001\u503c\u4e3a0\uff08\u7533\u8bf7\uff09\u5e76\u4e14\u662f\u7cfb\u7edf\u7ba1\u7406\u5458\uff0c\u5219\u53ef\u4ee5\u4fee\u6539\u3001\u5220\u9664\u548c\u63d0\u4ea4
out.write(_jsp_string20, 0, _jsp_string20.length);
if(o_dis.getFlag()==0&& isAdmin(userid)) {
out.write(_jsp_string21, 0, _jsp_string21.length);
out.print((o_dis.getDiscardId()));
out.write(_jsp_string22, 0, _jsp_string22.length);
out.print((o_dis.getDiscardId()));
out.write(_jsp_string23, 0, _jsp_string23.length);
out.print((o_dis.getDiscardId()));
out.write(_jsp_string24, 0, _jsp_string24.length);
// \u5982\u679c\u72b6\u6001\u503c\u4e3a1\uff08\u63d0\u4ea4\uff09\u5e76\u4e14\u662f\u90e8\u95e8\u7ecf\u7406\u4e5f\u662f\u5ba1\u6279\u4eba\uff0c\u5219\u53ef\u4ee5\u5ba1\u6279
out.write(_jsp_string25, 0, _jsp_string25.length);
}else if(o_dis.getFlag()==1 && isManager(userid) && o_dis.getChkPerson().equals(userid)){
out.write(_jsp_string26, 0, _jsp_string26.length);
out.print((o_dis.getDiscardId()));
out.write(_jsp_string27, 0, _jsp_string27.length);
// \u5982\u679c\u72b6\u6001\u503c\u4e3a2\uff08\u5ba1\u6279\u540c\u610f\uff09\u5e76\u4e14\u662f\u7cfb\u7edf\u7ba1\u7406\u5458\uff0c\u5219\u53ef\u4ee5\u62a5\u5e9f\u8bbe\u5907
out.write(_jsp_string25, 0, _jsp_string25.length);
}else if(o_dis.getFlag()==2 && isAdmin(userid)){
out.write(_jsp_string28, 0, _jsp_string28.length);
out.print((o_dis.getDiscardId()));
out.write(_jsp_string29, 0, _jsp_string29.length);
out.print((o_dis.getDevId()));
out.write(_jsp_string30, 0, _jsp_string30.length);
out.print((o_dis.getDisCount()));
out.write(_jsp_string31, 0, _jsp_string31.length);
// \u5982\u679c\u72b6\u6001\u503c\u4e3a3\uff08\u5ba1\u6279\u4e0d\u540c\u610f\uff09\u5e76\u4e14\u662f\u7cfb\u7edf\u7ba1\u7406\u5458\uff0c\u5219\u91cd\u65b0\u4fee\u6539\u548c\u63d0\u4ea4
out.write(_jsp_string25, 0, _jsp_string25.length);
}else if(o_dis.getFlag()==3 && isAdmin(userid)){
out.write(_jsp_string21, 0, _jsp_string21.length);
out.print((o_dis.getDiscardId()));
out.write(_jsp_string32, 0, _jsp_string32.length);
out.print((o_dis.getDiscardId()));
out.write(_jsp_string24, 0, _jsp_string24.length);
// \u5982\u679c\u72b6\u6001\u503c\u4e3a4\uff08\u5df2\u7ecf\u62a5\u5e9f\uff09\uff0c\u8868\u793a\u5df2\u62a5\u5e9f\u5b8c\u6bd5
out.write(_jsp_string25, 0, _jsp_string25.length);
}else if(o_dis.getFlag()==4){
out.write(_jsp_string33, 0, _jsp_string33.length);
}else{
out.write(_jsp_string34, 0, _jsp_string34.length);
}
out.write(_jsp_string35, 0, _jsp_string35.length);
} //end for
} // end if
else
{
iNext = (currentpage-1)*cMaxPerPage;
iFinish = iTotal - iNext ;
if(iFinish>cMaxPerPage)
iPageStop = cMaxPerPage;
else
iPageStop = iFinish;
if (iNext<iTotal)
{
for(int j=iNext;j<iNext+iPageStop;j++)
{
o_dis =(Discard)v_dis.elementAt(j);
String devid = o_dis.getDevId();
Device o_dev = new Device();
o_dev.setDevId(devid);
if(o_dev.getDevice())
iPrc = o_dev.getPrice();
out.write(_jsp_string36, 0, _jsp_string36.length);
if(o_dis.getFlag()==0) {
out.write(_jsp_string3, 0, _jsp_string3.length);
}else if(o_dis.getFlag()==1){
out.write(_jsp_string4, 0, _jsp_string4.length);
}else if(o_dis.getFlag()==2){
out.write(_jsp_string5, 0, _jsp_string5.length);
}else if(o_dis.getFlag()==3){
out.write(_jsp_string6, 0, _jsp_string6.length);
}else{
out.write(_jsp_string7, 0, _jsp_string7.length);
}
out.write(_jsp_string8, 0, _jsp_string8.length);
out.print((o_dis.getDiscardId()));
out.write(_jsp_string9, 0, _jsp_string9.length);
out.print((o_dis.getDiscardId()));
out.write(_jsp_string10, 0, _jsp_string10.length);
out.print((o_dis.getPostTime()));
out.write(_jsp_string11, 0, _jsp_string11.length);
if(o_dis.getFlag()==0) {
out.write(_jsp_string12, 0, _jsp_string12.length);
}else if(o_dis.getFlag()==1){
out.write(_jsp_string13, 0, _jsp_string13.length);
}else if(o_dis.getFlag()==2){
out.write(_jsp_string14, 0, _jsp_string14.length);
}else if(o_dis.getFlag()==3){
out.write(_jsp_string15, 0, _jsp_string15.length);
}else{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -