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