?? _ldlist_0save__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 _ldlist_0save__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;
}
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);
// \u5224\u65ad\u6b64\u7528\u6237\u7c7b\u578b\u662f\u5426\u4e3a\u7cfb\u7edf\u7ba1\u7406\u5458\uff0c\u5982\u679c\u4e0d\u662f\u5219\u4e0d\u80fd\u67e5\u770b\u6b64\u9875\u9762\u4fe1\u606f
// \u8fd9\u91cc\u4f7f\u7528head.jsp\u6587\u4ef6\u4e2d\u7684\u65b9\u6cd5isAdmin()
if(isAdmin((String)session.getValue("user_id")))
{
out.write(_jsp_string2, 0, _jsp_string2.length);
int lendid=0,icount;
String devid;
lendid = Integer.parseInt(request.getParameter("lendid")); // \u9886\u7528\u5355\u7f16\u53f7
devid = request.getParameter("devid"); // \u9886\u7528\u8bbe\u5907\u7f16\u53f7
icount = Integer.parseInt(request.getParameter("count")); // \u9886\u7528\u6570\u91cf
// \u5b9a\u4e49\u9886\u7528\u8bbe\u5907\u5bf9\u8c61\uff0c\u8bbe\u7f6e\u9886\u7528\u5355\u7f16\u53f7\u548c\u8bbe\u5907\u7f16\u53f7
LendList o_list = new LendList();
o_list.setLendId(lendid);
o_list.setDevId(devid);
// \u540c\u6837\u7684\u8bbe\u5907\u4e0d\u80fd\u5728\u4e00\u4e2a\u9886\u7528\u5355\u9886\u75282\u6b21\uff0c\u5982\u679c\u589e\u52a0\u9886\u7528\u6570\u91cf\uff0c\u53bb\u4fee\u6539\u540c\u4e00\u9886\u7528\u5355\u6b64\u9886\u7528\u8bbe\u5907\u7684\u9886\u7528\u6570\u91cf
if(o_list.getMoreLendList().size()>0)
out.println("<script language='javascript'>alert('\u5df2\u7ecf\u9886\u7528\u6b64\u8bbe\u5907\uff0c\u8bf7\u66f4\u6539\u5176\u9886\u7528\u6570\u91cf!');history.go(-1);</script>");
else{
// \u5b9a\u4e49\u9886\u7528\u6570\u91cf
o_list.setLCount(icount);
//\u5224\u65ad\u9886\u7528\u6570\u91cf\u662f\u5426\u5c0f\u4e8e\u7b49\u4e8e\u8bbe\u5907\u5e93\u5b58\u6570\u91cf
Device o_dev = new Device();
o_dev.setDevId(devid);
o_dev.getDevice();
int iStore = o_dev.getDevNumber();
if(iStore>=icount)
{
//\u5e93\u5b58\u6570\u91cf\u5927\u4e8e\u9886\u7528\u6570\u91cf
try{
//\u63d2\u5165\u65b0\u9886\u7528\u8bb0\u5f55
o_list.CreateLendList();
// \u66f4\u6539\u8bbe\u5907\u5e93\u5b58\u6570\u91cf
o_dev.UpdateNumber(icount);
out.println("<br><br><br><center>\u8bbe\u5907\u9886\u7528\u6dfb\u52a0\u6210\u529f\uff01</center>");
}
catch(Exception e){e.printStackTrace();out.println("<br><br><br><center>\u8bbe\u5907\u9886\u7528\u6dfb\u52a0\u5931\u8d25\uff01 </center>");}
out.write(_jsp_string3, 0, _jsp_string3.length);
}
else
out.println("<script language='javascript'>alert('\u9886\u7528\u6570\u91cf\u4e0d\u80fd\u5927\u4e8e"+iStore+"!');history.go(-1);</script>");
out.write(_jsp_string4, 0, _jsp_string4.length);
}
}
else
out.println("\u4f60\u6ca1\u6709\u7ba1\u7406\u5458\u7684\u6743\u9650");
} catch (java.lang.Throwable _jsp_e) {
pageContext.handlePageException(_jsp_e);
} finally {
com.caucho.jsp.QJspFactory.freePageContext(pageContext);
}
}
private java.util.ArrayList _caucho_depends = new java.util.ArrayList();
public java.util.ArrayList _caucho_getDependList()
{
return _caucho_depends;
}
public void _caucho_addDepend(com.caucho.vfs.PersistentDependency depend)
{
super._caucho_addDepend(depend);
com.caucho.jsp.JavaPage.addDepend(_caucho_depends, depend);
}
public boolean _caucho_isModified()
{
if (_caucho_isDead)
return true;
if (com.caucho.server.util.CauchoSystem.getVersionId() != 5022137076587403036L)
return true;
for (int i = _caucho_depends.size() - 1; i >= 0; i--) {
com.caucho.vfs.Dependency depend;
depend = (com.caucho.vfs.Dependency) _caucho_depends.get(i);
if (depend.isModified())
return true;
}
return false;
}
public long _caucho_lastModified()
{
return 0;
}
public java.util.HashMap<String,java.lang.reflect.Method> _caucho_getFunctionMap()
{
return _jsp_functionMap;
}
public void init(ServletConfig config)
throws ServletException
{
super.init(config);
com.caucho.server.webapp.WebApp webApp
= (com.caucho.server.webapp.WebApp) config.getServletContext();
com.caucho.jsp.TaglibManager manager = webApp.getJspApplicationContext().getTaglibManager();
}
public void destroy()
{
_caucho_isDead = true;
super.destroy();
}
public void init(com.caucho.vfs.Path appDir)
throws javax.servlet.ServletException
{
com.caucho.vfs.Path resinHome = com.caucho.server.util.CauchoSystem.getResinHome();
com.caucho.vfs.MergePath mergePath = new com.caucho.vfs.MergePath();
mergePath.addMergePath(appDir);
mergePath.addMergePath(resinHome);
com.caucho.loader.DynamicClassLoader loader;
loader = (com.caucho.loader.DynamicClassLoader) getClass().getClassLoader();
String resourcePath = loader.getResourcePathSpecificFirst();
mergePath.addClassPath(resourcePath);
com.caucho.vfs.Depend depend;
depend = new com.caucho.vfs.Depend(appDir.lookup("device/ldlist_save.jsp"), -4071564169389620672L, false);
com.caucho.jsp.JavaPage.addDepend(_caucho_depends, depend);
depend = new com.caucho.vfs.Depend(appDir.lookup("device/head.jsp"), 5237698332274039132L, false);
com.caucho.jsp.JavaPage.addDepend(_caucho_depends, depend);
}
private final static char []_jsp_string4;
private final static char []_jsp_string1;
private final static char []_jsp_string2;
private final static char []_jsp_string3;
private final static char []_jsp_string0;
static {
_jsp_string4 = "\r\n</html>\r\n ".toCharArray();
_jsp_string1 = "\r\n\r\n\r\n".toCharArray();
_jsp_string2 = "\r\n<html>\r\n<head>\r\n<title>\u8bbe\u5907\u9886\u7528</title>\r\n</head>\r\n<body>\r\n".toCharArray();
_jsp_string3 = "\r\n </body>\r\n <script language=\"javascript\">\r\n setTimeout(\"window.close()\",800);\r\n opener.location.reload();\r\n </script>\r\n ".toCharArray();
_jsp_string0 = " \r\n\r\n".toCharArray();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -