/[libdata]/trunk/admin/page_search.phtml
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/admin/page_search.phtml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 73 - (show annotations)
Thu Mar 18 21:27:37 2004 UTC (20 years ago) by dpavlin
File size: 10153 byte(s)
sync trunk to HEAD of pear-db (without changes specific to PEAR which will be dropped)

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

  ViewVC Help
Powered by ViewVC 1.1.26