| Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 1 | <html><body><pre>
 | 
| 刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 2 | <%--
 | 
| Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 3 |  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.
 | 
| 刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 17 | --%>
 | 
 | 18 | <HTML>
 | 
 | 19 | <HEAD><TITLE>
 | 
 | 20 |     Calendar: A JSP APPLICATION
 | 
| Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 21 | </TITLE></HEAD>
 | 
 | 22 | 
 | 
 | 23 | 
 | 
 | 24 | <BODY BGCOLOR="white">
 | 
 | 25 | 
 | 
 | 26 | <%@ page language="java" import="cal.*" %>
 | 
 | 27 | <jsp:useBean id="table" scope="session" class="cal.TableBean" />
 | 
 | 28 | 
 | 
 | 29 | <%
 | 
| 刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 30 |     table.processRequest(request);
 | 
 | 31 |     if (table.getProcessError() == false) {
 | 
| Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 32 | %>
 | 
 | 33 | 
 | 
 | 34 | <!-- html table goes here -->
 | 
 | 35 | <CENTER>
 | 
 | 36 | <TABLE WIDTH=60% BGCOLOR=yellow CELLPADDING=15>
 | 
 | 37 | <TR>
 | 
 | 38 | <TD ALIGN=CENTER> <A HREF=cal1.jsp?date=prev> prev </A>
 | 
 | 39 | <TD ALIGN=CENTER> Calendar:<%= table.getDate() %></TD>
 | 
 | 40 | <TD ALIGN=CENTER> <A HREF=cal1.jsp?date=next> next </A>
 | 
 | 41 | </TR>
 | 
 | 42 | </TABLE>
 | 
 | 43 | 
 | 
 | 44 | <!-- the main table -->
 | 
 | 45 | <TABLE WIDTH=60% BGCOLOR=lightblue BORDER=1 CELLPADDING=10>
 | 
 | 46 | <TR>
 | 
 | 47 | <TH> Time </TH>
 | 
 | 48 | <TH> Appointment </TH>
 | 
 | 49 | </TR>
 | 
 | 50 | <FORM METHOD=POST ACTION=cal1.jsp>
 | 
 | 51 | <%
 | 
| 刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 52 |     for(int i=0; i<table.getEntries().getRows(); i++) {
 | 
 | 53 |        cal.Entry entr = table.getEntries().getEntry(i);
 | 
| Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 54 | %>
 | 
| 刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 55 |     <TR>
 | 
 | 56 |     <TD>
 | 
 | 57 |     <A HREF=cal2.jsp?time=<%= entr.getHour() %>>
 | 
 | 58 |         <%= entr.getHour() %> </A>
 | 
 | 59 |     </TD>
 | 
 | 60 |     <TD BGCOLOR=<%= entr.getColor() %>>
 | 
 | 61 |     <% out.print(util.HTMLFilter.filter(entr.getDescription())); %>
 | 
 | 62 |     </TD>
 | 
 | 63 |     </TR>
 | 
| Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 64 | <%
 | 
| 刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 65 |     }
 | 
| Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 66 | %>
 | 
 | 67 | </FORM>
 | 
 | 68 | </TABLE>
 | 
 | 69 | <BR>
 | 
 | 70 | 
 | 
 | 71 | <!-- footer -->
 | 
 | 72 | <TABLE WIDTH=60% BGCOLOR=yellow CELLPADDING=15>
 | 
 | 73 | <TR>
 | 
| 刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 74 | <TD ALIGN=CENTER>  <% out.print(util.HTMLFilter.filter(table.getName())); %> :
 | 
 | 75 |              <% out.print(util.HTMLFilter.filter(table.getEmail())); %> </TD>
 | 
| Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 76 | </TR>
 | 
 | 77 | </TABLE>
 | 
 | 78 | </CENTER>
 | 
 | 79 | 
 | 
 | 80 | <%
 | 
| 刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 81 |     } else {
 | 
| Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 82 | %>
 | 
 | 83 | <font size=5>
 | 
| 刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 84 |     You must enter your name and email address correctly.
 | 
| Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 85 | </font>
 | 
 | 86 | <%
 | 
| 刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 87 |     }
 | 
| Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 88 | %>
 | 
 | 89 | 
 | 
 | 90 | 
 | 
 | 91 | </BODY>
 | 
 | 92 | </HTML>
 | 
 | 93 | 
 | 
 | 94 | 
 | 
| Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 95 | </pre></body></html>
 |