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

一、Action

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

 package com.chinasofti.golf.action;

 import java.util.ArrayList;
import java.util.List; import com.chinasofti.golf.dao.IConsumptionDAO; import com.chinasofti.golf.daoimpl.MembersDAOImpl;
import com.chinasofti.golf.entity.Consumption;
import com.chinasofti.golf.entity.Members;
import com.opensymphony.xwork2.ActionSupport; @SuppressWarnings("serial")
public class ConsumptionAction extends ActionSupport {
private Consumption con;//在Spring里配置过的con
private Consumption ms;//在Spring里配置过的ms
private List<Consumption> lcon;
private IConsumptionDAO consumptionDAO;
private int id;//从地址栏传过来的ID,所以在这里要封装一个 private MembersDAOImpl mebDAO;
private Members mebs;
private int totalpeoper;//这几行是做统计日报表封装的
private int rmb;
private int yes;
private int no;
private int yesmoney=0;
private int nomoney=0; int pageSize;//翻页
private int recordCount;
private int pageCount;
private int pageIndex;
private String p;
private String c; public int getPageSize() {
return pageSize;
} public void setPageSize(int pageSize) {
this.pageSize = pageSize;
} public int getRecordCount() {
return recordCount;
} public void setRecordCount(int recordCount) {
this.recordCount = recordCount;
} public int getPageCount() {
return pageCount;
} public void setPageCount(int pageCount) {
this.pageCount = pageCount;
} public int getPageIndex() {
return pageIndex;
} public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
} public String getP() {
return p;
} public void setP(String p) {
this.p = p;
} public String getC() {
return c;
} public void setC(String c) {
this.c = c;
} public int getYesmoney() {
return yesmoney;
} public void setYesmoney(int yesmoney) {
this.yesmoney = yesmoney;
} public int getNomoney() {
return nomoney;
} public void setNomoney(int nomoney) {
this.nomoney = nomoney;
} public int getYes() {
return yes;
} public void setYes(int yes) {
this.yes = yes;
} public int getNo() {
return no;
} public void setNo(int no) {
this.no = no;
} public MembersDAOImpl getMebDAO() {
return mebDAO;
} public void setMebDAO(MembersDAOImpl mebDAO) {
this.mebDAO = mebDAO;
} public int getRmb() {
return rmb;
} public void setRmb(int rmb) {
this.rmb = rmb;
} public int getTotalpeoper() {
return totalpeoper;
} public void setTotalpeoper(int totalpeoper) {
this.totalpeoper = totalpeoper;
} public Members getMebs() {
return mebs;
} public void setMebs(Members mebs) {
this.mebs = mebs;
} public int getId() {
return id;
} public void setId(int id) {
this.id = id;
} public Consumption getCon() {
return con;
} public void setCon(Consumption con) {
this.con = con;
} public Consumption getMs() {
return ms;
} public void setMs(Consumption ms) {
this.ms = ms;
} public List<Consumption> getLcon() {
return lcon;
} public void setLcon(List<Consumption> lcon) {
this.lcon = lcon;
} public IConsumptionDAO getConsumptionDAO() {
return consumptionDAO;
} public void setConsumptionDAO(IConsumptionDAO consumptionDAO) {
this.consumptionDAO = consumptionDAO;
}
//得到所有的消费卡信息
public String getConsumption(){
lcon=consumptionDAO.GetConsumption(); int pagesize=15;
int recordcount=lcon.size();
int pagecount=(recordcount-1)/pagesize+1;
int pageindex=1;
try{
pagesize=Integer.parseInt(c);
}catch(Exception e)
{}
try{
pageindex=Integer.parseInt(p);
}catch(Exception e)
{}
if(pageindex<=1){
pageindex=1;
}
if(pageindex>pagecount){
pageindex=pagecount;
}
List<Consumption> soc2=new ArrayList<Consumption>();
for(int i=(pageindex-1)*pagesize;i<pageindex*pagesize&&i<lcon.size();i++){
soc2.add(lcon.get(i));
}
pageSize=pagesize;
recordCount=recordcount;
pageCount=pagecount;
pageIndex=pageindex;
lcon=soc2; // lcon=consumptionDAO.GetConsumptionPaging(pageIndex, pageSize); return "getConsumption";
}
//根据ID找到一条消费卡信息
public String getconsumptionbyid(){
System.out.println(con.getId()); ms=consumptionDAO.GetConsumptionById(con.getId());
return "getconsumptionbyid";
}
//根据ID查找消费卡信息
public String jiezhangid(){ Time time=new Time();
//System.out.println(time.addDate());
ms=consumptionDAO.GetConsumptionById(id);
ms.setDate(time.addDate());
ms.setDatetime(time.addDateTime());
return "jiezhangid";
}
//进行修改
public String jiezhang(){ consumptionDAO.Update(ms);
return "jiezhang";
}
//添加一条信息,时间是time类获取的,不用输入
public String kaika(){
Time time=new Time();
if(ms.getName()!=null&&ms.getLevel()!=null ){
if(ms.getLevel().equals("会员")){
String name = ms.getName(); mebs=new Members(); mebs=mebDAO.GetMembersByMember(name); if(ms.getName().equals(mebs.getMember())){ con.setName(ms.getName()); con.setMemberid(mebs.getId()); con.setLevel(ms.getLevel());
con.setChecks(ms.getChecks());
con.setDate(time.addDate());
con.setDatetime(time.addDateTime());
String money="340";
con.setMoney(money);
consumptionDAO.Insert(con);
}else{
con.setName(ms.getName());
con.setMemberid(0);
con.setLevel(ms.getLevel());
con.setChecks(ms.getChecks());
con.setDate(time.addDate());
con.setDatetime(time.addDateTime());
String money="340";
con.setMoney(money);
consumptionDAO.Insert(con);
}
}else if(ms.getLevel().equals("访客")){
con.setName(ms.getName());
Integer memberid=0;
con.setMemberid(memberid);
con.setLevel(ms.getLevel());
con.setChecks(ms.getChecks());
con.setDate(time.addDate());
con.setDatetime(time.addDateTime());
String money="1280";
con.setMoney(money);
consumptionDAO.Insert(con);
}
}
return "kaika";
}
//根据填入的日期查找
public String getconbydate(){
//1. 打球总人数
lcon=consumptionDAO.GetConsumptionByDate(con.getDate()); int pagesize=15;
int recordcount=lcon.size();
int pagecount=(recordcount-1)/pagesize+1;
int pageindex=1;
try{
pagesize=Integer.parseInt(c);
}catch(Exception e)
{}
try{
pageindex=Integer.parseInt(p);
}catch(Exception e)
{}
if(pageindex<=1){
pageindex=1;
}
if(pageindex>pagecount){
pageindex=pagecount;
}
List<Consumption> soc2=new ArrayList<Consumption>();
for(int i=(pageindex-1)*pagesize;i<pageindex*pagesize&&i<lcon.size();i++){
soc2.add(lcon.get(i));
}
pageSize=pagesize;
recordCount=recordcount;
pageCount=pagecount;
pageIndex=pageindex;
lcon=soc2; //统计今天的报表
totalpeoper = lcon.size();
rmb=0; for(int i=0;i<lcon.size();i++){
int oncermb=Integer.parseInt(lcon.get(i).getMoney());
rmb=rmb+oncermb;
if(lcon.get(i).getChecks().equals("是")){
yes++;
int money1=Integer.parseInt(lcon.get(i).getMoney());
yesmoney=yesmoney+money1; }else if(lcon.get(i).getChecks().equals("否")){
no++;
int money2=Integer.parseInt(lcon.get(i).getMoney());
nomoney=nomoney+money2;
}
}
return "getconbydate";
} }

ConsumptionAction.java

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

 package com.chinasofti.golf.action;

 import java.util.List;
