├── .classpath ├── .mymetadata ├── .project ├── .settings └── org.eclipse.jdt.core.prefs ├── README.md ├── WebRoot ├── META-INF │ └── MANIFEST.MF ├── WEB-INF │ ├── classes │ │ ├── Bean │ │ │ ├── incomeViewBean.class │ │ │ ├── orderViewBean.class │ │ │ ├── roomInfoViewBean.class │ │ │ └── timeExtensionOrdersViewBean.class │ │ └── servlet │ │ │ ├── CharactorFilter.class │ │ │ ├── FindViewServlet.class │ │ │ ├── SearchByTime.class │ │ │ ├── SearchInfoServlet.class │ │ │ ├── TimeExtensionServlet.class │ │ │ ├── arriveServlet.class │ │ │ ├── checkinServlet.class │ │ │ ├── getPriceServlet.class │ │ │ ├── leaveServlet.class │ │ │ └── loginServlet.class │ ├── lib │ │ ├── commons-beanutils-1.8.0.jar │ │ ├── commons-collections-3.2.1.jar │ │ ├── commons-lang-2.6.jar │ │ ├── commons-logging-1.1.1.jar │ │ ├── ezmorph-1.0.6.jar │ │ ├── json-lib-2.4-jdk15.jar │ │ ├── sqljdbc4.jar │ │ └── xom-1.2.6.jar │ └── web.xml ├── arrive.jsp ├── banner.jsp ├── copyright.jsp ├── css │ ├── arrive.css │ ├── banner.css │ ├── default.css │ ├── other.css │ ├── reset.css │ ├── style.css │ ├── styles.css │ └── welcome.css ├── img │ ├── bg.jpg │ ├── client.png │ ├── double.jpg │ ├── double2.jpg │ ├── favicon.ico │ ├── finish.png │ ├── inputradio.gif │ ├── lock_icon_copy.png │ ├── logo.png │ ├── name.png │ ├── nosearch.png │ ├── password.png │ ├── puff.svg │ ├── single.jpg │ ├── single2.jpg │ ├── th.jpg │ ├── tick.png │ └── user_icon_copy.png ├── incomeView.jsp ├── index.jsp ├── js │ ├── jquery.js │ ├── login.js │ ├── main.js │ └── stopExecutionOnTimeout.js ├── leave.jsp ├── main.jsp ├── orderView.jsp ├── reserve.jsp ├── roomInfoView.jsp ├── search.html ├── searchInfo.html ├── searchInfo.jsp ├── showView.jsp ├── timeExtension.jsp ├── timeExtensionOrdersView.jsp └── welcome.jsp ├── sql_statement ├── Query.sql ├── create.sql └── insert_lizeyu_final.sql └── src ├── Bean ├── incomeViewBean.java ├── orderViewBean.java ├── roomInfoViewBean.java └── timeExtensionOrdersViewBean.java └── servlet ├── CharactorFilter.java ├── FindViewServlet.java ├── SearchByTime.java ├── SearchInfoServlet.java ├── TimeExtensionServlet.java ├── arriveServlet.java ├── checkinServlet.java ├── getPriceServlet.java ├── leaveServlet.java └── loginServlet.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.mymetadata: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | book_manager 4 | 5 | 6 | 7 | 8 | 9 | com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator 20 | 21 | 22 | 23 | 24 | com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator 25 | 26 | 27 | 28 | 29 | org.eclipse.wst.validation.validationbuilder 30 | 31 | 32 | 33 | 34 | com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder 35 | 36 | 37 | 38 | 39 | 40 | com.genuitec.eclipse.ast.deploy.core.deploymentnature 41 | com.genuitec.eclipse.j2eedt.core.webnature 42 | org.eclipse.jdt.core.javanature 43 | org.eclipse.wst.jsdt.core.jsNature 44 | 45 | 46 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Wed Nov 28 21:00:33 CST 2018 2 | eclipse.preferences.version=1 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 4 | org.eclipse.jdt.core.compiler.compliance=1.5 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.5 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hotel_managerment_final 2 | 数据库和javaWeb的期末作业 3 | # AJAX数据回传名字汇总 4 | ## 1.reserve.jsp 5 | ### 渲染位置(主要是看空房间) 6 | #### 回传的参数 7 | - [ ] roomType(房间类型) 8 | - [ ] roomNumber(房间号) 9 | - [ ] price(房间价格) 10 | 11 | ## 2.arrive.jsp 12 | ### 渲染位置(主要是为了看到状态更新的值,主要是看orderStatus) 13 | #### 回传的参数 14 | - [ ] orderNumber(订单号) 15 | - [ ] orderStatus(订单状态,分为“已入住”,“预订中”,“已退房”) 16 | - [ ] customerIDCard(顾客身份证号) 17 | - [ ] roomNumber(房间号) 18 | - [ ] checkInTime(入住时间) 19 | - [ ] checkOutTime(退房时间) 20 | - [ ] totalMoney(总花费,**可能会更新,因为会续住**) 21 | - [ ] orderTime(预订时间,当前的时间) 22 | 23 | ## 3.leave.jsp 24 | ### 渲染位置(同2) 25 | #### 回传的参数 26 | - [ ] orderNumber(订单号) 27 | - [ ] orderStatus(订单状态,分为“已入住”,“预订中”,“已退房”) 28 | - [ ] customerIDCard(顾客身份证号) 29 | - [ ] roomNumber(房间号) 30 | - [ ] checkInTime(入住时间) 31 | - [ ] checkOutTime(退房时间) 32 | - [ ] totalMoney(总花费,**可能会更新,因为会续住**) 33 | - [ ] orderTime(预订时间,当前的时间) 34 | 35 | ## 4.timeExtension.jsp 36 | ### 价格渲染 37 | #### 回传的参数 38 | - [ ] addMoney(根据时间*房价得到的总价) 39 | ### 续住成功信息渲染 40 | #### 回传的参数 41 | - [ ] addMoney(根据时间*房价得到的总价) 42 | - [ ] orderNumber(订单号) 43 | - [ ] oldExpiryTime(以前的离开时间) 44 | - [ ] newExpiryTime(续住以后的离开时间) 45 | ## 肖誉杰使用的文件 46 | 1. - **css** 47 | 1. reset.css 48 | 2. style.css 49 | 1. - **js** 50 | 1. app.js 51 | 2. login.js 52 | 3. particles.min.js 53 | 1. - **img** 54 | 1. bg.jpg 55 | 2. name.jpg 56 | 3. password.jpg 57 | 1. - **Servlet** 58 | 1. loginServlet.java 59 | 2. SearchByTime.java 60 | 3. checkinServlet.java 61 | 4. 查询.java(还没写) 62 | 1. - **jsp** 63 | 1. index.jsp 64 | 2. welcome.jsp 65 | 3. reserve.jsp 66 | 67 | ## 王虎的管理文件 68 | 1. - **Servlet** 69 | 1. arriveServlet.java 70 | 2. getPriceServlet.java 71 | 3. TimeExtensionServlet.jva 72 | 4. leaveServlet.java 73 | 2. - **jsp** 74 | 1. arrive.jsp 75 | 2. leave.jsp 76 | 3. timeExtension.jsp 77 | 78 | ## 公用文件 79 | 1. - **js** 80 | 1. js/jquery.js 81 | -------------------------------------------------------------------------------- /WebRoot/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/Bean/incomeViewBean.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/Bean/incomeViewBean.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/Bean/orderViewBean.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/Bean/orderViewBean.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/Bean/roomInfoViewBean.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/Bean/roomInfoViewBean.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/Bean/timeExtensionOrdersViewBean.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/Bean/timeExtensionOrdersViewBean.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/servlet/CharactorFilter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/servlet/CharactorFilter.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/servlet/FindViewServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/servlet/FindViewServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/servlet/SearchByTime.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/servlet/SearchByTime.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/servlet/SearchInfoServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/servlet/SearchInfoServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/servlet/TimeExtensionServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/servlet/TimeExtensionServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/servlet/arriveServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/servlet/arriveServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/servlet/checkinServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/servlet/checkinServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/servlet/getPriceServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/servlet/getPriceServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/servlet/leaveServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/servlet/leaveServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/servlet/loginServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/classes/servlet/loginServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-beanutils-1.8.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/lib/commons-beanutils-1.8.0.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-collections-3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/lib/commons-collections-3.2.1.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-lang-2.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/lib/commons-lang-2.6.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/ezmorph-1.0.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/lib/ezmorph-1.0.6.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/json-lib-2.4-jdk15.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/lib/json-lib-2.4-jdk15.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/sqljdbc4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/lib/sqljdbc4.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/xom-1.2.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/WEB-INF/lib/xom-1.2.6.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | loginServlet 9 | servlet.loginServlet 10 | 11 | 12 | checkinServlet 13 | servlet.checkinServlet 14 | 15 | 16 | SearchByTime 17 | servlet.SearchByTime 18 | 19 | 20 | leaveServlet 21 | servlet.leaveServlet 22 | 23 | 24 | arriveServlet 25 | servlet.arriveServlet 26 | 27 | 28 | This is the description of my J2EE component 29 | This is the display name of my J2EE component 30 | getPriceServlet 31 | servlet.getPriceServlet 32 | 33 | 34 | This is the description of my J2EE component 35 | This is the display name of my J2EE component 36 | timeExtensionServlet 37 | servlet.getPriceServlet 38 | 39 | 40 | This is the description of my J2EE component 41 | This is the display name of my J2EE component 42 | TimeExtensionServlet 43 | servlet.TimeExtensionServlet 44 | 45 | 46 | This is the description of my J2EE component 47 | This is the display name of my J2EE component 48 | FindViewServlet 49 | servlet.FindViewServlet 50 | 51 | 52 | This is the description of my J2EE component 53 | This is the display name of my J2EE component 54 | SearchInfoServlet 55 | servlet.SearchInfoServlet 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | loginServlet 69 | /loginServlet 70 | 71 | 72 | checkinServlet 73 | /checkinServlet 74 | 75 | 76 | SearchByTime 77 | /SearchByTime 78 | 79 | 80 | leaveServlet 81 | /leaveServlet 82 | 83 | 84 | arriveServlet 85 | /arriveServlet 86 | 87 | 88 | getPriceServlet 89 | /getPriceServlet 90 | 91 | 92 | timeExtensionServlet 93 | /timeExtensionServlet 94 | 95 | 96 | TimeExtensionServlet 97 | /TimeExtensionServlet 98 | 99 | 100 | FindViewServlet 101 | /FindViewServlet 102 | 103 | 104 | SearchInfoServlet 105 | /SearchInfoServlet 106 | 107 | 108 | 109 | CharactorFilter 110 | servlet.CharactorFilter 111 | 112 | encoding 113 | utf-8 114 | 115 | 116 | 117 | 118 | CharactorFilter 119 | /* 120 | 121 | 122 | 123 | index.jsp 124 | 125 | 126 | -------------------------------------------------------------------------------- /WebRoot/arrive.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 | 8 | 9 | 10 | 11 | 12 | 入住 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |

入住

27 | 28 | 29 |
30 |
31 | 32 |
33 | 顾客身份证号 34 |
35 | 36 | 37 |
38 | 39 |
40 |

个人信息

41 |
42 |
43 |
身份证号
44 |
状态
45 |
46 | 47 | 48 | 49 |

住房信息

50 |
51 |
52 |
入住时间
53 |
房间号
54 |
55 | 56 | 57 |
58 |
离开时间
59 |
总消费
60 |
61 | 62 | 63 | 64 |

预定信息

