高尔夫管理系统SSH

登录-----------http://localhost:8080/GOLF/Denglu

一、Action

1.处理今日消费数据逻辑的

  1 package com.chinasofti.golf.action;
  2
  3
  4
  5 import java.util.ArrayList;
  6 import java.util.List;
  7
  8
  9
 10 import com.chinasofti.golf.dao.IConsumptionDAO;
 11
 12 import com.chinasofti.golf.daoimpl.MembersDAOImpl;
 13 import com.chinasofti.golf.entity.Consumption;
 14 import com.chinasofti.golf.entity.Members;
 15 import com.opensymphony.xwork2.ActionSupport;
 16
 17 @SuppressWarnings("serial")
 18 public class ConsumptionAction extends ActionSupport {
 19     private Consumption con;//在Spring里配置过的con
 20     private Consumption ms;//在Spring里配置过的ms
 21     private List<Consumption> lcon;
 22     private IConsumptionDAO consumptionDAO;
 23     private  int id;//从地址栏传过来的ID,所以在这里要封装一个
 24
 25     private MembersDAOImpl mebDAO;
 26     private Members mebs;
 27     private int totalpeoper;//这几行是做统计日报表封装的
 28     private int rmb;
 29     private int yes;
 30     private int no;
 31     private int yesmoney=0;
 32     private int nomoney=0;
 33
 34     int pageSize;//翻页
 35     private int recordCount;
 36     private int pageCount;
 37     private int pageIndex;
 38     private String p;
 39     private String c;
 40
 41
 42
 43
 44
 45         public int getPageSize() {
 46         return pageSize;
 47     }
 48
 49     public void setPageSize(int pageSize) {
 50         this.pageSize = pageSize;
 51     }
 52
 53     public int getRecordCount() {
 54         return recordCount;
 55     }
 56
 57     public void setRecordCount(int recordCount) {
 58         this.recordCount = recordCount;
 59     }
 60
 61     public int getPageCount() {
 62         return pageCount;
 63     }
 64
 65     public void setPageCount(int pageCount) {
 66         this.pageCount = pageCount;
 67     }
 68
 69     public int getPageIndex() {
 70         return pageIndex;
 71     }
 72
 73     public void setPageIndex(int pageIndex) {
 74         this.pageIndex = pageIndex;
 75     }
 76
 77     public String getP() {
 78         return p;
 79     }
 80
 81     public void setP(String p) {
 82         this.p = p;
 83     }
 84
 85     public String getC() {
 86         return c;
 87     }
 88
 89     public void setC(String c) {
 90         this.c = c;
 91     }
 92
 93         public int getYesmoney() {
 94         return yesmoney;
 95     }
 96
 97     public void setYesmoney(int yesmoney) {
 98         this.yesmoney = yesmoney;
 99     }
100
101     public int getNomoney() {
102         return nomoney;
103     }
104
105     public void setNomoney(int nomoney) {
106         this.nomoney = nomoney;
107     }
108
109         public int getYes() {
110             return yes;
111         }
112
113         public void setYes(int yes) {
114             this.yes = yes;
115         }
116
117         public int getNo() {
118             return no;
119         }
120
121         public void setNo(int no) {
122             this.no = no;
123         }
124
125
126
127         public MembersDAOImpl getMebDAO() {
128             return mebDAO;
129         }
130
131         public void setMebDAO(MembersDAOImpl mebDAO) {
132             this.mebDAO = mebDAO;
133         }
134
135
136         public int getRmb() {
137             return rmb;
138         }
139
140         public void setRmb(int rmb) {
141             this.rmb = rmb;
142         }
143
144         public int getTotalpeoper() {
145             return totalpeoper;
146         }
147
148         public void setTotalpeoper(int totalpeoper) {
149             this.totalpeoper = totalpeoper;
150         }
151
152         public Members getMebs() {
153             return mebs;
154         }
155
156         public void setMebs(Members mebs) {
157             this.mebs = mebs;
158         }
159
160
161     public int getId() {
162             return id;
163         }
164
165         public void setId(int id) {
166             this.id = id;
167         }
168
169     public Consumption getCon() {
170             return con;
171         }
172
173         public void setCon(Consumption con) {
174             this.con = con;
175         }
176
177         public Consumption getMs() {
178             return ms;
179         }
180
181         public void setMs(Consumption ms) {
182             this.ms = ms;
183         }
184
185         public List<Consumption> getLcon() {
186             return lcon;
187         }
188
189         public void setLcon(List<Consumption> lcon) {
190             this.lcon = lcon;
191         }
192
193         public IConsumptionDAO getConsumptionDAO() {
194             return consumptionDAO;
195         }
196
197         public void setConsumptionDAO(IConsumptionDAO consumptionDAO) {
198             this.consumptionDAO = consumptionDAO;
199         }
200 //得到所有的消费卡信息
201     public String getConsumption(){
202         lcon=consumptionDAO.GetConsumption();
203
204         int pagesize=15;
205         int recordcount=lcon.size();
206         int pagecount=(recordcount-1)/pagesize+1;
207         int pageindex=1;
208         try{
209             pagesize=Integer.parseInt(c);
210         }catch(Exception e)
211         {}
212         try{
213             pageindex=Integer.parseInt(p);
214         }catch(Exception e)
215         {}
216         if(pageindex<=1){
217             pageindex=1;
218         }
219         if(pageindex>pagecount){
220             pageindex=pagecount;
221         }
222         List<Consumption> soc2=new ArrayList<Consumption>();
223         for(int i=(pageindex-1)*pagesize;i<pageindex*pagesize&&i<lcon.size();i++){
224             soc2.add(lcon.get(i));
225         }
226         pageSize=pagesize;
227         recordCount=recordcount;
228         pageCount=pagecount;
229         pageIndex=pageindex;
230         lcon=soc2;
231
232     //    lcon=consumptionDAO.GetConsumptionPaging(pageIndex, pageSize);
233
234         return "getConsumption";
235     }
236     //根据ID找到一条消费卡信息
237     public String getconsumptionbyid(){
238         System.out.println(con.getId());
239
240         ms=consumptionDAO.GetConsumptionById(con.getId());
241         return "getconsumptionbyid";
242     }
243     //根据ID查找消费卡信息
244     public String jiezhangid(){
245
246         Time time=new Time();
247         //System.out.println(time.addDate());
248         ms=consumptionDAO.GetConsumptionById(id);
249         ms.setDate(time.addDate());
250         ms.setDatetime(time.addDateTime());
251         return "jiezhangid";
252     }
253     //进行修改
254     public String jiezhang(){
255
256         consumptionDAO.Update(ms);
257         return "jiezhang";
258     }
259     //添加一条信息,时间是time类获取的,不用输入
260     public String kaika(){
261         Time time=new Time();
262         if(ms.getName()!=null&&ms.getLevel()!=null ){
263         if(ms.getLevel().equals("会员")){
264             String name = ms.getName();
265
266             mebs=new Members();
267
268             mebs=mebDAO.GetMembersByMember(name);
269
270             if(ms.getName().equals(mebs.getMember())){
271
272
273                 con.setName(ms.getName());
274
275                 con.setMemberid(mebs.getId());
276
277                 con.setLevel(ms.getLevel());
278                 con.setChecks(ms.getChecks());
279                 con.setDate(time.addDate());
280                 con.setDatetime(time.addDateTime());
281                 String money="340";
282                 con.setMoney(money);
283                 consumptionDAO.Insert(con);
284             }else{
285                 con.setName(ms.getName());
286                 con.setMemberid(0);
287                 con.setLevel(ms.getLevel());
288                 con.setChecks(ms.getChecks());
289                 con.setDate(time.addDate());
290                 con.setDatetime(time.addDateTime());
291                 String money="340";
292                 con.setMoney(money);
293                 consumptionDAO.Insert(con);
294             }
295         }else if(ms.getLevel().equals("访客")){
296             con.setName(ms.getName());
297             Integer memberid=0;
298             con.setMemberid(memberid);
299             con.setLevel(ms.getLevel());
300             con.setChecks(ms.getChecks());
301             con.setDate(time.addDate());
302             con.setDatetime(time.addDateTime());
303             String money="1280";
304             con.setMoney(money);
305             consumptionDAO.Insert(con);
306         }
307         }
308         return "kaika";
309     }
310       //根据填入的日期查找
311     public String getconbydate(){
312         //1. 打球总人数
313         lcon=consumptionDAO.GetConsumptionByDate(con.getDate());
314
315         int pagesize=15;
316         int recordcount=lcon.size();
317         int pagecount=(recordcount-1)/pagesize+1;
318         int pageindex=1;
319         try{
320             pagesize=Integer.parseInt(c);
321         }catch(Exception e)
322         {}
323         try{
324             pageindex=Integer.parseInt(p);
325         }catch(Exception e)
326         {}
327         if(pageindex<=1){
328             pageindex=1;
329         }
330         if(pageindex>pagecount){
331             pageindex=pagecount;
332         }
333         List<Consumption> soc2=new ArrayList<Consumption>();
334         for(int i=(pageindex-1)*pagesize;i<pageindex*pagesize&&i<lcon.size();i++){
335             soc2.add(lcon.get(i));
336         }
337         pageSize=pagesize;
338         recordCount=recordcount;
339         pageCount=pagecount;
340         pageIndex=pageindex;
341         lcon=soc2;
342
343 //统计今天的报表
344         totalpeoper = lcon.size();
345         rmb=0;
346
347         for(int i=0;i<lcon.size();i++){
348             int oncermb=Integer.parseInt(lcon.get(i).getMoney());
349             rmb=rmb+oncermb;
350             if(lcon.get(i).getChecks().equals("是")){
351                 yes++;
352                 int money1=Integer.parseInt(lcon.get(i).getMoney());
353                 yesmoney=yesmoney+money1;
354
355             }else if(lcon.get(i).getChecks().equals("否")){
356                 no++;
357                 int money2=Integer.parseInt(lcon.get(i).getMoney());
358                 nomoney=nomoney+money2;
359             }
360         }
361         return "getconbydate";
362     }
363
364
365 }

ConsumptionAction.java

2.处理员工信息的、登录

  1 package com.chinasofti.golf.action;
  2
  3
  4 import java.util.List;
  5 import java.util.Map;
  6
  7 import org.apache.struts2.interceptor.SessionAware;
  8
  9 import com.chinasofti.golf.dao.IEmployeesDAO;
 10
 11 import com.chinasofti.golf.entity.Employees;
 12 import com.opensymphony.xwork2.ActionSupport;
 13
 14 @SuppressWarnings("serial")
 15 public class denglu extends ActionSupport implements SessionAware{
 16   private Employees emp1;
 17   private IEmployeesDAO employeesDAO;
 18   private Employees emp2;
 19   private String currentDate;
 20   String massage;
 21   private List<Employees> lemp;
 22   private int id;
 23 private Map<String, Object> session;
 24
 25
 26 public int getId() {
 27     return id;
 28 }
 29 public void setId(int id) {
 30     this.id = id;
 31 }
 32 public List<Employees> getLemp() {
 33     return lemp;
 34 }
 35 public void setLemp(List<Employees> lemp) {
 36     this.lemp = lemp;
 37 }
 38 public String getMassage() {
 39     return massage;
 40 }
 41 public void setMassage(String massage) {
 42     this.massage = massage;
 43 }
 44 public Employees getEmp1() {
 45     return emp1;
 46 }
 47 public void setEmp1(Employees emp1) {
 48     this.emp1 = emp1;
 49 }
 50 public String getCurrentDate() {
 51     return currentDate;
 52 }
 53 public void setCurrentDate(String currentDate) {
 54     this.currentDate = currentDate;
 55 }
 56 public Employees getEmp2() {
 57     return emp2;
 58 }
 59 public void setEmp2(Employees emp2) {
 60     this.emp2 = emp2;
 61 }
 62 public IEmployeesDAO getEmployeesDAO() {
 63     return employeesDAO;
 64 }
 65 public void setEmployeesDAO(IEmployeesDAO employeesDAO) {
 66     this.employeesDAO = employeesDAO;
 67 }
 68 //登录
 69   public String denglu(){
 70       String lervel1="前台";
 71       String lervel2="管理员";
 72       emp2=employeesDAO.GetEmployeesByName(emp1.getName());
 73       if(emp2!=null&&emp2.getId()!=null){
 74           if(emp2.getPassword().equals(emp1.getPassword())){
 75               if(emp2.getLevel().equals(emp1.getLevel())&&emp1.getLevel().equals(lervel1)){
 76
 77                    session.put("OK",emp2);
 78                    return "denglu1";
 79               }    else if(emp2.getLevel().equals(emp1.getLevel())&&emp1.getLevel().equals(lervel2)){
 80
 81                   session.put("OK",emp2);
 82                   return "denglu2";
 83               }    else{
 84                   massage="身份错了!";
 85                   return "massage";
 86               }
 87           }else{
 88               massage="密码错了!";
 89               return "massage";
 90           }
 91       }
 92       massage="密码错误或用户名不存在!";
 93       return "massage";
 94   }
 95
 96   public String allemployees(){
 97       lemp=employeesDAO.GetEmployees();
 98       return "allemployees";
 99   }
100   //添加
101   public String addemployees(){
102       emp2.setName(emp1.getName());
103       emp2.setPassword(emp1.getPassword());
104       emp2.setLevel(emp1.getLevel());
105       emp2.setSex(emp1.getSex());
106       emp2.setTelephone(emp1.getTelephone());
107       employeesDAO.Insert(emp2);
108
109       return "addemployees";
110   }
111   //按照ID查找
112   public String updateemployeesbyid(){
113 //      int id=emp1.getId();
114 //      System.out.println(id);
115      emp2= employeesDAO.GetEmployeesById(id);
116       return "updateemployeesbyid";
117   }
118   //删除
119   public String deleteemployees(){
120      emp2= employeesDAO.GetEmployeesById(id);
121      employeesDAO.Delete(emp2);
122       return "deleteemployees";
123   }
124
125   //更改
126   public String updateemployees(){
127       emp2.setId(emp1.getId());
128       emp2.setName(emp1.getName());
129       emp2.setPassword(emp1.getPassword());
130       emp2.setLevel(emp1.getLevel());
131       emp2.setSex(emp1.getSex());
132       emp2.setTelephone(emp1.getTelephone());
133       employeesDAO.Update(emp2);
134
135
136
137       return "updateemployees";
138   }
139   //退出
140   public String tuichu(){
141
142       session.put("OK", "");
143
144
145
146       return "tuichu";
147   }
148
149
150 @Override
151 public void setSession(Map<String, Object> session) {
152     // TODO Auto-generated method stub
153      this.session=session;
154 }
155
156 }