import java.util.Map; import org.apache.struts2.interceptor.SessionAware; import com.chinasofti.golf.dao.IEmployeesDAO; import com.chinasofti.golf.entity.Employees;
import com.opensymphony.xwork2.ActionSupport; @SuppressWarnings("serial")
public class denglu extends ActionSupport implements SessionAware{
private Employees emp1;
private IEmployeesDAO employeesDAO;
private Employees emp2;
private String currentDate;
String massage;
private List<Employees> lemp;
private int id;
private Map<String, Object> session; public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public List<Employees> getLemp() {
return lemp;
}
public void setLemp(List<Employees> lemp) {
this.lemp = lemp;
}
public String getMassage() {
return massage;
}
public void setMassage(String massage) {
this.massage = massage;
}
public Employees getEmp1() {
return emp1;
}
public void setEmp1(Employees emp1) {
this.emp1 = emp1;
}
public String getCurrentDate() {
return currentDate;
}
public void setCurrentDate(String currentDate) {
this.currentDate = currentDate;
}
public Employees getEmp2() {
return emp2;
}
public void setEmp2(Employees emp2) {
this.emp2 = emp2;
}
public IEmployeesDAO getEmployeesDAO() {
return employeesDAO;
}
public void setEmployeesDAO(IEmployeesDAO employeesDAO) {
this.employeesDAO = employeesDAO;
}
//登录
public String denglu(){
String lervel1="前台";
String lervel2="管理员";
emp2=employeesDAO.GetEmployeesByName(emp1.getName());
if(emp2!=null&&emp2.getId()!=null){
if(emp2.getPassword().equals(emp1.getPassword())){
if(emp2.getLevel().equals(emp1.getLevel())&&emp1.getLevel().equals(lervel1)){ session.put("OK",emp2);
return "denglu1";
} else if(emp2.getLevel().equals(emp1.getLevel())&&emp1.getLevel().equals(lervel2)){ session.put("OK",emp2);
return "denglu2";
} else{
massage="身份错了!";
return "massage";
}
}else{
massage="密码错了!";
return "massage";
}
}
massage="密码错误或用户名不存在!";
return "massage";
} public String allemployees(){
lemp=employeesDAO.GetEmployees();
return "allemployees";
}
//添加
public String addemployees(){
emp2.setName(emp1.getName());
emp2.setPassword(emp1.getPassword());
emp2.setLevel(emp1.getLevel());
emp2.setSex(emp1.getSex());
emp2.setTelephone(emp1.getTelephone());
employeesDAO.Insert(emp2); return "addemployees";
}
//按照ID查找
public String updateemployeesbyid(){
// int id=emp1.getId();
// System.out.println(id);
emp2= employeesDAO.GetEmployeesById(id);
return "updateemployeesbyid";
}
//删除
public String deleteemployees(){
emp2= employeesDAO.GetEmployeesById(id);
employeesDAO.Delete(emp2);
return "deleteemployees";
} //更改
public String updateemployees(){
emp2.setId(emp1.getId());
emp2.setName(emp1.getName());
emp2.setPassword(emp1.getPassword());
emp2.setLevel(emp1.getLevel());
emp2.setSex(emp1.getSex());
emp2.setTelephone(emp1.getTelephone());
employeesDAO.Update(emp2); return "updateemployees";
}
//退出
public String tuichu(){ session.put("OK", ""); return "tuichu";
} @Override
public void setSession(Map<String, Object> session) {
// TODO Auto-generated method stub
this.session=session;
} }

denglu.java

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

 package com.chinasofti.golf.action;

 public class Denlu {
public String execute(){
return "landing";
} }

Denlu.java

4.处理留言的

 package com.chinasofti.golf.action;

 import java.util.ArrayList;
