• 大小: 14.88M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-13
  • 语言: 其他
  • 标签: 其他  

资源简介

onlineLearnSystem.rar

资源截图

代码片段和文件信息

package com.action;

import java.io.PrintWriter;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;
import org.directwebremoting.WebContext;
import org.directwebremoting.WebContextFactory;

import com.dao.TAdminDAO;
import com.model.TAdmin;
import com.opensymphony.xwork2.ActionSupport;

public class adminAction extends ActionSupport
{
private int userId;
private String userName;
private String userPw;
 
private String message;
private String path;
private String userPwNew;
private int index=1;
private int userType;
private TAdminDAO adminDAO;


public String adminAdd()
{
TAdmin admin=new TAdmin();
admin.setUserName(userName);
admin.setUserPw(userPw);
adminDAO.save(admin);
this.setMessage(“操作成功“);
this.setPath(“adminManage.action“);
return “succeed“;
}

public void userLogin() throws Exception
{
//HttpServletRequest request=ServletActionContext.getRequest();
String isSuccess = adminDAO.login(userName userPw userType);
HttpServletResponse response =ServletActionContext.getResponse();
response.setContentType(“text/html;charset=utf-8“);
PrintWriter pw = response.getWriter();
if (isSuccess.equals(“yes“)) {
pw.print(“yes“);
} else {
System.out.println(“======>用户名或者密码错误=====》“);
pw.print(“no“);
}
}

public void logout() throws Exception
{
HttpSession session=ServletActionContext.getRequest().getSession();
HttpServletResponse response =ServletActionContext.getResponse();
session.setAttribute(“userType“ null);
response.setContentType(“text/html;charset=utf-8“);
PrintWriter pw = response.getWriter();
pw.print(“yes“);
}

public void adminPwEdit() throws Exception
{
String isSuccess = adminDAO.adminPwEdit(userPwNew);
HttpServletResponse response =ServletActionContext.getResponse();
response.setContentType(“text/html;charset=utf-8“);
PrintWriter pw = response.getWriter();
if (isSuccess.equals(“yes“)) {
pw.print(“yes“);
} else {
System.out.println(“======>用户名或者密码错误=====》“);
pw.print(“no“);
}

}

public String adminManage()
{
List adminList=adminDAO.findAll();
Map request=(Map)ServletActionContext.getContext().get(“request“);
request.put(“adminList“ adminList);
return ActionSupport.SUCCESS;
}


public String adminDel()
{
adminDAO.delete(adminDAO.findById(userId));
this.setMessage(“删除成功“);
this.setPath(“adminManage.action“);
return “succeed“;
}



public TAdminDAO getAdminDAO()
{
return adminDAO;
}

public void setAdminDAO(TAdminDAO adminDAO)
{
this.adminDAO = adminDAO;
}

public String getMessage()
{
return message;
}

public int getIndex()
{
return index;
}



public void setIndex(int index)
{
this.index = index;
}



public void setMessage(String 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        834  2018-03-01 12:25  onlineLearnSystem\.classpath

     文件       1050  2018-03-01 12:25  onlineLearnSystem\.project

     文件        567  2018-03-01 12:25  onlineLearnSystem\.settings\.jsdtscope

     文件        364  2018-03-01 12:25  onlineLearnSystem\.settings\org.eclipse.jdt.core.prefs

     文件        503  2018-03-01 12:25  onlineLearnSystem\.settings\org.eclipse.wst.common.component

     文件        345  2018-03-01 12:25  onlineLearnSystem\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2018-03-01 12:25  onlineLearnSystem\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2018-03-01 12:25  onlineLearnSystem\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       5126  2018-05-21 21:08  onlineLearnSystem\build\classes\com\action\adminAction.class

     文件       3778  2018-05-21 21:08  onlineLearnSystem\build\classes\com\action\docAction.class

     文件       3699  2018-05-21 21:08  onlineLearnSystem\build\classes\com\action\gonggaoAction.class

     文件       1115  2018-05-21 21:08  onlineLearnSystem\build\classes\com\action\indexAction.class

     文件       4531  2018-05-21 21:08  onlineLearnSystem\build\classes\com\action\liuyanAction.class

     文件       3731  2018-05-21 21:08  onlineLearnSystem\build\classes\com\action\playAction.class

     文件       4060  2018-05-21 21:08  onlineLearnSystem\build\classes\com\action\shipinAction.class

     文件       3989  2018-05-21 21:08  onlineLearnSystem\build\classes\com\action\shitiAction.class

     文件       3985  2018-05-25 15:23  onlineLearnSystem\build\classes\com\action\stuAction.class

     文件       6776  2018-05-26 12:10  onlineLearnSystem\build\classes\com\action\teaAction.class

     文件       8883  2018-05-26 11:20  onlineLearnSystem\build\classes\com\action\timuAction.class

     文件       7959  2018-05-21 21:08  onlineLearnSystem\build\classes\com\dao\TAdminDAO.class

     文件       5600  2018-05-21 21:08  onlineLearnSystem\build\classes\com\dao\TDocDAO.class

     文件       5160  2018-05-21 21:08  onlineLearnSystem\build\classes\com\dao\TGonggaoDAO.class

     文件       5112  2018-05-21 21:08  onlineLearnSystem\build\classes\com\dao\TLiuyanDAO.class

     文件       5064  2018-05-21 21:08  onlineLearnSystem\build\classes\com\dao\TPlayDAO.class

     文件       5310  2018-05-24 21:50  onlineLearnSystem\build\classes\com\dao\TScoreDAO.class

     文件       5127  2018-05-21 21:08  onlineLearnSystem\build\classes\com\dao\TShipinDAO.class

     文件       5656  2018-05-21 21:08  onlineLearnSystem\build\classes\com\dao\TShitiDAO.class

     文件       5977  2018-05-21 21:08  onlineLearnSystem\build\classes\com\dao\TStuDAO.class

     文件       5980  2018-05-21 21:08  onlineLearnSystem\build\classes\com\dao\TTeaDAO.class

     文件       6129  2018-05-21 21:08  onlineLearnSystem\build\classes\com\dao\TTimuDAO.class

............此处省略923个文件信息

评论

共有 条评论