denglu.java

3.做登录界面跳转界面的

1 package com.chinasofti.golf.action;
2
3 public class Denlu {
4     public String execute(){
5         return "landing";
6     }
7
8 }

Denlu.java

4.处理留言的

  1 package com.chinasofti.golf.action;
  2
  3 import java.util.ArrayList;
  4 import java.util.List;
  5
  6 import com.chinasofti.golf.daoimpl.GuestDAOImpl;
  7 import com.chinasofti.golf.entity.Consumption;
  8 import com.chinasofti.golf.entity.Guest;
  9
 10 public class GuestAction {
 11     private Guest gue;
 12     private Guest gu;
 13     private List<Guest> lgue;
 14     private GuestDAOImpl gueDAO;
 15     private int id;
 16
 17     int pageSize;
 18     private int recordCount;
 19     private int pageCount;
 20     private int pageIndex;
 21     private String p;
 22     private String c;
 23
 24
 25
 26
 27
 28     public int getPageSize() {
 29         return pageSize;
 30     }
 31     public void setPageSize(int pageSize) {
 32         this.pageSize = pageSize;
 33     }
 34     public int getRecordCount() {
 35         return recordCount;
 36     }
 37     public void setRecordCount(int recordCount) {
 38         this.recordCount = recordCount;
 39     }
 40     public int getPageCount() {
 41         return pageCount;
 42     }
 43     public void setPageCount(int pageCount) {
 44         this.pageCount = pageCount;
 45     }
 46     public int getPageIndex() {
 47         return pageIndex;
 48     }
 49     public void setPageIndex(int pageIndex) {
 50         this.pageIndex = pageIndex;
 51     }
 52     public String getP() {
 53         return p;
 54     }
 55     public void setP(String p) {
 56         this.p = p;
 57     }
 58     public String getC() {
 59         return c;
 60     }
 61     public void setC(String c) {
 62         this.c = c;
 63     }
 64     public int getId() {
 65         return id;
 66     }
 67     public void setId(int id) {
 68         this.id = id;
 69     }
 70     public Guest getGu() {
 71         return gu;
 72     }
 73     public void setGu(Guest gu) {
 74         this.gu = gu;
 75     }
 76     public Guest getGue() {
 77         return gue;
 78     }
 79     public void setGue(Guest gue) {
 80         this.gue = gue;
 81     }
 82     public List<Guest> getLgue() {
 83         return lgue;
 84     }
 85     public void setLgue(List<Guest> lgue) {
 86         this.lgue = lgue;
 87     }
 88     public GuestDAOImpl getGueDAO() {
 89         return gueDAO;
 90     }
 91     public void setGueDAO(GuestDAOImpl gueDAO) {
 92         this.gueDAO = gueDAO;
 93     }
 94 //查找所有的留言
 95     public String allguest(){
 96         lgue=gueDAO.GetConsumption();
 97
 98          int pagesize=15;
 99             int recordcount=lgue.size();
100             int pagecount=(recordcount-1)/pagesize+1;
101             int pageindex=1;
102             try{
103                 pagesize=Integer.parseInt(c);
104             }catch(Exception e)
105             {}
106             try{
107                 pageindex=Integer.parseInt(p);
108             }catch(Exception e)
109             {}
110             if(pageindex<=1){
111                 pageindex=1;
112             }
113             if(pageindex>pagecount){
114                 pageindex=pagecount;
115             }
116             List<Guest> soc2=new ArrayList<Guest>();
117             for(int i=(pageindex-1)*pagesize;i<pageindex*pagesize&&i<lgue.size();i++){
118                 soc2.add(lgue.get(i));
119             }
120             pageSize=pagesize;
121             recordCount=recordcount;
122             pageCount=pagecount;
123             pageIndex=pageindex;
124             lgue=soc2;
125
126
127         return "allguest";
128     }
129     //添加一条留言
130     public String addguest(){
131         Time time=new Time();
132
133
134         gue.setName(gu.getName());
135         gue.setMessage(gu.getMessage());
136         gue.setLook(gu.getLook());
137         gue.setSolve(gu.getSolve());
138         gue.setDate(time.addDate());
139         gue.setDatetime(time.addDateTime());
140
141         gueDAO.Insert(gue);
142
143         return "addguest";
144     }
145
146     //根据ID查找这条留言,并且要显示已经查看过,解决与否可以更改的
147     public String getguestbyid(){
148         System.out.println(id);
149         gue=gueDAO.GetGuestById(id);
150     //    System.out.println(gue.getName());
151         return "getguestbyid";
152     }
153
154     public String updateguest(){
155
156        Time time=new Time();
157        System.out.println(111111111);
158        System.out.println(gu.getName());
159        System.out.println(gu.getMessage());
160        System.out.println(gu.getLook());
161        System.out.println(gu.getSolve());
162        System.out.println(time.addDate());
163        System.out.println(time.addDateTime());
164        System.out.println(111111111);
165
166
167         gue.setName(gu.getName());
168         gue.setMessage(gu.getMessage());
169         gue.setLook(gu.getLook());
170         gue.setSolve(gu.getSolve());
171         gue.setDate(time.addDate());
172         gue.setDatetime(time.addDateTime());
173         gueDAO.Update(gue);
174
175         return "updateguest";
176     }
177 }

GuestAction.java

5.拦截器,拦截登录信息的

 1 package com.chinasofti.golf.action;
 2
 3
 4 import java.util.Map;
 5
 6  import javax.servlet.http.HttpServletRequest;
 7
 8
 9  import org.apache.struts2.ServletActionContext;
10
11
12  import com.opensymphony.xwork2.ActionInvocation;
13  import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
14
15 @SuppressWarnings("serial")
16 public class Landing extends AbstractInterceptor{
17
18     @Override
19     public String intercept(ActionInvocation invocation) throws Exception {
20         // TODO Auto-generated method stub
21          HttpServletRequest request=ServletActionContext.getRequest();
22           Map<String,Object> session=invocation.getInvocationContext().getSession();
23                    Object obj=session.get("OK");
24                     if(obj!=null){
25                         invocation.invoke();
26                    }
27                      request.setAttribute("message", "对不起您还没有登录,请先登录");
28                      return "inputtt";
29
30             }
31
32         }

Landing.java

6.处理会员信息的

  1 package com.chinasofti.golf.action;
  2
  3 import java.util.ArrayList;
  4 import java.util.List;
  5
  6
  7 import com.chinasofti.golf.daoimpl.MembersDAOImpl;
  8 import com.chinasofti.golf.entity.Consumption;
  9 import com.chinasofti.golf.entity.Members;
 10 import com.opensymphony.xwork2.ActionSupport;
 11
 12 @SuppressWarnings("serial")
 13 public class MembersAction extends ActionSupport {
 14     private Members meb;
 15     private Members ms;
 16     private List<Members> lmeb;
 17     private MembersDAOImpl mebDAO;
 18     private int id;
 19
 20
 21     int pageSize;
 22     private int recordCount;
 23     private int pageCount;
 24     private int pageIndex;
 25     private String p;
 26     private String c;
 27
 28
 29     public int getPageSize() {
 30         return pageSize;
 31     }
 32     public void setPageSize(int pageSize) {
 33         this.pageSize = pageSize;
 34     }
 35     public int getRecordCount() {
 36         return recordCount;
 37     }
 38     public void setRecordCount(int recordCount) {
 39         this.recordCount = recordCount;
 40     }
 41     public int getPageCount() {
 42         return pageCount;
 43     }
 44     public void setPageCount(int pageCount) {
 45         this.pageCount = pageCount;
 46     }
 47     public int getPageIndex() {
 48         return pageIndex;
 49     }
 50     public void setPageIndex(int pageIndex) {
 51         this.pageIndex = pageIndex;
 52     }
 53     public String getP() {
 54         return p;
 55     }
 56     public void setP(String p) {
 57         this.p = p;
 58     }
 59     public String getC() {
 60         return c;
 61     }
 62     public void setC(String c) {
 63         this.c = c;
 64     }
 65     public int getId() {
 66         return id;
 67     }
 68     public void setId(int id) {
 69         this.id = id;
 70     }
 71     public MembersDAOImpl getMebDAO() {
 72         return mebDAO;
 73     }
 74     public void setMebDAO(MembersDAOImpl mebDAO) {
 75         this.mebDAO = mebDAO;
 76     }
 77     public Members getMeb() {
 78         return meb;
 79     }
 80     public void setMeb(Members meb) {
 81         this.meb = meb;
 82     }
 83     public List<Members> getLmeb() {
 84         return lmeb;
 85     }
 86     public void setLmeb(List<Members> lmeb) {
 87         this.lmeb = lmeb;
 88     }
 89     public Members getMs() {
 90         return ms;
 91     }
 92     public void setMs(Members ms) {
 93         this.ms = ms;
 94     }
 95
 96
 97
 98
 99     public String member(){
100        int id=meb.getId();
101        System.out.println(meb.getId());
102        ms=mebDAO.GetMembersById(id);
103        return "member";
104    }
105
106     public String allmember(){
107         lmeb=mebDAO.GetMembers();
108
109         int pagesize=15;
110         int recordcount=lmeb.size();
111         int pagecount=(recordcount-1)/pagesize+1;
112         int pageindex=1;
113         try{
114             pagesize=Integer.parseInt(c);
115         }catch(Exception e)
116         {}
117         try{
118             pageindex=Integer.parseInt(p);
119         }catch(Exception e)
120         {}
121         if(pageindex<=1){
122             pageindex=1;
123         }
124         if(pageindex>pagecount){
125             pageindex=pagecount;
126         }
127         List<Members> soc2=new ArrayList<Members>();
128         for(int i=(pageindex-1)*pagesize;i<pageindex*pagesize&&i<lmeb.size();i++){
129             soc2.add(lmeb.get(i));
130         }
131         pageSize=pagesize;
132         recordCount=recordcount;
133         pageCount=pagecount;
134         pageIndex=pageindex;
135         lmeb=soc2;
136
137
138
139         return "allmember";
140     }
141
142     public String addmember(){
143
144         meb.getMember();
145         meb.getCarid();
146         meb.getSex();
147         meb.getLevel();
148         meb.getTelephone();
149         mebDAO.Insert(meb);
150
151         return "addmember";
152     }
153     public String memberid(){
154 //            int id=meb.getId();
155            ms=mebDAO.GetMembersById(id);
156            return "memberid";
157        }
158     //修改会员信息
159     public String updatemember(){
160
161
162         mebDAO.Update(meb);
163         return "updatemember";
164     }
165
166
167
168
169
170 }