import java.util.List; import com.chinasofti.golf.daoimpl.GuestDAOImpl;
import com.chinasofti.golf.entity.Consumption;
import com.chinasofti.golf.entity.Guest; public class GuestAction {
private Guest gue;
private Guest gu;
private List<Guest> lgue;
private GuestDAOImpl gueDAO;
private int id; int pageSize;
private int recordCount;
private int pageCount;
private int pageIndex;
private String p;
private String c; public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getRecordCount() {
return recordCount;
}
public void setRecordCount(int recordCount) {
this.recordCount = recordCount;
}
public int getPageCount() {
return pageCount;
}
public void setPageCount(int pageCount) {
this.pageCount = pageCount;
}
public int getPageIndex() {
return pageIndex;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public String getP() {
return p;
}
public void setP(String p) {
this.p = p;
}
public String getC() {
return c;
}
public void setC(String c) {
this.c = c;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Guest getGu() {
return gu;
}
public void setGu(Guest gu) {
this.gu = gu;
}
public Guest getGue() {
return gue;
}
public void setGue(Guest gue) {
this.gue = gue;
}
public List<Guest> getLgue() {
return lgue;
}
public void setLgue(List<Guest> lgue) {
this.lgue = lgue;
}
public GuestDAOImpl getGueDAO() {
return gueDAO;
}
public void setGueDAO(GuestDAOImpl gueDAO) {
this.gueDAO = gueDAO;
}
//查找所有的留言
public String allguest(){
lgue=gueDAO.GetConsumption(); int pagesize=15;
int recordcount=lgue.size();
int pagecount=(recordcount-1)/pagesize+1;
int pageindex=1;
try{
pagesize=Integer.parseInt(c);
}catch(Exception e)
{}
try{
pageindex=Integer.parseInt(p);
}catch(Exception e)
{}
if(pageindex<=1){
pageindex=1;
}
if(pageindex>pagecount){
pageindex=pagecount;
}
List<Guest> soc2=new ArrayList<Guest>();
for(int i=(pageindex-1)*pagesize;i<pageindex*pagesize&&i<lgue.size();i++){
soc2.add(lgue.get(i));
}
pageSize=pagesize;
recordCount=recordcount;
pageCount=pagecount;
pageIndex=pageindex;
lgue=soc2; return "allguest";
}
//添加一条留言
public String addguest(){
Time time=new Time(); gue.setName(gu.getName());
gue.setMessage(gu.getMessage());
gue.setLook(gu.getLook());
gue.setSolve(gu.getSolve());
gue.setDate(time.addDate());
gue.setDatetime(time.addDateTime()); gueDAO.Insert(gue); return "addguest";
} //根据ID查找这条留言,并且要显示已经查看过,解决与否可以更改的
public String getguestbyid(){
System.out.println(id);
gue=gueDAO.GetGuestById(id);
// System.out.println(gue.getName());
return "getguestbyid";
} public String updateguest(){ Time time=new Time();
System.out.println(111111111);
System.out.println(gu.getName());
System.out.println(gu.getMessage());
System.out.println(gu.getLook());
System.out.println(gu.getSolve());
System.out.println(time.addDate());
System.out.println(time.addDateTime());
System.out.println(111111111); gue.setName(gu.getName());
gue.setMessage(gu.getMessage());
gue.setLook(gu.getLook());
gue.setSolve(gu.getSolve());
gue.setDate(time.addDate());
gue.setDatetime(time.addDateTime());
gueDAO.Update(gue); return "updateguest";
}
}

GuestAction.java

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

 package com.chinasofti.golf.action;

 import java.util.Map;

  import javax.servlet.http.HttpServletRequest;

  import org.apache.struts2.ServletActionContext;

  import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor; @SuppressWarnings("serial")
public class Landing extends AbstractInterceptor{ @Override
public String intercept(ActionInvocation invocation) throws Exception {
// TODO Auto-generated method stub
HttpServletRequest request=ServletActionContext.getRequest();
Map<String,Object> session=invocation.getInvocationContext().getSession();
Object obj=session.get("OK");
if(obj!=null){
invocation.invoke();
}
request.setAttribute("message", "对不起您还没有登录,请先登录");
return "inputtt"; } }

Landing.java

6.处理会员信息的

 package com.chinasofti.golf.action;

 import java.util.ArrayList;
import java.util.List; import com.chinasofti.golf.daoimpl.MembersDAOImpl;
import com.chinasofti.golf.entity.Consumption;
import com.chinasofti.golf.entity.Members;
import com.opensymphony.xwork2.ActionSupport; @SuppressWarnings("serial")
public class MembersAction extends ActionSupport {
private Members meb;
private Members ms;
private List<Members> lmeb;
private MembersDAOImpl mebDAO;
private int id; int pageSize;
private int recordCount;
private int pageCount;
private int pageIndex;
private String p;
private String c; public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getRecordCount() {
return recordCount;
}
public void setRecordCount(int recordCount) {
this.recordCount = recordCount;
}
public int getPageCount() {
return pageCount;
}
public void setPageCount(int pageCount) {
this.pageCount = pageCount;
}
public int getPageIndex() {
return pageIndex;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
public String getP() {
return p;
}
public void setP(String p) {
this.p = p;
}
public String getC() {
return c;
}
public void setC(String c) {
this.c = c;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public MembersDAOImpl getMebDAO() {
return mebDAO;
}
public void setMebDAO(MembersDAOImpl mebDAO) {
this.mebDAO = mebDAO;
}
public Members getMeb() {
return meb;
}
public void setMeb(Members meb) {
this.meb = meb;
}
public List<Members> getLmeb() {
return lmeb;
}
public void setLmeb(List<Members> lmeb) {
this.lmeb = lmeb;
}
public Members getMs() {
return ms;
}
public void setMs(Members ms) {
this.ms = ms;
} public String member(){
int id=meb.getId();
System.out.println(meb.getId());
ms=mebDAO.GetMembersById(id);
return "member";
} public String allmember(){
lmeb=mebDAO.GetMembers(); int pagesize=15;
int recordcount=lmeb.size();
int pagecount=(recordcount-1)/pagesize+1;
int pageindex=1;
try{
pagesize=Integer.parseInt(c);
}catch(Exception e)
{}
try{
pageindex=Integer.parseInt(p);
}catch(Exception e)
{}
if(pageindex<=1){
pageindex=1;
}
if(pageindex>pagecount){
pageindex=pagecount;
}
List<Members> soc2=new ArrayList<Members>();
for(int i=(pageindex-1)*pagesize;i<pageindex*pagesize&&i<lmeb.size();i++){
soc2.add(lmeb.get(i));
}
pageSize=pagesize;
recordCount=recordcount;
pageCount=pagecount;
pageIndex=pageindex;
lmeb=soc2; return "allmember";
} public String addmember(){ meb.getMember();
meb.getCarid();
meb.getSex();
meb.getLevel();
meb.getTelephone();
mebDAO.Insert(meb); return "addmember";
}
public String memberid(){
// int id=meb.getId();
ms=mebDAO.GetMembersById(id);
return "memberid";
}
//修改会员信息
public String updatemember(){ mebDAO.Update(meb);
return "updatemember";
} }

MembersAction.java

7.会员消费记录的

 package com.chinasofti.golf.action;

 import java.util.List;

 import com.chinasofti.golf.dao.IRecordDAO;
import com.chinasofti.golf.entity.Record;
import com.opensymphony.xwork2.ActionSupport; @SuppressWarnings("serial")
public class RecordAction extends ActionSupport{
private Record red;
private List<Record> lred;
private IRecordDAO redDAO; public Record getRed() {
return red;
}
public void setRed(Record red) {
this.red = red;
}
public List<Record> getLred() {
return lred;
}
public void setLred(List<Record> lred) {
this.lred = lred;
}
public IRecordDAO getRedDAO() {
return redDAO;
}
public void setRedDAO(IRecordDAO redDAO) {
this.redDAO = redDAO;
} public String getrecordbyid(){
String Memberid=red.getMemberid(); lred=(List<Record>) redDAO.GetRecordByMemberid(Memberid);
return "getrecordbyid";
} }

RecordAction

8.供大家用的时间类

 package com.chinasofti.golf.action;

 import java.text.SimpleDateFormat;
import java.util.Date; public class Time {
String currentDate;
String currentDateTime; public String addDate(){
Date date=new Date();
String format1="yyyy-MM-dd "; SimpleDateFormat sdf1=new SimpleDateFormat(format1); currentDate=sdf1.format(date); return currentDate;
}
public String addDateTime(){
Date date=new Date(); String format2="HH:mm:ss"; SimpleDateFormat sdf2=new SimpleDateFormat(format2); currentDateTime=sdf2.format(date); return currentDateTime;
} }

Time

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

 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0.3//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.3.dtd">
<validators>
<field name="emp1.name">
<field-validator type="requiredstring">
<message>用户名不能为空</message>
</field-validator>
</field> <field name="emp1.password">
<field-validator type="requiredstring">
<message>密码不能为空</message>
</field-validator> </field>
</validators>

denglu-Landing-validation.xml

二.jsp界面

1.添加

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'addemployees.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px;
color: bgcolor="red" ;
}
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;}
</style>
</head> <body>
<div id="bg">
<form action="Addemployees" method="post">
<table>
<tr><td width="100">姓名:</td><td><input type="text" name="emp1.name"/></td></tr>
<tr><td width="100">密码:</td><td><input type="text" name="emp1.password"/></td></tr>
<tr><td width="100">身份:</td><td><select name="emp1.level" >
<option value="前台" style="color: red">前台</option>
<option value="管理员" style="color: blue">管理员</option>
</select>
</td></tr> <tr><td width="100">性别:</td><td><select name="emp1.sex" >
<option value="女" style="color: red">女</option>
<option value="男" style="color: blue">男</option>
</select>
</td></tr> <tr><td width="100">电话号码:</td><td><input type="text" name="emp1.telephone"/></td></tr>
<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>
</tr> </table>
</form>
</div>
</body>
</html>

addemployees.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'addguest.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px; }
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {
width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
}
</style>
</head> <body> <div id="bg">
<form method="post" action="Addguest">
<table align="center" border="0" > <tr>
<td>留言人</td>
<td colspan="3" align="left"><input type="text" name="gu.name" style="width: 100%; "></td>
</tr> <tr>
<td>留言</td>
<td colspan="3" align="left">
<textarea cols="100" rows="20" name="gu.message" ></textarea>
</td>
</tr>
<tr>
<td>是否查看</td>
<td><select name="gu.look">
<option value="否" style="color: red">否</option>
<option value="是" style="color: blue">是</option>
</select></td>
<td>是否解决</td>
<td><select name="gu.solve">
<option value="否" style="color: red">否</option>
<option value="是" style="color: blue">是</option>
</select>
</td>
</tr>
<tr>
<td colspan="4" align="center" height="20px">
<input type="submit" value="提交" />&nbsp;&nbsp;
<input type="reset" value="取消 "/>
</td> </tr>
</table>
</form>
</div>
</body>
</html>

addguest

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'addmember.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px;
color: bgcolor="#39F" ;
}
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {
width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
}
</style>
</head> <body>
<div id="bg">
<form action="Addmember" method="post">
<table>
<tr><td width="100">姓名</td><td><input type="text" name="meb.member"/></td></tr>
<tr><td width="100">身份证号码</td><td><input type="text" name="meb.carid"/></td></tr>
<tr><td width="100">性别</td><td><select name="meb.sex" >
<option value="男" style="color: red">男</option>
<option value="女" style="color: blue">女</option>
<option value="人妖" style="color: blue">人妖</option>
</select>
</td></tr> <tr><td width="100">电话号码</td><td><input type="text" name="meb.telephone"/></td></tr>
<tr><td width="100">会员身份</td><td><select name="meb.level" >
<option value="会员" style="color: red">会员</option>
<option value="访客" style="color: blue">访客</option> </select>
</td></tr> <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>
</tr> </table>
</form>
</div>
</body>
</html>

addmember.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

 <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'kaika.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px; } #bg {
width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
}
</style>
</head> <body>
<div id="bg">
<form action="Kaika" method="post">
<table border="1" bgcolor="celeste" style="height: 140px; ">
<tr> <td width="100">姓名</td> <td><input type="text" name="ms.name"/></td></tr>
<tr> <td width="100">会员ID</td> <td><input type="text" name="ms.memberid"/></td></tr>
<tr><td width="100">身份</td> <td><select name="ms.level">
<option value="会员">会员</option>
<option value="访客">访客</option>
</select></td></tr> <tr><td width="100">是否结账</td><td><select name="ms.checks">
<option value="否">否</option>
<option value="是">是</option>
</select></td></tr>
<tr> <td width="100">当前日期</td> <td><input type="text" value="${ms.date}" name="ms.date"/></td></tr>
<tr><td width="100">当前时间</td><td><input type="text" value="${ms.datetime}" name="ms.datetime"/></td></tr>
<tr><td width="100">新增用户</td></tr>
<tr>
<td><input type="submit" value="确认开卡" ><input type="reset" value="取消" > </td>
</tr>
</table> </form>
</div>
</body>
</html>

kaika.jsp