65 |
66 |
67 |
预定时间
68 |
预定编号
69 |
70 | 71 | 72 |
73 | 74 | 75 | 76 | 114 | 115 | -------------------------------------------------------------------------------- /WebRoot/banner.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 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /WebRoot/copyright.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 | 8 | 9 | 10 | 11 | 12 | My JSP 'copyright.jsp' starting page 13 | 14 | 15 | 16 | 17 | 18 | 19 | 33 | 34 | 35 | 36 | 37 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /WebRoot/css/arrive.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | } 5 | i{ 6 | display: inline-block; 7 | } 8 | h2{ 9 | margin-top: 50px; 10 | margin-left: 170px; 11 | } 12 | .nav{ 13 | width: 170px; 14 | height: 67px; 15 | border: 1px solid #DDDDDD; 16 | text-align: center; 17 | line-height: 65px; 18 | font-size: 16px; 19 | font-weight: bold; 20 | position: relative; 21 | cursor: default; 22 | box-sizing: border-box; 23 | padding-left: 50px; 24 | } 25 | .client_nav{ 26 | border-top-left-radius: 5px; 27 | border-top-right-radius: 5px; 28 | left: 170px; 29 | top: 10px; 30 | } 31 | .client_nav_after{ 32 | position: absolute; 33 | left: 332px; 34 | top: 128px; 35 | width: 15px; 36 | height: 15px; 37 | transform: rotate(45deg); 38 | background: #F3F5F7; 39 | border-top: 1px solid #DDDDDD; 40 | border-right: 1px solid #DDDDDD; 41 | } 42 | .user_icon{ 43 | width: 40px; 44 | height: 43px; 45 | background: url('../img/client.png') no-repeat 0 0; 46 | background-size: 100% 100%; 47 | position: absolute; 48 | left: 25px; 49 | top: 10px; 50 | } 51 | .finish{ 52 | border-bottom-left-radius: 5px; 53 | border-bottom-right-radius: 5px; 54 | left: 170px; 55 | top: 9px; 56 | } 57 | .finish_after{ 58 | position: absolute; 59 | left: 332px; 60 | top: 192px; 61 | width: 15px; 62 | height: 15px; 63 | transform: rotate(45deg); 64 | background: #F3F5F7; 65 | border-top: 1px solid #DDDDDD; 66 | border-right: 1px solid #DDDDDD; 67 | display: none; 68 | } 69 | .finish_icon{ 70 | width: 37px; 71 | height: 37px; 72 | background: url('../img/finish.png') no-repeat 0 0; 73 | background-size: 100% 100%; 74 | position: absolute; 75 | left: 25px; 76 | top: 13px; 77 | } 78 | .selected{ 79 | background: #F3F5F7; 80 | color: #4583BE; 81 | } 82 | .content{ 83 | width: 830px; 84 | position: absolute; 85 | left: 465px; 86 | top: 95px; 87 | font-size: 15px; 88 | font-weight: bold; 89 | } 90 | .line{ 91 | width: 830px; 92 | height: 1px; 93 | margin-top: 3px; 94 | margin-bottom: 22px; 95 | border-top: 1.2px solid #DDDDDD; 96 | } 97 | .box{ 98 | width: 300px; 99 | height: 40px; 100 | border: 1.1px solid #DDDDDD; 101 | border-radius: 3px; 102 | margin-top: 17px; 103 | margin-right: 15px; 104 | font-size: 18px; 105 | position: relative; 106 | box-sizing: border-box; 107 | padding-left: 10px; 108 | } 109 | .id{ 110 | width: 400px; 111 | letter-spacing: 3px; 112 | } 113 | .sure{ 114 | display: block; 115 | width: 100px; 116 | height: 35px; 117 | background: #E0E1E3; 118 | border: none; 119 | outline: none; 120 | border-radius: 4px; 121 | margin-top: 17px; 122 | color: #5D5D5D; 123 | font-size: 14px; 124 | font-weight: bold; 125 | letter-spacing: 8px; 126 | text-align: center; 127 | padding-left: 7px; 128 | cursor: pointer; 129 | } 130 | .content2{ 131 | display: none; 132 | top: 75px; 133 | } 134 | .content2 h4:nth-child(n+2){ 135 | margin-top: 30px; 136 | } 137 | .title3{ 138 | margin-top: 15px; 139 | } 140 | .title h5:nth-child(1){ 141 | float: left; 142 | margin-right: 265px; 143 | } 144 | .status{ 145 | width: 200px; 146 | } 147 | .room_num{ 148 | width: 200px; 149 | } 150 | .cost{ 151 | width: 200px; 152 | } 153 | .reserve_num{ 154 | width: 200px; 155 | } 156 | 157 | .ex_num{ 158 | width: 150px; 159 | margin-left: 20px; 160 | } 161 | .ex_days{ 162 | width: 150px; 163 | margin-left: 35px; 164 | } 165 | .price{ 166 | width: 150px; 167 | height: 40px; 168 | margin-top: 17px; 169 | margin-left: 10px; 170 | border: none; 171 | border-bottom: 1.1px solid #DDDDDD; 172 | } 173 | .sure1{ 174 | float: left; 175 | } 176 | .submit{ 177 | float: left; 178 | margin-left: 30px; 179 | } 180 | .content1 h4{ 181 | font-size: 17px; 182 | } 183 | .content1 .title1{ 184 | margin-top: 20px; 185 | } 186 | .title1 h5{ 187 | float: left; 188 | font-size: 15px; 189 | margin-right: 145px; 190 | } 191 | .order_num{ 192 | width: 110px; 193 | margin-left: 20px; 194 | margin-top: 20px; 195 | } 196 | .content3{ 197 | margin-top: 30px; 198 | display: none; 199 | } 200 | .newExpiryTime{ 201 | width: 200px; 202 | } 203 | .oldExpiryTime{ 204 | width: 200px; 205 | } 206 | 207 | .content4{ 208 | top: 65px; 209 | } 210 | .content4 h4{ 211 | font-size: 17px; 212 | } 213 | .content4 h4:nth-child(n+2){ 214 | margin-top: 30px; 215 | } 216 | .content4 input{ 217 | margin-left: 15px; 218 | } 219 | .content4 .sure{ 220 | margin-left: 0; 221 | } 222 | .content4 div .sure{ 223 | float: left; 224 | margin-right: 30px; 225 | } 226 | .name{ 227 | width: 150px; 228 | margin-left: 45px!important; 229 | } 230 | .bz{ 231 | margin-left: 45px!important; 232 | } 233 | .arriveTime{ 234 | width: 185px; 235 | } 236 | .leaveTime{ 237 | width: 185px; 238 | } 239 | .reserveRoomNum{ 240 | width: 185px; 241 | } 242 | .reserveRoomType{ 243 | width: 185px; 244 | } 245 | .emptyRoomBox{ 246 | display: none; 247 | margin-top: 20px; 248 | } 249 | .emptyRoomBox input:nth-child(1){ 250 | margin-top: 10px; 251 | } -------------------------------------------------------------------------------- /WebRoot/css/banner.css: -------------------------------------------------------------------------------- 1 | * { 2 | padding: 0; 3 | margin: 0; 4 | } 5 | /* 最重要的一部分,样式 */ 6 | /* 即iframe的样式 */ 7 | #iframe { 8 | width: 100%; 9 | height: 571px; 10 | overflow: auto; 11 | } 12 | #iframe::-webkit-scrollbar { 13 | display: none; 14 | width: 0!important; 15 | } 16 | 17 | 18 | #banner { 19 | width: 100%; 20 | height: 40px; 21 | background: black; 22 | font-size: 16px; 23 | position: relative; 24 | cursor: pointer; 25 | color: rgba(255, 255, 255, .8); 26 | line-height: 40px; 27 | text-align: center; 28 | } 29 | #banner .banner-left { 30 | width: 30%; 31 | height: 100%; 32 | display: flex; 33 | flex-direction: row; 34 | justify-content: space-around; 35 | align-items: center; 36 | } 37 | #banner .banner-right { 38 | width: 30%; 39 | height: 100%; 40 | text-align: right; 41 | margin-right: 20px; 42 | } 43 | #banner .banner-time { 44 | position: absolute; 45 | top: 0; 46 | left: 50%; 47 | transform: translate(-50%); 48 | line-height: 40px; 49 | } 50 | #banner .search,#banner .view,#banner .find { 51 | width: 33.33%; 52 | height: 100%; 53 | position: relative; 54 | z-index: 999; 55 | border-right: 0.5px solid rgba(255, 255, 255, .5); 56 | } 57 | #banner .search:hover .word,#banner .view:hover .word,#banner .find:hover .word{ 58 | color: rgba(255, 255, 255, 1.0); 59 | } 60 | #banner .search i,#banner .find i{ 61 | font-size: 18px; 62 | } 63 | 64 | .triangle { 65 | width: 0; 66 | height: 0; 67 | border-width: 5px; 68 | border-color: white transparent transparent transparent; 69 | border-style: solid; 70 | display: block; 71 | position: absolute; 72 | right: 4px; 73 | top: 20px; 74 | } 75 | 76 | #banner .searchBtn { 77 | display: none; 78 | position: relative; 79 | top: -1px; 80 | border: .2px solid rgba(0, 0, 0, .5); 81 | border-top-left-radius: 5px; 82 | box-shadow: 1px 1px 1px rgba(0, 0, 0, .5); 83 | } 84 | 85 | 86 | #banner .content { 87 | width: 100%; 88 | height: 40px; 89 | border: .1px solid rgba(0, 0, 0, .1); 90 | transition: all .5s; 91 | background: black; 92 | color: white; 93 | } 94 | #banner .content:hover{ 95 | background: white; 96 | color: black; 97 | } 98 | 99 | #banner .content i { 100 | margin-right: 15px; 101 | } 102 | .icon-liulan { 103 | margin-top: 3px; 104 | } 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | -------------------------------------------------------------------------------- /WebRoot/css/default.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'icomoon'; 3 | src:url('../fonts/icomoon.eot?rretjt'); 4 | src:url('../fonts/icomoon.eot?#iefixrretjt') format('embedded-opentype'), 5 | url('../fonts/icomoon.woff?rretjt') format('woff'), 6 | url('../fonts/icomoon.ttf?rretjt') format('truetype'), 7 | url('../fonts/icomoon.svg?rretjt#icomoon') format('svg'); 8 | font-weight: normal; 9 | font-style: normal; 10 | } 11 | 12 | [class^="icon-"], [class*=" icon-"] { 13 | font-family: 'icomoon'; 14 | speak: none; 15 | font-style: normal; 16 | font-weight: normal; 17 | font-variant: normal; 18 | text-transform: none; 19 | line-height: 1; 20 | 21 | /* Better Font Rendering =========== */ 22 | -webkit-font-smoothing: antialiased; 23 | -moz-osx-font-smoothing: grayscale; 24 | } 25 | 26 | body, html {padding: 0; margin: 0;} 27 | 28 | 29 | /* Clearfix hack by Nicolas Gallagher: http://nicolasgallagher.com/micro-clearfix-hack/ */ 30 | .clearfix:before, 31 | .clearfix:after { 32 | content: " "; 33 | display: table; 34 | } 35 | 36 | .clearfix:after { 37 | clear: both; 38 | } 39 | 40 | body{ 41 | font-family: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", "FontAwesome", sans-serif; 42 | } 43 | a{color: #2fa0ec;text-decoration: none;outline: none;} 44 | a:hover,a:focus{color:#74777b;} 45 | 46 | .htmleaf-container{ 47 | margin: 0 auto; 48 | overflow: hidden; 49 | } 50 | 51 | .bgcolor-1 { background: #f0efee; } 52 | .bgcolor-2 { background: #f9f9f9; } 53 | .bgcolor-3 { background: #e8e8e8; }/*light grey*/ 54 | .bgcolor-4 { background: #2f3238; color: #fff; }/*Dark grey*/ 55 | .bgcolor-5 { background: #df6659; color: #521e18; }/*pink1*/ 56 | .bgcolor-6 { background: #2fa8ec; }/*sky blue*/ 57 | .bgcolor-7 { background: #d0d6d6; }/*White tea*/ 58 | .bgcolor-8 { background: #3d4444; color: #fff; }/*Dark grey2*/ 59 | .bgcolor-9 { background: #ef3f52; color: #fff;}/*pink2*/ 60 | .bgcolor-10{ background: #64448f; color: #fff;}/*Violet*/ 61 | .bgcolor-11{ background: #3755ad; color: #fff;}/*dark blue*/ 62 | .bgcolor-12{ background: #3498DB; color: #fff;}/*light blue*/ 63 | /* Header */ 64 | .htmleaf-header{ 65 | padding: 1em 190px 1em; 66 | letter-spacing: -1px; 67 | text-align: center; 68 | } 69 | .htmleaf-header h1 { 70 | color: #fff; 71 | font-weight: 600; 72 | font-size: 2em; 73 | line-height: 1; 74 | margin-bottom: 0; 75 | font-family: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", "FontAwesome", sans-serif; 76 | } 77 | .htmleaf-header h1 span { 78 | font-family: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", "FontAwesome", sans-serif; 79 | display: block; 80 | font-size: 60%; 81 | font-weight: 400; 82 | padding: 0.8em 0 0.5em 0; 83 | color: #fff; 84 | } 85 | /*nav*/ 86 | .htmleaf-demo a{color: #1d7db1;text-decoration: none;} 87 | .htmleaf-demo{width: 100%;padding-bottom: 1.2em;} 88 | .htmleaf-demo a{display: inline-block;margin: 0.5em;padding: 0.6em 1em;border: 3px solid #1d7db1;font-weight: 700;} 89 | .htmleaf-demo a:hover{opacity: 0.6;} 90 | .htmleaf-demo a.current{background:#1d7db1;color: #fff; } 91 | /* Top Navigation Style */ 92 | .htmleaf-links { 93 | position: relative; 94 | display: inline-block; 95 | white-space: nowrap; 96 | font-size: 1.5em; 97 | text-align: center; 98 | } 99 | 100 | .htmleaf-links::after { 101 | position: absolute; 102 | top: 0; 103 | left: 50%; 104 | margin-left: -1px; 105 | width: 2px; 106 | height: 100%; 107 | background: #dbdbdb; 108 | content: ''; 109 | -webkit-transform: rotate3d(0,0,1,22.5deg); 110 | transform: rotate3d(0,0,1,22.5deg); 111 | } 112 | 113 | .htmleaf-icon { 114 | display: inline-block; 115 | margin: 0.5em; 116 | padding: 0em 0; 117 | width: 1.5em; 118 | text-decoration: none; 119 | color: #f1a9a0; 120 | } 121 | 122 | .htmleaf-icon span { 123 | display: none; 124 | } 125 | 126 | .htmleaf-icon:before { 127 | margin: 0 5px; 128 | text-transform: none; 129 | font-weight: normal; 130 | font-style: normal; 131 | font-variant: normal; 132 | font-family: 'icomoon'; 133 | line-height: 1; 134 | speak: none; 135 | -webkit-font-smoothing: antialiased; 136 | } 137 | /* footer */ 138 | .htmleaf-footer{width: 100%;padding-top: 10px;} 139 | .htmleaf-small{font-size: 0.8em;} 140 | .center{text-align: center;} 141 | /****/ 142 | .related { 143 | color: #fff; 144 | background: #333; 145 | text-align: center; 146 | font-size: 1.25em; 147 | padding: 0.5em 0; 148 | overflow: hidden; 149 | } 150 | 151 | .related > a { 152 | vertical-align: top; 153 | width: calc(100% - 20px); 154 | max-width: 340px; 155 | display: inline-block; 156 | text-align: center; 157 | margin: 20px 10px; 158 | padding: 25px; 159 | font-family: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", "FontAwesome", sans-serif; 160 | } 161 | .related a { 162 | display: inline-block; 163 | text-align: left; 164 | margin: 20px auto; 165 | padding: 10px 20px; 166 | opacity: 0.8; 167 | -webkit-transition: opacity 0.3s; 168 | transition: opacity 0.3s; 169 | -webkit-backface-visibility: hidden; 170 | } 171 | 172 | .related a:hover, 173 | .related a:active { 174 | opacity: 1; 175 | } 176 | 177 | .related a img { 178 | max-width: 100%; 179 | opacity: 0.8; 180 | border-radius: 4px; 181 | } 182 | .related a:hover img, 183 | .related a:active img { 184 | opacity: 1; 185 | } 186 | .related h3{font-family: "Microsoft YaHei", sans-serif;} 187 | .related a h3 { 188 | font-weight: 300; 189 | margin-top: 0.15em; 190 | color: #fff; 191 | } 192 | /* icomoon */ 193 | .icon-htmleaf-home-outline:before { 194 | content: "\e5000"; 195 | } 196 | 197 | .icon-htmleaf-arrow-forward-outline:before { 198 | content: "\e5001"; 199 | } 200 | 201 | @media screen and (max-width: 50em) { 202 | .htmleaf-header { 203 | padding: 3em 10% 4em; 204 | } 205 | .htmleaf-header h1 { 206 | font-size:2em; 207 | } 208 | } 209 | 210 | 211 | @media screen and (max-width: 40em) { 212 | .htmleaf-header h1 { 213 | font-size: 1.5em; 214 | } 215 | } 216 | 217 | @media screen and (max-width: 30em) { 218 | .htmleaf-header h1 { 219 | font-size:1.2em; 220 | } 221 | } -------------------------------------------------------------------------------- /WebRoot/css/other.css: -------------------------------------------------------------------------------- 1 | /* ------------------ 2 | styling for the tables 3 | ------------------ */ 4 | 5 | 6 | body 7 | { 8 | line-height: 1.6em; 9 | } 10 | 11 | #hor-minimalist-a 12 | { 13 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 14 | font-size: 12px; 15 | background: #fff; 16 | margin: 45px; 17 | width: 480px; 18 | border-collapse: collapse; 19 | text-align: left; 20 | } 21 | #hor-minimalist-a th 22 | { 23 | font-size: 14px; 24 | font-weight: normal; 25 | color: #039; 26 | padding: 10px 8px; 27 | border-bottom: 2px solid #6678b1; 28 | } 29 | #hor-minimalist-a td 30 | { 31 | color: #669; 32 | padding: 9px 8px 0px 8px; 33 | } 34 | #hor-minimalist-a tbody tr:hover td 35 | { 36 | color: purple; 37 | } 38 | 39 | 40 | #hor-minimalist-b 41 | { 42 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 43 | font-size: 16px; 44 | background: #fff; 45 | margin: auto; 46 | width: 98%; 47 | border-collapse: collapse; 48 | text-align: center; 49 | } 50 | #hor-minimalist-b th 51 | { 52 | font-size: 16px; 53 | font-weight: normal; 54 | color: #039; 55 | padding: 10px 8px; 56 | border-bottom: 2px solid #6678b1; 57 | } 58 | #hor-minimalist-b td 59 | { 60 | border-bottom: 1px solid #ccc; 61 | color: #669; 62 | padding: 6px 8px; 63 | } 64 | #hor-minimalist-b tbody tr:hover td 65 | { 66 | color: purple; 67 | } 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | #ver-minimalist 91 | { 92 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 93 | font-size: 16px; 94 | margin: 45px; 95 | width: 480px; 96 | text-align: left; 97 | border-collapse: collapse; 98 | } 99 | #ver-minimalist th 100 | { 101 | padding: 8px 2px; 102 | font-weight: normal; 103 | font-size: 14px; 104 | border-bottom: 2px solid #6678b1; 105 | border-right: 30px solid #fff; 106 | border-left: 30px solid #fff; 107 | color: #039; 108 | } 109 | #ver-minimalist td 110 | { 111 | padding: 12px 2px 0px 2px; 112 | border-right: 30px solid #fff; 113 | border-left: 30px solid #fff; 114 | color: #669; 115 | } 116 | 117 | 118 | #box-table-a 119 | { 120 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 121 | font-size: 12px; 122 | margin: 45px; 123 | width: 480px; 124 | text-align: left; 125 | border-collapse: collapse; 126 | } 127 | #box-table-a th 128 | { 129 | font-size: 13px; 130 | font-weight: normal; 131 | padding: 8px; 132 | background: #b9c9fe; 133 | border-top: 4px solid #aabcfe; 134 | border-bottom: 1px solid #fff; 135 | color: #039; 136 | } 137 | #box-table-a td 138 | { 139 | padding: 8px; 140 | background: #e8edff; 141 | border-bottom: 1px solid #fff; 142 | color: #669; 143 | border-top: 1px solid transparent; 144 | } 145 | #box-table-a tr:hover td 146 | { 147 | background: #d0dafd; 148 | color: #339; 149 | } 150 | 151 | 152 | #box-table-b 153 | { 154 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 155 | font-size: 12px; 156 | margin: 45px; 157 | width: 480px; 158 | text-align: center; 159 | border-collapse: collapse; 160 | border-top: 7px solid #9baff1; 161 | border-bottom: 7px solid #9baff1; 162 | } 163 | #box-table-b th 164 | { 165 | font-size: 13px; 166 | font-weight: normal; 167 | padding: 8px; 168 | background: #e8edff; 169 | border-right: 1px solid #9baff1; 170 | border-left: 1px solid #9baff1; 171 | color: #039; 172 | } 173 | #box-table-b td 174 | { 175 | padding: 8px; 176 | background: #e8edff; 177 | border-right: 1px solid #aabcfe; 178 | border-left: 1px solid #aabcfe; 179 | color: #669; 180 | } 181 | 182 | 183 | #hor-zebra 184 | { 185 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 186 | font-size: 12px; 187 | margin: 45px; 188 | width: 480px; 189 | text-align: left; 190 | border-collapse: collapse; 191 | } 192 | #hor-zebra th 193 | { 194 | font-size: 14px; 195 | font-weight: normal; 196 | padding: 10px 8px; 197 | color: #039; 198 | } 199 | #hor-zebra td 200 | { 201 | padding: 8px; 202 | color: #669; 203 | } 204 | #hor-zebra .odd 205 | { 206 | background: #e8edff; 207 | } 208 | 209 | 210 | #ver-zebra 211 | { 212 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 213 | font-size: 12px; 214 | margin: 45px; 215 | width: 480px; 216 | text-align: left; 217 | border-collapse: collapse; 218 | } 219 | #ver-zebra th 220 | { 221 | font-size: 14px; 222 | font-weight: normal; 223 | padding: 12px 15px; 224 | border-right: 1px solid #fff; 225 | border-left: 1px solid #fff; 226 | color: #039; 227 | } 228 | #ver-zebra td 229 | { 230 | padding: 8px 15px; 231 | border-right: 1px solid #fff; 232 | border-left: 1px solid #fff; 233 | color: #669; 234 | } 235 | .vzebra-odd 236 | { 237 | background: #eff2ff; 238 | } 239 | .vzebra-even 240 | { 241 | background: #e8edff; 242 | } 243 | #ver-zebra #vzebra-adventure, #ver-zebra #vzebra-children 244 | { 245 | background: #d0dafd; 246 | border-bottom: 1px solid #c8d4fd; 247 | } 248 | #ver-zebra #vzebra-comedy, #ver-zebra #vzebra-action 249 | { 250 | background: #dce4ff; 251 | border-bottom: 1px solid #d6dfff; 252 | } 253 | 254 | 255 | #one-column-emphasis 256 | { 257 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 258 | font-size: 12px; 259 | margin: 45px; 260 | width: 480px; 261 | text-align: left; 262 | border-collapse: collapse; 263 | } 264 | #one-column-emphasis th 265 | { 266 | font-size: 14px; 267 | font-weight: normal; 268 | padding: 12px 15px; 269 | color: #039; 270 | } 271 | #one-column-emphasis td 272 | { 273 | padding: 10px 15px; 274 | color: #669; 275 | border-top: 1px solid #e8edff; 276 | } 277 | .oce-first 278 | { 279 | background: #d0dafd; 280 | border-right: 10px solid transparent; 281 | border-left: 10px solid transparent; 282 | } 283 | #one-column-emphasis tr:hover td 284 | { 285 | color: #339; 286 | background: #eff2ff; 287 | } 288 | 289 | 290 | #newspaper-a 291 | { 292 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 293 | font-size: 12px; 294 | margin: 45px; 295 | width: 480px; 296 | text-align: left; 297 | border-collapse: collapse; 298 | border: 1px solid #69c; 299 | } 300 | #newspaper-a th 301 | { 302 | padding: 12px 17px 12px 17px; 303 | font-weight: normal; 304 | font-size: 14px; 305 | color: #039; 306 | border-bottom: 1px dashed #69c; 307 | } 308 | #newspaper-a td 309 | { 310 | padding: 7px 17px 7px 17px; 311 | color: #669; 312 | } 313 | #newspaper-a tbody tr:hover td 314 | { 315 | color: #339; 316 | background: #d0dafd; 317 | } 318 | 319 | 320 | #newspaper-b 321 | { 322 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 323 | font-size: 12px; 324 | margin: 45px; 325 | width: 480px; 326 | text-align: left; 327 | border-collapse: collapse; 328 | border: 1px solid #69c; 329 | } 330 | #newspaper-b th 331 | { 332 | padding: 15px 10px 10px 10px; 333 | font-weight: normal; 334 | font-size: 14px; 335 | color: #039; 336 | } 337 | #newspaper-b tbody 338 | { 339 | background: #e8edff; 340 | } 341 | #newspaper-b td 342 | { 343 | padding: 10px; 344 | color: #669; 345 | border-top: 1px dashed #fff; 346 | } 347 | #newspaper-b tbody tr:hover td 348 | { 349 | color: #339; 350 | background: #d0dafd; 351 | } 352 | 353 | 354 | #newspaper-c 355 | { 356 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 357 | font-size: 12px; 358 | margin: 45px; 359 | width: 480px; 360 | text-align: left; 361 | border-collapse: collapse; 362 | border: 1px solid #6cf; 363 | } 364 | #newspaper-c th 365 | { 366 | padding: 20px; 367 | font-weight: normal; 368 | font-size: 13px; 369 | color: #039; 370 | text-transform: uppercase; 371 | border-right: 1px solid #0865c2; 372 | border-top: 1px solid #0865c2; 373 | border-left: 1px solid #0865c2; 374 | border-bottom: 1px solid #fff; 375 | } 376 | #newspaper-c td 377 | { 378 | padding: 10px 20px; 379 | color: #669; 380 | border-right: 1px dashed #6cf; 381 | } 382 | 383 | 384 | #rounded-corner 385 | { 386 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 387 | font-size: 12px; 388 | margin: 45px; 389 | width: 480px; 390 | text-align: left; 391 | border-collapse: collapse; 392 | } 393 | #rounded-corner thead th.rounded-company 394 | { 395 | background: #b9c9fe url('table-images/left.png') left -1px no-repeat; 396 | } 397 | #rounded-corner thead th.rounded-q4 398 | { 399 | background: #b9c9fe url('table-images/right.png') right -1px no-repeat; 400 | } 401 | #rounded-corner th 402 | { 403 | padding: 8px; 404 | font-weight: normal; 405 | font-size: 13px; 406 | color: #039; 407 | background: #b9c9fe; 408 | } 409 | #rounded-corner td 410 | { 411 | padding: 8px; 412 | background: #e8edff; 413 | border-top: 1px solid #fff; 414 | color: #669; 415 | } 416 | #rounded-corner tfoot td.rounded-foot-left 417 | { 418 | background: #e8edff url('table-images/botleft.png') left bottom no-repeat; 419 | } 420 | #rounded-corner tfoot td.rounded-foot-right 421 | { 422 | background: #e8edff url('table-images/botright.png') right bottom no-repeat; 423 | } 424 | #rounded-corner tbody tr:hover td 425 | { 426 | background: #d0dafd; 427 | } 428 | 429 | 430 | #background-image 431 | { 432 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 433 | font-size: 12px; 434 | margin: 45px; 435 | width: 480px; 436 | text-align: left; 437 | border-collapse: collapse; 438 | background: url('table-images/blurry.jpg') 330px 59px no-repeat; 439 | } 440 | #background-image th 441 | { 442 | padding: 12px; 443 | font-weight: normal; 444 | font-size: 14px; 445 | color: #339; 446 | } 447 | #background-image td 448 | { 449 | padding: 9px 12px; 450 | color: #669; 451 | border-top: 1px solid #fff; 452 | } 453 | #background-image tfoot td 454 | { 455 | font-size: 11px; 456 | } 457 | #background-image tbody td 458 | { 459 | background: url('table-images/back.png'); 460 | } 461 | * html #background-image tbody td 462 | { 463 | /* 464 | ---------------------------- 465 | PUT THIS ON IE6 ONLY STYLE 466 | AS THE RULE INVALIDATES 467 | YOUR STYLESHEET 468 | ---------------------------- 469 | */ 470 | filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='table-images/back.png',sizingMethod='crop'); 471 | background: none; 472 | } 473 | #background-image tbody tr:hover td 474 | { 475 | color: #339; 476 | background: none; 477 | } 478 | 479 | 480 | #gradient-style 481 | { 482 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 483 | font-size: 12px; 484 | margin: 45px; 485 | width: 480px; 486 | text-align: left; 487 | border-collapse: collapse; 488 | } 489 | #gradient-style th 490 | { 491 | font-size: 13px; 492 | font-weight: normal; 493 | padding: 8px; 494 | background: #b9c9fe url('table-images/gradhead.png') repeat-x; 495 | border-top: 2px solid #d3ddff; 496 | border-bottom: 1px solid #fff; 497 | color: #039; 498 | } 499 | #gradient-style td 500 | { 501 | padding: 8px; 502 | border-bottom: 1px solid #fff; 503 | color: #669; 504 | border-top: 1px solid #fff; 505 | background: #e8edff url('table-images/gradback.png') repeat-x; 506 | } 507 | #gradient-style tfoot tr td 508 | { 509 | background: #e8edff; 510 | font-size: 12px; 511 | color: #99c; 512 | } 513 | #gradient-style tbody tr:hover td 514 | { 515 | background: #d0dafd url('table-images/gradhover.png') repeat-x; 516 | color: #339; 517 | } 518 | 519 | 520 | #pattern-style-a 521 | { 522 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 523 | font-size: 12px; 524 | margin: 45px; 525 | width: 480px; 526 | text-align: left; 527 | border-collapse: collapse; 528 | background: url('table-images/pattern.png'); 529 | } 530 | #pattern-style-a thead tr 531 | { 532 | background: url('table-images/pattern-head.png'); 533 | } 534 | #pattern-style-a th 535 | { 536 | font-size: 13px; 537 | font-weight: normal; 538 | padding: 8px; 539 | border-bottom: 1px solid #fff; 540 | color: #039; 541 | } 542 | #pattern-style-a td 543 | { 544 | padding: 8px; 545 | border-bottom: 1px solid #fff; 546 | color: #669; 547 | border-top: 1px solid transparent; 548 | } 549 | #pattern-style-a tbody tr:hover td 550 | { 551 | color: #339; 552 | background: #fff; 553 | } 554 | 555 | 556 | #pattern-style-b 557 | { 558 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 559 | font-size: 12px; 560 | margin: 45px; 561 | width: 480px; 562 | text-align: left; 563 | border-collapse: collapse; 564 | background: url('table-images/patternb.png'); 565 | } 566 | #pattern-style-b thead tr 567 | { 568 | background: url('table-images/patternb-head.png'); 569 | } 570 | #pattern-style-b th 571 | { 572 | font-size: 13px; 573 | font-weight: normal; 574 | padding: 8px; 575 | border-bottom: 1px solid #fff; 576 | color: #039; 577 | } 578 | #pattern-style-b td 579 | { 580 | padding: 8px; 581 | border-bottom: 1px solid #fff; 582 | color: #669; 583 | border-top: 1px solid transparent; 584 | } 585 | #pattern-style-b tbody tr:hover td 586 | { 587 | color: #339; 588 | background: #cdcdee; 589 | } -------------------------------------------------------------------------------- /WebRoot/css/reset.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* CSS Document */ 3 | /*Reset*/ 4 | *{box-sizing:content-box;padding: 0;margin: 0;} 5 | a:hover, a:focus{text-decoration:none;} 6 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;} 7 | table{border-collapse:collapse;border-spacing:0;} 8 | body{-webkit-text-size-adjust:none;} 9 | fieldset,img{border:0;} 10 | img{ vertical-align: middle; max-width: 100%; } 11 | address,caption,cite,code,dfn,em,th,var{font-style:normal;font-weight:normal;} 12 | ol,ul{list-style:none;} 13 | caption,th{text-align:left;} 14 | h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;} 15 | q::before,q::after{content:'';} 16 | abbr,acronym {border:0;} 17 | .clearfix::after{visibility:hidden;display: block;font-size:0;content:" ";clear:both;height:0;} 18 | * html .clearfix{ zoom: 1; } /* IE6 */ 19 | *:first-child+html .clearfix { zoom: 1; } /* IE7 */ 20 | .cli{ clear:both; font-size:0; height:0; overflow:hidden;display:block;} 21 | .lclear{clear:left;font-size:0;height:0;overflow:hidden;} 22 | .fl{float:left;} 23 | .fr{float:right;} 24 | 25 | /* ֹ 26 | iframe{nifm2:expression(this.src='about:blank',this.outerHTML='');} 27 | script{no2js:expression((this.src.toLowerCase().indexOf('http')==0)?document.close():'');} 28 | */ 29 | /* ıԼ˶ 30 | div{word-wrap: break-word;word-break: normal;} 31 | p{text-align:justify; text-justify:inter-ideograph;} 32 | */ 33 | /*general*/ 34 | body{font-size:12px;font-family:'微软雅黑',"宋体","Arial Narrow",Helvetica,sans-serif;color:#000;line-height:1.2;text-align:left;} 35 | 36 | -------------------------------------------------------------------------------- /WebRoot/css/style.css: -------------------------------------------------------------------------------- 1 | @import "reset.css"; 2 | 3 | canvas{ 4 | display:block; 5 | vertical-align:bottom; 6 | } 7 | 8 | .count-particles{ 9 | background: #000022; 10 | position: absolute; 11 | top: 48px; 12 | left: 0; 13 | width: 80px; 14 | color: #13E8E9; 15 | font-size: .8em; 16 | text-align: left; 17 | text-indent: 4px; 18 | line-height: 14px; 19 | padding-bottom: 2px; 20 | font-family: Helvetica, Arial, sans-serif; 21 | font-weight: bold; 22 | } 23 | 24 | .js-count-particles{ 25 | font-size: 1.1em; 26 | } 27 | 28 | #stats, 29 | .count-particles{ 30 | -webkit-user-select: none; 31 | margin-top: 5px; 32 | margin-left: 5px; 33 | } 34 | 35 | #stats{ 36 | border-radius: 3px 3px 0 0; 37 | overflow: hidden; 38 | } 39 | 40 | .count-particles{ 41 | border-radius: 0 0 3px 3px; 42 | } 43 | 44 | 45 | #particles-js{ 46 | width: 100%; 47 | height: 100%; 48 | position: relative; 49 | background-image: url(../img/bg.jpg); 50 | background-position: 50% 50%; 51 | background-size: cover; 52 | background-repeat: no-repeat; 53 | margin-left: auto; 54 | margin-right: auto; 55 | } 56 | 57 | .sk-rotating-plane { 58 | display: none; 59 | width: 80px; 60 | height: 80px; 61 | margin: auto; 62 | background-color: white; 63 | -webkit-animation: sk-rotating-plane 1.2s infinite ease-in-out; 64 | animation: sk-rotating-plane 1.2s infinite ease-in-out; 65 | z-index: 1; 66 | position: absolute; 67 | top: 50%; 68 | left: 50%; 69 | margin-left: -40px; 70 | margin-top: -80px; 71 | } 72 | .sk-rotating-plane.active{display: block;} 73 | 74 | @keyframes sk-rotating-plane{ 75 | 0% { 76 | -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg); 77 | transform: perspective(120px) rotateX(0deg) rotateY(0deg); 78 | } 79 | 50% { 80 | -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg); 81 | transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg); 82 | } 83 | 100% { 84 | -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg); 85 | transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg); 86 | } 87 | } 88 | 89 | @keyframes login-small{ 90 | 0%{ 91 | transform: scale(1);-moz-transform: scale(1); /* Firefox 4 */-webkit-transform: scale(1); /* Safari 和 Chrome */-o-transform: scale(1); /* Opera */-ms-transform:scale(1); /* IE 9 */ 92 | } 93 | 100%{ 94 | transform: scale(0.2);-moz-transform: scale(0.1); /* Firefox 4 */-webkit-transform: scale(0.2); /* Safari 和 Chrome */-o-transform: scale(0.1); /* Opera */-ms-transform:scale(0.1); /* IE 9 */ 95 | } 96 | } 97 | 98 | .login{z-index: 2;position:absolute;width: 350px;border-radius: 5px;height: 500px;background: white;box-shadow: 0px 0px 5px #333333;top: 50%;left: 50%;margin-top: -250px;margin-left: -175px;transition: all 1s;-moz-transition: all 1s; /* Firefox 4 */-webkit-transition: all 1s; /* Safari 和 Chrome */-o-transition: all 1s; /* Opera */} 99 | .login-top{font-size: 24px;margin-top: 100px;padding-left: 40px;box-sizing: border-box;color: #333333;margin-bottom: 50px;} 100 | .login-center{width: 100%;box-sizing: border-box;padding: 0 40px;margin-bottom: 30px;} 101 | .login-center-img{width: 20px;height: 20px;float: left;margin-top: 5px;} 102 | .login-center-img>img{width: 100%;} 103 | .login-center-input{float: left;width: 230px;margin-left: 15px;height: 30px;position: relative;} 104 | .login-center-input input{z-index: 2;transition: all 0.5s;padding-left: 10px;color: #333333;width: 100%;height: 30px;border: 0;border-bottom: 1px solid #cccccc;border-top: 1px solid #ffffff;border-left: 1px solid #ffffff;border-right: 1px solid #ffffff;box-sizing: border-box;outline: none;position: relative;} 105 | .login-center-input input:focus{border: 1px solid dodgerblue;} 106 | .login-center-input-text{background: white;padding: 0 5px;position: absolute;z-index: 0;opacity: 0;height: 20px;top: 50%;margin-top: -10px;font-size: 14px;left: 5px;color: dodgerblue;line-height: 20px;transition: all 0.5s;-moz-transition: all 0.5s; /* Firefox 4 */-webkit-transition: all 0.5s; /* Safari 和 Chrome */-o-transition: all 0.5s; /* Opera */} 107 | .login-center-input input:focus~.login-center-input-text{top: 0;z-index: 3;opacity: 1;margin-top: -15px;} 108 | .login.active{-webkit-animation: login-small 0.8s ; animation: login-small 0.8s ;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards} 109 | .login-button{cursor: pointer;width: 250px;text-align: center;height: 40px;line-height: 40px;background-color: dodgerblue;border-radius: 5px;margin: 0 auto;margin-top: 50px;color: white;} 110 | 111 | .error { 112 | width: 300px; 113 | height: 40px; 114 | text-align: center; 115 | line-height: 40px; 116 | position: absolute; 117 | left: 50%; 118 | top: 30%; 119 | transform: translate(-50%, -30%); 120 | display: none; 121 | color: dodgerblue; 122 | font-size: 16px; 123 | } 124 | .error a { 125 | display: inline-block; 126 | } -------------------------------------------------------------------------------- /WebRoot/css/styles.css: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Gudea:400,700); 2 | body { 3 | -webkit-perspective: 800px; 4 | perspective: 800px; 5 | height: 100vh; 6 | margin: 0; 7 | overflow: hidden; 8 | font-family: 'Gudea', sans-serif; 9 | background: #EA5C54; 10 | /* Old browsers */ 11 | /* FF3.6+ */ 12 | background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #EA5C54), color-stop(100%, #bb6dec)); 13 | /* Chrome,Safari4+ */ 14 | background: -webkit-linear-gradient(-45deg, #EA5C54 0%, #bb6dec 100%); 15 | /* Chrome10+,Safari5.1+ */ 16 | /* Opera 11.10+ */ 17 | /* IE10+ */ 18 | background: -webkit-linear-gradient(315deg, #EA5C54 0%, #bb6dec 100%); 19 | background: linear-gradient(135deg, #EA5C54 0%, #bb6dec 100%); 20 | /* W3C */ 21 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#EA5C54 ', endColorstr='#bb6dec',GradientType=1 ); 22 | /* IE6-9 fallback on horizontal gradient */ 23 | } 24 | body ::-webkit-input-placeholder { 25 | color: #4E546D; 26 | } 27 | body .authent { 28 | display: none; 29 | background: #35394a; 30 | /* Old browsers */ 31 | /* FF3.6+ */ 32 | background: -webkit-gradient(linear, left bottom, right top, color-stop(0%, #35394a), color-stop(100%, #1f222e)); 33 | /* Chrome,Safari4+ */ 34 | background: -webkit-linear-gradient(45deg, #35394a 0%, #1f222e 100%); 35 | /* Chrome10+,Safari5.1+ */ 36 | /* Opera 11.10+ */ 37 | /* IE10+ */ 38 | background: linear-gradient(45deg, #35394a 0%, #1f222e 100%); 39 | /* W3C */ 40 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#35394a', endColorstr='#1f222e',GradientType=1 ); 41 | /* IE6-9 fallback on horizontal gradient */ 42 | position: absolute; 43 | left: 0; 44 | right: 90px; 45 | margin: auto; 46 | width: 100px; 47 | color: white; 48 | text-transform: uppercase; 49 | letter-spacing: 1px; 50 | text-align: center; 51 | padding: 20px 70px; 52 | top: 200px; 53 | bottom: 0; 54 | height: 70px; 55 | opacity: 0; 56 | } 57 | body .authent p { 58 | text-align: center; 59 | color: white; 60 | } 61 | body .success { 62 | display: none; 63 | color: #d5d8e2; 64 | } 65 | body .success p { 66 | font-size: 14px; 67 | } 68 | body .error { 69 | display: none; 70 | color: #d5d8e2; 71 | } 72 | body .error p { 73 | font-size: 14px; 74 | } 75 | body p { 76 | color: #5B5E6F; 77 | font-size: 10px; 78 | text-align: left; 79 | } 80 | body .testtwo { 81 | left: -320px !important; 82 | } 83 | body .test { 84 | box-shadow: 0px 20px 30px 3px rgba(0, 0, 0, 0.55); 85 | pointer-events: none; 86 | top: -100px !important; 87 | -webkit-transform: rotateX(70deg) scale(0.8) !important; 88 | transform: rotateX(70deg) scale(0.8) !important; 89 | opacity: .6 !important; 90 | -webkit-filter: blur(1px); 91 | filter: blur(1px); 92 | } 93 | body .login { 94 | opacity: 1; 95 | top: 20px; 96 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.25, 0.265, 0.85); 97 | -webkit-transition-property: -webkit-transform,opacity,box-shadow,top,left; 98 | transition-property: transform,opacity,box-shadow,top,left; 99 | -webkit-transition-duration: .5s; 100 | transition-duration: .5s; 101 | -webkit-transform-origin: 161px 100%; 102 | -ms-transform-origin: 161px 100%; 103 | transform-origin: 161px 100%; 104 | -webkit-transform: rotateX(0deg); 105 | transform: rotateX(0deg); 106 | position: relative; 107 | width: 240px; 108 | border-top: 2px solid #D8312A; 109 | height: 300px; 110 | position: absolute; 111 | left: 0; 112 | right: 0; 113 | margin: auto; 114 | top: 0; 115 | bottom: 0; 116 | padding: 100px 40px 40px 40px; 117 | background: #35394a; 118 | /* Old browsers */ 119 | /* FF3.6+ */ 120 | background: -webkit-gradient(linear, left bottom, right top, color-stop(0%, #35394a), color-stop(100%, #1f222e)); 121 | /* Chrome,Safari4+ */ 122 | background: -webkit-linear-gradient(45deg, #35394a 0%, #1f222e 100%); 123 | /* Chrome10+,Safari5.1+ */ 124 | /* Opera 11.10+ */ 125 | /* IE10+ */ 126 | background: linear-gradient(45deg, #35394a 0%, #1f222e 100%); 127 | /* W3C */ 128 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#35394a', endColorstr='#1f222e',GradientType=1 ); 129 | /* IE6-9 fallback on horizontal gradient */ 130 | } 131 | body .login .validation { 132 | position: absolute; 133 | z-index: 1; 134 | right: 10px; 135 | top: 6px; 136 | opacity: 0; 137 | } 138 | body .login .disclaimer { 139 | position: absolute; 140 | bottom: 20px; 141 | left: 35px; 142 | width: 250px; 143 | } 144 | body .login_title { 145 | color: #afb1be; 146 | height: 60px; 147 | text-align: left; 148 | font-size: 16px; 149 | } 150 | body .login_fields { 151 | height: 208px; 152 | position: absolute; 153 | left: 0; 154 | } 155 | body .login_fields .icon { 156 | position: absolute; 157 | z-index: 1; 158 | left: 36px; 159 | top: 8px; 160 | opacity: .5; 161 | } 162 | body .login_fields input[type='password'] { 163 | color: #DC6180 !important; 164 | } 165 | body .login_fields input[type='text'], body .login_fields input[type='password'] { 166 | color: #afb1be; 167 | width: 190px; 168 | margin-top: -2px; 169 | background: #32364a; 170 | left: 0; 171 | padding: 10px 65px; 172 | border-top: 2px solid #393d52; 173 | border-bottom: 2px solid #393d52; 174 | border-right: none; 175 | border-left: none; 176 | outline: none; 177 | font-family: 'Gudea', sans-serif; 178 | box-shadow: none; 179 | } 180 | body .login_fields__user, body .login_fields__password { 181 | position: relative; 182 | } 183 | body .login_fields__submit { 184 | position: relative; 185 | top: 35px; 186 | left: 0; 187 | width: 80%; 188 | right: 0; 189 | margin: auto; 190 | } 191 | body .login_fields__submit .forgot { 192 | float: right; 193 | font-size: 10px; 194 | margin-top: 11px; 195 | text-decoration: underline; 196 | } 197 | body .login_fields__submit .forgot a { 198 | color: #606479; 199 | } 200 | body .login_fields__submit input { 201 | border-radius: 50px; 202 | background: transparent; 203 | padding: 10px 50px; 204 | border: 2px solid #DC6180; 205 | color: #DC6180; 206 | text-transform: uppercase; 207 | font-size: 11px; 208 | -webkit-transition-property: background,color; 209 | transition-property: background,color; 210 | -webkit-transition-duration: .2s; 211 | transition-duration: .2s; 212 | } 213 | body .login_fields__submit input:focus { 214 | box-shadow: none; 215 | outline: none; 216 | } 217 | body .login_fields__submit input:hover { 218 | color: white; 219 | background: #DC6180; 220 | cursor: pointer; 221 | -webkit-transition-property: background,color; 222 | transition-property: background,color; 223 | -webkit-transition-duration: .2s; 224 | transition-duration: .2s; 225 | } 226 | 227 | /* Color Schemes */ 228 | .love { 229 | position: absolute; 230 | right: 20px; 231 | bottom: 0px; 232 | font-size: 11px; 233 | font-weight: normal; 234 | } 235 | .love p { 236 | color: white; 237 | font-weight: normal; 238 | font-family: 'Open Sans', sans-serif; 239 | } 240 | .love a { 241 | color: white; 242 | font-weight: 700; 243 | text-decoration: none; 244 | } 245 | .love img { 246 | position: relative; 247 | top: 3px; 248 | margin: 0px 4px; 249 | width: 10px; 250 | } 251 | 252 | .brand { 253 | position: absolute; 254 | left: 20px; 255 | bottom: 14px; 256 | } 257 | .brand img { 258 | width: 30px; 259 | } 260 | .mainJsp { 261 | cursor: pointer; 262 | text-align: center; 263 | font-size: 16px; 264 | } 265 | .success { 266 | font-size: 16px; 267 | } -------------------------------------------------------------------------------- /WebRoot/css/welcome.css: -------------------------------------------------------------------------------- 1 | * { 2 | padding: 0; 3 | margin: 0; 4 | } 5 | -------------------------------------------------------------------------------- /WebRoot/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/bg.jpg -------------------------------------------------------------------------------- /WebRoot/img/client.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/client.png -------------------------------------------------------------------------------- /WebRoot/img/double.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/double.jpg -------------------------------------------------------------------------------- /WebRoot/img/double2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/double2.jpg -------------------------------------------------------------------------------- /WebRoot/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/favicon.ico -------------------------------------------------------------------------------- /WebRoot/img/finish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/finish.png -------------------------------------------------------------------------------- /WebRoot/img/inputradio.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/inputradio.gif -------------------------------------------------------------------------------- /WebRoot/img/lock_icon_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/lock_icon_copy.png -------------------------------------------------------------------------------- /WebRoot/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/logo.png -------------------------------------------------------------------------------- /WebRoot/img/name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/name.png -------------------------------------------------------------------------------- /WebRoot/img/nosearch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/nosearch.png -------------------------------------------------------------------------------- /WebRoot/img/password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/password.png -------------------------------------------------------------------------------- /WebRoot/img/puff.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 19 | 20 | 21 | 28 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /WebRoot/img/single.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/single.jpg -------------------------------------------------------------------------------- /WebRoot/img/single2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/single2.jpg -------------------------------------------------------------------------------- /WebRoot/img/th.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/th.jpg -------------------------------------------------------------------------------- /WebRoot/img/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/tick.png -------------------------------------------------------------------------------- /WebRoot/img/user_icon_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/WebRoot/img/user_icon_copy.png -------------------------------------------------------------------------------- /WebRoot/incomeView.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@page import="Bean.incomeViewBean"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | <%@ page import="java.util.*" %> 8 | 9 | 10 | 11 | 12 | 13 | 收入视图 14 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 28 | 29 | 30 |

收入视图

31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | <% 42 | List list = (List) request.getAttribute("list"); 43 | if(list == null || list.size() < 1){ 44 | out.print(""); 45 | }else{ 46 | for(incomeViewBean e: list){ 47 | %> 48 | 49 | 50 | 51 | 52 | 53 | <% 54 | } 55 | } 56 | %> 57 | 58 |
退房时间总价订单个数
暂无信息
<%=e.getCheckOutTime()%><%=e.getTotalIncome()%><%=e.getNum()%>
59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /WebRoot/index.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 | 8 | 9 | 10 | 11 | 12 | 旅店管理系统 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 | 旅店管理系统登录 31 |
32 |
33 | 43 | 52 | 58 |
59 |
60 |

验证失败

61 | 请重新登录! 62 |
63 |
64 |

验证成功

65 | <% 66 | if(session.getAttribute("un") != null){ 67 | %> 68 |

欢迎登录~<%=session.getAttribute("un")%>

69 | <%}%> 70 |

进入首页

71 |
72 |
73 |

旅店管理系统是一个...........

74 |
75 |
76 |
77 | 78 |

正在验证,请稍等

79 |
80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /WebRoot/js/login.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | document.onkeydown = function (e){ 3 | if(e.keyCode == 13) { 4 | $('input[type="submit"]').trigger('click'); 5 | } 6 | } 7 | $('input[type="submit"]').click(function() { 8 | var username = $("#username").val(); 9 | var password = $("#password").val(); 10 | if(username == "" || password == "") {return;} 11 | $('.login').addClass('test'); 12 | setTimeout(function() { 13 | $('.login').addClass('testtwo'); 14 | }, 300); 15 | setTimeout(function() { 16 | $('.authent').show().animate({ 17 | right: -320 18 | }, { 19 | easing: 'easeOutQuint', 20 | duration: 600, 21 | queue: false 22 | }); 23 | $('.authent').animate({ 24 | opacity: 1 25 | }, { 26 | duration: 200, 27 | queue: false 28 | }).addClass('visible'); 29 | }, 500); 30 | 31 | $.ajax({ 32 | url: 'loginServlet', 33 | type: 'post', 34 | dataType: 'text', 35 | data: { 36 | 'user': username, 37 | 'pwd': password 38 | } 39 | }) 40 | .done(function(data) { 41 | if ($.trim(data) == "true") { 42 | console.log('成功'); 43 | processLogin(); 44 | } else { 45 | errorLogin(); 46 | console.log('失败'); 47 | } 48 | }) 49 | .fail(function() { 50 | console.log("error"); 51 | }) 52 | 53 | function errorLogin() { 54 | setTimeout(function() { 55 | $('.authent').show().animate({ 56 | right: 90 57 | }, { 58 | easing: 'easeOutQuint', 59 | duration: 600, 60 | queue: false 61 | }); 62 | $('.authent').animate({ 63 | opacity: 0 64 | }, { 65 | duration: 200, 66 | queue: false 67 | }).addClass('visible'); 68 | $('.login').removeClass('testtwo'); 69 | }, 1000); 70 | 71 | //主要是这两个处理登录的结果 72 | setTimeout(function() { 73 | $('.login').removeClass('test'); 74 | $('.login div').fadeOut(123); 75 | }, 1000); 76 | setTimeout(function() { 77 | $('.error').fadeIn(); 78 | }, 1000); 79 | } 80 | 81 | function processLogin() { 82 | var $mainJsp = $(".mainJsp"); 83 | $mainJsp.on('click', function(event) { 84 | window.location = "welcome.jsp"; 85 | }); 86 | setTimeout(function() { 87 | $('.authent').show().animate({ 88 | right: 90 89 | }, { 90 | easing: 'easeOutQuint', 91 | duration: 600, 92 | queue: false 93 | }); 94 | $('.authent').animate({ 95 | opacity: 0 96 | }, { 97 | duration: 200, 98 | queue: false 99 | }).addClass('visible'); 100 | $('.login').removeClass('testtwo'); 101 | }, 1000); 102 | 103 | //主要是这两个处理登录的结果 104 | setTimeout(function() { 105 | $('.login').removeClass('test'); 106 | $('.login div').fadeOut(123); 107 | }, 800); 108 | setTimeout(function() { 109 | $('.success').fadeIn(); 110 | }, 800); 111 | } 112 | }); 113 | $('input[type="text"],input[type="password"]').focus(function() { 114 | $(this).prev().animate({ 115 | 'opacity': '1' 116 | }, 200); 117 | }); 118 | $('input[type="text"],input[type="password"]').blur(function() { 119 | $(this).prev().animate({ 120 | 'opacity': '.5' 121 | }, 200); 122 | }); 123 | $('input[type="text"],input[type="password"]').keyup(function() { 124 | if (!$(this).val() == '') { 125 | $(this).next().animate({ 126 | 'opacity': '1', 127 | 'right': '30' 128 | }, 200); 129 | } else { 130 | $(this).next().animate({ 131 | 'opacity': '0', 132 | 'right': '20' 133 | }, 200); 134 | } 135 | }); 136 | var open = 0; 137 | $('.tab').click(function() { 138 | $(this).fadeOut(200, function() { 139 | $(this).parent().animate({ 140 | 'left': '0' 141 | }); 142 | }); 143 | }); 144 | }); 145 | 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /WebRoot/js/main.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | window.onload = function() { 3 | init(); 4 | search(); 5 | getTime(); 6 | setInterval(getTime, 1000); 7 | } 8 | var $iframe = $("#iframe"); 9 | var $time = $("#banner .banner-time"); 10 | //预订、入住、退房等等 11 | var $search = $("#banner .search"); 12 | //视图查询 13 | var $view = $("#banner .view"); 14 | //各种查询 15 | var $find = $("#banner .find"); 16 | 17 | //初始化事件 18 | function init() { 19 | $search.on('click', function(event) { 20 | event.preventDefault(); 21 | $("#banner .find .searchBtn").stop(true, true).slideUp(400); 22 | $("#banner .search .searchBtn").stop(true, true).slideToggle(400); 23 | }); 24 | } 25 | //获取系统当前时间 26 | function getTime() { 27 | var date = new Date(); 28 | var time = date.toString().split(" "); 29 | var formatTime = time[3] + "年" + (date.getMonth() + 1) + "月" + time[2] + "日" + time[4]; 30 | $time.text(formatTime); 31 | } 32 | //点击菜单栏 跳转相应的页面 33 | function search() { 34 | //点击入房退房等等 35 | var $searchBtn = $("#banner .search .searchBtn"); 36 | $searchBtn.on('click', '.content', function(event) { 37 | var className = $(this).attr('class'); 38 | console.log(className); 39 | var page = className.split(' ')[1]; 40 | console.log(page); 41 | $iframe.attr('src', page + ".jsp"); 42 | }); 43 | //点击视图查询,跳转相应的页面 44 | $view.on('click', function(event) { 45 | $iframe.attr('src', "showView.jsp"); 46 | }); 47 | $find.on('click', function(event) { 48 | $iframe.attr('src', "searchInfo.jsp"); 49 | }); 50 | } 51 | }); -------------------------------------------------------------------------------- /WebRoot/js/stopExecutionOnTimeout.js: -------------------------------------------------------------------------------- 1 | "use strict";"object"!=typeof window.CP&&(window.CP={}),window.CP.PenTimer={programNoLongerBeingMonitored:!1,timeOfFirstCallToShouldStopLoop:0,_loopExits:{},_loopTimers:{},START_MONITORING_AFTER:2e3,STOP_ALL_MONITORING_TIMEOUT:5e3,MAX_TIME_IN_LOOP_WO_EXIT:2200,exitedLoop:function(o){this._loopExits[o]=!0},shouldStopLoop:function(o){if(this.programKilledSoStopMonitoring)return!0;if(this.programNoLongerBeingMonitored)return!1;if(this._loopExits[o])return!1;var t=this._getTime();if(0===this.timeOfFirstCallToShouldStopLoop)return this.timeOfFirstCallToShouldStopLoop=t,!1;var i=t-this.timeOfFirstCallToShouldStopLoop;if(ithis.STOP_ALL_MONITORING_TIMEOUT)return this.programNoLongerBeingMonitored=!0,!1;try{this._checkOnInfiniteLoop(o,t)}catch(n){return this._sendErrorMessageToEditor(),this.programKilledSoStopMonitoring=!0,!0}return!1},_sendErrorMessageToEditor:function(){try{if(this._shouldPostMessage()){var o={action:"infinite-loop",line:this._findAroundLineNumber()};parent.postMessage(JSON.stringify(o),"*")}else this._throwAnErrorToStopPen()}catch(t){this._throwAnErrorToStopPen()}},_shouldPostMessage:function(){return document.location.href.match(/boomerang/)},_throwAnErrorToStopPen:function(){throw"We found an infinite loop in your Pen. We've stopped the Pen from running. Please correct it or contact support@codepen.io."},_findAroundLineNumber:function(){var o=new Error,t=0;if(o.stack){var i=o.stack.match(/boomerang\S+:(\d+):\d+/);i&&(t=i[1])}return t},_checkOnInfiniteLoop:function(o,t){if(!this._loopTimers[o])return this._loopTimers[o]=t,!1;var i=t-this._loopTimers[o];if(i>this.MAX_TIME_IN_LOOP_WO_EXIT)throw"Infinite Loop found on loop: "+o},_getTime:function(){return+new Date}},window.CP.shouldStopExecution=function(o){return window.CP.PenTimer.shouldStopLoop(o)},window.CP.exitedLoop=function(o){window.CP.PenTimer.exitedLoop(o)}; -------------------------------------------------------------------------------- /WebRoot/leave.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 | 8 | 9 | 10 | 11 | 12 | 退房 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |

退房

28 | 29 | 30 |
31 |
32 | 33 |
34 | 顾客身份证号 35 |
36 | 37 | 38 |
39 | 40 |
41 |

个人信息

42 |
43 |
44 |
身份证号
45 |
状态
46 |
47 | 48 | 49 | 50 |

住房信息

51 |
52 |
53 |
入住时间
54 |
房间号
55 |
56 | 57 | 58 |
59 |
离开时间
60 |
总消费
61 |
62 | 63 | 64 | 65 |

预定信息

66 |
67 |
68 |
预定时间
69 |
预定编号
70 |
71 | 72 | 73 |
74 | 75 | 76 | 77 | 115 | 116 | -------------------------------------------------------------------------------- /WebRoot/main.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 | 8 | 9 | 10 | 11 | 12 | My JSP 'main.jsp' starting page 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /WebRoot/orderView.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@page import="Bean.orderViewBean"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 订单视图 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |

订单视图

27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | <% 44 | List list = (List) request.getAttribute("list"); 45 | if(list == null || list.size() < 1){ 46 | out.print(""); 47 | }else{ 48 | for(orderViewBean e: list){ 49 | 50 | %> 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | <% 64 | } 65 | } 66 | %> 67 | 68 |
订单号订单状态客户姓名房间号房间类型预定时间入住时间退房时间顾客电话号码总金额
没有任何信息
<%=e.getOrderNumber()%><%=e.getOrderStatus()%><%=e.getCustomerName()%><%=e.getRoomNumber()%><%=e.getRoomType()%><%=e.getOrderTime()%><%=e.getCheckInTime()%><%=e.getCheckOutTime()%><%=e.getCustomerPhoneNumber()%><%=e.getTotalMoney()%>
69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /WebRoot/reserve.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 | 8 | 9 | 10 | 11 | 12 | 预订 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |

订房

26 | 27 | 28 |
29 |
30 | 31 |
32 |

时间安排

33 |
34 | 入住时间
35 | 离开时间 36 | 37 |
38 | 剩余空房间(请选择)

39 |
40 | 41 | 42 |

个人信息

43 |
44 |
45 | 身份证号
46 | 姓名 47 | 性别   男 48 | 女
49 | 电话号码
50 | 备注
51 |
52 | 53 | 54 |
55 |
56 |
57 | 58 |
59 |

恭喜您! 订房成功!

60 |
61 |
62 |
预定房间
63 |
房间类型
64 |
65 |
66 | 67 | 68 |
69 |
70 |
入住时间
71 |
离开时间
72 |
73 |
74 | 75 | 76 |
77 |
78 | 79 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /WebRoot/roomInfoView.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@page import="Bean.roomInfoViewBean"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 房间信息视图 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 27 | 28 |

房间信息视图

29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | <% 42 | List list = (List) request.getAttribute("list"); 43 | if(list == null || list.size() < 1){ 44 | out.print(""); 45 | }else{ 46 | for(roomInfoViewBean e: list){ 47 | 48 | %> 49 | 50 | 51 | 52 | 53 | 54 | 55 | <% 56 | } 57 | } 58 | %> 59 | 60 |
房间号房间类型房间备注价格
没有任何信息
<%=e.getRoomNumber()%><%=e.getRoomType()%><%=e.getRemarks()%><%=e.getPrice() %>
61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /WebRoot/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 99 | 100 | 101 | 102 | 103 |
104 |

订单查询

105 |
106 |
107 | 108 | 姓名 109 |
110 | 姓名 111 |
112 |
113 |
114 | 房间 115 |
116 | 房间号 117 |
118 |
119 | 房间类型 120 |
121 | 122 |
123 |
124 | 125 | 时间 126 |
127 | 入住时间 128 |
129 |
130 | 退房时间 131 |
132 |
133 | 预订时间 134 |
135 |
136 | 退房时间 137 |
138 |
139 |
140 | 141 | 联系方式 142 |
143 | 联系方式 144 |
145 |
146 |
147 | 148 | 金额 149 |
150 | 金额 151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 | 162 | 172 | 173 | -------------------------------------------------------------------------------- /WebRoot/searchInfo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 128 | 129 | 130 | 131 | 132 |
133 |
134 | 135 | 136 | 137 | 姓名 138 |
139 |
140 | 141 | 142 | 143 | 房间号 144 |
145 |
146 | 147 | 148 | 149 | 房间类型 150 |
151 |
152 | 153 | 154 | 155 | 预订时间 156 |
157 |
158 | 159 | 160 | 161 | 入住时间 162 |
163 |
164 | 165 | 166 | 167 | 退房时间 168 |
169 |
170 | 171 | 172 | 173 | 联系方式 174 |
175 |
176 | 177 | 178 | 179 | 总金额 180 |
181 |
182 | 183 |
184 | 185 |
186 | 187 | 188 | 189 | 207 | 208 | 262 | 263 | -------------------------------------------------------------------------------- /WebRoot/searchInfo.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 | 8 | 9 | 10 | 11 | 12 | Document 13 | 265 | 266 | 267 | 268 | 269 | 270 |
271 |

订单查询

272 |
273 |
274 | 275 | 姓名 276 |
277 | 278 | 姓名 279 |
280 |
281 |
282 | 房间 283 |
284 | 房间号 285 |
286 |
287 | 房间类型 288 |
289 | 290 |
291 |
292 | 293 | 时间 294 |
295 | 入住时间 296 |
297 |
298 | 退房时间 299 |
300 |
301 | 预订时间 302 |
303 |
304 | 退房时间 305 |
306 |
307 |
308 | 309 | 联系方式 310 |
311 | 联系方式 312 |
313 |
314 |
315 | 316 | 金额 317 |
318 | 319 | 320 | 321 | 金额 322 |
323 |
324 |
325 |
326 | 327 |
328 | 329 |
330 | 331 |
332 |
333 | 334 |
335 |
336 | 337 | 338 | 443 | 444 | -------------------------------------------------------------------------------- /WebRoot/showView.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 | 8 | 9 | 10 | 11 | 视图 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 62 | 63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /WebRoot/timeExtension.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 续费 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |

28 | 29 | 30 | 31 | 32 |

续费

33 | 34 | 35 |
36 |
37 | 38 |
39 |

续费要求

40 |
41 | 续费房间号
42 | 续费天数
43 | 顾客身份证号
44 |
45 |

续费之后

46 |
47 | 续费价格 48 |
49 |
新到期时间
50 |
旧到期时间
51 |
52 |
53 | 54 | 55 |
56 | 订单编号 57 | 58 |
59 | 60 |
61 | 62 | 63 |
64 | 65 |
66 | 67 |
68 |

恭喜您! 续费成功!

69 |
70 |
71 |
新到期时间
72 |
旧到期时间
73 |
74 |
75 | 76 | 77 |
78 |
79 | 80 | 81 | 82 | 83 | 153 | 154 | -------------------------------------------------------------------------------- /WebRoot/timeExtensionOrdersView.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@page import="Bean.timeExtensionOrdersViewBean"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 续费订单视图 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |

续费订单视图

26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | <% 44 | List list = (List) request.getAttribute("list"); 45 | if(list == null || list.size() < 1){ 46 | out.print(""); 47 | }else{ 48 | for(timeExtensionOrdersViewBean e: list){ 49 | 50 | %> 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | <% 62 | } 63 | } 64 | %> 65 | 66 |
订单号客户姓名联系电话房间号入住时间前到期时间现到期时间加钱数目
没有任何信息
<%=e.getOrderNumber()%><%=e.getCustomerName()%><%=e.getCustomerPhoneNumber()%><%=e.getRoomNumber() %><%=e.getCheckInTime() %><%=e.getOldExpiryDate() %><%=e.getNewExpiryDate() %><%=e.getAddMoney() %>
67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /WebRoot/welcome.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 | 8 | 9 | 10 | 11 | 旅店管理系统 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /sql_statement/Query.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/sql_statement/Query.sql -------------------------------------------------------------------------------- /sql_statement/create.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/sql_statement/create.sql -------------------------------------------------------------------------------- /sql_statement/insert_lizeyu_final.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zyllee/hotel_managerment_final/a7bf05b31cd55e6081641016d46d9cbc06d2a531/sql_statement/insert_lizeyu_final.sql -------------------------------------------------------------------------------- /src/Bean/incomeViewBean.java: -------------------------------------------------------------------------------- 1 | package Bean; 2 | 3 | import java.sql.Date; 4 | 5 | public class incomeViewBean { 6 | private Date checkOutTime; 7 | private int totalIncome; 8 | private int num; 9 | public Date getCheckOutTime() { 10 | return checkOutTime; 11 | } 12 | public void setCheckOutTime(Date checkOutTime) { 13 | this.checkOutTime = checkOutTime; 14 | } 15 | public int getTotalIncome() { 16 | return totalIncome; 17 | } 18 | public void setTotalIncome(int totalIncome) { 19 | this.totalIncome = totalIncome; 20 | } 21 | public int getNum() { 22 | return num; 23 | } 24 | public void setNum(int num) { 25 | this.num = num; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/Bean/orderViewBean.java: -------------------------------------------------------------------------------- 1 | package Bean; 2 | 3 | import java.sql.Date; 4 | 5 | 6 | public class orderViewBean { 7 | private int orderNumber; 8 | private String orderStatus; 9 | private String customerName; 10 | private String roomNumber; 11 | private String roomType; 12 | private Date orderTime; 13 | private Date checkInTime; 14 | private Date checkOutTime; 15 | private String customerPhoneNumber; 16 | private int totalMoney; 17 | private String roomUrl; 18 | public String getRoomUrl() { 19 | return roomUrl; 20 | } 21 | public void setRoomUrl(String roomUrl) { 22 | this.roomUrl = roomUrl; 23 | } 24 | public int getOrderNumber() { 25 | return orderNumber; 26 | } 27 | public void setOrderNumber(int orderNumber) { 28 | this.orderNumber = orderNumber; 29 | } 30 | public String getOrderStatus() { 31 | return orderStatus; 32 | } 33 | public void setOrderStatus(String orderStatus) { 34 | this.orderStatus = orderStatus; 35 | } 36 | public String getCustomerName() { 37 | return customerName; 38 | } 39 | public void setCustomerName(String customerName) { 40 | this.customerName = customerName; 41 | } 42 | public String getRoomNumber() { 43 | return roomNumber; 44 | } 45 | public void setRoomNumber(String roomNumber) { 46 | this.roomNumber = roomNumber; 47 | } 48 | public String getRoomType() { 49 | return roomType; 50 | } 51 | public void setRoomType(String roomType) { 52 | this.roomType = roomType; 53 | } 54 | public Date getOrderTime() { 55 | return orderTime; 56 | } 57 | public void setOrderTime(Date orderTime) { 58 | this.orderTime = orderTime; 59 | } 60 | public Date getCheckInTime() { 61 | return checkInTime; 62 | } 63 | public void setCheckInTime(Date checkInTime) { 64 | this.checkInTime = checkInTime; 65 | } 66 | public Date getCheckOutTime() { 67 | return checkOutTime; 68 | } 69 | public void setCheckOutTime(Date checkOutTime) { 70 | this.checkOutTime = checkOutTime; 71 | } 72 | public String getCustomerPhoneNumber() { 73 | return customerPhoneNumber; 74 | } 75 | public void setCustomerPhoneNumber(String customerPhoneNumber) { 76 | this.customerPhoneNumber = customerPhoneNumber; 77 | } 78 | public int getTotalMoney() { 79 | return totalMoney; 80 | } 81 | public void setTotalMoney(int totalMoney) { 82 | this.totalMoney = totalMoney; 83 | } 84 | 85 | } 86 | -------------------------------------------------------------------------------- /src/Bean/roomInfoViewBean.java: -------------------------------------------------------------------------------- 1 | package Bean; 2 | 3 | public class roomInfoViewBean { 4 | private String roomNumber; 5 | private String roomType; 6 | private String remarks; 7 | private int price; 8 | public String getRoomNumber() { 9 | return roomNumber; 10 | } 11 | public void setRoomNumber(String roomNumber) { 12 | this.roomNumber = roomNumber; 13 | } 14 | public String getRoomType() { 15 | return roomType; 16 | } 17 | public void setRoomType(String roomType) { 18 | this.roomType = roomType; 19 | } 20 | public String getRemarks() { 21 | return remarks; 22 | } 23 | public void setRemarks(String remarks) { 24 | this.remarks = remarks; 25 | } 26 | public int getPrice() { 27 | return price; 28 | } 29 | public void setPrice(int price) { 30 | this.price = price; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/Bean/timeExtensionOrdersViewBean.java: -------------------------------------------------------------------------------- 1 | package Bean; 2 | 3 | import java.sql.Date; 4 | 5 | public class timeExtensionOrdersViewBean { 6 | int orderNumber; 7 | String customerName; 8 | String customerPhoneNumber; 9 | String roomNumber; 10 | Date checkInTime; 11 | Date oldExpiryDate; 12 | Date newExpiryDate; 13 | int addMoney; 14 | public int getOrderNumber() { 15 | return orderNumber; 16 | } 17 | public void setOrderNumber(int orderNumber) { 18 | this.orderNumber = orderNumber; 19 | } 20 | public String getCustomerName() { 21 | return customerName; 22 | } 23 | public void setCustomerName(String customerName) { 24 | this.customerName = customerName; 25 | } 26 | public String getCustomerPhoneNumber() { 27 | return customerPhoneNumber; 28 | } 29 | public void setCustomerPhoneNumber(String customerPhoneNumber) { 30 | this.customerPhoneNumber = customerPhoneNumber; 31 | } 32 | public String getRoomNumber() { 33 | return roomNumber; 34 | } 35 | public void setRoomNumber(String roomNumber) { 36 | this.roomNumber = roomNumber; 37 | } 38 | public Date getCheckInTime() { 39 | return checkInTime; 40 | } 41 | public void setCheckInTime(Date checkInTime) { 42 | this.checkInTime = checkInTime; 43 | } 44 | public Date getOldExpiryDate() { 45 | return oldExpiryDate; 46 | } 47 | public void setOldExpiryDate(Date oldExpiryDate) { 48 | this.oldExpiryDate = oldExpiryDate; 49 | } 50 | public Date getNewExpiryDate() { 51 | return newExpiryDate; 52 | } 53 | public void setNewExpiryDate(Date newExpiryDate) { 54 | this.newExpiryDate = newExpiryDate; 55 | } 56 | public int getAddMoney() { 57 | return addMoney; 58 | } 59 | public void setAddMoney(int addMoney) { 60 | this.addMoney = addMoney; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/servlet/CharactorFilter.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.servlet.Filter; 6 | import javax.servlet.FilterChain; 7 | import javax.servlet.FilterConfig; 8 | import javax.servlet.ServletException; 9 | import javax.servlet.ServletRequest; 10 | import javax.servlet.ServletResponse; 11 | 12 | import org.omg.CORBA.Request; 13 | 14 | public class CharactorFilter implements Filter { 15 | public String encoding; 16 | public void destroy() { 17 | encoding = null; 18 | 19 | } 20 | 21 | public void doFilter(ServletRequest request, ServletResponse response, 22 | FilterChain chain) throws IOException, ServletException { 23 | response.setContentType("text/html"); 24 | request.setCharacterEncoding("utf-8"); 25 | response.setCharacterEncoding("utf-8"); 26 | chain.doFilter(request, response); 27 | } 28 | 29 | public void init(FilterConfig arg0) throws ServletException { 30 | encoding = arg0.getInitParameter("encoding"); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/servlet/FindViewServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.sql.Connection; 6 | import java.sql.Date; 7 | import java.sql.DriverManager; 8 | import java.sql.ResultSet; 9 | import java.sql.SQLException; 10 | import java.sql.Statement; 11 | import java.util.ArrayList; 12 | import java.util.HashMap; 13 | import java.util.List; 14 | import java.util.Map; 15 | 16 | import javax.servlet.ServletException; 17 | import javax.servlet.http.HttpServlet; 18 | import javax.servlet.http.HttpServletRequest; 19 | import javax.servlet.http.HttpServletResponse; 20 | 21 | import Bean.incomeViewBean; 22 | import Bean.orderViewBean; 23 | import Bean.roomInfoViewBean; 24 | import Bean.timeExtensionOrdersViewBean; 25 | 26 | public class FindViewServlet extends HttpServlet { 27 | 28 | /** 29 | * The doGet method of the servlet.
30 | * 31 | * This method is called when a form has its tag value method equals to get. 32 | * 33 | * @param request the request send by the client to the server 34 | * @param response the response send by the server to the client 35 | * @throws ServletException if an error occurred 36 | * @throws IOException if an error occurred 37 | */ 38 | public void doGet(HttpServletRequest request, HttpServletResponse response) 39 | throws ServletException, IOException { 40 | PrintWriter out = response.getWriter(); 41 | //初始化 42 | String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; 43 | String url = "jdbc:sqlserver://localhost:1433;Database=hotel_db"; 44 | String user = "sa"; 45 | String pwd = "160510111xyj"; 46 | String viewType = request.getParameter("viewType"); 47 | System.out.println(viewType); 48 | String sql_income = "select * from incomeView";//收入视图查询语句 49 | String sql_order = "select * from orderView";//订单视图查询语句 50 | String sql_roomInfoView = "select * from roomInfoView";//房间信息视图 51 | String sql_timeExtension = "select * from timeExtensionOrdersView";//续费订单视图 52 | Connection conn; 53 | try { 54 | Class.forName(driverName); 55 | try { 56 | conn = DriverManager.getConnection(url,user,pwd); 57 | Statement st = conn.createStatement(); 58 | if(viewType.equals("incomeView"))//执行收入视图查询 59 | { 60 | System.out.println("执行收入视图成功!"); 61 | ResultSet rs = st.executeQuery(sql_income); 62 | List list = new ArrayList(); 63 | while(rs.next()){ 64 | Date checkOutTime = rs.getDate("checkOutTime"); 65 | int totalIncome = rs.getInt("totalIncome"); 66 | int num = rs.getInt("num"); 67 | incomeViewBean incomeView = new incomeViewBean(); 68 | incomeView.setCheckOutTime(checkOutTime); 69 | incomeView.setNum(num); 70 | incomeView.setTotalIncome(totalIncome); 71 | list.add(incomeView); 72 | } 73 | request.setAttribute("list",list); 74 | } 75 | else if(viewType.equals("orderView")){//执行订单视图查询 76 | System.out.println("执行订单视图成功!"); 77 | ResultSet rs = st.executeQuery(sql_order); 78 | List list = new ArrayList(); 79 | while(rs.next()){ 80 | int orderNumber = rs.getInt("orderNumber"); 81 | String orderStatus = rs.getString("orderStatus"); 82 | String customerName = rs.getString("customerName"); 83 | String roomNumber = rs.getString("roomNumber"); 84 | String roomType = rs.getString("roomType"); 85 | Date orderTime = rs.getDate("orderTime"); 86 | Date checkInTime = rs.getDate("checkInTime"); 87 | Date checkOutTime = rs.getDate("checkOutTime"); 88 | String customerPhoneNumber = rs.getString("customerPhoneNumber"); 89 | int totalMoney = rs.getInt("totalMoney"); 90 | orderViewBean orderView = new orderViewBean(); 91 | orderView.setOrderNumber(orderNumber); 92 | orderView.setOrderStatus(orderStatus); 93 | orderView.setRoomNumber(roomNumber); 94 | orderView.setRoomType(roomType); 95 | orderView.setOrderTime(orderTime); 96 | orderView.setCheckInTime(checkInTime); 97 | orderView.setCheckOutTime(checkOutTime); 98 | orderView.setCustomerPhoneNumber(customerPhoneNumber); 99 | orderView.setCustomerName(customerName); 100 | orderView.setTotalMoney(totalMoney); 101 | list.add(orderView); 102 | } 103 | request.setAttribute("list",list); 104 | } 105 | else if(viewType.equals("roomInfoView")){ 106 | System.out.println("执行房间信息视图成功!"); 107 | ResultSet rs = st.executeQuery(sql_roomInfoView); 108 | List list = new ArrayList(); 109 | while (rs.next()) { 110 | String roomNumber = rs.getString("roomNumber"); 111 | String roomType = rs.getString("roomType"); 112 | String remarks = rs.getString("remarks"); 113 | int price = rs.getInt("price"); 114 | roomInfoViewBean roomInfoView = new roomInfoViewBean(); 115 | roomInfoView.setPrice(price); 116 | roomInfoView.setRemarks(remarks); 117 | roomInfoView.setRoomNumber(roomNumber); 118 | roomInfoView.setRoomType(roomType); 119 | list.add(roomInfoView); 120 | } 121 | request.setAttribute("list",list); 122 | } 123 | else if(viewType.equals("timeExtensionOrdersView")){ 124 | System.out.println("执行续费订单视图成功!"); 125 | ResultSet rs = st.executeQuery(sql_timeExtension); 126 | List list = new ArrayList(); 127 | while(rs.next()){ 128 | int orderNumber = rs.getInt("orderNumber"); 129 | String customerName = rs.getString("customerName"); 130 | String customerPhoneNumber = rs.getString("customerPhoneNumber"); 131 | String roomNumber = rs.getString("roomNumber"); 132 | Date checkInTime = rs.getDate("checkInTime"); 133 | Date oldExpiryDate = rs.getDate("oldExpiryDate"); 134 | Date newExpiryDate = rs.getDate("newExpiryDate"); 135 | int addMoney = rs.getInt("addMoney"); 136 | timeExtensionOrdersViewBean timeExtensionOrdersView = new timeExtensionOrdersViewBean(); 137 | timeExtensionOrdersView.setOrderNumber(orderNumber); 138 | timeExtensionOrdersView.setCustomerName(customerName); 139 | timeExtensionOrdersView.setRoomNumber(roomNumber); 140 | timeExtensionOrdersView.setCustomerPhoneNumber(customerPhoneNumber); 141 | timeExtensionOrdersView.setCheckInTime(checkInTime); 142 | timeExtensionOrdersView.setOldExpiryDate(oldExpiryDate); 143 | timeExtensionOrdersView.setNewExpiryDate(newExpiryDate); 144 | timeExtensionOrdersView.setAddMoney(addMoney); 145 | list.add(timeExtensionOrdersView); 146 | } 147 | request.setAttribute("list",list); 148 | } 149 | else{ 150 | System.out.println("进入视图失败!"); 151 | } 152 | } catch (SQLException e) { 153 | // TODO Auto-generated catch block 154 | e.printStackTrace(); 155 | } 156 | } catch (ClassNotFoundException e) { 157 | // TODO Auto-generated catch block 158 | e.printStackTrace(); 159 | } 160 | if(viewType.equals("incomeView")){ 161 | request.getRequestDispatcher("incomeView.jsp").forward(request, response); 162 | }else if(viewType.equals("orderView")){ 163 | request.getRequestDispatcher("orderView.jsp").forward(request, response); 164 | }else if(viewType.equals("roomInfoView")){ 165 | request.getRequestDispatcher("roomInfoView.jsp").forward(request, response); 166 | } 167 | else if(viewType.equals("timeExtensionOrdersView")){ 168 | request.getRequestDispatcher("timeExtensionOrdersView.jsp").forward(request, response); 169 | } 170 | } 171 | 172 | /** 173 | * The doPost method of the servlet.
174 | * 175 | * This method is called when a form has its tag value method equals to post. 176 | * 177 | * @param request the request send by the client to the server 178 | * @param response the response send by the server to the client 179 | * @throws ServletException if an error occurred 180 | * @throws IOException if an error occurred 181 | */ 182 | public void doPost(HttpServletRequest request, HttpServletResponse response) 183 | throws ServletException, IOException { 184 | doGet(request, response); 185 | } 186 | 187 | } 188 | -------------------------------------------------------------------------------- /src/servlet/SearchByTime.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.sql.Date; 6 | import java.sql.DriverManager; 7 | import java.sql.PreparedStatement; 8 | import java.sql.ResultSet; 9 | import java.sql.SQLException; 10 | import java.text.DateFormat; 11 | import java.text.ParseException; 12 | import java.text.SimpleDateFormat; 13 | import java.util.*; 14 | import java.text.DateFormat; 15 | import javax.servlet.ServletException; 16 | import javax.servlet.http.HttpServlet; 17 | import javax.servlet.http.HttpServletRequest; 18 | import javax.servlet.http.HttpServletResponse; 19 | import javax.xml.crypto.Data; 20 | 21 | import net.sf.json.JSONArray; 22 | 23 | 24 | import com.sun.corba.se.pept.transport.Connection; 25 | 26 | public class SearchByTime extends HttpServlet { 27 | 28 | /** 29 | * The doGet method of the servlet.
30 | * 31 | * This method is called when a form has its tag value method equals to get. 32 | * 33 | * @param request the request send by the client to the server 34 | * @param response the response send by the server to the client 35 | * @throws ServletException if an error occurred 36 | * @throws IOException if an error occurred 37 | */ 38 | public void doGet(HttpServletRequest request, HttpServletResponse response) 39 | throws ServletException, IOException { 40 | response.setContentType("text/html"); 41 | PrintWriter out = response.getWriter(); 42 | String DriverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; 43 | String url = "jdbc:sqlserver://localhost:1433;Database=hotel_db"; 44 | String user = "sa"; 45 | String pwd = "160510111xyj"; 46 | String checkinTime = request.getParameter("checkInTime"); 47 | String checkOutTime = request.getParameter("checkOutTime"); 48 | // try { 49 | // java.util.Date checkInDate = fmt.parse(checkinTime); 50 | // java.util.Date checkOutDate = fmt.parse(checkOutTime); 51 | // } catch (ParseException e1) { 52 | // // TODO Auto-generated catch block 53 | // e1.printStackTrace(); 54 | // } 55 | String sql = "select room.roomType,roomTypeAndPrice.price,room.roomNumber from room inner join roomTypeAndPrice on room.roomType = roomTypeAndPrice.roomType where roomNumber not in (select orders.roomNumber from orders where((orders.checkInTime between '"+checkinTime+"' and '"+checkOutTime+"')) or ((orders.checkOutTime between '"+checkinTime+"' and '"+checkOutTime+"')))"; 56 | java.sql.Connection conn; 57 | try { 58 | Class.forName(DriverName); 59 | try { 60 | conn = DriverManager.getConnection(url,user,pwd); 61 | PreparedStatement ps = conn.prepareStatement(sql); 62 | ResultSet rs = ps.executeQuery(); 63 | List list = new ArrayList(); 64 | while(rs.next()){ 65 | String roomType = rs.getString("roomType"); 66 | String roomNumber = rs.getString("roomNumber"); 67 | String price = rs.getString("price"); 68 | 69 | Map e = new HashMap(); 70 | e.put("roomType", roomType); 71 | e.put("roomNumber",roomNumber); 72 | e.put("price", price); 73 | list.add(e); 74 | } 75 | JSONArray json = JSONArray.fromObject(list); 76 | out.print(json); 77 | } catch (SQLException e) { 78 | e.printStackTrace(); 79 | } 80 | } catch (ClassNotFoundException e) { 81 | e.printStackTrace(); 82 | } 83 | 84 | } 85 | 86 | /** 87 | * The doPost method of the servlet.
88 | * 89 | * This method is called when a form has its tag value method equals to post. 90 | * 91 | * @param request the request send by the client to the server 92 | * @param response the response send by the server to the client 93 | * @throws ServletException if an error occurred 94 | * @throws IOException if an error occurred 95 | */ 96 | public void doPost(HttpServletRequest request, HttpServletResponse response) 97 | throws ServletException, IOException { 98 | doGet(request,response); 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /src/servlet/SearchInfoServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.net.URLDecoder; 6 | import java.sql.Connection; 7 | import java.sql.Date; 8 | import java.sql.DriverManager; 9 | import java.sql.ResultSet; 10 | import java.sql.SQLException; 11 | import java.sql.Statement; 12 | import java.util.ArrayList; 13 | import java.util.HashMap; 14 | import java.util.List; 15 | import java.util.Map; 16 | 17 | import javax.servlet.ServletException; 18 | import javax.servlet.http.HttpServlet; 19 | import javax.servlet.http.HttpServletRequest; 20 | import javax.servlet.http.HttpServletResponse; 21 | 22 | import net.sf.json.JSONArray; 23 | 24 | public class SearchInfoServlet extends HttpServlet { 25 | 26 | /** 27 | * The doGet method of the servlet.
28 | * 29 | * This method is called when a form has its tag value method equals to get. 30 | * 31 | * @param request the request send by the client to the server 32 | * @param response the response send by the server to the client 33 | * @throws ServletException if an error occurred 34 | * @throws IOException if an error occurred 35 | */ 36 | public void doGet(HttpServletRequest request, HttpServletResponse response) 37 | throws ServletException, IOException { 38 | PrintWriter out = response.getWriter(); 39 | //初始化 40 | String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; 41 | String url = "jdbc:sqlserver://localhost:1433;Database=hotel_db"; 42 | String user = "sa"; 43 | String pwd = "160510111xyj"; 44 | String orderProperty = request.getParameter("orderProperty");//获取查询订单的类别 45 | String SearchInfo = request.getParameter("SearchInfo"); 46 | SearchInfo = URLDecoder.decode(SearchInfo,"utf-8"); 47 | System.out.println(orderProperty); 48 | System.out.println(SearchInfo); 49 | String sql_order = "declare @Type varchar(25),@para varchar(25) set @Type = '"+orderProperty+"' set @para = '"+SearchInfo+"' exec ChooseSearchInfo @para,@Type";//订单视图查询语句 50 | Connection conn = null; 51 | try { 52 | Class.forName(driverName); 53 | try { 54 | conn = DriverManager.getConnection(url,user,pwd); 55 | Statement st = conn.createStatement(); 56 | ResultSet rs = st.executeQuery(sql_order); 57 | List list = new ArrayList(); 58 | if(rs.next()){ 59 | do{ 60 | String orderNumber = rs.getString("orderNumber"); 61 | String orderStatus = rs.getString("orderStatus"); 62 | String customerName = rs.getString("customerName"); 63 | String roomNumber = rs.getString("roomNumber"); 64 | String roomType = rs.getString("roomType"); 65 | String orderTime = rs.getString("orderTime"); 66 | String checkInTime = rs.getString("checkInTime"); 67 | String checkOutTime = rs.getString("checkOutTime"); 68 | String customerPhoneNumber = rs.getString("customerPhoneNumber"); 69 | String totalMoney = rs.getString("totalMoney"); 70 | Map e = new HashMap(); 71 | e.put("orderNumber", orderNumber); 72 | e.put("orderStatus",orderStatus); 73 | e.put("customerName",customerName); 74 | e.put("roomNumber",roomNumber); 75 | e.put("roomType",roomType); 76 | e.put("orderTime",orderTime); 77 | e.put("checkInTime",checkInTime); 78 | e.put("checkOutTime",checkOutTime); 79 | e.put("customerPhoneNumber",customerPhoneNumber); 80 | e.put("totalMoney",totalMoney); 81 | list.add(e); 82 | }while(rs.next()); 83 | }else{ 84 | System.out.println("没有结果"); 85 | } 86 | JSONArray json = JSONArray.fromObject(list); 87 | out.print(json); 88 | } catch (SQLException e) { 89 | // TODO Auto-generated catch block 90 | e.printStackTrace(); 91 | } 92 | } catch (ClassNotFoundException e) { 93 | // TODO Auto-generated catch block 94 | e.printStackTrace(); 95 | } 96 | 97 | } 98 | 99 | /** 100 | * The doPost method of the servlet.
101 | * 102 | * This method is called when a form has its tag value method equals to post. 103 | * 104 | * @param request the request send by the client to the server 105 | * @param response the response send by the server to the client 106 | * @throws ServletException if an error occurred 107 | * @throws IOException if an error occurred 108 | */ 109 | public void doPost(HttpServletRequest request, HttpServletResponse response) 110 | throws ServletException, IOException { 111 | doGet(request, response); 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /src/servlet/TimeExtensionServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import java.io.Console; 4 | import java.io.IOException; 5 | import java.io.PrintWriter; 6 | import java.sql.Connection; 7 | import java.sql.DriverManager; 8 | import java.sql.ResultSet; 9 | import java.sql.SQLException; 10 | import java.sql.Statement; 11 | import java.util.*; 12 | 13 | import javax.servlet.ServletException; 14 | import javax.servlet.http.HttpServlet; 15 | import javax.servlet.http.HttpServletRequest; 16 | import javax.servlet.http.HttpServletResponse; 17 | 18 | import net.sf.json.JSONArray; 19 | 20 | public class TimeExtensionServlet extends HttpServlet { 21 | 22 | /** 23 | * The doGet method of the servlet.
24 | * 25 | * This method is called when a form has its tag value method equals to get. 26 | * 27 | * @param request the request send by the client to the server 28 | * @param response the response send by the server to the client 29 | * @throws ServletException if an error occurred 30 | * @throws IOException if an error occurred 31 | */ 32 | public void doGet(HttpServletRequest request, HttpServletResponse response) 33 | throws ServletException, IOException { 34 | PrintWriter out = response.getWriter(); 35 | //初始化 36 | String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; 37 | String url = "jdbc:sqlserver://localhost:1433;Database=hotel_db"; 38 | String user = "sa"; 39 | String pwd = "160510111xyj"; 40 | //获取数据 41 | String addMoney = request.getParameter("addMoney"); 42 | String orderNumber = request.getParameter("orderNumber"); 43 | String oldExpiryTime = request.getParameter("oldExpiryTime"); 44 | String newExpiryTime = request.getParameter("newExpiryTime"); 45 | String sql = "insert timeExtension values("+orderNumber+",'"+oldExpiryTime+"','"+newExpiryTime+"',"+addMoney+")"; 46 | Connection conn = null; 47 | try { 48 | Class.forName(driverName); 49 | try { 50 | conn = DriverManager.getConnection(url,user,pwd); 51 | Statement st = conn.createStatement(); 52 | st.execute(sql); 53 | System.out.print("续费成功"); 54 | } catch (SQLException e) { 55 | // TODO Auto-generated catch block 56 | e.printStackTrace(); 57 | } 58 | } catch (ClassNotFoundException e) { 59 | // TODO Auto-generated catch block 60 | e.printStackTrace(); 61 | } 62 | } 63 | 64 | /** 65 | * The doPost method of the servlet.
66 | * 67 | * This method is called when a form has its tag value method equals to post. 68 | * 69 | * @param request the request send by the client to the server 70 | * @param response the response send by the server to the client 71 | * @throws ServletException if an error occurred 72 | * @throws IOException if an error occurred 73 | */ 74 | public void doPost(HttpServletRequest request, HttpServletResponse response) 75 | throws ServletException, IOException { 76 | doGet(request, response); 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /src/servlet/arriveServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.sql.Connection; 6 | import java.sql.DriverManager; 7 | import java.sql.ResultSet; 8 | import java.sql.SQLException; 9 | import java.sql.Statement; 10 | import java.util.*; 11 | 12 | import javax.servlet.ServletException; 13 | import javax.servlet.http.HttpServlet; 14 | import javax.servlet.http.HttpServletRequest; 15 | import javax.servlet.http.HttpServletResponse; 16 | 17 | import net.sf.json.JSONArray; 18 | 19 | public class arriveServlet extends HttpServlet { 20 | public void doGet(HttpServletRequest request, HttpServletResponse response) 21 | throws ServletException, IOException { 22 | response.setContentType("text/html"); 23 | request.setCharacterEncoding("utf-8"); 24 | response.setCharacterEncoding("utf-8"); 25 | PrintWriter out = response.getWriter(); 26 | //��ʼ�� 27 | String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; 28 | String url = "jdbc:sqlserver://localhost:1433;Database=hotel_db"; 29 | String user = "sa"; 30 | String pwd = "160510111xyj"; 31 | String customerIDCard = request.getParameter("customerIDCard"); 32 | String sql_leave = "update orders set orderStatus = '已入住' where orders.customerIDCard = '"+customerIDCard+"'"; 33 | String sql_query = "select * from orders where customerIDCard = '"+customerIDCard+"'"; 34 | Connection conn = null; 35 | try { 36 | Class.forName(driverName); 37 | try { 38 | conn = DriverManager.getConnection(url,user,pwd); 39 | Statement st = conn.createStatement(); 40 | st.execute(sql_leave); 41 | System.out.print("��ס�ɹ�!"); 42 | ResultSet rs = st.executeQuery(sql_query); 43 | List list = new ArrayList(); 44 | while(rs.next()){ 45 | String orderNumber = rs.getString("orderNumber"); 46 | String orderStatus = rs.getString("orderStatus"); 47 | customerIDCard = rs.getString("customerIDCard"); 48 | String roomNumber = rs.getString("roomNumber"); 49 | String checkInTime = rs.getString("checkInTime"); 50 | String checkOutTime = rs.getString("checkOutTime"); 51 | String totalMoney = rs.getString("totalMoney"); 52 | String orderTime = rs.getString("orderTime"); 53 | Map e = new HashMap(); 54 | e.put("orderNumber", orderNumber); 55 | e.put("orderStatus",orderStatus); 56 | e.put("customerIDCard", customerIDCard); 57 | e.put("roomNumber",roomNumber); 58 | e.put("checkInTime",checkInTime); 59 | e.put("checkOutTime",checkOutTime); 60 | e.put("totalMoney",totalMoney); 61 | e.put("orderTime",orderTime); 62 | list.add(e); 63 | } 64 | JSONArray json = JSONArray.fromObject(list); 65 | out.print(json); 66 | } catch (SQLException e) { 67 | // TODO Auto-generated catch block 68 | e.printStackTrace(); 69 | } 70 | } catch (ClassNotFoundException e) { 71 | // TODO Auto-generated catch block 72 | e.printStackTrace(); 73 | } 74 | } 75 | 76 | 77 | public void doPost(HttpServletRequest request, HttpServletResponse response) 78 | throws ServletException, IOException { 79 | doGet(request,response); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /src/servlet/checkinServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.sql.Connection; 6 | import java.sql.DriverManager; 7 | import java.sql.PreparedStatement; 8 | import java.sql.ResultSet; 9 | import java.sql.SQLException; 10 | import java.sql.Statement; 11 | import java.text.SimpleDateFormat; 12 | import java.util.Date; 13 | import java.util.Map; 14 | 15 | import javax.servlet.ServletException; 16 | import javax.servlet.http.HttpServlet; 17 | import javax.servlet.http.HttpServletRequest; 18 | import javax.servlet.http.HttpServletResponse; 19 | import javax.servlet.http.HttpSession; 20 | 21 | import net.sf.json.JSONArray; 22 | 23 | public class checkinServlet extends HttpServlet { 24 | public void doGet(HttpServletRequest request, HttpServletResponse response) 25 | throws ServletException, IOException { 26 | response.setContentType("text/html"); 27 | request.setCharacterEncoding("utf-8"); 28 | response.setCharacterEncoding("utf-8"); 29 | PrintWriter out = response.getWriter(); 30 | //��ʼ�� 31 | String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; 32 | String url = "jdbc:sqlserver://localhost:1433;Database=hotel_db"; 33 | String user = "sa"; 34 | String pwd = "160510111xyj"; 35 | //��ҳ���ȡ���� 36 | String checkinTime = request.getParameter("checkInTime"); 37 | String checkOutTime = request.getParameter("checkOutTime"); 38 | String customerName = request.getParameter("customerName"); 39 | String customerIDCard = request.getParameter("customerIDCard"); 40 | String customerGender = request.getParameter("customerGender"); 41 | String remarks = request.getParameter("remarks"); 42 | String roomNumber = request.getParameter("roomNumber"); 43 | String customerPhoneNumber = request.getParameter("customerPhoneNumber"); 44 | String price = request.getParameter("price"); 45 | String orderStatus = "预订中"; 46 | //��ȡ��ǰʱ�� 47 | Date now = new Date(); 48 | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");//���Է�����޸����ڸ�ʽ 49 | String orderTime = dateFormat.format(now); 50 | // System.out.print(orderTime); 51 | Connection conn; 52 | String sql_customer = "insert customers values('"+customerIDCard+"','"+customerGender+"','"+customerName+"','"+customerPhoneNumber+"',"+price+")"; 53 | String sql_orders = "insert orders values('"+orderStatus+"','"+customerIDCard+"','"+roomNumber+"','"+checkinTime+"','"+checkOutTime+"',"+price+",'"+orderTime+"')"; 54 | try { 55 | Class.forName(driverName); 56 | try { 57 | conn = DriverManager.getConnection(url,user,pwd); 58 | Statement st = conn.createStatement(); 59 | st.executeUpdate(sql_customer); 60 | st.executeUpdate(sql_orders); 61 | System.out.print("����ɹ���"); 62 | } catch (SQLException e) { 63 | e.printStackTrace(); 64 | } 65 | } catch (ClassNotFoundException e) { 66 | e.printStackTrace(); 67 | } 68 | 69 | 70 | } 71 | public void doPost(HttpServletRequest request, HttpServletResponse response) 72 | throws ServletException, IOException { 73 | doGet(request, response); 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /src/servlet/getPriceServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.sql.Connection; 6 | import java.sql.DriverManager; 7 | import java.sql.ResultSet; 8 | import java.sql.SQLException; 9 | import java.sql.Statement; 10 | import java.util.*; 11 | 12 | import javax.servlet.ServletException; 13 | import javax.servlet.http.HttpServlet; 14 | import javax.servlet.http.HttpServletRequest; 15 | import javax.servlet.http.HttpServletResponse; 16 | 17 | import net.sf.json.JSONArray; 18 | 19 | public class getPriceServlet extends HttpServlet { 20 | 21 | /** 22 | * The doGet method of the servlet.
23 | * 24 | * This method is called when a form has its tag value method equals to get. 25 | * 26 | * @param request the request send by the client to the server 27 | * @param response the response send by the server to the client 28 | * @throws ServletException if an error occurred 29 | * @throws IOException if an error occurred 30 | */ 31 | public void doGet(HttpServletRequest request, HttpServletResponse response) 32 | throws ServletException, IOException { 33 | response.setContentType("text/html"); 34 | request.setCharacterEncoding("utf-8"); 35 | response.setCharacterEncoding("utf-8"); 36 | PrintWriter out = response.getWriter(); 37 | 38 | String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; 39 | String url = "jdbc:sqlserver://localhost:1433;Database=hotel_db"; 40 | String user = "sa"; 41 | String pwd = "160510111xyj"; 42 | String customerIDCard = request.getParameter("customerIDCard"); 43 | String roomNumber = request.getParameter("roomNumber"); 44 | String addDay = request.getParameter("addDay"); 45 | String sql = "declare @customerIDCard char(18),@addMoney int,@orderNumber int,@oldExpiryTime date,@newExpiryTime date exec dbo.getPrice '"+customerIDCard+"','"+roomNumber+"',"+addDay+",@addMoney output,@orderNumber output,@oldExpiryTime output,@newExpiryTime output select @addMoney as addMoney,@orderNumber as orderNumber,@oldExpiryTime as oldExpiryTime,@newExpiryTime as newExpiryTime"; 46 | Connection conn = null; 47 | try { 48 | Class.forName(driverName); 49 | try { 50 | conn = DriverManager.getConnection(url,user,pwd); 51 | Statement st = conn.createStatement(); 52 | ResultSet rs = st.executeQuery(sql); 53 | List list = new ArrayList(); 54 | while(rs.next()){ 55 | String addMoney = rs.getString("addMoney"); 56 | String orderNumber = rs.getString("orderNumber"); 57 | String oldExpiryTime = rs.getString("oldExpiryTime"); 58 | String newExpiryTime = rs.getString("newExpiryTime"); 59 | Map e = new HashMap(); 60 | e.put("addMoney", addMoney); 61 | e.put("orderNumber",orderNumber); 62 | e.put("oldExpiryTime",oldExpiryTime); 63 | e.put("newExpiryTime",newExpiryTime); 64 | list.add(e); 65 | } 66 | JSONArray json = JSONArray.fromObject(list); 67 | System.out.println(json); 68 | out.print(json); 69 | } catch (SQLException e) { 70 | // TODO Auto-generated catch block 71 | e.printStackTrace(); 72 | } 73 | } catch (ClassNotFoundException e) { 74 | // TODO Auto-generated catch block 75 | e.printStackTrace(); 76 | } 77 | 78 | } 79 | 80 | /** 81 | * The doPost method of the servlet.
82 | * 83 | * This method is called when a form has its tag value method equals to post. 84 | * 85 | * @param request the request send by the client to the server 86 | * @param response the response send by the server to the client 87 | * @throws ServletException if an error occurred 88 | * @throws IOException if an error occurred 89 | */ 90 | public void doPost(HttpServletRequest request, HttpServletResponse response) 91 | throws ServletException, IOException { 92 | doGet(request,response); 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/servlet/leaveServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.sql.Connection; 6 | import java.sql.DriverManager; 7 | import java.sql.ResultSet; 8 | import java.sql.SQLException; 9 | import java.sql.Statement; 10 | import java.util.*; 11 | 12 | import javax.servlet.ServletException; 13 | import javax.servlet.http.HttpServlet; 14 | import javax.servlet.http.HttpServletRequest; 15 | import javax.servlet.http.HttpServletResponse; 16 | 17 | import net.sf.json.JSONArray; 18 | 19 | public class leaveServlet extends HttpServlet { 20 | public void doGet(HttpServletRequest request, HttpServletResponse response) 21 | throws ServletException, IOException { 22 | response.setContentType("text/html"); 23 | request.setCharacterEncoding("utf-8"); 24 | response.setCharacterEncoding("utf-8"); 25 | PrintWriter out = response.getWriter(); 26 | //��ʼ�� 27 | String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; 28 | String url = "jdbc:sqlserver://localhost:1433;Database=hotel_db"; 29 | String user = "sa"; 30 | String pwd = "160510111xyj"; 31 | String customerIDCard = request.getParameter("customerIDCard"); 32 | String sql_leave = "update orders set orderStatus = '已退房' where orders.customerIDCard = '"+customerIDCard+"'"; 33 | String sql_query = "select * from orders where customerIDCard = '"+customerIDCard+"'"; 34 | Connection conn = null; 35 | try { 36 | Class.forName(driverName); 37 | try { 38 | conn = DriverManager.getConnection(url,user,pwd); 39 | Statement st = conn.createStatement(); 40 | st.execute(sql_leave); 41 | System.out.print("�˷��ɹ�!"); 42 | ResultSet rs = st.executeQuery(sql_query); 43 | List list = new ArrayList(); 44 | while(rs.next()){ 45 | String orderNumber = rs.getString("orderNumber"); 46 | String orderStatus = rs.getString("orderStatus"); 47 | customerIDCard = rs.getString("customerIDCard"); 48 | String roomNumber = rs.getString("roomNumber"); 49 | String checkInTime = rs.getString("checkInTime"); 50 | String checkOutTime = rs.getString("checkOutTime"); 51 | String totalMoney = rs.getString("totalMoney"); 52 | String orderTime = rs.getString("orderTime"); 53 | Map e = new HashMap(); 54 | e.put("orderNumber", orderNumber); 55 | e.put("orderStatus",orderStatus); 56 | e.put("customerIDCard", customerIDCard); 57 | e.put("roomNumber",roomNumber); 58 | e.put("checkInTime",checkInTime); 59 | e.put("checkOutTime",checkOutTime); 60 | e.put("totalMoney",totalMoney); 61 | e.put("orderTime",orderTime); 62 | list.add(e); 63 | } 64 | JSONArray json = JSONArray.fromObject(list); 65 | out.print(json); 66 | } catch (SQLException e) { 67 | // TODO Auto-generated catch block 68 | e.printStackTrace(); 69 | } 70 | } catch (ClassNotFoundException e) { 71 | // TODO Auto-generated catch block 72 | e.printStackTrace(); 73 | } 74 | } 75 | 76 | 77 | public void doPost(HttpServletRequest request, HttpServletResponse response) 78 | throws ServletException, IOException { 79 | doGet(request,response); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /src/servlet/loginServlet.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | import java.io.IOException; 3 | import java.io.PrintWriter; 4 | import java.sql.Connection; 5 | import java.sql.DriverManager; 6 | import java.sql.PreparedStatement; 7 | import java.sql.ResultSet; 8 | import java.sql.SQLException; 9 | 10 | import javax.servlet.ServletException; 11 | import javax.servlet.http.HttpServlet; 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpServletResponse; 14 | import javax.servlet.http.HttpSession; 15 | 16 | 17 | public class loginServlet extends HttpServlet { 18 | 19 | /** 20 | * The doGet method of the servlet.
21 | * 22 | * This method is called when a form has its tag value method equals to get. 23 | * 24 | * @param request the request send by the client to the server 25 | * @param response the response send by the server to the client 26 | * @throws ServletException if an error occurred 27 | * @throws IOException if an error occurred 28 | */ 29 | public void doGet(HttpServletRequest request, HttpServletResponse response) 30 | throws ServletException, IOException { 31 | response.setContentType("text/html"); 32 | String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; 33 | String url = "jdbc:sqlserver://localhost:1433;Database=db"; 34 | String user = "sa"; 35 | String pwd = "160510111xyj"; 36 | String username = request.getParameter("user"); 37 | String upwd = request.getParameter("pwd"); 38 | PrintWriter out = response.getWriter(); 39 | Connection conn; 40 | try { 41 | Class.forName(driverName); 42 | try{ 43 | conn = DriverManager.getConnection(url,user,pwd); 44 | String sql = "select *from usertab where uid = ?"; 45 | PreparedStatement ps = conn.prepareStatement(sql); 46 | ps.setString(1, username); 47 | ResultSet rs = ps.executeQuery(); 48 | String mima = ""; 49 | while(rs.next()){ 50 | mima = rs.getString("upwd").trim(); 51 | } 52 | 53 | if(mima.equals(upwd)){ 54 | HttpSession session = request.getSession(); 55 | session.setAttribute("un", username); 56 | out.println("true"); 57 | //request.getRequestDispatcher("welcome.jsp").forward(request, response); 58 | } 59 | else{ 60 | out.println("false"); 61 | //request.getRequestDispatcher("index.jsp").forward(request, response); 62 | } 63 | }catch(SQLException e){ 64 | e.printStackTrace(); 65 | } 66 | } catch (ClassNotFoundException e) { 67 | // TODO Auto-generated catch block 68 | e.printStackTrace(); 69 | } 70 | } 71 | 72 | /** 73 | * The doPost method of the servlet.
74 | * 75 | * This method is called when a form has its tag value method equals to post. 76 | * 77 | * @param request the request send by the client to the server 78 | * @param response the response send by the server to the client 79 | * @throws ServletException if an error occurred 80 | * @throws IOException if an error occurred 81 | */ 82 | public void doPost(HttpServletRequest request, HttpServletResponse response) 83 | throws ServletException, IOException { 84 | doGet(request, response); 85 | } 86 | 87 | } 88 | --------------------------------------------------------------------------------