MembersAction.java

7.会员消费记录的

 1 package com.chinasofti.golf.action;
 2
 3 import java.util.List;
 4
 5 import com.chinasofti.golf.dao.IRecordDAO;
 6 import com.chinasofti.golf.entity.Record;
 7 import com.opensymphony.xwork2.ActionSupport;
 8
 9 @SuppressWarnings("serial")
10 public class RecordAction extends ActionSupport{
11       private Record red;
12       private List<Record> lred;
13       private IRecordDAO  redDAO;
14
15     public Record getRed() {
16         return red;
17     }
18     public void setRed(Record red) {
19         this.red = red;
20     }
21     public List<Record> getLred() {
22         return lred;
23     }
24     public void setLred(List<Record> lred) {
25         this.lred = lred;
26     }
27     public IRecordDAO getRedDAO() {
28         return redDAO;
29     }
30     public void setRedDAO(IRecordDAO redDAO) {
31         this.redDAO = redDAO;
32     }
33
34
35     public String getrecordbyid(){
36         String Memberid=red.getMemberid();
37
38         lred=(List<Record>) redDAO.GetRecordByMemberid(Memberid);
39         return "getrecordbyid";
40     }
41
42 }

RecordAction

8.供大家用的时间类

 1 package com.chinasofti.golf.action;
 2
 3 import java.text.SimpleDateFormat;
 4 import java.util.Date;
 5
 6 public class Time {
 7     String currentDate;
 8     String currentDateTime;
 9
10
11      public String addDate(){
12           Date date=new Date();
13           String format1="yyyy-MM-dd ";
14
15           SimpleDateFormat sdf1=new SimpleDateFormat(format1);
16
17           currentDate=sdf1.format(date);
18
19           return currentDate;
20         }
21      public String addDateTime(){
22           Date date=new Date();
23
24           String format2="HH:mm:ss";
25
26           SimpleDateFormat sdf2=new SimpleDateFormat(format2);
27
28           currentDateTime=sdf2.format(date);
29
30          return currentDateTime;
31         }
32
33
34 }

Time

9.校验器,校验登录信息的

 1 <?xml version="1.0" encoding="UTF-8"?>
 2  <!DOCTYPE validators PUBLIC
 3           "-//OpenSymphony Group//XWork Validator 1.0.3//EN"
 4           "http://www.opensymphony.com/xwork/xwork-validator-1.0.3.dtd">
 5 <validators>
 6      <field name="emp1.name">
 7           <field-validator type="requiredstring">
 8                <message>用户名不能为空</message>
 9          </field-validator>
10        </field>
11
12          <field name="emp1.password">
13              <field-validator type="requiredstring">
14                     <message>密码不能为空</message>
15              </field-validator>
16
17       </field>
18 </validators>

denglu-Landing-validation.xml

二.jsp界面

1.添加

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘addemployees.jsp‘ starting page</title>
13
14     <meta http-equiv="pragma" content="no-cache">
15     <meta http-equiv="cache-control" content="no-cache">
16     <meta http-equiv="expires" content="0">
17     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
18     <meta http-equiv="description" content="This is my page">
19     <!--
20     <link rel="stylesheet" type="text/css" href="styles.css">
21     -->
22  <style type="text/css">
23     tr{
24     text-align: center;
25     font-family: "微软雅黑";
26     font-size: 14px;
27     color:  bgcolor="red" ;
28     }
29 td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
30 #bg {width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;}
31 </style>
32   </head>
33
34   <body>
35   <div id="bg">
36       <form action="Addemployees" method="post">
37     <table>
38     <tr><td width="100">姓名:</td><td><input type="text" name="emp1.name"/></td></tr>
39     <tr><td width="100">密码:</td><td><input type="text" name="emp1.password"/></td></tr>
40     <tr><td width="100">身份:</td><td><select name="emp1.level" >
41                             <option value="前台" style="color: red">前台</option>
42                              <option value="管理员" style="color: blue">管理员</option>
43                             </select>
44                             </td></tr>
45
46     <tr><td width="100">性别:</td><td><select name="emp1.sex" >
47                             <option value="女" style="color: red">女</option>
48                              <option value="男" style="color: blue">男</option>
49                             </select>
50                             </td></tr>
51
52     <tr><td width="100">电话号码:</td><td><input type="text" name="emp1.telephone"/></td></tr>
53     <tr><td width="100"><input type="submit" value="确认添加" style="height: 20px; width: 100px; "></td><td width="100px"><a href="allmember.jsp"><input type="reset" value="取消" style="height: 20px; width: 100px; "></a></td></td>
54     </tr>
55
56
57     </table>
58     </form>
59     </div>
60   </body>
61 </html>

addemployees.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘addguest.jsp‘ starting page</title>
13
14     <meta http-equiv="pragma" content="no-cache">
15     <meta http-equiv="cache-control" content="no-cache">
16     <meta http-equiv="expires" content="0">
17     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
18     <meta http-equiv="description" content="This is my page">
19     <!--
20     <link rel="stylesheet" type="text/css" href="styles.css">
21     -->
22  <style type="text/css">
23     tr{
24     text-align: center;
25     font-family: "微软雅黑";
26     font-size: 14px;
27
28     }
29 td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
30 #bg {
31 width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
32     }
33 </style>
34   </head>
35
36   <body>  <div id="bg">
37    <form  method="post" action="Addguest">
38     <table align="center" border="0" >
39
40     <tr>
41           <td>留言人</td>
42           <td colspan="3" align="left"><input type="text" name="gu.name"  style="width: 100%; "></td>
43        </tr>
44
45        <tr>
46            <td>留言</td>
47            <td colspan="3" align="left">
48               <textarea cols="100" rows="20"  name="gu.message" ></textarea>
49            </td>
50        </tr>
51        <tr>
52           <td>是否查看</td>
53           <td><select name="gu.look">
54                             <option value="否" style="color: red">否</option>
55                              <option value="是" style="color: blue">是</option>
56                             </select></td>
57           <td>是否解决</td>
58           <td><select name="gu.solve">
59                             <option value="否" style="color: red">否</option>
60                              <option value="是" style="color: blue">是</option>
61                             </select>
62           </td>
63        </tr>
64        <tr>
65          <td colspan="4" align="center" height="20px">
66            <input type="submit" value="提交" />&nbsp;&nbsp;
67            <input type="reset" value="取消 "/>
68          </td>
69
70        </tr>
71     </table>
72    </form>
73    </div>
74   </body>
75 </html>

addguest

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘addmember.jsp‘ starting page</title>
13
14     <meta http-equiv="pragma" content="no-cache">
15     <meta http-equiv="cache-control" content="no-cache">
16     <meta http-equiv="expires" content="0">
17     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
18     <meta http-equiv="description" content="This is my page">
19     <!--
20     <link rel="stylesheet" type="text/css" href="styles.css">
21     -->
22  <style type="text/css">
23     tr{
24     text-align: center;
25     font-family: "微软雅黑";
26     font-size: 14px;
27     color:  bgcolor="#39F" ;
28     }
29 td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
30 #bg {
31 width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
32     }
33 </style>
34   </head>
35
36   <body>
37   <div id="bg">
38   <form action="Addmember" method="post">
39     <table>
40     <tr><td width="100">姓名</td><td><input type="text" name="meb.member"/></td></tr>
41     <tr><td width="100">身份证号码</td><td><input type="text" name="meb.carid"/></td></tr>
42     <tr><td width="100">性别</td><td><select name="meb.sex" >
43                             <option value="男" style="color: red">男</option>
44                              <option value="女" style="color: blue">女</option>
45                              <option value="人妖" style="color: blue">人妖</option>
46                             </select>
47                             </td></tr>
48
49     <tr><td width="100">电话号码</td><td><input type="text" name="meb.telephone"/></td></tr>
50     <tr><td width="100">会员身份</td><td><select name="meb.level" >
51                             <option value="会员" style="color: red">会员</option>
52                              <option value="访客" style="color: blue">访客</option>
53
54                             </select>
55                             </td></tr>
56
57
58     <tr><td width="100"><input type="submit" value="确认添加" style="height: 20px; width: 100px; "></td><td width="100px"><input type="reset" value="取消" style="height: 20px; width: 100px; "></td></td>
59     </tr>
60
61
62     </table>
63     </form>
64     </div>
65   </body>
66 </html>

addmember.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2
 3 <%
 4 String path = request.getContextPath();
 5 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 6 %>
 7
 8 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 9 <html>
10   <head>
11     <base href="<%=basePath%>">
12
13     <title>My JSP ‘kaika.jsp‘ starting page</title>
14
15     <meta http-equiv="pragma" content="no-cache">
16     <meta http-equiv="cache-control" content="no-cache">
17     <meta http-equiv="expires" content="0">
18     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
19     <meta http-equiv="description" content="This is my page">
20     <!--
21     <link rel="stylesheet" type="text/css" href="styles.css">
22     -->
23  <style type="text/css">
24     tr{
25     text-align: center;
26     font-family: "微软雅黑";
27     font-size: 14px;
28
29     }
30
31 #bg {
32     width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
33     }
34 </style>
35   </head>
36
37   <body>
38    <div id="bg">
39     <form  action="Kaika" method="post">
40      <table  border="1"  bgcolor="celeste"  style="height: 140px;  ">
41     <tr> <td width="100">姓名</td> <td><input type="text" name="ms.name"/></td></tr>
42    <tr> <td width="100">会员ID</td> <td><input type="text" name="ms.memberid"/></td></tr>
43     <tr><td width="100">身份</td> <td><select  name="ms.level">
44                                         <option value="会员">会员</option>
45                                          <option value="访客">访客</option>
46                                       </select></td></tr>
47
48     <tr><td width="100">是否结账</td><td><select name="ms.checks">
49                                                                                   <option value="否">否</option>
50                                                                                  <option value="是">是</option>
51                                                                                  </select></td></tr>
52    <tr> <td width="100">当前日期</td> <td><input type="text"  value="${ms.date}" name="ms.date"/></td></tr>
53     <tr><td width="100">当前时间</td><td><input type="text"  value="${ms.datetime}" name="ms.datetime"/></td></tr>
54     <tr><td width="100">新增用户</td></tr>
55    <tr>
56     <td><input type="submit" value="确认开卡" ><input type="reset" value="取消" > </td>
57     </tr>
58     </table>
59
60
61    </form>
62    </div>
63   </body>
64 </html>

kaika.jsp

2.查询所有

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 3 <%
 4 String path = request.getContextPath();
 5 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 6 %>
 7
 8 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 9 <html>