2.查询所有

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'allemployees.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{text-align: center;font-family: "微软雅黑";font-size: 14px;}
td{background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;}
</style>
</head> <body>
<div id="bg">
<table align="center">
<tr>
<td width="100px">员工号</td>
<td width="100px">姓名</td>
<td width="100px" >密码</td>
<td width="100px">身份</td>
<td width="100px">性别</td>
<td width="100px">电话号码</td>
<td width="100px" colspan="2"><a href="addemployees.jsp"><input type="submit" value="增加员工" style="height: 20px; width: 100px; "/></a></td>
</tr>
<c:forEach var="lem" items= "${lemp}">
<tr>
<td><input type="text" value="${lem.id}" name="emp1.id" readonly="readonly"/></td>
<td><input type="text" value="${lem.name}" name="emp1.name" readonly="readonly"/></td>
<td><input type="text" value="${lem.password}" name="emp1.password" readonly="readonly"/></td>
<td><input type="text" value="${lem.level}" name="emp1.level" readonly="readonly"/></td>
<td><input type="text" value="${lem.sex}" name="emp1.sex" readonly="readonly"/></td>
<td><input type="text" value="${lem.telephone }" name="emp1.telephone" readonly="readonly"/></td>
<td width="100px"><a href="Deleteemployees?id=${lem.id}" onclick=" return confirm('确认删除?删除后不可恢复!')"><input type="submit" value="删除员工" style="height: 20px; width: 100px; "/></a></td>
<td width="100px"><a href="Updateemployeesbyid?id=${lem.id}"><input type="submit" value="修改员工信息" style="height: 20px; width: 100px; "/></a></td>
</tr>
</c:forEach> </table>
</div>
</body>
</html>

allemployees.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'allguest.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{text-align: center;font-family: "微软雅黑";font-size: 14px;}
td{background-image: url(./imge/l1b5.gif);background-size: 100% 100%; }
#bg {width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;}
.red{ background-color: red; }
</style>
</head> <body>
<div id="bg">
<table align="center" border="0" >
<tr>
<td width="30px">序列</td>
<td width="50px">留言人</td>
<td width="100px">日期</td>
<td width="100px">时间</td>
<td width="100px">是否查看</td>
<td width="100px">是否解决</td>
<td width="20px">留言信息</td>
<td width="150px"><a href="addguest.jsp"><input type="submit" value="新增留言" style="height: 20px; width: 100px; "></a></td>
</tr>
<c:forEach var="gue" items= "${lgue}" varStatus="status">
<tr>
<td >${gue.id}</td>
<td >${gue.name}</td>
<td ><input value="${gue.date}" readonly="readonly"></td>
<td><input value="${gue.datetime}" readonly="readonly"></td>
<td >${gue.look}</td>
<td >${gue.solve}</td>
<td ><input value="${gue.message}" readonly="readonly"></td>
<td><a href="Getguestbyid?id=${gue.id}"><input type="submit" value="查看详情" style="height: 20px; width: 100px; "></a></td>
</tr>
</c:forEach>
</table>
<table align="center">
<tr><td>
共有${recordCount}条留言,每页显示${pageSize}条,共${pageCount}页,当前第${pageIndex}页
<a href="Allguest?p=${pageIndex-1}&c=${pageSize}">上一页</a>
<a href="Allguest?p=${pageIndex+1}&c=${pageSize}">下一页</a>
</td></tr>
</table>
</div>
</body>
</html>

allguest.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'allmember.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{text-align: center;font-family: "微软雅黑";font-size: 14px;}
td{background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;}
</style>
</head> <body>
<div id="bg">
<table align="center">
<tr><td width="100">会员ID</td>
<td width="100">姓名</td>
<td width="100">身份证号码</td>
<td width="100">性别</td>
<td width="100">电话号码</td>
<td width="100">会员身份</td>
<td width="100"><a href="addmember.jsp"><input type="submit" value="添加会员" style="height: 20px; width: 100px; "></a></td> </tr>
<c:forEach var="meb" items= "${lmeb}">
<tr><td><input value="${meb.id}" readonly="readonly"></td>
<td><input type="text" value="${meb.member}" readonly="readonly"></td>
<td><input type="text" value="${meb.carid}" readonly="readonly"></td>
<td><input type="text" value="${meb.sex}" readonly="readonly"></td>
<td><input type="text" value="${meb.telephone}" readonly="readonly"></td>
<td><input type="text" value="${meb.level}" readonly="readonly"></td>
<td><a href="Memberid?id=${meb.id}"><input type="submit" value="更改会员信息" style="height: 20px; width: 100px; "></a></td>
</tr>
</c:forEach>
</table>
<table align="center">
<tr><td>
共有${recordCount}人打球,每页显示${pageSize}人,共${pageCount}页,当前第${pageIndex}页
<a href="Allmember?p=${pageIndex-1}&c=${pageSize}">上一页</a>
<a href="Allmember?p=${pageIndex+1}&c=${pageSize}">下一页</a>
</td></tr>
</table>
</div>
</body>
</html>

allmember

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'tadykaika.jsp' starting page</title> <style type="text/css">
tr{text-align: center;font-family: "微软雅黑";font-size: 14px;}
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {width: auto;height:41em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;}
</style> </head> <body>
<div id="bg" >
<table align="center" >
<tr>
<td width="100">消费卡号</td>
<td width="100">姓名</td>
<td width="100">会员ID</td>
<td width="100">身份</td>
<td width="100">价格</td>
<td width="100">是否结账</td>
<td width="100">当前日期</td>
<td width="100">当前时间</td>
<td width="200" ><a href="kaika.jsp" ><input type="submit" value="开卡" style="height: 20px; width: 100px; "></a></td>
</tr>
<c:forEach var="con" items= "${lcon}">
<tr>
<td><input type="text" value="${con.id}" readonly="readonly"></td>
<td><input type="text" value="${con.name}" readonly="readonly"></td>
<td><input type="text" value="${con.memberid}" readonly="readonly"></td>
<td><input type="text" value="${con.level}" readonly="readonly"></td>
<td><input type="text" value="${con.money}" readonly="readonly"></td>
<td><input type="text" value="${con.checks}" readonly="readonly"></td>
<td><input type="text" value="${con.date}" readonly="readonly"></td>
<td><input type="text" value="${con.datetime}" readonly="readonly"></td>
<td><a href="Jiezhangid?id=${con.id}" ><input type="submit" value="结账" style="height: 20px; width: 100px; "></a></td>
</tr> </c:forEach> </table>
<table align="center">
<tr><td>
共有${recordCount}人打球,每页显示${pageSize}人,共${pageCount}页,当前第${pageIndex}页
<a href="GetConsumption?p=${pageIndex-1}&c=${pageSize}">上一页</a>
<a href="GetConsumption?p=${pageIndex+1}&c=${pageSize}">下一页</a>
</td></tr>
</table>
</div>
</body>
</html>

tadykaika.jsp

3.通过XX查

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'getconsumptionbydate.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
#denglu {
position: absolute;
border: 1px solid #C90;
height: 5%;
width: 100%;
background-image: url(./imge/l1b5.gif);background-size: 100% 100%;
}
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px; }
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {
width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
}
</style>
</head> <body>
<div id="bg">
<h3> 查询消费卡信息:</h3>
<form action="Getconsumptionbydate" method="post">
<table border="0" align="center">
<tr><td width="100">日期:</td><td> <input type="date" name="con.date"/></td></tr> <tr><td><input type="submit" value="查询" style="height: 20px; width: 100px; "/></td><td>${con.date}</td></tr>
</table>
</form>
<table align="center">
<tr>
<td width="100">截止日期</td>
<td width="100">截止时间</td>
<td width="100">身份</td>
<td width="100">消费卡号</td>
<td width="100">姓名</td>
<td width="100">会员卡号</td>
<td width="100">价格</td>
<td width="100">是否结账</td> </tr>
<c:forEach var="ms" items= "${lcon}">
<tr>
<td>${ms.date}</td>
<td>${ms.datetime}</td>
<td>${ms.level}</td>
<td>${ms.id}</td>
<td>${ms.name}</td>
<td>${ms.memberid}</td>
<td>${ms.money}</td>
<td>${ms.checks}</td> </tr>
</c:forEach>
</table>
<table align="center">
<tr><td>
共有${recordCount}人打球,共${pageCount}页,当前第${pageIndex}页
<a href="Getconsumptionbydate?p=${pageIndex-1}&c=${pageSize}">上一页</a>
<a href="Getconsumptionbydate?p=${pageIndex+1}&c=${pageSize}">下一页</a>
</td></tr>
</table>
<div id="denglu">
<table>
<tr>
<td>今日总人数:</td>
<td> <input type="text" value="${totalpeoper}" /></td>
<td>已完成:</td>
<td> <input type="text" value="${yes}"/></td>
<td>剩余人数:</td>
<td> <input type="text" value="${no}"/></td>
<td>总收入:</td>
<td> <input type="text" value="${rmb}" /></td>
<td>已经收到金额:</td>
<td> <input type="text" value="${yesmoney}"/></td>
<td>剩余收到金额:</td>
<td> <input type="text" value="${nomoney}" /></td> </tr> </table> </div>
</div>
</body>
</html>

