1 |
<?php |
2 |
// Load globals |
3 |
require_once ("global_vars.php"); |
4 |
|
5 |
// Includes |
6 |
require_once ($GLOBAL_ADMIN_INC."sessionClass.php"); |
7 |
require_once ($GLOBAL_ADMIN_INC."accessClass.php"); |
8 |
require_once ($GLOBAL_ADMIN_INC."db_connect.php"); |
9 |
require_once ($GLOBAL_ADMIN_INC."app_controls.php"); |
10 |
|
11 |
|
12 |
// HTML header |
13 |
printf("<HTML>\n"); |
14 |
printf("<HEAD>\n"); |
15 |
printf("<title>CourseLib/PageScribe Search</title>\n"); |
16 |
printf("<link rel=\"stylesheet\" href=\"%s\" type=\"text/css\">\n", $GLOBAL_ADMIN_CSS); |
17 |
printf("</HEAD>\n"); |
18 |
|
19 |
|
20 |
// Default access settings |
21 |
$sess_time_human = ""; |
22 |
$sess_staff_account = ""; |
23 |
$sess_staff_id = 0; |
24 |
$sess_access_level = 0; |
25 |
$sess_access = ""; |
26 |
$sess_last_name = ""; |
27 |
$sess_first_name = ""; |
28 |
|
29 |
|
30 |
// Page header |
31 |
require_once ($GLOBAL_ADMIN_HEADER); |
32 |
|
33 |
|
34 |
// Collect access information |
35 |
if (isset($libsession)) { |
36 |
|
37 |
// Fetch session information |
38 |
$sessionClass = new sessionClass("", $libsession, "", ""); |
39 |
$accessClass = new accessClass($sessionClass); |
40 |
|
41 |
// Load user session variables |
42 |
$sess_time_human = $sessionClass->time_human; |
43 |
$sess_staff_account = $sessionClass->staff_account; |
44 |
$sess_access_level = $accessClass->access_level; |
45 |
$sess_access = $accessClass->access; |
46 |
$sess_last_name = $accessClass->last_name; |
47 |
$sess_first_name = $accessClass->first_name; |
48 |
|
49 |
} |
50 |
|
51 |
|
52 |
// If the cookie is set and access level is appropriate |
53 |
if(isset($libsession) && $sess_access_level >= 20) { |
54 |
?> |
55 |
|
56 |
<center> |
57 |
<table width="80%" border="1" class="backLight" cellpadding="2"> |
58 |
<tr> |
59 |
|
60 |
<td colspan="4" class="cellPlain" align="center"> |
61 |
CourseLib/PageScribe Search |
62 |
</td> |
63 |
|
64 |
</tr> |
65 |
|
66 |
<tr> |
67 |
<form method="POST" action="page_results_brief.phtml"> |
68 |
<td colspan="4" align="center"> |
69 |
<input type ="Submit" value="Search"> <input type ="Reset" value= "Reset"><br> |
70 |
</td> |
71 |
</tr> |
72 |
|
73 |
<tr> |
74 |
<td width="40%"> |
75 |
<b>Page Type:</b> |
76 |
</td> |
77 |
|
78 |
<td colspan="3" align="left"> |
79 |
<select name ="pagetype_id"> |
80 |
<option value ="0">Unselected</option> |
81 |
<?php dropDownFieldOmit("pagetype", "pagetype", "pagetype_id", "WHERE pagetype_id > 1"); ?> |
82 |
</select> |
83 |
<br> |
84 |
</td> |
85 |
</tr> |
86 |
|
87 |
<tr> |
88 |
<td> |
89 |
<b>Date Created (YYYY-MM-DD):</b> |
90 |
</td> |
91 |
|
92 |
<td colspan="3" align="left"> |
93 |
<input type = "text" name="date_created" size="10"> substrings also: e.g. 2002, 2002-12<br> |
94 |
</td> |
95 |
</tr> |
96 |
|
97 |
<tr> |
98 |
<td> |
99 |
<b>Date Modified (YYYY-MM-DD):</b> |
100 |
</td> |
101 |
|
102 |
<td colspan="3" align="left"> |
103 |
<input type = "text" name="date_modified" size="10"> substrings also: e.g. 2002, 2002-12<br> |
104 |
</td> |
105 |
</tr> |
106 |
|
107 |
<tr> |
108 |
<td> |
109 |
<b>Page Creator:</b> |
110 |
</td> |
111 |
|
112 |
<td colspan="3" align="left"> |
113 |
<select name ="account_created"> |
114 |
<option value ="0">Unselected</option> |
115 |
<?php dropDownAccountOmit(" WHERE staff_id > 1"); ?> |
116 |
</select> |
117 |
<br> |
118 |
</td> |
119 |
</tr> |
120 |
|
121 |
|
122 |
<tr> |
123 |
<td> |
124 |
<b>Last Modified By:</b> |
125 |
</td> |
126 |
|
127 |
<td colspan="3" align="left"> |
128 |
<select name ="account_modified"> |
129 |
<option value ="0">Unselected</option> |
130 |
<?php dropDownAccountOmit(" WHERE staff_id > 1"); ?> |
131 |
</select> |
132 |
<br> |
133 |
</td> |
134 |
</tr> |
135 |
|
136 |
<tr> |
137 |
<td> |
138 |
<b>Page Coordinator:</b> |
139 |
</td> |
140 |
|
141 |
<td colspan="3" align="left"> |
142 |
<select name ="staff_coordinator"> |
143 |
<option value ="0">Unselected</option> |
144 |
<?php dropDownStaffOmit(" WHERE staff_id > 1"); ?> |
145 |
</select> |
146 |
<br> |
147 |
</td> |
148 |
</tr> |
149 |
|
150 |
<tr> |
151 |
<td> |
152 |
<b>Page Co-Maintainer:</b> |
153 |
</td> |
154 |
|
155 |
<td colspan="3" align="left"> |
156 |
<select name ="comaintainer_id"> |
157 |
<option value ="0">Unselected</option> |
158 |
<?php dropDownStaffOmit(" WHERE staff_id > 1"); ?> |
159 |
</select> |
160 |
<br> |
161 |
</td> |
162 |
</tr> |
163 |
|
164 |
|
165 |
<tr> |
166 |
<td> |
167 |
<b>Page/Course Title:</b> |
168 |
</td> |
169 |
<td colspan="3" align="left"> |
170 |
<input type = "text" name="page_title" size="30"><br> |
171 |
</td> |
172 |
</tr> |
173 |
|
174 |
<tr> |
175 |
<td colspan="4" class="cellPlain" align="center"> |
176 |
CourseLib Only |
177 |
</td> |
178 |
|
179 |
<tr> |
180 |
|
181 |
<tr> |
182 |
<td colspan="4"> |
183 |
Note that Faculty, Staff (as course instructor), and TA/Other are OR'd |
184 |
together in this section due to data relationship issues. |
185 |
</td> |
186 |
|
187 |
<tr> |
188 |
|
189 |
<tr> |
190 |
<td> |
191 |
<b>(Faculty Name:</b> |
192 |
</td> |
193 |
|
194 |
<td colspan="3" align="left"> |
195 |
<select name ="faculty_id"> |
196 |
<option value ="0">Unselected</option> |
197 |
<?php dropDownFacultyOmit(" WHERE faculty_id > 1"); ?> |
198 |
</select> |
199 |
<b>OR</b><br> |
200 |
</td> |
201 |
</tr> |
202 |
|
203 |
<tr> |
204 |
<td> |
205 |
<b>Library Staff (as instructor):</b> |
206 |
</td> |
207 |
|
208 |
<td colspan="3" align="left"> |
209 |
<select name ="pers_staff_id"> |
210 |
<option value ="0">Unselected</option> |
211 |
<?php dropDownStaffOmit(" WHERE staff_id > 1"); ?> |
212 |
</select> |
213 |
<b>OR</b><br> |
214 |
</td> |
215 |
</tr> |
216 |
|
217 |
<tr> |
218 |
<td> |
219 |
<b>TA/Other Instructor Last Name:</b> |
220 |
</td> |
221 |
|
222 |
<td colspan="3" align="left"> |
223 |
<input type="text" name="pers_lastname" size="30"> |
224 |
)<br> |
225 |
</td> |
226 |
</tr> |
227 |
|
228 |
<tr> |
229 |
<td> |
230 |
<b>Course Subject/Dept:</b> |
231 |
</td> |
232 |
|
233 |
<td colspan="3" align="left"> |
234 |
<select name ="coursesub_id"> |
235 |
<option value ="0">Unselected</option> |
236 |
<?php dropDownFieldOmit("coursesub", "coursesub", "coursesub_id", "WHERE coursesub_id > 1"); ?> |
237 |
</select> |
238 |
<br> |
239 |
</td> |
240 |
</tr> |
241 |
|
242 |
<tr> |
243 |
<td> |
244 |
<b>Campus:</b> |
245 |
</td> |
246 |
|
247 |
<td colspan="3" align="left"> |
248 |
<select name ="campus_id"> |
249 |
<option value ="0">Unselected</option> |
250 |
<?php dropDownFieldOmit("campus", "campus", "campus_id", "WHERE campus_id > 1"); ?> |
251 |
</select> |
252 |
<br> |
253 |
</td> |
254 |
</tr> |
255 |
|
256 |
<tr> |
257 |
<td> |
258 |
<b>Term:</b> |
259 |
</td> |
260 |
|
261 |
<td align="left"> |
262 |
<select name ="term_id"> |
263 |
<option value ="0">Unselected</option> |
264 |
<?php dropDownFieldOmit("term", "term", "term_id", "WHERE term_id > 1"); ?> |
265 |
</select> |
266 |
<br> |
267 |
</td> |
268 |
|
269 |
<td> |
270 |
<b>Year:</b> |
271 |
</td> |
272 |
|
273 |
<td align="left"> |
274 |
<input type="text" name="course_year" size=\"4\"> |
275 |
<br> |
276 |
</td> |
277 |
|
278 |
</tr> |
279 |
|
280 |
<tr> |
281 |
<td> |
282 |
<b>Course Intro Text:</b> |
283 |
</td> |
284 |
<td colspan="3" align="left"> |
285 |
<input type = "text" name="intro_text" size="30"><br> |
286 |
</td> |
287 |
</tr> |
288 |
|
289 |
|
290 |
<tr> |
291 |
<td colspan="4" class="cellPlain" align="center"> |
292 |
Output Parameters |
293 |
</td> |
294 |
|
295 |
<tr> |
296 |
<td colspan="2"> |
297 |
<b>Order results by:</b> |
298 |
</td> |
299 |
<td colspan="2"> |
300 |
<b>Direction:</b> |
301 |
</td> |
302 |
|
303 |
</tr> |
304 |
|
305 |
<tr> |
306 |
<td width="25%"> |
307 |
Page/Course Title |
308 |
</td> |
309 |
<td width="8%"> |
310 |
<input type="radio" name="orderby" value="p.page_title" checked> |
311 |
</td> |
312 |
<td width="25%"> |
313 |
Ascending |
314 |
</td> |
315 |
<td width="8%"> |
316 |
<input type="radio" name="orderdir" value="ASC" checked> |
317 |
</td> |
318 |
</tr> |
319 |
|
320 |
<tr> |
321 |
<td width="25%"> |
322 |
Date Created |
323 |
</td> |
324 |
<td width="8%"> |
325 |
<input type="radio" name="orderby" value="p.date_created"> |
326 |
</td> |
327 |
<td width="25%"> |
328 |
Descending |
329 |
</td> |
330 |
<td width="8%"> |
331 |
<input type="radio" name="orderdir" value="DESC"> |
332 |
</td> |
333 |
</tr> |
334 |
|
335 |
<tr> |
336 |
<td width="25%"> |
337 |
Date Modified |
338 |
</td> |
339 |
<td colspan="3"> |
340 |
<input type="radio" name="orderby" value = "p.date_modified"> |
341 |
</td> |
342 |
</tr> |
343 |
|
344 |
<tr> |
345 |
<td width="25%"> |
346 |
Coordinator & Page/Course Title |
347 |
</td> |
348 |
<td colspan="3"> |
349 |
<input type="radio" name="orderby" value = "s.last_name, s.first_name, p.page_title, c.course_concat"> |
350 |
</td> |
351 |
</tr> |
352 |
|
353 |
<tr> |
354 |
<td align= "center" colspan="4"> |
355 |
<br><input type ="Submit" value="Search"> <input type ="Reset" value= "Reset"> |
356 |
</form> |
357 |
</td> |
358 |
</tr> |
359 |
</table> |
360 |
|
361 |
|
362 |
<br><br> |
363 |
|
364 |
|
365 |
<table width="80%" border="1" class="backLight" cellpadding="2"> |
366 |
<tr> |
367 |
|
368 |
<td colspan="4" class="cellPlain" align="center"> |
369 |
CourseLib/PageScribe Elements Searches |
370 |
</td> |
371 |
|
372 |
</tr> |
373 |
|
374 |
<tr> |
375 |
<td width="20%"> |
376 |
<form method="POST" action="element_results_brief.phtml"> |
377 |
<br><b>Resource ID:</b> <input type = "text" name="resource_id" size="6"><br><br> |
378 |
</td> |
379 |
|
380 |
<td width="60%" colspan = "3" align="center"> |
381 |
<input type ="Submit" value="Search"> <input type ="Reset" value= "Reset"><br> |
382 |
</td> |
383 |
</tr> |
384 |
|
385 |
<tr> |
386 |
<td> |
387 |
<b>Location/Library:</b> |
388 |
</td> |
389 |
|
390 |
<td colspan="3" align="left"> |
391 |
<select name ="location_id"> |
392 |
<option value ="0">Unselected</option> |
393 |
<?php dropDownFieldOmit("location", "location", "location_id", "WHERE location_id > 1"); ?> |
394 |
</select> |
395 |
<br> |
396 |
</td> |
397 |
</tr> |
398 |
|
399 |
<tr> |
400 |
<td> |
401 |
<b>Service:</b> |
402 |
</td> |
403 |
|
404 |
<td colspan="3" align="left"> |
405 |
<select name ="service_id"> |
406 |
<option value ="0">Unselected</option> |
407 |
<?php dropDownFieldOmit("service", "service", "service_id", "WHERE service_id > 1"); ?> |
408 |
</select> |
409 |
<br> |
410 |
</td> |
411 |
</tr> |
412 |
|
413 |
|
414 |
<tr> |
415 |
<td> |
416 |
<b>Staff (as elements):</b> |
417 |
</td> |
418 |
|
419 |
<td colspan="3" align="left"> |
420 |
<select name ="staff_id"> |
421 |
<option value ="0">Unselected</option> |
422 |
<?php dropDownStaffOmit(" WHERE staff_id > 1"); ?> |
423 |
</select> |
424 |
<br> |
425 |
</td> |
426 |
</tr> |
427 |
|
428 |
<tr> |
429 |
<td> |
430 |
<b>Element Text Label:</b> |
431 |
</td> |
432 |
<td colspan="3" align="left"> |
433 |
<input type="text" name="label" size="50"> |
434 |
</td> |
435 |
</tr> |
436 |
|
437 |
<tr> |
438 |
<td> |
439 |
<b>Element URL (full or partial):</b> |
440 |
</td> |
441 |
<td colspan="3" align="left"> |
442 |
<input type="text" name="label_url" size="50"> |
443 |
</td> |
444 |
</tr> |
445 |
|
446 |
<tr> |
447 |
<td> |
448 |
<b>Element Description:</b> |
449 |
</td> |
450 |
<td colspan="3" align="left"> |
451 |
<input type="text" name="element_descr" size="50"> |
452 |
</td> |
453 |
</tr> |
454 |
|
455 |
<tr> |
456 |
<td colspan="4" class="cellPlain" align="center"> |
457 |
Output Parameters |
458 |
</td> |
459 |
|
460 |
<tr> |
461 |
<td colspan="2"> |
462 |
<b>Order results by:</b> |
463 |
</td> |
464 |
<td colspan="2"> |
465 |
<b>Direction:</b> |
466 |
</td> |
467 |
|
468 |
</tr> |
469 |
|
470 |
<tr> |
471 |
<td width="25%"> |
472 |
Page/Course Title |
473 |
</td> |
474 |
<td width="8%"> |
475 |
<input type="radio" name="orderby" value="p.page_title" checked> |
476 |
</td> |
477 |
<td width="25%"> |
478 |
Ascending |
479 |
</td> |
480 |
<td width="8%"> |
481 |
<input type="radio" name="orderdir" value="ASC" checked> |
482 |
</td> |
483 |
</tr> |
484 |
|
485 |
<tr> |
486 |
<td width="25%"> |
487 |
Date Created |
488 |
</td> |
489 |
<td width="8%"> |
490 |
<input type="radio" name="orderby" value="p.date_created"> |
491 |
</td> |
492 |
<td width="25%"> |
493 |
Descending |
494 |
</td> |
495 |
<td width="8%"> |
496 |
<input type="radio" name="orderdir" value="DESC"> |
497 |
</td> |
498 |
</tr> |
499 |
|
500 |
<tr> |
501 |
<td width="25%"> |
502 |
Date Modified |
503 |
</td> |
504 |
<td colspan="3"> |
505 |
<input type="radio" name="orderby" value = "p.date_modified"> |
506 |
</td> |
507 |
</tr> |
508 |
|
509 |
<tr> |
510 |
<td width="25%"> |
511 |
Coordinator & Page/Course Title |
512 |
</td> |
513 |
<td colspan="3"> |
514 |
<input type="radio" name="orderby" value = "t.staff_account, p.page_title, c.course_concat"> |
515 |
</td> |
516 |
</tr> |
517 |
|
518 |
<tr> |
519 |
<td align= "center" colspan="4"> |
520 |
<br><input type ="Submit" value="Search"> <input type ="Reset" value= "Reset"> |
521 |
</form> |
522 |
</td> |
523 |
</tr> |
524 |
</table> |
525 |
|
526 |
|
527 |
<?php |
528 |
|
529 |
// Link to return to admin console |
530 |
adminReturn($sess_access_level); |
531 |
|
532 |
} // logged in |
533 |
|
534 |
// No access page |
535 |
else require_once ($GLOBAL_NO_ACCESS); |
536 |
|
537 |
|
538 |
// Page footer |
539 |
require_once ($GLOBAL_ADMIN_FOOTER); |
540 |
?> |
541 |
|
542 |
</body> |
543 |
</html> |