10   <head>
11     <base href="<%=basePath%>">
12
13     <title>My JSP ‘allemployees.jsp‘ starting page</title>
14
15     <meta http-equiv="pragma" content="no-cache">
16     <meta http-equiv="cache-control" content="no-cache">
17     <meta http-equiv="expires" content="0">
18     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
19     <meta http-equiv="description" content="This is my page">
20     <!--
21     <link rel="stylesheet" type="text/css" href="styles.css">
22     -->
23  <style type="text/css">
24     tr{text-align: center;font-family: "微软雅黑";font-size: 14px;}
25     td{background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
26     #bg {width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;}
27 </style>
28   </head>
29
30   <body>
31   <div id="bg">
32     <table align="center">
33     <tr>
34     <td width="100px">员工号</td>
35      <td width="100px">姓名</td>
36       <td width="100px" >密码</td>
37        <td width="100px">身份</td>
38         <td width="100px">性别</td>
39          <td width="100px">电话号码</td>
40          <td width="100px" colspan="2"><a href="addemployees.jsp"><input type="submit" value="增加员工" style="height: 20px; width: 100px; "/></a></td>
41     </tr>
42     <c:forEach var="lem" items= "${lemp}">
43     <tr>
44     <td><input type="text" value="${lem.id}"  name="emp1.id" readonly="readonly"/></td>
45      <td><input type="text" value="${lem.name}"  name="emp1.name" readonly="readonly"/></td>
46       <td><input type="text" value="${lem.password}"  name="emp1.password" readonly="readonly"/></td>
47        <td><input type="text" value="${lem.level}"  name="emp1.level" readonly="readonly"/></td>
48         <td><input type="text" value="${lem.sex}"  name="emp1.sex" readonly="readonly"/></td>
49          <td><input type="text" value="${lem.telephone }"  name="emp1.telephone" readonly="readonly"/></td>
50           <td width="100px"><a href="Deleteemployees?id=${lem.id}" onclick=" return confirm(‘确认删除?删除后不可恢复!‘)"><input type="submit" value="删除员工" style="height: 20px; width: 100px; "/></a></td>
51           <td width="100px"><a href="Updateemployeesbyid?id=${lem.id}"><input type="submit" value="修改员工信息" style="height: 20px; width: 100px; "/></a></td>
52     </tr>
53     </c:forEach>
54
55
56
57     </table>
58     </div>
59   </body>
60 </html>

allemployees.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 3
 4
 5 <%
 6 String path = request.getContextPath();
 7 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 8 %>
 9
10 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
11 <html>
12   <head>
13     <base href="<%=basePath%>">
14
15     <title>My JSP ‘allguest.jsp‘ starting page</title>
16
17     <meta http-equiv="pragma" content="no-cache">
18     <meta http-equiv="cache-control" content="no-cache">
19     <meta http-equiv="expires" content="0">
20     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
21     <meta http-equiv="description" content="This is my page">
22     <!--
23     <link rel="stylesheet" type="text/css" href="styles.css">
24     -->
25  <style type="text/css">
26     tr{text-align: center;font-family: "微软雅黑";font-size: 14px;}
27     td{background-image: url(./imge/l1b5.gif);background-size: 100% 100%; }
28     #bg {width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;}
29     .red{ background-color: red; }
30 </style>
31   </head>
32
33   <body>
34     <div id="bg">
35     <table align="center" border="0" >
36     <tr>
37     <td width="30px">序列</td>
38     <td width="50px">留言人</td>
39      <td width="100px">日期</td>
40       <td width="100px">时间</td>
41        <td width="100px">是否查看</td>
42         <td width="100px">是否解决</td>
43          <td width="20px">留言信息</td>
44           <td width="150px"><a href="addguest.jsp"><input type="submit" value="新增留言" style="height: 20px; width: 100px; "></a></td>
45     </tr>
46      <c:forEach var="gue" items= "${lgue}" varStatus="status">
47     <tr>
48      <td >${gue.id}</td>
49     <td >${gue.name}</td>
50      <td ><input value="${gue.date}" readonly="readonly"></td>
51       <td><input value="${gue.datetime}" readonly="readonly"></td>
52        <td >${gue.look}</td>
53         <td >${gue.solve}</td>
54          <td ><input value="${gue.message}" readonly="readonly"></td>
55            <td><a href="Getguestbyid?id=${gue.id}"><input type="submit" value="查看详情" style="height: 20px; width: 100px; "></a></td>
56     </tr>
57     </c:forEach>
58     </table>
59     <table align="center">
60     <tr><td>
61                  共有${recordCount}条留言,每页显示${pageSize}条,共${pageCount}页,当前第${pageIndex}页
62         <a href="Allguest?p=${pageIndex-1}&c=${pageSize}">上一页</a>
63         <a href="Allguest?p=${pageIndex+1}&c=${pageSize}">下一页</a>
64         </td></tr>
65    </table>
66     </div>
67   </body>
68 </html>

allguest.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 3 <%
 4 String path = request.getContextPath();
 5 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 6 %>
 7
 8 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 9 <html>
10   <head>
11     <base href="<%=basePath%>">
12
13     <title>My JSP ‘allmember.jsp‘ starting page</title>
14
15     <meta http-equiv="pragma" content="no-cache">
16     <meta http-equiv="cache-control" content="no-cache">
17     <meta http-equiv="expires" content="0">
18     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
19     <meta http-equiv="description" content="This is my page">
20     <!--
21     <link rel="stylesheet" type="text/css" href="styles.css">
22     -->
23  <style type="text/css">
24     tr{text-align: center;font-family: "微软雅黑";font-size: 14px;}
25     td{background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
26     #bg {width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;}
27 </style>
28   </head>
29
30   <body>
31   <div id="bg">
32     <table align="center">
33     <tr><td width="100">会员ID</td>
34             <td width="100">姓名</td>
35             <td width="100">身份证号码</td>
36             <td width="100">性别</td>
37             <td width="100">电话号码</td>
38             <td width="100">会员身份</td>
39             <td width="100"><a href="addmember.jsp"><input type="submit" value="添加会员" style="height: 20px; width: 100px; "></a></td>
40
41     </tr>
42       <c:forEach var="meb" items= "${lmeb}">
43     <tr><td><input value="${meb.id}" readonly="readonly"></td>
44                 <td><input type="text" value="${meb.member}" readonly="readonly"></td>
45                 <td><input type="text" value="${meb.carid}" readonly="readonly"></td>
46                 <td><input type="text" value="${meb.sex}" readonly="readonly"></td>
47                 <td><input type="text" value="${meb.telephone}" readonly="readonly"></td>
48                 <td><input type="text" value="${meb.level}" readonly="readonly"></td>
49                 <td><a href="Memberid?id=${meb.id}"><input type="submit" value="更改会员信息" style="height: 20px; width: 100px; "></a></td>
50     </tr>
51     </c:forEach>
52     </table>
53     <table align="center">
54     <tr><td>
55                  共有${recordCount}人打球,每页显示${pageSize}人,共${pageCount}页,当前第${pageIndex}页
56         <a href="Allmember?p=${pageIndex-1}&c=${pageSize}">上一页</a>
57         <a href="Allmember?p=${pageIndex+1}&c=${pageSize}">下一页</a>
58         </td></tr>
59    </table>
60     </div>
61   </body>
62 </html>

allmember

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 3 <%
 4 String path = request.getContextPath();
 5 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 6 %>
 7
 8 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 9 <html>
10   <head>
11     <base href="<%=basePath%>">
12
13     <title>My JSP ‘tadykaika.jsp‘ starting page</title>
14
15 <style type="text/css">
16     tr{text-align: center;font-family: "微软雅黑";font-size: 14px;}
17     td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
18    #bg {width: auto;height:41em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;}
19 </style>
20
21   </head>
22
23   <body>
24     <div id="bg" >
25     <table  align="center" >
26     <tr>
27     <td width="100">消费卡号</td>
28     <td width="100">姓名</td>
29     <td width="100">会员ID</td>
30     <td width="100">身份</td>
31     <td width="100">价格</td>
32     <td width="100">是否结账</td>
33     <td width="100">当前日期</td>
34     <td width="100">当前时间</td>
35     <td width="200" ><a href="kaika.jsp" ><input type="submit" value="开卡" style="height: 20px; width: 100px; "></a></td>
36     </tr>
37     <c:forEach var="con" items= "${lcon}">
38     <tr>
39     <td><input type="text" value="${con.id}" readonly="readonly"></td>
40     <td><input type="text" value="${con.name}" readonly="readonly"></td>
41     <td><input type="text" value="${con.memberid}" readonly="readonly"></td>
42     <td><input type="text" value="${con.level}" readonly="readonly"></td>
43     <td><input type="text" value="${con.money}" readonly="readonly"></td>
44     <td><input type="text" value="${con.checks}" readonly="readonly"></td>
45     <td><input type="text" value="${con.date}" readonly="readonly"></td>
46     <td><input type="text" value="${con.datetime}" readonly="readonly"></td>
47     <td><a href="Jiezhangid?id=${con.id}" ><input type="submit" value="结账" style="height: 20px; width: 100px; "></a></td>
48     </tr>
49
50     </c:forEach>
51
52     </table>
53     <table align="center">
54     <tr><td>
55                  共有${recordCount}人打球,每页显示${pageSize}人,共${pageCount}页,当前第${pageIndex}页
56         <a href="GetConsumption?p=${pageIndex-1}&c=${pageSize}">上一页</a>
57         <a href="GetConsumption?p=${pageIndex+1}&c=${pageSize}">下一页</a>
58         </td></tr>
59    </table>
60    </div>
61   </body>
62 </html>

tadykaika.jsp

3.通过XX查

  1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
  2 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3 <%
  4 String path = request.getContextPath();
  5 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  6 %>
  7
  8 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  9 <html>
 10   <head>
 11     <base href="<%=basePath%>">
 12
 13     <title>My JSP ‘getconsumptionbydate.jsp‘ starting page</title>
 14
 15     <meta http-equiv="pragma" content="no-cache">
 16     <meta http-equiv="cache-control" content="no-cache">
 17     <meta http-equiv="expires" content="0">
 18     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 19     <meta http-equiv="description" content="This is my page">
 20     <!--
 21     <link rel="stylesheet" type="text/css" href="styles.css">
 22     -->
 23 <style type="text/css">
 24 #denglu {
 25     position: absolute;
 26     border: 1px solid #C90;
 27     height: 5%;
 28     width: 100%;
 29     background-image: url(./imge/l1b5.gif);background-size: 100% 100%;
 30 }
 31  tr{
 32     text-align: center;
 33     font-family: "微软雅黑";
 34     font-size: 14px;
 35
 36     }
 37 td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
 38 #bg {
 39     width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
 40     }
 41 </style>
 42   </head>
 43
 44   <body>
 45   <div id="bg">
 46     <h3>     查询消费卡信息:</h3>
 47      <form  action="Getconsumptionbydate" method="post">
 48     <table  border="0"   align="center">
 49     <tr><td width="100">日期:</td><td> <input type="date" name="con.date"/></td></tr>
 50
 51
 52     <tr><td><input type="submit" value="查询" style="height: 20px; width: 100px; "/></td><td>${con.date}</td></tr>
 53     </table>
 54    </form>
 55     <table align="center">
 56     <tr>
 57              <td width="100">截止日期</td>
 58             <td width="100">截止时间</td>
 59             <td width="100">身份</td>
 60             <td width="100">消费卡号</td>
 61             <td width="100">姓名</td>
 62             <td width="100">会员卡号</td>
 63             <td width="100">价格</td>
 64             <td width="100">是否结账</td>
 65
 66
 67     </tr>
 68      <c:forEach var="ms" items= "${lcon}">
 69                <tr>
 70                    <td>${ms.date}</td>
 71                 <td>${ms.datetime}</td>
 72                 <td>${ms.level}</td>
 73                 <td>${ms.id}</td>
 74                 <td>${ms.name}</td>
 75                 <td>${ms.memberid}</td>
 76                 <td>${ms.money}</td>
 77                 <td>${ms.checks}</td>
 78
 79     </tr>
 80     </c:forEach>
 81     </table>
 82       <table align="center">
 83     <tr><td>
 84                  共有${recordCount}人打球,共${pageCount}页,当前第${pageIndex}页
 85         <a href="Getconsumptionbydate?p=${pageIndex-1}&c=${pageSize}">上一页</a>
 86         <a href="Getconsumptionbydate?p=${pageIndex+1}&c=${pageSize}">下一页</a>
 87         </td></tr>
 88    </table>
 89     <div id="denglu">
 90     <table>
 91        <tr>
 92          <td>今日总人数:</td>
 93          <td> <input type="text" value="${totalpeoper}" /></td>
 94           <td>已完成:</td>
 95            <td> <input type="text"  value="${yes}"/></td>
 96            <td>剩余人数:</td>
 97             <td> <input type="text"  value="${no}"/></td>
 98             <td>总收入:</td>
 99              <td> <input type="text" value="${rmb}" /></td>
100              <td>已经收到金额:</td>
101               <td> <input type="text"  value="${yesmoney}"/></td>
102               <td>剩余收到金额:</td>
103                <td> <input type="text" value="${nomoney}" /></td>
104
105       </tr>
106
107     </table>
108
109 </div>
110 </div>
111   </body>
112 </html>

getconmptionbydate.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%@taglib  prefix="s" uri="/struts-tags"%>
 3 <%
 4 String path = request.getContextPath();
 5 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 6 %>
 7
 8 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 9 <html>