getconmptionbydate.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'getconsumpyionbyid.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px; }
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {
width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
}
</style>
</head> <body>
<div id="bg">
<h3>查询消费卡信息:</h3>
<form action="Getconsumptionbyid" method="post">
<table border="1" align="center" >
<tr><td width="100">消费卡号:</td><td> <input type="text" name="con.id"/></td></tr>
<tr><td><input type="submit" value="查询" /></td> <td><input type="reset" value="取消"/> </td></tr>
</table>
</form> <table align="center">
<tr><td width="100">消费卡号</td>
<td width="100">姓名</td>
<td width="100">会员卡号</td>
<td width="100">身份</td>
<td width="100">价格</td>
<td width="100">是否结账</td>
<td width="100">开卡日期</td>
<td width="100">开卡时间</td>
</tr>
<tr><td>${ms.id}</td>
<td>${ms.name}</td>
<td>${ms.memberid}</td>
<td>${ms.level}</td>
<td>${ms.money}</td>
<td>${ms.checks}</td>
<td>${ms.date}</td>
<td>${ms.datetime}</td>
<td><a href="Jiezhangid?id=${ms.id}"><input type="submit" value="结账" style="height: 20px; width: 80px; "/></a> </td>
</tr>
</table>
</div>
</body>
</html>

getconmptionbyid.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'getconsumpyionbyid.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px; }
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {
width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
}
</style>
</head> <body>
<div id="bg">
<h3>查询消费卡信息:</h3>
<form action="Getconsumptionbyid" method="post">
<table border="1" align="center" >
<tr><td width="100">消费卡号:</td><td> <input type="text" name="con.id"/></td></tr>
<tr><td><input type="submit" value="查询" /></td> <td><input type="reset" value="取消"/> </td></tr>
</table>
</form> <table align="center">
<tr><td width="100">消费卡号</td>
<td width="100">姓名</td>
<td width="100">会员卡号</td>
<td width="100">身份</td>
<td width="100">价格</td>
<td width="100">是否结账</td>
<td width="100">开卡日期</td>
<td width="100">开卡时间</td>
</tr>
<tr><td>${ms.id}</td>
<td>${ms.name}</td>
<td>${ms.memberid}</td>
<td>${ms.level}</td>
<td>${ms.money}</td>
<td>${ms.checks}</td>
<td>${ms.date}</td>
<td>${ms.datetime}</td>
<td><a href="Jiezhangid?id=${ms.id}"><input type="submit" value="结账" style="height: 20px; width: 80px; "/></a> </td>
</tr>
</table>
</div>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'getconsumpyionbyid.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px; }
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {
width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
}
</style>
</head> <body>
<div id="bg">
<h3>查询消费卡信息:</h3>
<form action="Getconsumptionbyid" method="post">
<table border="1" align="center" >
<tr><td width="100">消费卡号:</td><td> <input type="text" name="con.id"/></td></tr>
<tr><td><input type="submit" value="查询" /></td> <td><input type="reset" value="取消"/> </td></tr>
</table>
</form> <table align="center">
<tr><td width="100">消费卡号</td>
<td width="100">姓名</td>
<td width="100">会员卡号</td>
<td width="100">身份</td>
<td width="100">价格</td>
<td width="100">是否结账</td>
<td width="100">开卡日期</td>
<td width="100">开卡时间</td>
</tr>
<tr><td>${ms.id}</td>
<td>${ms.name}</td>
<td>${ms.memberid}</td>
<td>${ms.level}</td>
<td>${ms.money}</td>
<td>${ms.checks}</td>
<td>${ms.date}</td>
<td>${ms.datetime}</td>
<td><a href="Jiezhangid?id=${ms.id}"><input type="submit" value="结账" style="height: 20px; width: 80px; "/></a> </td>
</tr>
</table>
</div>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'getconsumpyionbyid.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px; }
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {
width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
}
</style>
</head> <body>
<div id="bg">
<h3>查询消费卡信息:</h3>
<form action="Getconsumptionbyid" method="post">
<table border="1" align="center" >
<tr><td width="100">消费卡号:</td><td> <input type="text" name="con.id"/></td></tr>
<tr><td><input type="submit" value="查询" /></td> <td><input type="reset" value="取消"/> </td></tr>
</table>
</form> <table align="center">
<tr><td width="100">消费卡号</td>
<td width="100">姓名</td>
<td width="100">会员卡号</td>
<td width="100">身份</td>
<td width="100">价格</td>
<td width="100">是否结账</td>
<td width="100">开卡日期</td>
<td width="100">开卡时间</td>
</tr>
<tr><td>${ms.id}</td>
<td>${ms.name}</td>
<td>${ms.memberid}</td>
<td>${ms.level}</td>
<td>${ms.money}</td>
<td>${ms.checks}</td>
<td>${ms.date}</td>
<td>${ms.datetime}</td>
<td><a href="Jiezhangid?id=${ms.id}"><input type="submit" value="结账" style="height: 20px; width: 80px; "/></a> </td>
</tr>
</table>
</div>
</body>
</html>

getmembersbyid

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'getrecordbyid.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px; }
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {
width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
}
</style>
</head> <body>
<div id="bg">
<h3> 查询会员信息:</h3>
<form action="Recordbyid" method="post">
<table border="1" align="center" >
<tr><td width="100">会员卡号:</td><td> <input type="text" name="red.memberid"/></td></tr>
<tr><td><input type="submit" value="查询" /></td> <td><input type="reset" value="取消"/> </td></tr>
</table>
</form>
<table align="center">
<tr><td width="100">流水账号</td>
<td width="100">会员id</td>
<td width="100">消费卡号</td>
<td width="100">身份</td>
<td width="100">消费</td>
<td width="100">消费日期</td>
<td width="100">消费时间</td>
</tr> <c:forEach var="ms" items="${lred}">
<tr><td>${ms.id}</td>
<td>${ms.memberid}</td>
<td>${ms.consumptionid}</td>
<td>${ms.level}</td>
<td>${ms.money}</td> <td>${ms.date}</td>
<td>${ms.datetime}</td> </tr>
</c:forEach>
</table>
</div>
</body>
</html>

getrecordbyid.jsp

4.删除

5.更改

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'jiezhang.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px; }
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {
width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
}
</style>
</head> <body>
<div id="bg">
<form action="Jiezhang" method="post">
<table>
<tr><td width="100">消费卡号</td><td> <input value="${ms.id}" name="con.id" readonly="readonly"/></td></tr>
<tr><td width="100">姓名</td><td><input value="${ms.name}" name="con.name" readonly="readonly"/></td></tr>
<tr><td width="100">会员卡号</td><td><input value="${ms.memberid}" name="con.memberid" readonly="readonly"/></td></tr>
<tr><td width="100">身份</td><td><input value="${ms.level}" name="con.level" readonly="readonly"/></td></tr>
<tr><td width="100">价格</td><td><input value="${ms.money}" name="con.money" readonly="readonly"/></td></tr>
<tr><td width="100">是否结账</td><td><select name="con.checks" >
<option value="否" style="color: red">否</option>
<option value="是" style="color: blue">是</option>
</select>
</td></tr> <tr><td width="100">日期</td><td><input type="text" value="${ms.date}" name="con.date"/></td></tr>
<tr><td width="100">时间</td><td><input type="text" value="${ms.datetime}" name="con.datetime"/></td></tr>
<tr><td><input type="submit" value="结账"> </td><td><input type="reset" value="取消"> </td></tr>
</table>
</form>
</div>
</body>
</html>

jiezhang.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'delepeemployeesbyid.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px; }
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {
width: auto;height:45em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
}
</style>
</head> <body>
<div id="bg">
<form action="Updateemployees" method="post">
<table >
<tr> <td width="100px">员工号</td><td><input type="text" value="${emp2.id}" name="emp1.id" readonly="readonly"/></td></tr>
<tr> <td width="100px">姓名</td> <td><input type="text" value="${emp2.name}" name="emp1.name" readonly="readonly"/></td></tr>
<tr><td width="100px" >密码</td> <td><input type="text" value="${emp2.password}" name="emp1.password"/></td></tr>
<tr><td width="100">身份:</td><td><select name="emp1.level" value="${emp2.level}">
<option value="前台" style="color: red">前台</option>
<option value="管理员" style="color: blue">管理员</option>
</select>
</td></tr> <tr><td width="100">性别:</td><td><select name="emp1.sex" value="${emp2.sex}">
<option value="女" style="color: red">女</option>
<option value="男" style="color: blue">男</option>
</select>
</td></tr> <tr><td width="100px">电话号码</td><td><input type="text" value="${emp2.telephone }" name="emp1.telephone"/></td></tr> <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>
</table>
</form>
</div>
</body>
</html>

