资源简介
1109111213.zip
代码片段和文件信息
package action;
import java.io.IOException;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import model.Fangchan;
import model.Jiaofei;
import model.Tousu;
import model.User;
import model.Weixiu;
import model.Zhuhu;
import org.apache.struts2.ServletActionContext;
import util.Pager;
import util.Util;
import com.opensymphony.xwork2.ActionSupport;
import dao.FangchanDao;
import dao.JiaofeiDao;
import dao.TousuDao;
import dao.UserDao;
import dao.WeixiuDao;
import dao.ZhuhuDao;
public class ManageAction extends ActionSupport{
private static final long serialVersionUID = -4304509122548259589L;
private UserDao userDao;
private String url = “./“;
public UserDao getUserDao() {
return userDao;
}
public void setUserDao(UserDao userDao) {
this.userDao = userDao;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
//程序入口界面
public String index(){
HttpServletRequest request = ServletActionContext.getRequest();
Util.init(request);
HttpSession session = request.getSession();
User user = (User)session.getAttribute(“user“);
if(user==null){
return “success2“;
}else{
return “success1“;
}
}
//用户登录操作
public String login() throws IOException {
HttpServletRequest request = ServletActionContext.getRequest();
String username = request.getParameter(“username“);
String password = request.getParameter(“password“);
String role = request.getParameter(“role“);
User user = userDao.selectBean(“ where username = ‘“+username +“‘ and password= ‘“+password +“‘ and userlock=0 and role=“+role);
if (user!=null) {
HttpSession session = request.getSession();
session.setAttribute(“user“ user);
this.setUrl(“index“);
return “redirect“;
} else {
HttpServletResponse response = ServletActionContext.getResponse();
response.setCharacterEncoding(“gbk“);response.setContentType(“text/html; charset=gbk“);
response
.getWriter()
.print(
“ript language=javascript>alert(‘用户名或者密码错误‘);window.location.href=‘login.jsp‘; ript>“);
}
return null;
}
//用户退出操作
public String loginout() {
HttpServletRequest request = ServletActionContext.getRequest();
HttpSession session = request.getSession();
session.removeAttribute(“user“);
this.setUrl(“login.jsp“);
return SUCCESS;
}
//跳转到修改密码页面
public String changepwd() {
this.setUrl(“user/password.jsp“);
return SUCCESS;
}
//修改密码操作
public void changepwd2() throws IOException {
HttpServletRequest request = ServletActionContext.getRequest();
HttpSession session = request.getSession();
User u = (User)session.getAttribute(“user“);
String password1 = request.getParameter(“password1“);
String password2 = request.getParameter(“password2“);
User b
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-12-06 05:49 1109111213\
文件 46080 2013-12-05 21:42 1109111213\任务书.doc
文件 72192 2013-12-05 21:57 1109111213\开题报告.doc
目录 0 2013-12-06 13:35 1109111213\数据库文件\
文件 3145728 2013-12-02 11:11 1109111213\数据库文件\wuye_db.mdf
文件 1048576 2013-12-02 11:11 1109111213\数据库文件\wuye_db_log.ldf
文件 1132544 2013-12-06 12:55 1109111213\毕业论文.doc
目录 0 2013-12-06 13:39 1109111213\程序源码\
目录 0 2013-12-06 05:50 1109111213\程序源码\wuye\
文件 5052 2013-11-26 22:30 1109111213\程序源码\wuye\.classpath
目录 0 2013-12-06 05:51 1109111213\程序源码\wuye\.myeclipse\
文件 285 2013-11-26 22:30 1109111213\程序源码\wuye\.myme
文件 1222 2013-11-26 22:31 1109111213\程序源码\wuye\.project
目录 0 2013-12-06 05:50 1109111213\程序源码\wuye\src\
目录 0 2013-12-06 05:50 1109111213\程序源码\wuye\src\action\
文件 48352 2013-11-26 22:30 1109111213\程序源码\wuye\src\action\ManageAction.java
目录 0 2013-12-06 05:50 1109111213\程序源码\wuye\src\dao\
文件 457 2013-11-26 22:30 1109111213\程序源码\wuye\src\dao\FangchanDao.java
目录 0 2013-12-06 05:50 1109111213\程序源码\wuye\src\dao\impl\
文件 1670 2013-11-26 22:30 1109111213\程序源码\wuye\src\dao\impl\FangchanDaoImpl.java
文件 1649 2013-11-26 22:30 1109111213\程序源码\wuye\src\dao\impl\JiaofeiDaoImpl.java
文件 1607 2013-11-26 22:30 1109111213\程序源码\wuye\src\dao\impl\TousuDaoImpl.java
文件 1586 2013-11-26 22:30 1109111213\程序源码\wuye\src\dao\impl\UserDaoImpl.java
文件 1628 2013-11-26 22:30 1109111213\程序源码\wuye\src\dao\impl\WeixiuDaoImpl.java
文件 1607 2013-11-26 22:30 1109111213\程序源码\wuye\src\dao\impl\ZhuhuDaoImpl.java
文件 447 2013-11-26 22:30 1109111213\程序源码\wuye\src\dao\JiaofeiDao.java
文件 427 2013-11-26 22:30 1109111213\程序源码\wuye\src\dao\TousuDao.java
文件 417 2013-11-26 22:30 1109111213\程序源码\wuye\src\dao\UserDao.java
文件 437 2013-11-26 22:30 1109111213\程序源码\wuye\src\dao\WeixiuDao.java
文件 427 2013-11-26 22:30 1109111213\程序源码\wuye\src\dao\ZhuhuDao.java
文件 1392 2013-11-26 22:30 1109111213\程序源码\wuye\src\hibernate.cfg.xm
............此处省略307个文件信息
相关资源
- BPA.rar
- 99彩时时彩整站带数据源码.rar
- 18239138BN090-体检系统.rar
- 一个人的电商:运营策略与实操手记
- 牛客校招面试题附答案与解析全集.
- 随书仿真模型.zip
- Cyuyancaoyanlong.zip
- 199806.txt
- resource.rar
- 微教育-多校版fm_jiaoyu3.12.16安装更新一
- come.rar
-
databa
sesystem(第五版).zip - 凸优化ConvexOptimization_Boyd中文版.pdf
- 奔跑吧ansible.pdf
- zw_wangkezhi5-10391405-XEP100演示代码.zip
- 老虎框架一键导入版5.99.17.zip
- Optiwave.OptiSystem.v7.0.With.Crack-NULL.part1
- ComputerKiller1.9.3.zip
- 迅捷pdf转word破解版.rar
- 凸优化_Boyd和Vandenberghe_中文完整版.
- 最新SSC喜虎完整源码.zip
- 线性代数及其应用中文版.pdf
- ClassicalMechanics-Goldstein.pdf
- 大话数据结构原书+源代码.zip
- zw_szhejiajun-10914079-iptv.zip
- 网络摄像头破解.rar
- 刺客信条1022_qqjike.com.rar
- TeamViewer15.zip
- 计算机网络:自顶向下方法原书第7版
- 概率论与数理统计(浙江大学第四版
评论
共有 条评论