10   <head>
11     <base href="<%=basePath%>">
12
13     <title>My JSP ‘getconsumpyionbyid.jsp‘ starting page</title>
14
15     <meta http-equiv="pragma" content="no-cache">
16     <meta http-equiv="cache-control" content="no-cache">
17     <meta http-equiv="expires" content="0">
18     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
19     <meta http-equiv="description" content="This is my page">
20     <!--
21     <link rel="stylesheet" type="text/css" href="styles.css">
22     -->
23      <style type="text/css">
24     tr{
25     text-align: center;
26     font-family: "微软雅黑";
27     font-size: 14px;
28
29     }
30     td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
31 #bg {
32     width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
33     }
34 </style>
35   </head>
36
37   <body>
38   <div id="bg">
39      <h3>查询消费卡信息:</h3>
40      <form  action="Getconsumptionbyid" method="post">
41         <table  border="1"  align="center" >
42             <tr><td width="100">消费卡号:</td><td> <input type="text" name="con.id"/></td></tr>
43             <tr><td><input type="submit" value="查询" /></td> <td><input type="reset" value="取消"/> </td></tr>
44         </table>
45    </form>
46
47     <table align="center">
48     <tr><td width="100">消费卡号</td>
49             <td width="100">姓名</td>
50             <td width="100">会员卡号</td>
51             <td width="100">身份</td>
52             <td width="100">价格</td>
53             <td width="100">是否结账</td>
54             <td width="100">开卡日期</td>
55             <td width="100">开卡时间</td>
56     </tr>
57                <tr><td>${ms.id}</td>
58                 <td>${ms.name}</td>
59                 <td>${ms.memberid}</td>
60                 <td>${ms.level}</td>
61                 <td>${ms.money}</td>
62                 <td>${ms.checks}</td>
63                 <td>${ms.date}</td>
64                 <td>${ms.datetime}</td>
65                 <td><a href="Jiezhangid?id=${ms.id}"><input type="submit" value="结账" style="height: 20px; width: 80px; "/></a> </td>
66     </tr>
67     </table>
68 </div>
69   </body>
70 </html>

getconmptionbyid.jsp

  1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
  2 <%@taglib  prefix="s" uri="/struts-tags"%>
  3 <%
  4 String path = request.getContextPath();
  5 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  6 %>
  7
  8 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  9 <html>
 10   <head>
 11     <base href="<%=basePath%>">
 12
 13     <title>My JSP ‘getconsumpyionbyid.jsp‘ starting page</title>
 14
 15     <meta http-equiv="pragma" content="no-cache">
 16     <meta http-equiv="cache-control" content="no-cache">
 17     <meta http-equiv="expires" content="0">
 18     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 19     <meta http-equiv="description" content="This is my page">
 20     <!--
 21     <link rel="stylesheet" type="text/css" href="styles.css">
 22     -->
 23      <style type="text/css">
 24     tr{
 25     text-align: center;
 26     font-family: "微软雅黑";
 27     font-size: 14px;
 28
 29     }
 30     td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
 31 #bg {
 32     width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
 33     }
 34 </style>
 35   </head>
 36
 37   <body>
 38   <div id="bg">
 39      <h3>查询消费卡信息:</h3>
 40      <form  action="Getconsumptionbyid" method="post">
 41         <table  border="1"  align="center" >
 42             <tr><td width="100">消费卡号:</td><td> <input type="text" name="con.id"/></td></tr>
 43             <tr><td><input type="submit" value="查询" /></td> <td><input type="reset" value="取消"/> </td></tr>
 44         </table>
 45    </form>
 46
 47     <table align="center">
 48     <tr><td width="100">消费卡号</td>
 49             <td width="100">姓名</td>
 50             <td width="100">会员卡号</td>
 51             <td width="100">身份</td>
 52             <td width="100">价格</td>
 53             <td width="100">是否结账</td>
 54             <td width="100">开卡日期</td>
 55             <td width="100">开卡时间</td>
 56     </tr>
 57                <tr><td>${ms.id}</td>
 58                 <td>${ms.name}</td>
 59                 <td>${ms.memberid}</td>
 60                 <td>${ms.level}</td>
 61                 <td>${ms.money}</td>
 62                 <td>${ms.checks}</td>
 63                 <td>${ms.date}</td>
 64                 <td>${ms.datetime}</td>
 65                 <td><a href="Jiezhangid?id=${ms.id}"><input type="submit" value="结账" style="height: 20px; width: 80px; "/></a> </td>
 66     </tr>
 67     </table>
 68 </div>
 69   </body>
 70 </html>
 71 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 72 <%@taglib  prefix="s" uri="/struts-tags"%>
 73 <%
 74 String path = request.getContextPath();
 75 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 76 %>
 77
 78 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 79 <html>
 80   <head>
 81     <base href="<%=basePath%>">
 82
 83     <title>My JSP ‘getconsumpyionbyid.jsp‘ starting page</title>
 84
 85     <meta http-equiv="pragma" content="no-cache">
 86     <meta http-equiv="cache-control" content="no-cache">
 87     <meta http-equiv="expires" content="0">
 88     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 89     <meta http-equiv="description" content="This is my page">
 90     <!--
 91     <link rel="stylesheet" type="text/css" href="styles.css">
 92     -->
 93      <style type="text/css">
 94     tr{
 95     text-align: center;
 96     font-family: "微软雅黑";
 97     font-size: 14px;
 98
 99     }
100     td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
101 #bg {
102     width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
103     }
104 </style>
105   </head>
106
107   <body>
108   <div id="bg">
109      <h3>查询消费卡信息:</h3>
110      <form  action="Getconsumptionbyid" method="post">
111         <table  border="1"  align="center" >
112             <tr><td width="100">消费卡号:</td><td> <input type="text" name="con.id"/></td></tr>
113             <tr><td><input type="submit" value="查询" /></td> <td><input type="reset" value="取消"/> </td></tr>
114         </table>
115    </form>
116
117     <table align="center">
118     <tr><td width="100">消费卡号</td>
119             <td width="100">姓名</td>
120             <td width="100">会员卡号</td>
121             <td width="100">身份</td>
122             <td width="100">价格</td>
123             <td width="100">是否结账</td>
124             <td width="100">开卡日期</td>
125             <td width="100">开卡时间</td>
126     </tr>
127                <tr><td>${ms.id}</td>
128                 <td>${ms.name}</td>
129                 <td>${ms.memberid}</td>
130                 <td>${ms.level}</td>
131                 <td>${ms.money}</td>
132                 <td>${ms.checks}</td>
133                 <td>${ms.date}</td>
134                 <td>${ms.datetime}</td>
135                 <td><a href="Jiezhangid?id=${ms.id}"><input type="submit" value="结账" style="height: 20px; width: 80px; "/></a> </td>
136     </tr>
137     </table>
138 </div>
139   </body>
140 </html>
141 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
142 <%@taglib  prefix="s" uri="/struts-tags"%>
143 <%
144 String path = request.getContextPath();
145 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
146 %>
147
148 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
149 <html>
150   <head>
151     <base href="<%=basePath%>">
152
153     <title>My JSP ‘getconsumpyionbyid.jsp‘ starting page</title>
154
155     <meta http-equiv="pragma" content="no-cache">
156     <meta http-equiv="cache-control" content="no-cache">
157     <meta http-equiv="expires" content="0">
158     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
159     <meta http-equiv="description" content="This is my page">
160     <!--
161     <link rel="stylesheet" type="text/css" href="styles.css">
162     -->
163      <style type="text/css">
164     tr{
165     text-align: center;
166     font-family: "微软雅黑";
167     font-size: 14px;
168
169     }
170     td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
171 #bg {
172     width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
173     }
174 </style>
175   </head>
176
177   <body>
178   <div id="bg">
179      <h3>查询消费卡信息:</h3>
180      <form  action="Getconsumptionbyid" method="post">
181         <table  border="1"  align="center" >
182             <tr><td width="100">消费卡号:</td><td> <input type="text" name="con.id"/></td></tr>
183             <tr><td><input type="submit" value="查询" /></td> <td><input type="reset" value="取消"/> </td></tr>
184         </table>
185    </form>
186
187     <table align="center">
188     <tr><td width="100">消费卡号</td>
189             <td width="100">姓名</td>
190             <td width="100">会员卡号</td>
191             <td width="100">身份</td>
192             <td width="100">价格</td>
193             <td width="100">是否结账</td>
194             <td width="100">开卡日期</td>
195             <td width="100">开卡时间</td>
196     </tr>
197                <tr><td>${ms.id}</td>
198                 <td>${ms.name}</td>
199                 <td>${ms.memberid}</td>
200                 <td>${ms.level}</td>
201                 <td>${ms.money}</td>
202                 <td>${ms.checks}</td>
203                 <td>${ms.date}</td>
204                 <td>${ms.datetime}</td>
205                 <td><a href="Jiezhangid?id=${ms.id}"><input type="submit" value="结账" style="height: 20px; width: 80px; "/></a> </td>
206     </tr>
207     </table>
208 </div>
209   </body>
210 </html>

getmembersbyid

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 3 <%@taglib  prefix="s" uri="/struts-tags"%>
 4 <%
 5 String path = request.getContextPath();
 6 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 7 %>
 8
 9 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
10 <html>
11   <head>
12     <base href="<%=basePath%>">
13
14     <title>My JSP ‘getrecordbyid.jsp‘ starting page</title>
15
16     <meta http-equiv="pragma" content="no-cache">
17     <meta http-equiv="cache-control" content="no-cache">
18     <meta http-equiv="expires" content="0">
19     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
20     <meta http-equiv="description" content="This is my page">
21     <!--
22     <link rel="stylesheet" type="text/css" href="styles.css">
23     -->
24  <style type="text/css">
25     tr{
26     text-align: center;
27     font-family: "微软雅黑";
28     font-size: 14px;
29
30     }
31 td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
32 #bg {
33 width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
34     }
35 </style>
36   </head>
37
38   <body>
39   <div id="bg">
40    <h3> 查询会员信息:</h3>
41      <form  action="Recordbyid" method="post">
42     <table  border="1"  align="center" >
43     <tr><td width="100">会员卡号:</td><td> <input type="text" name="red.memberid"/></td></tr>
44     <tr><td><input type="submit" value="查询" /></td> <td><input type="reset" value="取消"/> </td></tr>
45     </table>
46    </form>
47     <table align="center">
48     <tr><td width="100">流水账号</td>
49             <td width="100">会员id</td>
50             <td width="100">消费卡号</td>
51             <td width="100">身份</td>
52             <td width="100">消费</td>
53             <td width="100">消费日期</td>
54             <td width="100">消费时间</td>
55     </tr>
56
57     <c:forEach var="ms" items="${lred}">
58     <tr><td>${ms.id}</td>
59                 <td>${ms.memberid}</td>
60                 <td>${ms.consumptionid}</td>
61                 <td>${ms.level}</td>
62                 <td>${ms.money}</td>
63
64                 <td>${ms.date}</td>
65                 <td>${ms.datetime}</td>
66
67
68     </tr>
69     </c:forEach>
70     </table>
71     </div>
72   </body>
73 </html>

getrecordbyid.jsp

4.删除

5.更改

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘jiezhang.jsp‘ starting page</title>
13
14     <meta http-equiv="pragma" content="no-cache">
15     <meta http-equiv="cache-control" content="no-cache">
16     <meta http-equiv="expires" content="0">
17     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
18     <meta http-equiv="description" content="This is my page">
19     <!--
20     <link rel="stylesheet" type="text/css" href="styles.css">
21     -->
22  <style type="text/css">
23     tr{
24     text-align: center;
25     font-family: "微软雅黑";
26     font-size: 14px;
27
28     }
29 td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
30 #bg {
31     width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
32     }
33 </style>
34   </head>
35
36   <body>
37   <div id="bg">
38   <form action="Jiezhang" method="post">
39     <table>
40     <tr><td width="100">消费卡号</td><td> <input  value="${ms.id}" name="con.id" readonly="readonly"/></td></tr>
41     <tr><td width="100">姓名</td><td><input  value="${ms.name}" name="con.name" readonly="readonly"/></td></tr>
42     <tr><td width="100">会员卡号</td><td><input  value="${ms.memberid}" name="con.memberid" readonly="readonly"/></td></tr>
43     <tr><td width="100">身份</td><td><input  value="${ms.level}" name="con.level" readonly="readonly"/></td></tr>
44     <tr><td width="100">价格</td><td><input  value="${ms.money}" name="con.money" readonly="readonly"/></td></tr>
45     <tr><td width="100">是否结账</td><td><select name="con.checks" >
46                                                                                   <option value="否" style="color: red">否</option>
47                                                                                  <option value="是" style="color: blue">是</option>
48                                                                                  </select>
49                                                                                 </td></tr>
50
51
52
53     <tr><td width="100">日期</td><td><input type="text"  value="${ms.date}" name="con.date"/></td></tr>
54     <tr><td width="100">时间</td><td><input type="text"  value="${ms.datetime}" name="con.datetime"/></td></tr>
55      <tr><td><input type="submit" value="结账"> </td><td><input type="reset" value="取消"> </td></tr>
56     </table>
57     </form>
58     </div>
59   </body>
60 </html>

jiezhang.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘delepeemployeesbyid.jsp‘ starting page</title>
13
14     <meta http-equiv="pragma" content="no-cache">
15     <meta http-equiv="cache-control" content="no-cache">
16     <meta http-equiv="expires" content="0">
17     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
18     <meta http-equiv="description" content="This is my page">
19     <!--
20     <link rel="stylesheet" type="text/css" href="styles.css">
21     -->
22  <style type="text/css">
23     tr{
24     text-align: center;
25     font-family: "微软雅黑";
26     font-size: 14px;
27
28     }
29     td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
30 #bg {
31 width: auto;height:45em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
32     }
33 </style>
34   </head>
35
36   <body>
37   <div id="bg">
38   <form action="Updateemployees" method="post">
39     <table >
40     <tr> <td width="100px">员工号</td><td><input type="text" value="${emp2.id}"  name="emp1.id" readonly="readonly"/></td></tr>
41     <tr> <td width="100px">姓名</td> <td><input type="text" value="${emp2.name}"  name="emp1.name" readonly="readonly"/></td></tr>
42       <tr><td width="100px" >密码</td> <td><input type="text" value="${emp2.password}"  name="emp1.password"/></td></tr>
43       <tr><td width="100">身份:</td><td><select name="emp1.level" value="${emp2.level}">
44                             <option value="前台" style="color: red">前台</option>
45                              <option value="管理员" style="color: blue">管理员</option>
46                             </select>
47                             </td></tr>
48
49     <tr><td width="100">性别:</td><td><select name="emp1.sex" value="${emp2.sex}">
50                             <option value="女" style="color: red">女</option>
51                              <option value="男" style="color: blue">男</option>
52                             </select>
53                             </td></tr>
54
55          <tr><td width="100px">电话号码</td><td><input type="text" value="${emp2.telephone }"  name="emp1.telephone"/></td></tr>
56
57          <tr><td width="100px"><input type="submit" value="确认更改" style="height: 20px; width: 100px; "></td><td width="100px"><input type="reset" value="取消" style="height: 20px; width: 100px; "></td> </tr>
58     </table>
59     </form>
60     </div>
61   </body>
62 </html>

updateemployeesbyid.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘updateguest.jsp‘ starting page</title>
13
14     <meta http-equiv="pragma" content="no-cache">
15     <meta http-equiv="cache-control" content="no-cache">
16     <meta http-equiv="expires" content="0">
17     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
18     <meta http-equiv="description" content="This is my page">
19     <!--
20     <link rel="stylesheet" type="text/css" href="styles.css">
21     -->
22 <style type="text/css">
23     tr{
24     text-align: center;
25     font-family: "微软雅黑";
26     font-size: 14px;
27
28     }
29 td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
30 #bg {
31 width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
32     }
33 </style>
34   </head>
35
36   <body>  <div id="bg">
37    <form  method="post" action="Updateguest">
38     <table align="center" border="0" >
39
40     <tr>
41           <td>留言人</td>
42           <td colspan="3" align="left"><input type="text"  name="gu.name" value="${gue.name}"></td>
43
44        </tr>
45     <tr>
46     <td>留言时间</td>
47     <td><input type="text" value=" ${gue.date}" name="gu.date"><input type="text" value="${gue.datetime}" name="gu.datetime"></td> </tr>
48        <tr>
49            <td>留言</td>
50            <td colspan="3" align="left">
51               <textarea cols="100" rows="20" name="gu.message" >${gue.message}</textarea>
52            </td>
53        </tr>
54        <tr>
55           <td>是否查看</td>
56           <td><select name="gu.look" value="${gue.look}">
57
58                              <option value="是" style="color: blue">是</option>
59                             </select></td>
60           <td>是否解决</td>
61           <td><select name="gu.solve" value="${gue.solve}">
62                             <option value="否" style="color: red">否</option>
63                              <option value="是" style="color: blue">是</option>
64                             </select>
65           </td>
66        </tr>
67        <tr>
68          <td colspan="4" align="center" height="20px">
69            <input type="submit" value="确认查看" />&nbsp;&nbsp;
70            <input type="reset" value="取消 "/>
71          </td>
72
73        </tr>
74     </table>
75    </form>
76    </div>
77   </body>
78 </html>

updateguest.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘updatemember.jsp‘ starting page</title>
13
14     <meta http-equiv="pragma" content="no-cache">
15     <meta http-equiv="cache-control" content="no-cache">
16     <meta http-equiv="expires" content="0">
17     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
18     <meta http-equiv="description" content="This is my page">
19     <!--
20     <link rel="stylesheet" type="text/css" href="styles.css">
21     -->
22  <style type="text/css">
23     tr{
24     text-align: center;
25     font-family: "微软雅黑";
26     font-size: 14px;
27
28     }
29 td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
30 #bg {
31     width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
32     }
33 </style>
34   </head>
35
36   <body>
37      <div id="bg">
38     <form action="Updatemember" method="post">
39     <table>
40     <tr><td width="100">会员卡号</td><td><input type="text" value="${ms.id}" name="meb.id" readonly="readonly"/></td></tr>
41     <tr><td width="100">姓名</td><td><input type="text" value="${ms.member}" name="meb.member" /></td></tr>
42     <tr><td width="100">身份证号码</td><td><input type="text" value="${ms.carid}" name="meb.carid"/></td></tr>
43     <tr><td width="100">性别</td><td><select value="${ms.sex }" name="meb.sex">
44                             <option value="男" style="color: red">男</option>
45                              <option value="女" style="color: blue">女</option>
46                              <option value="人妖" style="color: blue">人妖</option>
47                             </select>
48                             </td></tr>
49
50     <tr><td width="100">电话号码</td><td><input type="text" value="${ms.telephone}" name="meb.telephone"/></td></tr>
51     <tr><td width="100">会员身份</td><td><select value="${ms.level}" name="meb.level">
52                             <option value="会员" style="color: red">会员</option>
53                              <option value="访客" style="color: blue">访客</option>
54
55                             </select></td></tr>
56
57
58     <tr><td width="100"><input type="submit" value="修改"/></td><td><input type="reset" value="取消" /></td>
59     </tr>
60
61
62     </table>
63     </form>
64     </div>
65   </body>
66 </html>

updatemember.jsp

6.其他乱七八糟

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%@taglib  prefix="s" uri="/struts-tags"%>
 3 <%
 4 String path = request.getContextPath();
 5 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 6 %>
 7
 8 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 9 <html>