updateemployeesbyid.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'updateguest.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px; }
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {
width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
}
</style>
</head> <body> <div id="bg">
<form method="post" action="Updateguest">
<table align="center" border="0" > <tr>
<td>留言人</td>
<td colspan="3" align="left"><input type="text" name="gu.name" value="${gue.name}"></td> </tr>
<tr>
<td>留言时间</td>
<td><input type="text" value=" ${gue.date}" name="gu.date"><input type="text" value="${gue.datetime}" name="gu.datetime"></td> </tr>
<tr>
<td>留言</td>
<td colspan="3" align="left">
<textarea cols="100" rows="20" name="gu.message" >${gue.message}</textarea>
</td>
</tr>
<tr>
<td>是否查看</td>
<td><select name="gu.look" value="${gue.look}"> <option value="是" style="color: blue">是</option>
</select></td>
<td>是否解决</td>
<td><select name="gu.solve" value="${gue.solve}">
<option value="否" style="color: red">否</option>
<option value="是" style="color: blue">是</option>
</select>
</td>
</tr>
<tr>
<td colspan="4" align="center" height="20px">
<input type="submit" value="确认查看" />&nbsp;&nbsp;
<input type="reset" value="取消 "/>
</td> </tr>
</table>
</form>
</div>
</body>
</html>

updateguest.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'updatemember.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
tr{
text-align: center;
font-family: "微软雅黑";
font-size: 14px; }
td{ background-image: url(./imge/l1b5.gif);background-size: 100% 100%;}
#bg {
width: auto;height:40em;text-align:inherit;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;
}
</style>
</head> <body>
<div id="bg">
<form action="Updatemember" method="post">
<table>
<tr><td width="100">会员卡号</td><td><input type="text" value="${ms.id}" name="meb.id" readonly="readonly"/></td></tr>
<tr><td width="100">姓名</td><td><input type="text" value="${ms.member}" name="meb.member" /></td></tr>
<tr><td width="100">身份证号码</td><td><input type="text" value="${ms.carid}" name="meb.carid"/></td></tr>
<tr><td width="100">性别</td><td><select value="${ms.sex }" name="meb.sex">
<option value="男" style="color: red">男</option>
<option value="女" style="color: blue">女</option>
<option value="人妖" style="color: blue">人妖</option>
</select>
</td></tr> <tr><td width="100">电话号码</td><td><input type="text" value="${ms.telephone}" name="meb.telephone"/></td></tr>
<tr><td width="100">会员身份</td><td><select value="${ms.level}" name="meb.level">
<option value="会员" style="color: red">会员</option>
<option value="访客" style="color: blue">访客</option> </select></td></tr> <tr><td width="100"><input type="submit" value="修改"/></td><td><input type="reset" value="取消" /></td>
</tr> </table>
</form>
</div>
</body>
</html>

updatemember.jsp

