blob: e83627c0b6bd898d5cbf26655ff8b0c8c58b41dd [file] [log] [blame]
Hongqing Liufd5ee812014-05-10 16:32:51 +08001<html><body><pre>
刘洪青6266f992017-05-15 21:21:03 +08002&lt;%--
Hongqing Liufd5ee812014-05-10 16:32:51 +08003 Licensed to the Apache Software Foundation (ASF) under one or more
4 contributor license agreements. See the NOTICE file distributed with
5 this work for additional information regarding copyright ownership.
6 The ASF licenses this file to You under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with
8 the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
刘洪青6266f992017-05-15 21:21:03 +080017--%>
18&lt;HTML>
19&lt;HEAD>&lt;TITLE>
20 Calendar: A JSP APPLICATION
Hongqing Liufd5ee812014-05-10 16:32:51 +080021&lt;/TITLE>&lt;/HEAD>
22
23
24&lt;BODY BGCOLOR="white">
25
26&lt;%@ page language="java" import="cal.*" %>
27&lt;jsp:useBean id="table" scope="session" class="cal.TableBean" />
28
29&lt;%
刘洪青6266f992017-05-15 21:21:03 +080030 table.processRequest(request);
31 if (table.getProcessError() == false) {
Hongqing Liufd5ee812014-05-10 16:32:51 +080032%>
33
34&lt;!-- html table goes here -->
35&lt;CENTER>
36&lt;TABLE WIDTH=60% BGCOLOR=yellow CELLPADDING=15>
37&lt;TR>
38&lt;TD ALIGN=CENTER> &lt;A HREF=cal1.jsp?date=prev> prev &lt;/A>
39&lt;TD ALIGN=CENTER> Calendar:&lt;%= table.getDate() %>&lt;/TD>
40&lt;TD ALIGN=CENTER> &lt;A HREF=cal1.jsp?date=next> next &lt;/A>
41&lt;/TR>
42&lt;/TABLE>
43
44&lt;!-- the main table -->
45&lt;TABLE WIDTH=60% BGCOLOR=lightblue BORDER=1 CELLPADDING=10>
46&lt;TR>
47&lt;TH> Time &lt;/TH>
48&lt;TH> Appointment &lt;/TH>
49&lt;/TR>
50&lt;FORM METHOD=POST ACTION=cal1.jsp>
51&lt;%
刘洪青6266f992017-05-15 21:21:03 +080052 for(int i=0; i&lt;table.getEntries().getRows(); i++) {
53 cal.Entry entr = table.getEntries().getEntry(i);
Hongqing Liufd5ee812014-05-10 16:32:51 +080054%>
刘洪青6266f992017-05-15 21:21:03 +080055 &lt;TR>
56 &lt;TD>
57 &lt;A HREF=cal2.jsp?time=&lt;%= entr.getHour() %>>
58 &lt;%= entr.getHour() %> &lt;/A>
59 &lt;/TD>
60 &lt;TD BGCOLOR=&lt;%= entr.getColor() %>>
61 &lt;% out.print(util.HTMLFilter.filter(entr.getDescription())); %>
62 &lt;/TD>
63 &lt;/TR>
Hongqing Liufd5ee812014-05-10 16:32:51 +080064&lt;%
刘洪青6266f992017-05-15 21:21:03 +080065 }
Hongqing Liufd5ee812014-05-10 16:32:51 +080066%>
67&lt;/FORM>
68&lt;/TABLE>
69&lt;BR>
70
71&lt;!-- footer -->
72&lt;TABLE WIDTH=60% BGCOLOR=yellow CELLPADDING=15>
73&lt;TR>
刘洪青6266f992017-05-15 21:21:03 +080074&lt;TD ALIGN=CENTER> &lt;% out.print(util.HTMLFilter.filter(table.getName())); %> :
75 &lt;% out.print(util.HTMLFilter.filter(table.getEmail())); %> &lt;/TD>
Hongqing Liufd5ee812014-05-10 16:32:51 +080076&lt;/TR>
77&lt;/TABLE>
78&lt;/CENTER>
79
80&lt;%
刘洪青6266f992017-05-15 21:21:03 +080081 } else {
Hongqing Liufd5ee812014-05-10 16:32:51 +080082%>
83&lt;font size=5>
刘洪青6266f992017-05-15 21:21:03 +080084 You must enter your name and email address correctly.
Hongqing Liufd5ee812014-05-10 16:32:51 +080085&lt;/font>
86&lt;%
刘洪青6266f992017-05-15 21:21:03 +080087 }
Hongqing Liufd5ee812014-05-10 16:32:51 +080088%>
89
90
91&lt;/BODY>
92&lt;/HTML>
93
94
Hongqing Liufd5ee812014-05-10 16:32:51 +080095</pre></body></html>