📄 upaction.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: upAction.java
package com.gzrealmap.oa.action;
import com.gzrealmap.oa.upload.SeachStringToKenizers;
import com.gzrealmap.oa.upload.uptext;
import com.gzrealmap.user.user.User;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.StringTokenizer;
import javax.servlet.ServletRequest;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import org.apache.struts.actions.DispatchAction;
// Referenced classes of package com.gzrealmap.oa.action:
// upActionform
public class upAction
extends DispatchAction {
private uptext uts;
public upAction() {
uts = new uptext();
}
private User getUser(HttpServletRequest request) {
User user = User.getInstance().getUserByName(request.getRemoteUser());
return user;
}
public ActionForward add(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
boolean boo = true;
upActionform upform = (upActionform) form;
User user = getUser(request);
if (user.getID().equals("") || user.getID() == null)
return mapping.findForward("indexs");
int ids = Integer.parseInt(user.getID());
upform.setUserid(ids);
int totalsizebefore = uts.addsize(ids);
int curentsize = upform.getLcontext() != null ? upform.getLcontext().length :
0;
boo = uts.add(upform, ids);
if (boo)
return mapping.findForward("ok");
else
return mapping.findForward("errors");
}
public ActionForward send(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
upActionform upform = (upActionform) form;
User user = getUser(request);
if (user.getID().equals("") || user.getID() == null) {
return mapping.findForward("indexs");
}
else {
String username = user.getTrueName();
int sendnameid = Integer.parseInt(user.getID());
HttpSession sessions = request.getSession();
sessions.setAttribute("id", new Integer(sendnameid));
ArrayList al = new ArrayList();
al = uts.getUserExceptSelf(username);
request.setAttribute("allist", al);
return mapping.findForward("sends");
}
}
public ActionForward show(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
upActionform upform = (upActionform) form;
User user = getUser(request);
if (user.getID().equals("") || user.getID() == null) {
return mapping.findForward("indexs");
}
else {
int i = upform.getIdd();
com.gzrealmap.oa.upload.LawInfoActionForm lf = uts.getallbyid(i);
request.setAttribute("reg", lf);
return mapping.findForward("shows");
}
}
public ActionForward del(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
upActionform upform = (upActionform) form;
ArrayList al = new ArrayList();
User user = getUser(request);
if (user.getID().equals("") || user.getID() == null)
return mapping.findForward("indexs");
String ids = upform.getProductid();
String inte;
for (StringTokenizer st = new StringTokenizer(ids, ",", false);
st.hasMoreTokens(); al.add(inte))
inte = st.nextToken();
int sendid = Integer.parseInt(user.getID());
uts.del(al, sendid);
return mapping.findForward("ok");
}
public ActionForward load(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
return mapping.findForward("welcome");
}
public ActionForward receive(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
SeachStringToKenizers stk = new SeachStringToKenizers();
upActionform upform = (upActionform) form;
User user = getUser(request);
String id = user.getID();
if (id.equals("") || id == null) {
return mapping.findForward("indexs");
}
else {
request.setAttribute("receivid", new Integer(id));
int idd = Integer.parseInt(id);
ArrayList als = new ArrayList();
ArrayList al = uts.allreceivpage("1", idd);
request.setAttribute("receivelist", al);
return mapping.findForward("receivlist");
}
}
public ActionForward list(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
User user = getUser(request);
ArrayList all = new ArrayList();
if (user.getID().equals("") || user.getID() == null) {
return mapping.findForward("indexs");
}
else {
int userid = Integer.parseInt(user.getID());
request.setAttribute("sendid", new Integer(userid));
all = uts.allsendpage("1", userid);
request.setAttribute("lists", all);
return mapping.findForward("listjsp");
}
}
public ActionForward allfile(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
upActionform upform = (upActionform) form;
ArrayList al = new ArrayList();
al = uts.allfilepage("1");
request.setAttribute("list", al);
return mapping.findForward("alllist");
}
public ActionForward dels(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
ArrayList al = new ArrayList();
User user = getUser(request);
upActionform upform = (upActionform) form;
if (user.getID().equals("") || user.getID() == null)
return mapping.findForward("indexs");
String ids = upform.getProductid();
String inte;
for (StringTokenizer st = new StringTokenizer(ids, ",", false);
st.hasMoreTokens(); al.add(inte))
inte = (String) st.nextElement();
uts.dels(al);
System.out.println(ids);
return mapping.findForward("ok");
}
public ActionForward rshow(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
upActionform upform = (upActionform) form;
int i = upform.getIdd();
com.gzrealmap.oa.upload.LawInfoActionForm lf = uts.getallbyid(i);
request.setAttribute("reg", lf);
return mapping.findForward("shows");
}
public ActionForward allpage(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
ArrayList al = new ArrayList();
String s = null;
upActionform upform = (upActionform) form;
String page = upform.getPage();
al = uts.allfilepage(page);
request.setAttribute("list", al);
return mapping.findForward("alllist");
}
public ActionForward sendpage(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
ArrayList al = new ArrayList();
User user = getUser(request);
int userid = Integer.parseInt(user.getID());
request.setAttribute("sendid", new Integer(userid));
upActionform upform = (upActionform) form;
String page = upform.getPage();
al = uts.allsendpage(page, userid);
request.setAttribute("lists", al);
return mapping.findForward("listjsp");
}
public ActionForward receivpage(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws
Exception {
ArrayList al = new ArrayList();
User user = getUser(request);
int userid = Integer.parseInt(user.getID());
request.setAttribute("receivid", new Integer(userid));
upActionform upform = (upActionform) form;
String page = upform.getPage();
al = uts.allreceivpage(page, userid);
request.setAttribute("receivelist", al);
return mapping.findForward("receivlist");
}
public ActionForward alldels(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
ArrayList al = new ArrayList();
User user = getUser(request);
upActionform upform = (upActionform) form;
if (user.getID().equals("") || user.getID() == null)
return mapping.findForward("indexs");
String ids = upform.getProductid();
String inte;
for (StringTokenizer st = new StringTokenizer(ids, ",", false);
st.hasMoreTokens(); al.add(inte))
inte = (String) st.nextElement();
uts.dels(al);
System.out.println(ids);
return mapping.findForward("ok");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -