-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathformReport.cfm
376 lines (374 loc) · 12 KB
/
formReport.cfm
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
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
<script language="JavaScript" type="text/javascript">
<!--
function validateForm(form)
{
if (form.ReportID.options[ form.ReportID.selectedIndex ].value == 0)
{
alert("Please choose a report type");
return false;
}
/*if ((form.QuarterID.options[ form.QuarterID.selectedIndex ].value != 0) &&
(form.Year.options[ form.Year.selectedIndex ].value == 0))
{
alert("If you select a quarter, you must also select a fiscal year");
return false;
}*/
return true;
}
function switchTimes(formObj,yearType)
{
formObj.SessionDate.value = "";
switch ( yearType )
{
case 1 : formObj.CYear.selectedIndex = 0;
break;
case 2 : formObj.FYear.selectedIndex = 0;
break;
}
}
function clearYears(formObj)
{
if ( formObj.SessionDate.value != "" )
{
formObj.QuarterID.selectedIndex = 0;
formObj.CYear.selectedIndex = 0;
formObj.FYear.selectedIndex = 0;
}
}
//-->
</script>
<cfoutput>
<form action="showReport.cfm" method="post" name="Reports" id="Reports" target="_blank" onsubmit="JavaScript:return validateForm(this);">
<span class="formSectionTitle">#pageTitle#</span>
<div class="form">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" style="font-size: small; color: red">
The data you will see in any given report is determined by your user level.<br>
Most librarians can see only their own data in the reports.<br>
Instruction Coordinators and unit heads can see data for their whole unit.
<br>The UL, AUL, and ILP director can view reports of the data for all the library units.
</td>
</tr>
<tr><td><hr size="1"></td></tr>
</table>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<em class="required">*</em>Report type<br>
<select name="ReportID">
<option value="0">-select-</option>
<cfloop query="Reports">
<option value="#Reports.ReportID#">#Reports.Title#</option>
</cfloop>
</select>
<a href="sessDefs.html" target="_blank"><img src="images/help_icon.gif" alt="View definitions" border="0"></a>
</td>
</tr>
<tr><td><hr size="1"></td></tr>
</table>
<table border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<cfif SESSION.UserLevelID eq 1>
<input type="hidden" name="OwnerID" value="#SESSION.LibID#">
<cfelse>
<td>
<table>
<tr valign="top">
<cfoutput>
<td>
Library Staff Presenter(s):<br>
<select name="Presenters" multiple="multiple" size="10">
<cfloop query="Librarians">
<option value="#Librarians.LibrarianID#">#Librarians.LastName#, #Librarians.FirstName#</option>
</cfloop>
</select>
</td>
<td> </td>
<td>
Library Staff Developer(s):<br>
<select name="Developers" multiple="multiple" size="10">
<cfloop query="Librarians">
<option value="#Librarians.LibrarianID#">#Librarians.LastName#, #Librarians.FirstName#</option>
</cfloop>
</select>
</td>
<td> </td>
</cfoutput>
</tr>
</table>
<!---Library Staff Presenter<br>
<select name="OwnerID">
<option value="0">-select-</option>
<cfloop query="Librarians">
<option value="#Librarians.LibrarianID#">#Librarians.LastName#, #Librarians.FirstName#</option>
</cfloop>
</select--->
</td>
</cfif>
<td>
Contact<br>
<select name="CntctID">
<option value="0">-select-</option>
<cfloop query="Contacts">
<option value="#Contacts.ContactID#">#Contacts.LastName#, #Contacts.FirstName#</option>
</cfloop>
</select>
</td>
<!---td>
Classroom<br>
<select name="ClassID">
<option value="0">-select-</option>
<cfloop query="Classrooms">
<option value="#Classrooms.ClassroomID#">#Classrooms.Name# (#Classrooms.Building# #Classrooms.RoomNumber#)</option>
</cfloop>
</select>
</td--->
</tr>
<tr>
<td colspan="3"><hr size="1"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td colspan="5">
Select an optional date range: you can select: a full calendar year; a full fiscal year; a quarter
within a calendar or fiscal year; or a specific date. If you do not pick any of these, the report
will use the current fiscal year.
</td>
</tr>
<tr valign="top">
<td>
Quarter<br>
<cfset Lookup = "Quarter">
<cfset Header = "-select-">
<cfinclude template="uspGetLookup.cfm">
<select name="QuarterID">
<cfloop query="Quarter">
<option value="#Quarter.QuarterID#">#Quarter.Quarter#</option>
</cfloop>
</select>
</td>
<td>
Fiscal Year<br>
<select name="FYear" onchange="switchTimes(Reports,1)">
<option value="0">-select-</option>
<cfloop query="Years">
<cfif DatePart("yyyy", Now()) gt Years.TheYear>
<option value="#Years.TheYear#">#Years.TheYear#/#Years.TheYear + 1#</option>
<cfelseif DatePart("yyyy", Now()) eq Years.TheYear and DatePart("m", Now()) ge 7>
<option value="#Years.TheYear#">#Years.TheYear#/#Years.TheYear + 1#</option>
<cfelse>
</cfif>
</cfloop>
</select>
</td>
<!--td align="center">OR</td-->
<td>
Calendar Year<br>
<select name="CYear" onchange="switchTimes(Reports,2)">
<option value="0">-select-</option>
<cfloop query="Years">
<option value="#Years.TheYear#">#Years.TheYear#</option>
</cfloop>
</select>
</td>
<td>
Session Date<br>
<input type="text" name="SessionDate" size="12" maxlength="10" value="" onchange="clearYears(Reports)">
<a href="javascript:ShowCalendar(Reports,'Reports','SessionDate')">Select Date</a>
</td>
</tr>
<tr><td colspan="4"><hr size="1"></td></tr>
</table>
<table border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td>
Department | Campus Unit | Group<br/>
<cfset Lookup = "Department">
<cfset Header = "">
<cfinclude template="uspGetLookup.cfm">
<select name="SessionDepartmentID" multiple size="10">
<cfloop query="Department">
<option value="#Department.DepartmentID#">#Department.Department#</option>
</cfloop>
</select>
</td>
<td>
Academic Departments and More<br>
<cfset Lookup = "Department">
<cfset Header = "-select-">
<cfinclude template="uspGetLookup.cfm">
<select name="DepartmentID">
<cfloop query="Department">
<option value="#Department.DepartmentID#">#Department.Department#</option>
</cfloop>
</select>
</td>
<td>
Other department, college, etc.<br>
<input
name="FacultyGroup"
type="text"
size="25"
maxlength="255"
value=""
>
</td>
</tr>
<tr valign="top">
<td>
Learner category<br>
<cfset Lookup = "LearnerCategory">
<cfset Header = "">
<cfinclude template="uspGetLookup.cfm">
<select name="LearnerCategoryID" multiple size="10">
<cfloop query="LearnerCategory">
<option value="#LearnerCategory.LearnerCategoryID#">#LearnerCategory.LearnerCategory#</option>
</cfloop>
</select>
</td>
<!---td>
Affiliation<br>
<cfset Lookup = "Affiliation">
<cfset Header = "-select-">
<cfinclude template="uspGetLookup.cfm">
<select name="AffiliationID">
<cfloop query="Affiliation">
<option value="#Affiliation.AffiliationID#">#Affiliation.Affiliation#</option>
</cfloop>
</select>
</td--->
</tr>
<cfif SESSION.UserLevelID eq 1>
<input type="hidden" name="UnitID" value="0">
<cfelseif SESSION.UserLevelID eq 2>
<input type="hidden" name="UnitID" value="#SESSION.UID#">
<cfelse>
<tr valign="top">
<td colspan="3">
Library unit<br>
<cfset Lookup = "Unit">
<cfset Header = "">
<cfinclude template="uspGetLookup.cfm">
<select name="UnitID">
<option value="0">-select-</option>
<cfloop query="Unit">
<option value="#Unit.UnitID#">#Unit.Unit#</option>
</cfloop>
</select>
</td>
</tr>
</cfif>
<tr><td colspan="3"><hr size="1"></td></tr>
</table>
<table border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td>
Delivery mode<br>
<cfset Lookup = "DeliveryMode">
<cfset Header = "">
<cfinclude template="uspGetLookup.cfm">
<select name="DeliveryModes" multiple="multiple" size="#DeliveryMode.recordcount#">
<cfloop query="DeliveryMode">
<option value="#DeliveryMode.DeliveryModeID#">#DeliveryMode.DeliveryMode#</option>
</cfloop>
</select>
</td>
<td>
Material type<br>
<cfset Lookup = "MaterialType">
<cfset Header = "-select-">
<cfinclude template="uspGetLookup.cfm">
<select name="MaterialTypeID">
<cfloop query="MaterialType">
<option value="#MaterialType.MaterialTypeID#">#MaterialType.MaterialType#</option>
</cfloop>
</select>
</td>
</tr>
<tr><td colspan="2"><hr size="1"></td></tr>
</table>
<table border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td>
Display Class Duration?
</td>
<td>
<input type="radio" name="Duration" value="0" checked>No<br>
<input type="radio" name="Duration" value="1">Yes
</td>
<td>
Display Development & Preparation time?
</td>
<td>
<input type="radio" name="PrepTime" value="0" checked>No<br>
<input type="radio" name="PrepTime" value="1">Yes
</td>
<td>
Display Evaluation/Feedback?
</td>
<td>
<input type="radio" name="Feedback" value="0" checked>No<br>
<input type="radio" name="Feedback" value="1">Yes
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<input name="reqElements" type="hidden" value="ReportID,a report type">
<input name="Submit" type="submit" class="mainControl" style="width:100px;" value="VIEW REPORT">
</td>
<td>
<input name="reset" type="reset" class="mainControl" style="width:100px;" value="Reset">
</td>
</tr>
</table>
</div>
</form>
</cfoutput>
<!--td>
Activity/course type<br>
<cfset Lookup = "ActivityType">
<cfset Header = "-select-">
<cfinclude template="uspGetLookup.cfm">
<select name="ActivityTypeID">
<cfloop query="ActivityType">
<option value="#ActivityType.ActivityTypeID#">#ActivityType.ActivityType#</option>
</cfloop>
</select>
</td>
<select name="Duration">
<option value="-1">-select-</option>
<cfloop query="Durations">
<option value="#Durations.Duration#">#Durations.Duration#</option>
</cfloop>
</select>
mins
</td>
<select name="PrepTime">
<option value="-1">-select-</option>
<cfloop query="PrepTimes">
<option value="#PrepTimes.PrepTime#">#PrepTimes.PrepTime#</option>
</cfloop>
</select>
mins
</td>
<select name="DevTime">
<option value="-1">-select-</option>
<cfloop query="DevTimes">
<option value="#DevTimes.DevTime#">#DevTimes.DevTime#</option>
</cfloop>
</select>
mins
</td--->
<!---td>
Display Preparation time?
</td>
<td>
<input type="radio" name="PrepTime" value="0" checked>No<br>
<input type="radio" name="PrepTime" value="1">Yes
</td--->