-
Notifications
You must be signed in to change notification settings - Fork 0
/
caldisplay.asp
137 lines (106 loc) · 3.21 KB
/
caldisplay.asp
1
2
3
4
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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
<!--#include virtual="/eVacation/common/appglobal.asp" -->
<!-- #include virtual="/evacation/common/objects/calendar.asp" -->
<!--#include virtual="/eVacation/common/calendarfunctions.asp" -->
<%
strCurrentPageName = "Calendar"
'**** INITIALISE CURRENT USER AND EE TO VIEW OBJECTS ****
mInitialiseCurrentUser
mWriteHMTLTop strCurrentPageName
mWriteNavBar strCurrentPageName
%>
<script language="javascript">
var monthStart;
var monthEnd;
var yearOfCal;
//FUNCTIONS TO CHOOSE SECTIONS TO VIEW
function qtr1() {
var now = new Date();
monthStart = 1;
monthEnd = 3;
yearOfCal = now.getFullYear();
document.form1.startMonth.value = monthStart;
document.form1.monthsToDisplay.value = monthEnd;
if (document.form1.yearOfCal.value == '') {
document.form1.yearOfCal.value = yearOfCal;
}
}
function qtr2() {
var now = new Date();
monthStart = 4;
monthEnd = 3;
yearOfCal = now.getFullYear();
document.form1.startMonth.value = monthStart;
document.form1.monthsToDisplay.value = monthEnd;
if (document.form1.yearOfCal.value == '') {
document.form1.yearOfCal.value = yearOfCal;
}
}
function qtr3() {
var now = new Date();
monthStart = 7;
monthEnd = 3;
yearOfCal = now.getFullYear();
document.form1.startMonth.value = monthStart;
document.form1.monthsToDisplay.value = monthEnd;
if (document.form1.yearOfCal.value == '') {
document.form1.yearOfCal.value = yearOfCal;
}
}
function qtr4() {
var now = new Date();
monthStart = 10;
monthEnd = 3;
yearOfCal = now.getFullYear();
document.form1.startMonth.value = monthStart;
document.form1.monthsToDisplay.value = monthEnd;
if (document.form1.yearOfCal.value == '') {
document.form1.yearOfCal.value = yearOfCal;
}
}
//FUNCTION TO CHOOSE TO VIEW THE FULL YEAR
function fullYear() {
var now = new Date();
monthStart = 1;
monthEnd = 12;
yearOfCal = now.getFullYear();
document.form1.startMonth.value = monthStart;
document.form1.monthsToDisplay.value = monthEnd;
if (document.form1.yearOfCal.value == '') {
document.form1.yearOfCal.value = yearOfCal;
}
}
</script>
<table class='pageContentWidth'>
<form method="post" name="form1" action="yearlycalendar.asp" >
<tr>
<!--BUTTONS TO FILL THE FIELDS WITH INFORMATION-->
<td colspan="2" align="center"><input type="button" value="1st QTR" onclick="qtr1()" class="tbcontent">
<input type="button" value="2nd QTR" onclick="qtr2()" class="tbcontent">
<input type="button" value="3rd QTR" onclick="qtr3()" class="tbcontent">
<input type="button" value="4th QTR" onclick="qtr4()" class="tbcontent">
<input type="button" value="Full Year" onclick="fullYear()" class="tbcontent"></td>
</tr>
<tr>
<td style='width:50%'>First Month: <tt>(As Number, e.g. January = 1)</tt></td>
<td style='width:50%'><input type="text" name="startMonth" ID="Text1"></td>
</tr>
<tr>
<td>Year: <tt>(As Number, e.g. 2007)</tt></td>
<td><input type="text" name="yearOfCal" ID="Text2"></td>
</tr>
<tr>
<td>Months to Display: <tt>(e.g. 12 = Full Year)</tt></td>
<td><input type="text" name="monthsToDisplay" ID="Text3"></td>
</tr>
<tr>
<!--BUTTON TO SUBMIT FORM-->
<td colspan="2" align="center">
<input type="submit" value="Submit" class="tbcontent">
</td>
</tr>
</form>
</table>
<br class="small">
<%
mWritePageFooter
%>