10   <head>
11     <base href="<%=basePath%>">
12
13     <title>My JSP ‘denglu.jsp‘ starting page</title>
14
15 <style type="text/css">
16 body{padding: 0px;margin: 0px;}
17 #header{width: auto;min-height: 70px;line-height: 70px;}
18 #header{border-bottom: medium solid #39A631;}
19 span.title_con{font-family:"微软雅黑";font-style: normal;font-size: 2em;font-weight:800 ;color: #39A631;padding-left: 1em;}
20 #content{width: auto;height:28em;text-align: center;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;}
21 #footer{width: auto;min-height: 60px;line-height:60px;}
22 #footer{border-top: thin solid #39A631;}
23 .con{width: 35%;height: 20em;margin-top:4em;}
24 .con{border: thin solid #8EC172;}
25 .con_title{background-color: #8EC172;width: auto;height: 3.5em;line-height: 3.5em;text-align: center;}
26 .con_title_sp{font-family: "微软雅黑";font-size: 1.5em;font-weight: 800;color: #FFF;}
27 .con_input{margin: 2em 0 1em 0;}
28 .submit-btn{width: 8em;height: 2em;background-color: #62ab00;border-radius: 4px;border: 0px;color: #fff;font-family:"微软雅黑";font-size: 1em;font-weight: bold;}
29 .con_input span{font-family: "微软雅黑";font-size: 1em;font-weight: bold;color: #333;}
30 .con_input input{width: 15em;padding: 0.5em 1em;border: 1px solid #bbb;}
31 .submit-btn{margin: 1em 0 1em 0;}
32 .con_select{margin-left: 2em;font-family:"微软雅黑";font-size: 1em;color: #333;}
33 </style>
34 </head>
35 <body>
36 <div id="header">
37     <div class="header_title">
38         <span class="title_con">高练系统</span>
39     </div>
40 </div>
41  <form action="Landing" method="post">
42 <div id="content">
43     <center>
44         <div class="con">
45         <div class="con_title">
46             <span class="con_title_sp">欢迎登录高练系统</span>
47         </div>
48         <div class="con_panel">
49             <div class="con_input">
50                 <span>用户名:</span><input  type="text" name="emp1.name"/> <s:property value="fieldErrors[‘emp1.name‘][0]" />
51             </div>
52             <div class="con_input">
53                 <span>密&nbsp;&nbsp;&nbsp;&nbsp;码:</span><input  type="password" name="emp1.password"/> <s:property value="fieldErrors[‘emp1.password‘][0]" />
54             </div>
55             <div class="con_input">
56                  <span>身&nbsp;&nbsp;&nbsp;&nbsp;份:</span>
57                   <select size="1" name="emp1.level">
58                 <option value="前台" >前台收银</option>
59                 <option value="管理员" >管理员</option>
60                 </select>
61             </div>
62             <input type="submit" value="登    录" class="submit-btn"/>
63         </div>
64     </div>
65     </center>
66 </div>
67 </form>
68
69
70
71
72
73   </body>
74 </html>

denglu.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘erro.jsp‘ starting page</title>
13
14     <meta http-equiv="pragma" content="no-cache">
15     <meta http-equiv="cache-control" content="no-cache">
16     <meta http-equiv="expires" content="0">
17     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
18     <meta http-equiv="description" content="This is my page">
19     <!--
20     <link rel="stylesheet" type="text/css" href="styles.css">
21     -->
22
23   </head>
24
25   <body>
26    <h2 style="border-bottom-color: red">${massage}</h2>
27
28   </body>
29 </html>

erro.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘guanliyuan.jsp‘ starting page</title>
13
14     <meta http-equiv="pragma" content="no-cache">
15     <meta http-equiv="cache-control" content="no-cache">
16     <meta http-equiv="expires" content="0">
17     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
18     <meta http-equiv="description" content="This is my page">
19     <!--
20     <link rel="stylesheet" type="text/css" href="styles.css">
21     -->
22
23   </head>
24
25 <frameset rows="15%,*" frameborder="no">
26      <frame src="top.jsp" name ="top" scrolling="no" noresize="noresize" frameborder="0" marginheight="0" marginwidth="0">
27      <frameset cols="15%,*">
28           <frame src="left2.jsp" name ="left2" scrolling="no" noresize="noresize" frameborder="0" marginheight="5" marginwidth="5">
29           <frameset rows="5%,*">
30               <frame src="mid.jsp" name ="mid" scrolling="no" noresize="noresize" frameborder="0" marginheight="3" marginwidth="0">
31               <frame  src= "welcome.jsp" name ="right2" scrolling="yes" noresize="noresize" >
32           </frameset>
33      </frameset>
34 </frameset>
35
36
37
38
39
40   <body>
41     This is my JSP page. <br>
42   </body>
43 </html>

guanliyuan.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘left1.jsp‘ starting page</title>
13
14 <style type="text/css">
15     #left {background-image: url(./imge/l1b5.gif) ; background-size: 100% ;height: 97%;}
16     td{font-family: "微软雅黑";font-size: 18px;color: #30F;}
17 </style>
18 </head>
19 <body>
20 <div  id="left">
21     <table width="273" height="70%" border="1" style="width: 269px; height: 546px" >
22        <tr >
23          <td  height="50" align="center" ><a href="GetConsumption" target="right1">开卡</a></td>
24       </tr>
25
26       <tr >
27           <td height="50" align="center"><a href="getconsumptionbyid.jsp" target="right1">查询消费卡/结账</a></td>
28       </tr>
29       <tr>
30          <td height="50" align="center"><a href="getrecordbyid.jsp" target="right1">查询会员消费情况</a></td>
31       </tr>
32        <tr>
33          <td height="50" align="center"><a href="getemembersbyid.jsp" target="right1">查询会员资料</a></td>
34       </tr>
35        <tr >
36           <td height="30" align="center"><a href="getconsumptionbydate.jsp" target="right1">日报表查询</a></td>
37       </tr>
38        <tr>
39           <td height="50" align="center"><a href="Allguest" target="right1">留言簿</a></td>
40       </tr>
41       <tr>
42           <td height="50" align="center"><a href="Denglu" target="_parent">退出</a></td>
43       </tr>
44
45     </table>
46 </div>
47   </body>
48 </html>

left1.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘left2.jsp‘ starting page</title>
13
14 <style type="text/css">
15     #left {background-image: url(imge/l1b5.gif); background-size: 100% 100%; height: 97%;}
16     td{font-family: "微软雅黑";font-size: 18px;color: #F00;}
17 </style>
18 </head>
19 <body>
20 <div  id="left">
21     <table width="270" border="1" style="width: 269px; height: 540px">
22        <tr>
23           <td  height="30" align="center"><a href="GetConsumption" target="right2">开卡</a></td>
24       </tr>
25       <tr >
26           <td height="30" align="center"><a href="getconsumptionbyid.jsp" target="right2">查询消费卡/结账</a></td>
27       </tr>
28       <tr>
29          <td height="30" align="center"><a href="getemembersbyid.jsp" target="right2">查询会员资料</a></td>
30       </tr>
31       <tr>
32          <td height="30" align="center"><a href="getrecordbyid.jsp" target="right2">查询会员消费情况</a></td>
33       </tr>
34       <tr>
35          <td height="30" align="center"><a href="Allmember" target="right2">会员信息管理</a></td>
36       </tr>
37        <tr >
38           <td height="30" align="center"><a href="getconsumptionbydate.jsp" target="right2">日报表查询</a></td>
39       </tr>
40
41       <tr>
42          <td height="30" align="center"><a href="Allemployees" target="right2">人事管理</a></td>
43       </tr>
44       <tr>
45          <td height="30" align="center"><a href="Allguest" target="right2">留言簿</a></td>
46       </tr>
47       <tr>
48           <td height="50" align="center"><a href="Denglu" target="_parent">退出</a></td>
49       </tr>
50
51
52   </table>
53   </div>
54   </body>
55 </html>

left2.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘mid.jsp‘ starting page</title>
13
14     <meta http-equiv="pragma" content="no-cache">
15     <meta http-equiv="cache-control" content="no-cache">
16     <meta http-equiv="expires" content="0">
17     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
18     <meta http-equiv="description" content="This is my page">
19     <!--
20     <link rel="stylesheet" type="text/css" href="styles.css">
21     -->
22
23   </head>
24
25   <body>
26     <marquee behavior="scroll" bgcolor="#9F9" >
27     1.早班请观看留言簿!
28     2.交接班后所有账需上交财务!
29     3.当天的账目必须清零!
30     4.晚班结束必须核对当天账目,不允许挂账!
31     5.祝大家都能找到好工作!解决不了的问题找金老师!
32
33
34
35     </marquee>
36   </body>
37 </html>

mid.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘qiantai.jsp‘ starting page</title>
13
14     <meta http-equiv="pragma" content="no-cache">
15     <meta http-equiv="cache-control" content="no-cache">
16     <meta http-equiv="expires" content="0">
17     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
18     <meta http-equiv="description" content="This is my page">
19     <!--
20     <link rel="stylesheet" type="text/css" href="styles.css">
21     -->
22
23   </head>
24
25 <frameset rows="15%,*" frameborder="no">
26      <frame src="top.jsp" name ="top" scrolling="no" noresize="noresize" frameborder="0" marginheight="0" marginwidth="0">
27      <frameset cols="15%,*">
28           <frame src="left1.jsp" name ="left1" scrolling="no" noresize="noresize" frameborder="0" marginheight="5" marginwidth="5">
29           <frameset rows="5%,*">
30               <frame src="mid.jsp" name ="mid" scrolling="no" noresize="noresize" frameborder="0" marginheight="3" marginwidth="0">
31               <frame  src= "welcome.jsp" name ="right1" scrolling="yes" noresize="noresize" >
32           </frameset>
33      </frameset>
34 </frameset>
35   <body>
36     This is my JSP page. <br>
37   </body>
38 </html>

qiantai.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘top.jsp‘ starting page</title>
13
14 <style type="text/css">
15 #title {
16     float: left;
17     height: 140px;
18     width: 100%;
19     position: absolute;
20     background-position: center;
21     border: 1px solid #C90;
22     background-image: url(imge/3.jpg) ; background-size: 100% 100%;
23
24 }
25 td{
26     font-family: "微软雅黑";
27     font-size: 16px;
28     color: #39A631;
29     }
30 </style>
31 </head>
32 <body>
33     <div id="title">
34         <table  width="100%" align="center" >
35         <tr>
36            <td style="width: 20%; "></td>
37                <td style=" width: 80%; "><h1>高练系统欢迎你!</h2></td>
38
39
40      </tr>
41         </table>
42
43     </div>
44
45   </body>
46 </html>

top.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11
12     <title>My JSP ‘welcome.jsp‘ starting page</title>
13
14     <meta http-equiv="pragma" content="no-cache">
15     <meta http-equiv="cache-control" content="no-cache">
16     <meta http-equiv="expires" content="0">
17     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
18     <meta http-equiv="description" content="This is my page">
19     <!--
20     <link rel="stylesheet" type="text/css" href="styles.css">
21     -->
22
23   </head>
24
25   <body>
26    <h1 style="color: #39A631"  > 欢迎你! </h1>
27   </body>
28 </html>

welcom.jsp

三、配置文件

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <beans
 3     xmlns="http://www.springframework.org/schema/beans"
 4     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 5     xmlns:p="http://www.springframework.org/schema/p"
 6     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
 7
 8
 9     <bean id="sessionFactory"
10         class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
11         <property name="configLocation"
12             value="classpath:hibernate.cfg.xml">
13         </property>
14     </bean>
15
16     <!--1. 公用的hibernateTemplate -->
17     <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
18         <constructor-arg ref="sessionFactory"></constructor-arg>
19     </bean>
20
21     <!-- 2.2实体类  -->
22     <bean id="employees" class="com.chinasofti.golf.entity.Employees" scope="prototype"></bean>
23     <!-- 2.employees人员信息表 -->
24     <bean id="employeesDAO" class="com.chinasofti.golf.daoimpl.EmployeesDAOImpl">
25         <property name="hibernateTemplate" ref="hibernateTemplate"></property>
26     </bean>
27     <!-- 2.1 登录界面,其中name="employeesDAO"是denglu.jsp里面的employees私有类属性 -->
28     <bean id="denglu" class="com.chinasofti.golf.action.denglu" scope="prototype">
29         <property name="employeesDAO" ref="employeesDAO"></property>
30         <property name="emp2" ref="employees"></property>
31         <property name="emp1" ref="employees"></property>
32     </bean>
33
34
35     <!-- 3 Consumption 前台消费操作表-->
36     <bean id="consumption" class="com.chinasofti.golf.entity.Consumption"></bean>
37
38     <bean id ="consumptionDAO" class="com.chinasofti.golf.daoimpl.ConsumptionDAOImpl" >
39         <property name="hibernateTemplate" ref="hibernateTemplate"></property>
40     </bean>
41     <!--3.1 查找当日消费的所有信息  -->
42     <bean id="consumptionaction" class="com.chinasofti.golf.action.ConsumptionAction" scope="prototype"><!-- 这里的ID是跟struts 里面的class是一致的 -->
43     <property name="consumptionDAO" ref="consumptionDAO"> </property>    <!-- 这里的name是ConsumptionAction里面类私有属性的name -->
44     <property name="con" ref="consumption"></property>
45     <property name="ms" ref="consumption"></property>
46     <property name="mebDAO" ref="membersDAO"></property>
47     </bean>
48
49
50
51
52     <!-- 4.members会员个人管理表 -->
53     <bean id="membersDAO" class="com.chinasofti.golf.daoimpl.MembersDAOImpl">
54     <property name="hibernateTemplate" ref="hibernateTemplate"></property>
55     </bean>
56     <bean id="members" class="com.chinasofti.golf.entity.Members">
57
58     </bean>
59     <!-- 4.1根据ID查找会员当天的消费情况 -->
60     <bean id="membersaction" class="com.chinasofti.golf.action.MembersAction" scope="prototype">
61     <property name="mebDAO" ref="membersDAO"></property>
62     <property name="ms" ref="members"></property>
63     </bean>
64
65
66
67     <!-- 5 .Record会员以往消费记录 -->
68     <bean id ="recordDAO" class="com.chinasofti.golf.daoimpl.RecordDAOImpl">
69     <property name="hibernateTemplate" ref="hibernateTemplate"></property>
70     </bean>
71     <!-- 5.1根据memberID查询会员以前的消费记录和流水账号 -->
72     <bean id="recordAction" class="com.chinasofti.golf.action.RecordAction" scope="prototype">
73     <property name="redDAO" ref="recordDAO"></property>
74     </bean>
75
76
77     <!-- 6.Guest 留言簿 -->
78     <bean id ="guest" class="com.chinasofti.golf.entity.Guest"></bean>
79     <bean id ="guestDAO" class="com.chinasofti.golf.daoimpl.GuestDAOImpl">
80     <property name="hibernateTemplate"  ref="hibernateTemplate"></property>
81     </bean>
82     <bean id="guestAction" class="com.chinasofti.golf.action.GuestAction">
83     <property name="gueDAO" ref="guestDAO"></property>
84     <property name="gue" ref="guest"></property>
85     <property name="gu" ref="guest"></property>
86     </bean>
87
88
89     </beans>

applicationContext.xml

 1 <?xml version=‘1.0‘ encoding=‘UTF-8‘?>
 2 <!DOCTYPE hibernate-configuration PUBLIC
 3           "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
 4           "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
 5 <!-- Generated by MyEclipse Hibernate Tools.                   -->
 6 <hibernate-configuration>
 7
 8     <session-factory>
 9         <property name="dialect">
10             org.hibernate.dialect.SQLServerDialect
11         </property>
12         <property name="connection.url">
13             jdbc:sqlserver://127.0.0.1:1433
14         </property>
15         <property name="connection.username">sa</property>
16         <property name="connection.password">123456</property>
17         <property name="connection.driver_class">
18             com.microsoft.sqlserver.jdbc.SQLServerDriver
19         </property>
20         <property name="myeclipse.connection.profile">
21             SQLServerDriver
22         </property>
23
24         <property name="show_sql">true</property>
25         <property name="connection.autocommit">true</property>
26
27         <mapping resource="com/chinasofti/golf/entity/Members.hbm.xml" />
28
29         <mapping
30             resource="com/chinasofti/golf/entity/Consumption.hbm.xml" />
31         <mapping resource="com/chinasofti/golf/entity/Record.hbm.xml" />
32         <mapping
33             resource="com/chinasofti/golf/entity/Employees.hbm.xml" />
34         <mapping resource="com/chinasofti/golf/entity/Guest.hbm.xml" />
35
36     </session-factory>
37
38 </hibernate-configuration>

hibernate.cfg.xml

  1 <?xml version="1.0" encoding="UTF-8" ?>
  2 <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
  3 <struts>
  4     <package name="anding" namespace="/" extends="struts-default">
  5     <!-- 登录 -->
  6      <interceptors>
  7       <interceptor name="login" class="com.chinasofti.golf.action.Landing"/>
  8    </interceptors>
  9
 10
 11
 12
 13     <action name="Denglu" class="com.chinasofti.golf.action.Denlu">
 14         <result name="landing" type="dispatcher">/denglu.jsp</result>
 15     </action>
 16         <action name="Landing"   class="denglu"  method="denglu">
 17                 <result name="denglu1" type="dispatcher">/qiantai.jsp</result>
 18                 <result name="denglu2" type="dispatcher">/guanliyuan.jsp</result>
 19                 <result name="massage" type="dispatcher">/erro.jsp</result>
 20                 <result name="input" type="dispatcher">/denglu.jsp</result>
 21
 22         </action>
 23         <action name="Tuichu" class="denglu" method="tuichu">
 24             <result name="tuichu" type="redirectAction">Denglu</result>
 25         </action>
 26
 27
 28
 29      <!-- 员工信息管理 -->
 30        <action name="Allemployees" class="denglu" method="allemployees">
 31                <result name="allemployees" type="dispatcher">/allemployees.jsp</result>
 32
 33                  <result name="inputtt" type="redirectAction">Denglu</result>
 34                <interceptor-ref name="login"></interceptor-ref>
 35              <interceptor-ref name="defaultStack"></interceptor-ref>
 36        </action>
 37       <action name="Addemployees" class="denglu" method="addemployees">
 38                <result name="addemployees" type="redirectAction">Allemployees</result>
 39                 <result name="inputtt" type="redirectAction">Denglu</result>
 40                <interceptor-ref name="login"></interceptor-ref>
 41              <interceptor-ref name="defaultStack"></interceptor-ref>
 42        </action>
 43
 44         <action name="Deleteemployees" class="denglu" method="deleteemployees">
 45        <result name="deleteemployees" type="redirectAction">Allemployees</result>
 46
 47         <result name="inputtt" type="redirectAction">Denglu</result>
 48                <interceptor-ref name="login"></interceptor-ref>
 49              <interceptor-ref name="defaultStack"></interceptor-ref>
 50        </action>
 51
 52
 53        <action name="Updateemployeesbyid" class="denglu" method="updateemployeesbyid">
 54        <result name="updateemployeesbyid" type="dispatcher">/updateemployeesbyid.jsp</result>
 55         <result name="inputtt" type="redirectAction">Denglu</result>
 56                <interceptor-ref name="login"></interceptor-ref>
 57              <interceptor-ref name="defaultStack"></interceptor-ref>
 58        </action>
 59         <action name="Updateemployees" class="denglu" method="updateemployees">
 60        <result name="updateemployees" type="redirectAction">Allemployees</result>
 61         <result name="inputtt" type="redirectAction">Denglu</result>
 62                <interceptor-ref name="login"></interceptor-ref>
 63              <interceptor-ref name="defaultStack"></interceptor-ref>
 64        </action>
 65
 66
 67
 68
 69
 70       <!-- 开卡Consumption表 -->
 71         <action name="GetConsumption" class="consumptionaction"  method="getConsumption">
 72                 <result name="getConsumption" type="dispatcher">/tadykaika.jsp</result>
 73                  <result name="inputtt" type="redirectAction">Denglu</result>
 74                <interceptor-ref name="login"></interceptor-ref>
 75              <interceptor-ref name="defaultStack"></interceptor-ref>
 76         </action>
 77         <!-- 新开卡 -->
 78          <action name="Kaika" class="consumptionaction"  method="kaika">
 79                 <result name="kaika" type="redirectAction">GetConsumption</result>
 80                  <result name="inputtt" type="redirectAction">Denglu</result>
 81                <interceptor-ref name="login"></interceptor-ref>
 82              <interceptor-ref name="defaultStack"></interceptor-ref>
 83         </action>
 84
 85         <!-- 根据ID查找该ID今天的消费信息 -->
 86         <action name="Getconsumptionbyid" class="consumptionaction" method="getconsumptionbyid">
 87             <result name="getconsumptionbyid" type="dispatcher"> /getconsumptionbyid.jsp</result>
 88              <result name="inputtt" type="redirectAction">Denglu</result>
 89                <interceptor-ref name="login"></interceptor-ref>
 90              <interceptor-ref name="defaultStack"></interceptor-ref>
 91          </action>
 92         <!-- 给该ID做结账处理~更改 -->
 93
 94
 95
 96
 97          <!-- 结账 -->
 98         <action name="Jiezhangid" class="consumptionaction" method="jiezhangid">
 99             <result name="jiezhangid" type="dispatcher"> /jiezhang.jsp</result>
100              <result name="inputtt" type="redirectAction">Denglu</result>
101                <interceptor-ref name="login"></interceptor-ref>
102              <interceptor-ref name="defaultStack"></interceptor-ref>
103          </action>
104
105         <action name="Jiezhang" class="consumptionaction" method="jiezhang">
106             <result name="jiezhang" type="redirectAction">GetConsumption</result>
107              <result name="inputtt" type="redirectAction">Denglu</result>
108                <interceptor-ref name="login"></interceptor-ref>
109              <interceptor-ref name="defaultStack"></interceptor-ref>
110          </action>
111          <!-- 日报表查询 -->
112
113         <action name="Getconsumptionbydate" class="consumptionaction" method="getconbydate">
114             <result name="getconbydate" type="dispatcher">/getconsumptionbydate.jsp</result>
115              <result name="inputtt" type="redirectAction">Denglu</result>
116                <interceptor-ref name="login"></interceptor-ref>
117              <interceptor-ref name="defaultStack"></interceptor-ref>
118          </action>
119
120
121
122
123         <!-- 根据ID查询会员的个人资料  members-->
124         <action name="MemberById" class="membersaction" method="member">
125             <result name="member" type="dispatcher"> /getemembersbyid.jsp</result>
126              <result name="inputtt" type="redirectAction">Denglu</result>
127                <interceptor-ref name="login"></interceptor-ref>
128              <interceptor-ref name="defaultStack"></interceptor-ref>
129
130         </action>
131         <!-- 查找全部会员信息,显示在allmember.jsp上 -->
132           <action name="Allmember" class="membersaction" method="allmember">
133             <result name="allmember" type="dispatcher"> /allmember.jsp</result>
134              <result name="inputtt" type="redirectAction">Denglu</result>
135                <interceptor-ref name="login"></interceptor-ref>
136              <interceptor-ref name="defaultStack"></interceptor-ref>
137         </action>
138         <!-- 添加会员 -->
139           <action name="Addmember" class="membersaction" method="addmember">
140             <result name="addmember" type="redirectAction">Allmember</result>
141              <result name="inputtt" type="redirectAction">Denglu</result>
142                <interceptor-ref name="login"></interceptor-ref>
143              <interceptor-ref name="defaultStack"></interceptor-ref>
144         </action>
145          <!-- 更改会员信息 -->
146          <action name="Memberid" class="membersaction" method="memberid">
147             <result name="memberid" type="dispatcher"> /updatemember.jsp</result>
148              <result name="inputtt" type="redirectAction">Denglu</result>
149                <interceptor-ref name="login"></interceptor-ref>
150              <interceptor-ref name="defaultStack"></interceptor-ref>
151         </action>
152           <action name="Updatemember" class="membersaction" method="updatemember">
153             <result name="updatemember" type="redirectAction">Allmember</result>
154              <result name="inputtt" type="redirectAction">Denglu</result>
155                <interceptor-ref name="login"></interceptor-ref>
156              <interceptor-ref name="defaultStack"></interceptor-ref>
157         </action>
158
159
160
161
162
163
164        <!-- 根据memberID查询会员以前的消费记录和流水账号 Record -->
165         <action name="Recordbyid" class="recordAction" method="getrecordbyid">
166              <result name="getrecordbyid" type="dispatcher">/getrecordbyid.jsp</result>
167               <result name="inputtt" type="redirectAction">Denglu</result>
168                <interceptor-ref name="login"></interceptor-ref>
169              <interceptor-ref name="defaultStack"></interceptor-ref>
170
171         </action>
172
173         <!-- 留言簿 -->
174         <action name="Allguest" class="guestAction" method="allguest">
175         <result name="allguest" type="dispatcher">/allguest.jsp</result>
176          <result name="inputtt" type="redirectAction">Denglu</result>
177                <interceptor-ref name="login"></interceptor-ref>
178              <interceptor-ref name="defaultStack"></interceptor-ref>
179         </action>
180            <action name="Addguest" class="guestAction" method="addguest">
181         <result name="addguest" type="redirectAction">Allguest</result>
182          <result name="inputtt" type="redirectAction">Denglu</result>
183                <interceptor-ref name="login"></interceptor-ref>
184              <interceptor-ref name="defaultStack"></interceptor-ref>
185         </action>
186         <action name="Getguestbyid" class="guestAction" method="getguestbyid">
187         <result name="getguestbyid" type="dispatcher">/updateguest.jsp</result>
188          <result name="inputtt" type="redirectAction">Denglu</result>
189                <interceptor-ref name="login"></interceptor-ref>
190              <interceptor-ref name="defaultStack"></interceptor-ref>
191         </action>
192
193
194         <action name="Updateguest" class="guestAction" method="updateguest">
195         <result name="updateguest" type="redirectAction">Allguest</result>
196          <result name="inputtt" type="redirectAction">Denglu</result>
197                <interceptor-ref name="login"></interceptor-ref>
198              <interceptor-ref name="defaultStack"></interceptor-ref>
199         </action>
200
201
202
203
204     </package>
205 </struts>    

struts.xml

四、附件

相册img/imge

时间: 2024-10-11 03:59:06

高尔夫管理系统SSH的相关文章

jsp453企业OA管理系统之办公用品管理系统ssh

一.技术实现: 开发语言: jsp , 框架: ssh ,模式:B/S 数据库 : mysql,sqlserver,oracle, 开发工具: myeclipse eclipse . 论文字数:1万左右. 二.功能实现: 企业OA管理系统之办公用品管理系统主要是企业内部的管理系统主要是对企业物品的管理.通过分析本系统的主要功能模块如下: (1)具有信息的录入功能 员工基本信息的录入(新增.删除和修改) 物品基本信息的录入(新增.删除和修改) (2)具有申请功能 物品借用申请 物品归还申请 (3)

管理系统-------------SSH框架书写登录和显示用户

一.思路的穿插. web.xml中的配置找到--->application.xml---->找到对应的Action---->找到struts.xml----->在去找action----->service的实现类---->dao的impl实现类. 二.SSH框架整合需要的jar 三.实现登录 (一).创建实体 /* * 员工表 * */ @Entity @Table(name="sys_employee") public class Employee

jsp476教学科研项目管理系统ssh

一.技术实现: 开发语言: jsp , 框架: ssh ,模式:B/S 数据库 : mysql,sqlserver,oracle, 开发工具: myeclipse eclipse . 论文字数:1万左右. 二.功能实现: (1)用户注册登录功能. 用户登录:系统将验证用户是否存在,输入信息是否正确. (2)公告管理查看功能.管理员可以维护公告用户可以查看公告. (3)站内信功能.用户可以使用系统发送站内信. (4)项目申请功能,用户可以对项目进行申请. (5)项目审批功能.用户可以审批项目. (

Spring 雇员管理系统SSH 1

[配置Spring并测试] ? ? 引入Spring包,编写applicationContext.xml文件,该文件放在src目录下 ? ? 建立domain包,编写雇员类Employee.java ? ? Employee.java中 ? ? public class Employee { private Integer id; private String name; private String email; private String pwd; private Integer grad

基于android的相关的管理系统的毕业设计代写

1.启思代做启思毕业设计代做是专业java毕业设计代做,主要针对java,ssh,ssm,jsp,j2ee,android相关管理系统的毕业设计代写. 客服:加扣扣(幺零三贰三七幺贰幺) 2.代做特色a.定做设计,不卖模版:我们的java毕设代做,是定做设计,是安全按照学生的开题要求,定制一套.而目前市面上99%的代做都是卖的模版给学生,都是重复卖给很多学生的.那些设计虽然便宜,但完全不可能通过学校的查重.老师一下就能看出来.所以奉劝同学们,千万不要贪图便宜,便宜无好货,好货不便宜. b.一站式

SSH原理和基本使用

1.启思代做启思毕业网站设计代做是专业java毕业程序设计代做,主要针对java,ssh,ssm,jsp,j2ee,android相关管理系统的毕业设计代写. 客服:加扣扣(幺零三贰三七幺贰幺) 2.代做特色a.根据需求提供定做设计的服务,不卖模版:我们是java毕设定做服务,安全按照顾客提出的开题要求,定制一套.而目前市面上99%的代做都是卖的模版给学生.那些设计虽然便宜,但完全不可能通过学校的查重.经验丰富的老师们一下就能看出来.所以奉劝同学们,千万不要贪图便宜,便宜无好货,好货不便宜. b

分享java web 期末项目实验源码20套,BBS论坛,ERP管理系统,OA自动化等等

我自己也从里面学习到了很多东西!? 1.BBS论坛系统(jsp+sql)2.ERP管理系统(jsp+servlet)3.OA办公自动化管理系统(Struts1.2+Hibernate3.0+Spring2+DWR)4.博客系统(struts+hibernate+spring)5.车辆管理系统(struts+hibernate+spring+oracle)6.家庭理财系统(java+applet)7.教材订购系统(jsp+servlet+mysql)8.酒店管理系统(jsp+servlet+mys

简单分析做过的三个项目的部分表关系

第一个项目:教务管理系统 分析其中的 用户.角色.功能.权限之间的关系: 第二个项目:网上商城 这个就不画图了,感觉上个图好丑,专业工具找不到了,见谅! 数据库表: 图书表book.图书类别bookType.顾客表customer表.顾客详细表customerDetail.菜单表menu 消息表news.订单表ordermain.订单明细表orderdetail.收货地址表shopaddress. 系统用户表sysAdmin表关系:book: n-----1 bookTypecustomer:

MySql 时间处理

纸上得来终觉浅,绝知此事要躬行 博客园 首页 新闻 新随笔 联系 管理 随笔- 490  文章- 0  评论- 65 MySql 时间处理 这里是一个使用日期函数的例子.下面的查询选择了所有记录,其date_col的值是在最后30天以内: mysql> SELECT something FROM table  WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) <= 30; DAYOFWEEK(date)  返回日期date的星期索引(1=星期天,2=星期一, …