6.其他乱七八糟

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'denglu.jsp' starting page</title> <style type="text/css">
body{padding: 0px;margin: 0px;}
#header{width: auto;min-height: 70px;line-height: 70px;}
#header{border-bottom: medium solid #39A631;}
span.title_con{font-family:"微软雅黑";font-style: normal;font-size: 2em;font-weight:800 ;color: #39A631;padding-left: 1em;}
#content{width: auto;height:28em;text-align: center;background-image: url(./img/xgxt_login_bg.jpg);background-size: 100% 100%;}
#footer{width: auto;min-height: 60px;line-height:60px;}
#footer{border-top: thin solid #39A631;}
.con{width: 35%;height: 20em;margin-top:4em;}
.con{border: thin solid #8EC172;}
.con_title{background-color: #8EC172;width: auto;height: 3.5em;line-height: 3.5em;text-align: center;}
.con_title_sp{font-family: "微软雅黑";font-size: 1.5em;font-weight: 800;color: #FFF;}
.con_input{margin: 2em 0 1em 0;}
.submit-btn{width: 8em;height: 2em;background-color: #62ab00;border-radius: 4px;border: 0px;color: #fff;font-family:"微软雅黑";font-size: 1em;font-weight: bold;}
.con_input span{font-family: "微软雅黑";font-size: 1em;font-weight: bold;color: #333;}
.con_input input{width: 15em;padding: 0.5em 1em;border: 1px solid #bbb;}
.submit-btn{margin: 1em 0 1em 0;}
.con_select{margin-left: 2em;font-family:"微软雅黑";font-size: 1em;color: #333;}
</style>
</head>
<body>
<div id="header">
<div class="header_title">
<span class="title_con">高练系统</span>
</div>
</div>
<form action="Landing" method="post">
<div id="content">
<center>
<div class="con">
<div class="con_title">
<span class="con_title_sp">欢迎登录高练系统</span>
</div>
<div class="con_panel">
<div class="con_input">
<span>用户名:</span><input type="text" name="emp1.name"/> <s:property value="fieldErrors['emp1.name'][0]" />
</div>
<div class="con_input">
<span>密&nbsp;&nbsp;&nbsp;&nbsp;码:</span><input type="password" name="emp1.password"/> <s:property value="fieldErrors['emp1.password'][0]" />
</div>
<div class="con_input">
<span>身&nbsp;&nbsp;&nbsp;&nbsp;份:</span>
<select size="1" name="emp1.level">
<option value="前台" >前台收银</option>
<option value="管理员" >管理员</option>
</select>
</div>
<input type="submit" value="登 录" class="submit-btn"/>
</div>
</div>
</center>
</div>
</form> </body>
</html>

denglu.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'erro.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head> <body>
<h2 style="border-bottom-color: red">${massage}</h2> </body>
</html>

erro.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'guanliyuan.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head> <frameset rows="15%,*" frameborder="no">
<frame src="top.jsp" name ="top" scrolling="no" noresize="noresize" frameborder="0" marginheight="0" marginwidth="0">
<frameset cols="15%,*">
<frame src="left2.jsp" name ="left2" scrolling="no" noresize="noresize" frameborder="0" marginheight="5" marginwidth="5">
<frameset rows="5%,*">
<frame src="mid.jsp" name ="mid" scrolling="no" noresize="noresize" frameborder="0" marginheight="3" marginwidth="0">
<frame src= "welcome.jsp" name ="right2" scrolling="yes" noresize="noresize" >
</frameset>
</frameset>
</frameset> <body>
This is my JSP page. <br>
</body>
</html>

guanliyuan.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'left1.jsp' starting page</title> <style type="text/css">
#left {background-image: url(./imge/l1b5.gif) ; background-size: 100% ;height: 97%;}
td{font-family: "微软雅黑";font-size: 18px;color: #30F;}
</style>
</head>
<body>
<div id="left">
<table width="273" height="70%" border="1" style="width: 269px; height: 546px" >
<tr >
<td height="50" align="center" ><a href="GetConsumption" target="right1">开卡</a></td>
</tr> <tr >
<td height="50" align="center"><a href="getconsumptionbyid.jsp" target="right1">查询消费卡/结账</a></td>
</tr>
<tr>
<td height="50" align="center"><a href="getrecordbyid.jsp" target="right1">查询会员消费情况</a></td>
</tr>
<tr>
<td height="50" align="center"><a href="getemembersbyid.jsp" target="right1">查询会员资料</a></td>
</tr>
<tr >
<td height="30" align="center"><a href="getconsumptionbydate.jsp" target="right1">日报表查询</a></td>
</tr>
<tr>
<td height="50" align="center"><a href="Allguest" target="right1">留言簿</a></td>
</tr>
<tr>
<td height="50" align="center"><a href="Denglu" target="_parent">退出</a></td>
</tr> </table>
</div>
</body>
</html>

left1.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'left2.jsp' starting page</title> <style type="text/css">
#left {background-image: url(imge/l1b5.gif); background-size: 100% 100%; height: 97%;}
td{font-family: "微软雅黑";font-size: 18px;color: #F00;}
</style>
</head>
<body>
<div id="left">
<table width="270" border="1" style="width: 269px; height: 540px">
<tr>
<td height="30" align="center"><a href="GetConsumption" target="right2">开卡</a></td>
</tr>
<tr >
<td height="30" align="center"><a href="getconsumptionbyid.jsp" target="right2">查询消费卡/结账</a></td>
</tr>
<tr>
<td height="30" align="center"><a href="getemembersbyid.jsp" target="right2">查询会员资料</a></td>
</tr>
<tr>
<td height="30" align="center"><a href="getrecordbyid.jsp" target="right2">查询会员消费情况</a></td>
</tr>
<tr>
<td height="30" align="center"><a href="Allmember" target="right2">会员信息管理</a></td>
</tr>
<tr >
<td height="30" align="center"><a href="getconsumptionbydate.jsp" target="right2">日报表查询</a></td>
</tr> <tr>
<td height="30" align="center"><a href="Allemployees" target="right2">人事管理</a></td>
</tr>
<tr>
<td height="30" align="center"><a href="Allguest" target="right2">留言簿</a></td>
</tr>
<tr>
<td height="50" align="center"><a href="Denglu" target="_parent">退出</a></td>
</tr> </table>
</div>
</body>
</html>

left2.jsp

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

mid.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'qiantai.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head> <frameset rows="15%,*" frameborder="no">
<frame src="top.jsp" name ="top" scrolling="no" noresize="noresize" frameborder="0" marginheight="0" marginwidth="0">
<frameset cols="15%,*">
<frame src="left1.jsp" name ="left1" scrolling="no" noresize="noresize" frameborder="0" marginheight="5" marginwidth="5">
<frameset rows="5%,*">
<frame src="mid.jsp" name ="mid" scrolling="no" noresize="noresize" frameborder="0" marginheight="3" marginwidth="0">
<frame src= "welcome.jsp" name ="right1" scrolling="yes" noresize="noresize" >
</frameset>
</frameset>
</frameset>
<body>
This is my JSP page. <br>
</body>
</html>

qiantai.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'top.jsp' starting page</title> <style type="text/css">
#title {
float: left;
height: 140px;
width: 100%;
position: absolute;
background-position: center;
border: 1px solid #C90;
background-image: url(imge/3.jpg) ; background-size: 100% 100%; }
td{
font-family: "微软雅黑";
font-size: 16px;
color: #39A631;
}
</style>
</head>
<body>
<div id="title">
<table width="100%" align="center" >
<tr>
<td style="width: 20%; "></td>
<td style=" width: 80%; "><h1>高练系统欢迎你!</h2></td> </tr>
</table> </div> </body>
</html>

top.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'welcome.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head> <body>
<h1 style="color: #39A631" > 欢迎你! </h1>
</body>
</html>

welcom.jsp

三、配置文件

 <?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"
value="classpath:hibernate.cfg.xml">
</property>
</bean> <!--1. 公用的hibernateTemplate -->
<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
<constructor-arg ref="sessionFactory"></constructor-arg>
</bean> <!-- 2.2实体类 -->
<bean id="employees" class="com.chinasofti.golf.entity.Employees" scope="prototype"></bean>
<!-- 2.employees人员信息表 -->
<bean id="employeesDAO" class="com.chinasofti.golf.daoimpl.EmployeesDAOImpl">
<property name="hibernateTemplate" ref="hibernateTemplate"></property>
</bean>
<!-- 2.1 登录界面,其中name="employeesDAO"是denglu.jsp里面的employees私有类属性 -->
<bean id="denglu" class="com.chinasofti.golf.action.denglu" scope="prototype">
<property name="employeesDAO" ref="employeesDAO"></property>
<property name="emp2" ref="employees"></property>
<property name="emp1" ref="employees"></property>
</bean> <!-- 3 Consumption 前台消费操作表-->
<bean id="consumption" class="com.chinasofti.golf.entity.Consumption"></bean> <bean id ="consumptionDAO" class="com.chinasofti.golf.daoimpl.ConsumptionDAOImpl" >
<property name="hibernateTemplate" ref="hibernateTemplate"></property>
</bean>
<!--3.1 查找当日消费的所有信息 -->
<bean id="consumptionaction" class="com.chinasofti.golf.action.ConsumptionAction" scope="prototype"><!-- 这里的ID是跟struts 里面的class是一致的 -->
<property name="consumptionDAO" ref="consumptionDAO"> </property> <!-- 这里的name是ConsumptionAction里面类私有属性的name -->
<property name="con" ref="consumption"></property>
<property name="ms" ref="consumption"></property>
<property name="mebDAO" ref="membersDAO"></property>
</bean> <!-- 4.members会员个人管理表 -->
<bean id="membersDAO" class="com.chinasofti.golf.daoimpl.MembersDAOImpl">
<property name="hibernateTemplate" ref="hibernateTemplate"></property>
</bean>
<bean id="members" class="com.chinasofti.golf.entity.Members"> </bean>
<!-- 4.1根据ID查找会员当天的消费情况 -->
<bean id="membersaction" class="com.chinasofti.golf.action.MembersAction" scope="prototype">
<property name="mebDAO" ref="membersDAO"></property>
<property name="ms" ref="members"></property>
</bean> <!-- 5 .Record会员以往消费记录 -->
<bean id ="recordDAO" class="com.chinasofti.golf.daoimpl.RecordDAOImpl">
<property name="hibernateTemplate" ref="hibernateTemplate"></property>
</bean>
<!-- 5.1根据memberID查询会员以前的消费记录和流水账号 -->
<bean id="recordAction" class="com.chinasofti.golf.action.RecordAction" scope="prototype">
<property name="redDAO" ref="recordDAO"></property>
</bean> <!-- 6.Guest 留言簿 -->
<bean id ="guest" class="com.chinasofti.golf.entity.Guest"></bean>
<bean id ="guestDAO" class="com.chinasofti.golf.daoimpl.GuestDAOImpl">
<property name="hibernateTemplate" ref="hibernateTemplate"></property>
</bean>
<bean id="guestAction" class="com.chinasofti.golf.action.GuestAction">
<property name="gueDAO" ref="guestDAO"></property>
<property name="gue" ref="guest"></property>
<property name="gu" ref="guest"></property>
</bean> </beans>

applicationContext.xml

 <?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!-- Generated by MyEclipse Hibernate Tools. -->
<hibernate-configuration> <session-factory>
<property name="dialect">
org.hibernate.dialect.SQLServerDialect
</property>
<property name="connection.url">
jdbc:sqlserver://127.0.0.1:1433
</property>
<property name="connection.username">sa</property>
<property name="connection.password">123456</property>
<property name="connection.driver_class">
com.microsoft.sqlserver.jdbc.SQLServerDriver
</property>
<property name="myeclipse.connection.profile">
SQLServerDriver
</property> <property name="show_sql">true</property>
<property name="connection.autocommit">true</property> <mapping resource="com/chinasofti/golf/entity/Members.hbm.xml" /> <mapping
resource="com/chinasofti/golf/entity/Consumption.hbm.xml" />
<mapping resource="com/chinasofti/golf/entity/Record.hbm.xml" />
<mapping
resource="com/chinasofti/golf/entity/Employees.hbm.xml" />
<mapping resource="com/chinasofti/golf/entity/Guest.hbm.xml" /> </session-factory> </hibernate-configuration>

hibernate.cfg.xml

 <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<package name="anding" namespace="/" extends="struts-default">
<!-- 登录 -->
<interceptors>
<interceptor name="login" class="com.chinasofti.golf.action.Landing"/>
</interceptors> <action name="Denglu" class="com.chinasofti.golf.action.Denlu">
<result name="landing" type="dispatcher">/denglu.jsp</result>
</action>
<action name="Landing" class="denglu" method="denglu">
<result name="denglu1" type="dispatcher">/qiantai.jsp</result>
<result name="denglu2" type="dispatcher">/guanliyuan.jsp</result>
<result name="massage" type="dispatcher">/erro.jsp</result>
<result name="input" type="dispatcher">/denglu.jsp</result> </action>
<action name="Tuichu" class="denglu" method="tuichu">
<result name="tuichu" type="redirectAction">Denglu</result>
</action> <!-- 员工信息管理 -->
<action name="Allemployees" class="denglu" method="allemployees">
<result name="allemployees" type="dispatcher">/allemployees.jsp</result> <result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action>
<action name="Addemployees" class="denglu" method="addemployees">
<result name="addemployees" type="redirectAction">Allemployees</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action> <action name="Deleteemployees" class="denglu" method="deleteemployees">
<result name="deleteemployees" type="redirectAction">Allemployees</result> <result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action> <action name="Updateemployeesbyid" class="denglu" method="updateemployeesbyid">
<result name="updateemployeesbyid" type="dispatcher">/updateemployeesbyid.jsp</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action>
<action name="Updateemployees" class="denglu" method="updateemployees">
<result name="updateemployees" type="redirectAction">Allemployees</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action> <!-- 开卡Consumption表 -->
<action name="GetConsumption" class="consumptionaction" method="getConsumption">
<result name="getConsumption" type="dispatcher">/tadykaika.jsp</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action>
<!-- 新开卡 -->
<action name="Kaika" class="consumptionaction" method="kaika">
<result name="kaika" type="redirectAction">GetConsumption</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action> <!-- 根据ID查找该ID今天的消费信息 -->
<action name="Getconsumptionbyid" class="consumptionaction" method="getconsumptionbyid">
<result name="getconsumptionbyid" type="dispatcher"> /getconsumptionbyid.jsp</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action>
<!-- 给该ID做结账处理~更改 --> <!-- 结账 -->
<action name="Jiezhangid" class="consumptionaction" method="jiezhangid">
<result name="jiezhangid" type="dispatcher"> /jiezhang.jsp</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action> <action name="Jiezhang" class="consumptionaction" method="jiezhang">
<result name="jiezhang" type="redirectAction">GetConsumption</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action>
<!-- 日报表查询 --> <action name="Getconsumptionbydate" class="consumptionaction" method="getconbydate">
<result name="getconbydate" type="dispatcher">/getconsumptionbydate.jsp</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action> <!-- 根据ID查询会员的个人资料 members-->
<action name="MemberById" class="membersaction" method="member">
<result name="member" type="dispatcher"> /getemembersbyid.jsp</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref> </action>
<!-- 查找全部会员信息,显示在allmember.jsp上 -->
<action name="Allmember" class="membersaction" method="allmember">
<result name="allmember" type="dispatcher"> /allmember.jsp</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action>
<!-- 添加会员 -->
<action name="Addmember" class="membersaction" method="addmember">
<result name="addmember" type="redirectAction">Allmember</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action>
<!-- 更改会员信息 -->
<action name="Memberid" class="membersaction" method="memberid">
<result name="memberid" type="dispatcher"> /updatemember.jsp</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action>
<action name="Updatemember" class="membersaction" method="updatemember">
<result name="updatemember" type="redirectAction">Allmember</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action> <!-- 根据memberID查询会员以前的消费记录和流水账号 Record -->
<action name="Recordbyid" class="recordAction" method="getrecordbyid">
<result name="getrecordbyid" type="dispatcher">/getrecordbyid.jsp</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref> </action> <!-- 留言簿 -->
<action name="Allguest" class="guestAction" method="allguest">
<result name="allguest" type="dispatcher">/allguest.jsp</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action>
<action name="Addguest" class="guestAction" method="addguest">
<result name="addguest" type="redirectAction">Allguest</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action>
<action name="Getguestbyid" class="guestAction" method="getguestbyid">
<result name="getguestbyid" type="dispatcher">/updateguest.jsp</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action> <action name="Updateguest" class="guestAction" method="updateguest">
<result name="updateguest" type="redirectAction">Allguest</result>
<result name="inputtt" type="redirectAction">Denglu</result>
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action> </package>
</struts>

struts.xml

四、附件

相册img/imge

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

  1. 毕业设计java实验室预约管理系统SSH机房预约系统javaweb机房实验室排课系统mysql机房管理系统 实验室管理系统 课程设计 代码讲解 调试运行

    毕业设计java实验室预约管理系统SSH机房预约系统javaweb机房实验室排课系统mysql机房管理系统 实验室管理系统 课程设计 代码讲解 调试运行 注意:该项目只展示部分功能,如需了解,评论区咨 ...

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

    一.思路的穿插. web.xml中的配置找到--->application.xml---->找到对应的Action---->找到struts.xml----->在去找actio ...

  3. java开发就业招聘管理系统 ssh源码

    开发环境:    Windows操作系统开发工具: MyEclipse+Jdk+Tomcat+MySql数据库 此项目分为 用户 企业  管理员三种角色 运行效果图

  4. JSP/JAVA目录清单

    JAVA253中国象棋(CS) JAVA258网络五子棋游戏的设计与实现(CS) JAVA390停车场管理系统SQL(CS) JSP001学生综合素质测评系统JAVA+Mysql JSP002学生成绩 ...

  5. MySql 时间处理

    纸上得来终觉浅,绝知此事要躬行 博客园 首页 新闻 新随笔 联系 管理 随笔- 490  文章- 0  评论- 65  MySql 时间处理 这里是一个使用日期函数的例子.下面的查询选择了所有记录,其 ...

  6. java 备用待迁移

    Java基础 2018年如何快速学Java 泛型就这么简单 注解就这么简单 Druid数据库连接池就是这么简单 Object对象你真理解了吗? JDK10都发布了,nio你了解多少? COW奶牛!Co ...

  7. 最全的计算机Java毕业设计题目大全 附 源码

    本文提供数百个计算机毕设题目可以参考 并提供成品源码下载,都是从网上收集而来 源码技术全部采用java+MySQL开发,并结合了其他技术如ssm,ssh,jsp等等. 下载链接在文末! 以下是项目名称 ...

  8. git提交更改都是一个作者

    为什么提交到github的commit都是一个作者 参考链接 重要知识点讲解 问题如下所示 git是分布式去中心化的管理系统 ssh秘钥对生成.并把id_rsa.pub加入github.com中(这个 ...

  9. 基于SSH框架的学生公寓管理系统的质量属性

    系统名称:学生公寓管理系统 首先介绍一下学生公寓管理系统,在学生公寓管理方面,针对学生有关住宿信息问题进行管理,学生公寓管理系统主要包含了1)学生信息记录:包括学号.姓名.性别.院系.班级:2)住宿信 ...

随机推荐

  1. 1-12 ARP协议

    ARP(Address Resolution Protocol)地址解析协议,负责将相应的IP地址解析成MAC地址. 在局域网中,网络中实际传输的是‘帧’,帧里面包含了目的主机的MAC.ARP就是用来 ...

  2. lua创建文件和文件夹

    创建文件夹: os.execute('mkdir xx') 创建文件: f = assert(io.open('a.tmp','w')) f:write('test') f:close()

  3. 调用SAP函数创建寄售退货订单的时候报错:业务对象 BUS2032 是销售订单,销售凭证类别 H 是退货。

    RE.KR订单类型用BAPI_CUSTOMERRETURN_CREATE 其他用BAPI_SALESORDER_CREATEFROMDAT2

  4. nullcom HackIM2016 -- Programming Question 4

    One of the NullCon vidoes talked about a marvalous Russian Gift. The Vidoe was uploaded on [May of 2 ...

  5. spring mvc 第二天【注解实现springmvc Handler处理ajax简单请求 的配置】

    这里使用的是在前台发起ajax请求Handler,后台伪造数据响应给前台, 配置对应ajax请求的Handler信息如下 @Controller public class MyController { ...

  6. dos 批处理删除svn目录

    转自 http://blog.sina.com.cn/mpl398235717 @echo offecho ********************************************** ...

  7. Tcc学习笔记(一) 开篇

    TCC,全称Tiny C Compiler(http://bellard.org/tcc/),是一个颇具特色的C编译器,你能把它当作一个C语言解释器来用,也可以嵌入你自己的应用程序作一个动态代码生成器 ...

  8. 还是要好好研究开源的php

    听说facebook是php写的,还是要静下心来好好研究一番的嘛,踏踏实实点点滴滴的做起来!加油

  9. IE6/IE7/IE8兼容H5标签

    可以使用html5shiv(html5shiv主要解决HTML5提出的新元素不被IE6-8识别,这些新元素不能作为父节点包裹子元素,并且不能应用CSS样式)来解决 <!--[if lt IE 9 ...

  10. JSP中的 HttpSession、pageContext对象

    pageContext 隐含对象对应javax.servlet.jsp.PageContext,都自动的被加入至pageContext中, 您可以由它来取得与JSP相关的对应之Servlet对象,像是 ...