/[libdata]/branches/paul/admin/include/scribe_forms.php
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 /branches/paul/admin/include/scribe_forms.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 20 - (show annotations)
Tue Jan 27 20:49:26 2004 UTC (20 years, 2 months ago) by dpavlin
File size: 80685 byte(s)
initial import of libdata version 1.04

1 <?php
2 /**********************************************************
3 Function Library: scribeforms.php
4 Original Author: Paul Bramscher <brams006@tc.umn.edu>
5 Last Modified: 01.27.2004
6 ***********************************************************
7 Comments:
8 This library brings together all of the edit forms on the
9 PageScribe system.
10 ***********************************************************
11 Table of Contents:
12 addLabel
13 addLoc
14 addRes
15 addRQS
16 addRQSLink
17 addSelection
18 addService
19 addStaff
20 buttonDown
21 buttonUp
22 copyElement
23 delElement
24 displayElement
25 displayHeader
26 editButtons
27 editElement
28 editHeader
29 formAssignPageStaff
30 formAssignPageSubject
31 formCourse
32 formCoursePers
33 formPageHeader
34 pageTitleStyle
35 readButtons
36 **********************************************************/
37
38
39 /**********************************************************
40 Function: addLabel
41 Author: Paul Bramscher
42 Last Modified: 06.23.2003
43 ***********************************************************
44 Purpose:
45 Collect values for title, description, and URL to add a
46 free-text or label type element on a PageScribe/CourseLib
47 page.
48 **********************************************************/
49 function addLabel($con, $place_array, $page_id) {
50
51 // Break apart place array
52 // $element_id = $place_array[0];
53 // $element_order = $place_array[1];
54 // $indent_level = $place_array[2];
55 // $parent_id = $place_array[3];
56 $position = $place_array[4];
57
58 // Build an HTML passable place array
59 $place_array_HTML = $place_array[0] . "," . $place_array[1] . "," . $place_array[2] . "," . $place_array[3] . "," . $place_array[4];
60
61 // Table
62 printf("<table width=\"25%%\" class=\"backLight\" border=\"1\" cellpadding=\"4\">\n");
63
64 // Add label form
65 printf("<BR><form method = \"POST\" action = \"scribe_transaction.phtml\">\n");
66 printf("<input type = \"hidden\" name=\"page_id\" value =\"%d\">\n", $page_id);
67 printf("<input type = \"hidden\" name=\"place_array_HTML\" value =\"%s\">\n", $place_array_HTML);
68 printf("<input type = \"Hidden\" name = \"transaction\" value = \"insertScribeLabel\" >\n");
69
70 // Row header
71 printf("<tr><td class=\"cellPlain\">\n");
72 printf("Add Text");
73 printf("</td></tr>\n");
74
75 // Label
76 printf("<tr><td>\n");
77 printf("<br><b>Label:</b><br>\n");
78 printf("<input type =\"text\" name =\"label\" size =\"40\">\n");
79 printf("<br>\n");
80
81 // Description
82 printf("<BR><b>Description:</b><BR>");
83 printf("<textarea rows=\"2\" cols=\"40\" name =\"element_descr\" >\n");
84 printf("</textarea><br>");
85
86 // URL
87 printf("<b>Wrap with URL:</b><BR>");
88 printf("<input type = \"text\" name =\"label_url\" value =\"http://\" size=\"50\"><br><br>");
89
90 // Interior table
91 printf("<table border=\"0\" cellpadding=\"4\"><tr><td>\n");
92 printf("<input type= \"submit\" value=\"Add\">\n");
93 printf("</form>\n");
94 printf("</td><td>\n");
95
96 // Cancel button
97 printf("<form method =\"POST\" action =\"scribe.phtml?page_id=%d&this_pos=%d#p%d\">",
98 $page_id, $position, $position);
99 printf("<input type=\"hidden\" name=\"cmd\" value=\"\">\n");
100 printf("<input type =\"submit\" value =\"Cancel\">\n");
101 printf("</form>\n");
102
103 // Close interior table
104 printf("</td></tr></table>\n");
105
106 // Close exterior table
107 printf("</td></tr></table>\n");
108 }
109
110
111 /**********************************************************
112 Function: addLoc
113 Author: Paul Bramscher
114 Last Modified: 06.23.2003
115 ***********************************************************
116 Purpose:
117 Select from the list of available location to add as an
118 element to a PageScribe/CourseLib page.
119 **********************************************************/
120 function addLoc($con, $place_array, $page_id) {
121
122 // Break apart place array
123 // $element_id = $place_array[0];
124 // $element_order = $place_array[1];
125 // $indent_level = $place_array[2];
126 // $parent_id = $place_array[3];
127 $position = $place_array[4];
128
129 // Build an HTML passable place array
130 $place_array_HTML = $place_array[0] . "," . $place_array[1] . "," . $place_array[2] . "," . $place_array[3] . "," . $place_array[4];
131
132 // Table
133 printf("<table width=\"25%%\" class=\"backLight\" border=\"1\" cellpadding=\"4\">\n");
134
135 // Add location form
136 printf("<form method = \"POST\" action = \"scribe_transaction.phtml\">\n");
137 printf("<input type = \"hidden\" name=\"page_id\" value =\"%d\">\n", $page_id);
138 printf("<input type = \"hidden\" name=\"place_array_HTML\" value =\"%s\">\n", $place_array_HTML);
139 printf("<input type = \"Hidden\" name = \"transaction\" value = \"insertScribeLocation\" >\n");
140
141 // Row header
142 printf("<tr><td class=\"cellPlain\">\n");
143 printf("Add a Location");
144 printf("</td></tr>\n");
145
146 // Location drop-down
147 printf("<tr><td>\n");
148 printf("<BR><b>Select Location:</b><BR>\n");
149 printf("<select name =\"location_id\" size=\"5\" >\n");
150 dropDownFieldOmit($con, "location", "location", "location_id", " WHERE location_id > 1");
151 printf("</select><br><br>");
152
153
154 // Interior table
155 printf("<table border=\"0\" cellpadding=\"4\"><tr><td>\n");
156 printf("<input type= \"submit\" value=\"Add\">\n");
157 printf("</form>\n");
158 printf("</td><td>\n");
159
160 // Cancel button
161 printf("<form method =\"POST\" action =\"scribe.phtml?page_id=%d&this_pos=%d#p%d\">",
162 $page_id, $position, $position);
163 printf("<input type=\"hidden\" name=\"cmd\" value=\"\">\n");
164 printf("<input type =\"submit\" value =\"Cancel\">\n");
165 printf("</form>\n");
166
167 // Close interior table
168 printf("</td></tr></table>\n");
169
170 // Close exterior table
171 printf("</td></tr></table>\n");
172 }
173
174
175 /**********************************************************
176 Function: addRes
177 Author: Paul Bramscher
178 Last Modified: 06.23.2003
179 ***********************************************************
180 Purpose:
181 Select from the list of available resources to add as
182 an element to a PageScribe/CourseLib page.
183 **********************************************************/
184 function addRes($con, $feature_id, $letter, $limitstring, $masterinfotype_id, $place_array, $page_id) {
185
186 // Default to letter A if nothing selected
187 if ($letter == "" && $limitstring == "" && $masterinfotype_id < 1 && $feature_id < 1) $letter = "A";
188
189 // Break apart place array
190 // $element_id = $place_array[0];
191 // $element_order = $place_array[1];
192 // $indent_level = $place_array[2];
193 // $parent_id = $place_array[3];
194 $position = $place_array[4];
195
196 // Build an HTML passable place array
197 $place_array_HTML = $place_array[0] . "," . $place_array[1] . "," . $place_array[2] . "," . $place_array[3] . "," . $place_array[4];
198
199
200 // Table
201 printf("<table width =\"40%%\" class=\"backLight\" border=\"1\" cellpadding=\"4\">\n");
202
203 // Row header
204 printf("<tr><td class=\"cellPlain\" colspan=\"2\">\n");
205 printf("Add Resource");
206 printf("</td></tr>\n");
207 printf("<tr><td colspan=\"2\">\n");
208
209 // Limit to letter
210 printf("Narrow Resource List To:<br>\n");
211 if ($letter != "" && $letter != "All") printf("Starting With <b>%s</b>\n", $letter);
212 else if ($limitstring != "") printf ("Titles or Descriptions Containing <b>\"%s\"</b>\n", $limitstring);
213 else printf ("All Resources\n");
214
215 // User limited by masterinfotype, display it
216 if ($masterinfotype_id > 0) {
217 $masterinfotype = lookupField($con, "masterinfotype", "masterinfotype_id", $masterinfotype_id, "masterinfotype");
218 printf(" within <b>%s</b>\n", $masterinfotype);
219 }
220
221 // User limited by feature, display it
222 if ($feature_id > 0) {
223 $feature = lookupField($con, "feature", "feature_id", $feature_id, "feature");
224 printf(" involving <b>%s</b>\n", $feature);
225 }
226
227 printf("<BR>\n");
228
229 // Allow A-Z
230 printf("<tr><td align=\"center\" colspan=\"2\" class=\"backLight\">\n");
231 printf("<a href=\"scribe.phtml?page_id="
232 . $page_id
233 . "&cmd=addRes&letter=All"
234 . "&this_pos="
235 . $position
236 . "#p"
237 . $position
238 . "\">A-Z</a>");
239
240 // Draw the alphabet
241 for ($ascii_char = 65; $ascii_char <= 90; $ascii_char++) {
242 if ($ascii_char == 77 || $asci_char == 90) printf("<BR><BR>\n");
243 else printf(" | ");
244 printf("<a href=\"scribe.phtml?page_id="
245 . $page_id
246 . "&cmd=addRes"
247 . "&letter="
248 . chr($ascii_char)
249 . "&this_pos="
250 . $position
251 . "#p"
252 . $position
253 . "\">"
254 . chr($ascii_char)
255 . "</a>");
256
257 }
258 printf("</td></tr>\n");
259
260
261 // Search
262 printf("<tr><td class=\"cellPlain\">Title or Description:</td><td>\n");
263 printf("<form method=\"POST\" action=\"scribe.phtml#p%d\">\n", $position);
264 printf("<input type = \"hidden\" name=\"cmd\" value=\"addRes\">\n");
265 printf("<input type = \"hidden\" name=\"page_id\" value =\"%d\">\n", $page_id);
266 printf("<input type = \"hidden\" name=\"this_pos\" value =\"%s\">\n", $position);
267 printf("<input type=\"text\" name=\"limitstring\" value =\"%s\" size =\"20\">\n", $limitstring);
268 printf(" and/or<br>\n");
269 printf("<b>Note:</b> This searches contiguous strings or words, no boolean functionality yet. ");
270 printf("</td></tr>\n");
271
272
273 // Masterinfotype
274 printf("<tr><td class = \"cellPlain\" >Master Info Type:</td><td>\n");
275 printf("<select name = \"masterinfotype_id\">\n");
276 printf("<option value=\"0\">All</option>\n");
277 dropDownFieldSelected($con, "masterinfotype", "masterinfotype", "masterinfotype_id", " WHERE masterinfotype_id > 1 ", $masterinfotype_id);
278 printf("</select>\n");
279 printf(" and/or</td></tr>\n");
280
281
282 // Feature
283 printf("<tr><td class = \"cellPlain\" >Feature:</td><td>\n");
284 printf("<select name = \"feature_id\">\n");
285 printf("<option value=\"0\">All</option>\n");
286 dropDownFieldSelected($con, "feature", "feature", "feature_id", " WHERE feature_id > 1 ", $feature_id);
287 printf("</select>\n");
288 printf("<input type=\"submit\" value =\"Limit\"></form>\n");
289 printf("</td></tr>\n");
290
291
292 // The Add-Resource Box
293 printf("<tr><td align=\"center\" colspan = \"2\" >\n");
294 printf("<form method =\"POST\" action=\"scribe_transaction.phtml\" >\n");
295 printf("<input type = \"hidden\" name=\"page_id\" value =\"%d\">", $page_id);
296 printf("<input type = \"hidden\" name=\"place_array_HTML\" value =\"%s\">", $place_array_HTML);
297 printf("<input type = \"Hidden\" name = \"transaction\" value = \"insertScribeResource\" >");
298 printf("<b>Add a Resource</b><BR>\n");
299 printf("<select name = \"resource_id\" size = \"5\" >\n");
300
301 // Determine any limits and draw the box
302 if (strlen($letter) > 0 && $letter != "All") $limit = $letter;
303 if (strlen($limitstring) > 0) $limit = $limitstring;
304 dropDownResource($con, 0, $limit, $masterinfotype_id, $feature_id);
305 printf("</select><br>\n");
306
307 // Interior table
308 printf("<table border=\"0\" cellpadding=\"4\"><tr><td>\n");
309 printf("<input type=\"submit\" value =\"Add\">\n");
310 printf("</form>\n");
311 printf("</td><td>\n");
312
313 // Cancel button
314 printf("<form method =\"POST\" action =\"scribe.phtml?page_id=%d&this_pos=%d#p%d\">",
315 $page_id, $position, $position);
316 printf("<input type=\"hidden\" name=\"cmd\" value=\"\">\n");
317 printf("<input type =\"submit\" value =\"Cancel\">\n");
318 printf("</form></td></tr>\n");
319
320 // Close interior table
321 printf("</table>\n");
322
323 // Add a new base resource
324 printf("<tr><td colspan=\"2\">\n");
325 printf("<b>Can't find the resource?</b> ");
326 printf("<a href=\"console.phtml\">Add New Resource</a>\n");
327
328 // Close exterior table
329 printf("</td></tr></table><BR>\n");
330 }
331
332
333 /**********************************************************
334 Function: addRQS
335 Author: Paul Bramscher
336 Last Modified: 06.23.2003
337 ***********************************************************
338 Purpose:
339 Select an RQS subject page to harvest (all elements). This
340 is contrasted with addRQSLink() which merely adds a link
341 to it.
342 **********************************************************/
343 function addRQS($con, $place_array, $page_id) {
344
345 // Break apart place array
346 // $element_id = $place_array[0];
347 // $element_order = $place_array[1];
348 // $indent_level = $place_array[2];
349 // $parent_id = $place_array[3];
350 $position = $place_array[4];
351
352 // Build an HTML passable place array
353 $place_array_HTML = $place_array[0] . "," . $place_array[1] . "," . $place_array[2] . "," . $place_array[3] . "," . $place_array[4];
354
355 // Table
356 printf("<table width=\"25%%\" class=\"backLight\" border=\"1\" cellpadding=\"4\">\n");
357
358 // Add label form
359 printf("<BR><form method = \"POST\" action = \"scribe_transaction.phtml\">\n");
360 printf("<input type = \"hidden\" name=\"page_id\" value =\"%d\">\n", $page_id);
361 printf("<input type = \"hidden\" name=\"place_array_HTML\" value =\"%s\">\n", $place_array_HTML);
362 printf("<input type = \"Hidden\" name = \"transaction\" value = \"insertScribeRQS\" >\n");
363
364 // Row header
365 printf("<tr><td class=\"cellPlain\">\n");
366 printf("Harvest an RQS Page");
367 printf("</td></tr>\n");
368
369 // Select subject
370 printf("<tr><td>\n");
371 printf("<br><b>RQS Subject:</b><br>\n");
372 printf("<select name = \"subject_id\" size=\"10\">\n");
373 dropDownFieldOmit($con, "subject", "subject", "subject_id", "WHERE SUBJECT_ID > 1");
374 printf("</select>\n");
375
376 // Interior table
377 printf("<table border=\"0\" cellpadding=\"4\"><tr><td>\n");
378 printf("<input type= \"submit\" value=\"Harvest Resources\">\n");
379 printf("</form>\n");
380 printf("</td><td>\n");
381
382 // Cancel button
383 printf("<form method =\"POST\" action =\"scribe.phtml?page_id=%d&this_pos=%d#p%d\">",
384 $page_id, $position, $position);
385 printf("<input type=\"hidden\" name=\"cmd\" value=\"\">\n");
386 printf("<input type =\"submit\" value =\"Cancel\">\n");
387 printf("</form>\n");
388
389 // Close interior table
390 printf("</td></tr></table>\n");
391
392 // Close exterior table
393 printf("</td></tr></table>\n");
394 }
395
396
397 /**********************************************************
398 Function: addRQSLink
399 Author: Paul Bramscher
400 Last Modified: 06.13.2003
401 ***********************************************************
402 Purpose:
403 Select from a list of RQS pages to add as a link element
404 on a PageScribe/CourseLib page.
405 **********************************************************/
406 function addRQSLink($con, $place_array, $page_id) {
407
408 // Break apart place array
409 // $element_id = $place_array[0];
410 // $element_order = $place_array[1];
411 // $indent_level = $place_array[2];
412 // $parent_id = $place_array[3];
413 $position = $place_array[4];
414
415 // Build an HTML passable place array
416 $place_array_HTML = $place_array[0] . "," . $place_array[1] . "," . $place_array[2] . "," . $place_array[3] . "," . $place_array[4];
417
418 // Table
419 printf("<table width=\"25%%\" class=\"backLight\" border=\"1\" cellpadding=\"4\">\n");
420
421 // Add label form
422 printf("<BR><form method = \"POST\" action = \"scribe_transaction.phtml\">\n");
423 printf("<input type = \"hidden\" name=\"page_id\" value =\"%d\">\n", $page_id);
424 printf("<input type = \"hidden\" name=\"place_array_HTML\" value =\"%s\">\n", $place_array_HTML);
425 printf("<input type = \"Hidden\" name = \"transaction\" value = \"insertScribeRQSLink\" >\n");
426
427 // Row header
428 printf("<tr><td class=\"cellPlain\">\n");
429 printf("Add RQS Page Link");
430 printf("</td></tr>\n");
431
432 // Select subject
433 printf("<tr><td>\n");
434 printf("<br><b>RQS Subject:</b><br>\n");
435 printf("<select name = \"subject_id\" size=\"10\">\n");
436 dropDownFieldOmit($con, "subject", "subject", "subject_id", "WHERE SUBJECT_ID > 1");
437 printf("</select>\n");
438
439 // Interior table
440 printf("<table border=\"0\" cellpadding=\"4\"><tr><td>\n");
441 printf("<input type= \"submit\" value=\"Add Link\">\n");
442 printf("</form>\n");
443 printf("</td><td>\n");
444
445 // Cancel button
446 printf("<form method =\"POST\" action =\"scribe.phtml?page_id=%d&this_pos=%d#p%d\">",
447 $page_id, $position, $position);
448 printf("<input type=\"hidden\" name=\"cmd\" value=\"\">\n");
449 printf("<input type =\"submit\" value =\"Cancel\">\n");
450 printf("</form>\n");
451
452 // Close interior table
453 printf("</td></tr></table>\n");
454
455 // Close exterior table
456 printf("</td></tr></table>\n");
457 }
458
459
460 /**********************************************************
461 Function: addSelection
462 Author: Paul Bramscher
463 Last Modified: 06.25.2003
464 ***********************************************************
465 Purpose:
466 Select from a list of element types to add to a
467 PageScribe/CourseLib page. Note that these types
468 correspond to columns available in the elements and
469 pastebuffer tables -- adding a new type is not a trivial
470 task. All SQL which render Pagescribe/Courselib pages
471 would need to be changed to add the new join criteria.
472 **********************************************************/
473 function addSelection($con, $place_array, $page_id) {
474
475 // Break apart place array
476 // $element_id = $place_array[0];
477 // $element_order = $place_array[1];
478 // $indent_level = $place_array[2];
479 // $parent_id = $place_array[3];
480 $position = $place_array[4];
481
482 // Table
483 printf("<table class=\"backLight\" border=\"1\" cellpadding=\"4\">\n");
484
485 // Row header
486 printf("<tr><td class=\"cellPlain\">\n");
487 printf("Add An Element");
488 printf("</td></tr>\n");
489
490 // Element selection form
491 printf("<form method =\"POST\" action =\"scribe.phtml?page_id=%d&this_pos=%d#p%d\">",
492 $page_id, $position, $position);
493
494 printf("<tr><td>\n");
495 printf("<BR><b>Select Type To Add:</b><BR>\n");
496 printf("<select name =\"cmd\" size=\"7\">");
497 printf("<option value =\"addRes\">Resource</option>\n");
498 printf("<option value=\"addLoc\">Location</option>\n");
499 printf("<option value=\"addStaff\">Staff</option>\n");
500 printf("<option value=\"addService\">Service</option>\n");
501 printf("<option value=\"addLabel\">Text</option>\">\n");
502 printf("<option value=\"addRQSLink\">RQS Subject Link</option>\n");
503 printf("<option value=\"addRQS\">RQS Subject Harvest</option>\n");
504 printf("</select><BR><BR>\n");
505
506 // Interior table
507 printf("<table border=\"0\" cellpadding=\"4\"><tr><td>\n");
508 printf("<input type =\"submit\" value =\"Select\">\n");
509 printf("</form>\n");
510 printf("</td><td>\n");
511
512 // Cancel button
513 printf("<form method =\"POST\" action =\"scribe.phtml?page_id=%d&this_pos=%d#p%d\">",
514 $page_id, $position, $position);
515 printf("<input type=\"hidden\" name=\"cmd\" value=\"\">\n");
516 printf("<input type =\"submit\" value =\"Cancel\">\n");
517 printf("</form>\n");
518
519 // Close interior table
520 printf("</td></tr></table>\n");
521
522 // Close exterior table
523 printf("</td></tr></table>\n");
524
525 }
526
527
528 /**********************************************************
529 Function: addService
530 Author: Paul Bramscher
531 Last Modified: 06.23.2003
532 ***********************************************************
533 Purpose:
534 Select from a list of library services to add as an
535 element to a PageScribe/CourseLib page.
536 **********************************************************/
537 function addService($con, $place_array, $servicetype_id, $page_id) {
538
539 // Break apart place array
540 // $element_id = $place_array[0];
541 // $element_order = $place_array[1];
542 // $indent_level = $place_array[2];
543 // $parent_id = $place_array[3];
544 $position = $place_array[4];
545
546 // Build an HTML passable place array
547 $place_array_HTML = $place_array[0] . "," . $place_array[1] . "," . $place_array[2] . "," . $place_array[3] . "," . $place_array[4];
548
549 // Table
550 printf("<table width=\"25%%\" class=\"backLight\" border=\"1\" cellpadding=\"4\">\n");
551
552 // Row header
553 printf("<tr><td class=\"cellPlain\" colspan=\"2\">\n");
554 printf("Add a Service");
555 printf("</td></tr>\n");
556
557 // Limit by type
558 printf("<tr><td class=\"cellPlain\">Service Type:</td>");
559 printf("<form method =\"POST\" action =\"scribe.phtml?page_id=%d&this_pos=%d#p%d\">",
560 $page_id, $position, $position);
561 printf("<input type=\"hidden\" name=\"cmd\" value=\"addService\">\n");
562 printf("<input type = \"hidden\" name=\"page_id\" value =\"%d\">\n", $page_id);
563 printf("<input type = \"hidden\" name=\"place_array_HTML\" value =\"%s\">\n", $place_array_HTML);
564 printf("<input type = \"hidden\" name=\"this_pos\" value =\"%s\">\n", $position);
565 printf("<td>\n");
566 printf("<select name =\"servicetype_id\">\n");
567 printf("<option value=\"\">All</option>\n");
568 dropDownFieldSelected($con, "servicetype", "servicetype", "servicetype_id", " WHERE servicetype_id > 1", $servicetype_id);
569 printf("</select><br><br>\n");
570 printf("<input type =\"submit\" value =\"Limit by Service Type\">\n");
571 printf("</form></td></tr>\n");
572
573 // Add service form
574 printf("<form method = \"POST\" action = \"scribe_transaction.phtml\">\n");
575 printf("<input type = \"hidden\" name=\"page_id\" value =\"%d\">\n", $page_id);
576 printf("<input type = \"hidden\" name=\"place_array_HTML\" value =\"%s\">\n", $place_array_HTML);
577 printf("<input type = \"Hidden\" name = \"transaction\" value = \"insertScribeService\" >\n");
578
579 // Service drop-down
580 printf("<tr><td colspan=\"2\">Select a Service:<br>\n");
581 printf("<select name =\"service_id\" size=\"5\" >\n");
582 dropDownServiceLimit($con, $servicetype_id);
583 printf("</select><br><br>");
584
585 // Interior table
586 printf("<table border=\"0\" cellpadding=\"4\"><tr><td>\n");
587 printf("<input type= \"submit\" value=\"Add\">\n");
588 printf("</form>\n");
589 printf("</td><td>\n");
590
591 // Cancel button
592 printf("<form method =\"POST\" action =\"scribe.phtml?page_id=%d&this_pos=%d#p%d\">",
593 $page_id, $position, $position);
594 printf("<input type=\"hidden\" name=\"cmd\" value=\"\">\n");
595 printf("<input type =\"submit\" value =\"Cancel\">\n");
596 printf("</form>\n");
597
598 // Close interior table
599 printf("</td></tr></table>\n");
600
601 // Close exterior table
602 printf("</td></tr></table>\n");
603 }
604
605
606 /**********************************************************
607 Function: addStaff
608 Author: Paul Bramscher
609 Last Modified: 06.23.2003
610 ***********************************************************
611 Purpose:
612 Select from a list of library staff to add as an
613 element to a PageScribe/CourseLib page.
614 **********************************************************/
615 function addStaff($con, $place_array, $page_id) {
616
617 // Break apart place array
618 // $element_id = $place_array[0];
619 // $element_order = $place_array[1];
620 // $indent_level = $place_array[2];
621 // $parent_id = $place_array[3];
622 $position = $place_array[4];
623
624 // Build an HTML passable place array
625 $place_array_HTML = $place_array[0] . "," . $place_array[1] . "," . $place_array[2] . "," . $place_array[3] . "," . $place_array[4];
626
627 $position = $place_array[4];
628
629 // Table
630 printf("<table width=\"25%%\" class=\"backLight\" border=\"1\" cellpadding=\"4\">\n");
631
632 // Add staff form
633 printf("<form method = \"POST\" action = \"scribe_transaction.phtml\">");
634 printf("<input type = \"hidden\" name=\"page_id\" value =\"%d\">", $page_id);
635 printf("<input type = \"hidden\" name=\"place_array_HTML\" value =\"%s\">", $place_array_HTML);
636 printf("<input type = \"Hidden\" name = \"transaction\" value = \"insertScribeStaff\" >");
637
638 // Row header
639 printf("<tr><td class=\"cellPlain\">\n");
640 printf("Add Staff");
641 printf("</td></tr>\n");
642
643 // Staff drop-down
644 printf("<tr><td>\n");
645 printf("<BR><b>Select Staffperson:</b><BR>\n");
646 printf("<select name =\"staff_id\" size=\"5\" >");
647 dropDownStaffOmit($con, " WHERE staff_id > 1");
648 printf("</select><br><br>");
649
650 // Interior table
651 printf("<table border=\"0\" cellpadding=\"4\"><tr><td>\n");
652 printf("<input type= \"submit\" value=\"Add\">");
653 printf("</form>\n");
654 printf("</td><td>\n");
655
656 // Cancel button
657 printf("<form method =\"POST\" action =\"scribe.phtml?page_id=%d&this_pos=%d#p%d\">",
658 $page_id, $position, $position);
659 printf("<input type=\"hidden\" name=\"cmd\" value=\"\">\n");
660 printf("<input type =\"submit\" value =\"Cancel\">\n");
661 printf("</form>\n");
662
663 // Close interior table
664 printf("</td></tr></table>\n");
665
666 // Close exterior table
667 printf("</td></tr></table>\n");
668 }
669
670
671 /**********************************************************
672 Function: buttonDown
673 Author: Paul Bramscher
674 Last Modified: 06.23.2003
675 ***********************************************************
676 Purpose:
677 Provide a down button for elements on a PageScribe/CourseLib
678 page which may be moved down.
679 **********************************************************/
680 function buttonDown($page_id, $place_array){
681
682 // Break apart place array
683 $element_id = $place_array[0];
684 $element_order = $place_array[1];
685 $indent_level = $place_array[2];
686 $parent_id = $place_array[3];
687 $position = $place_array[4];
688
689 // Move down
690 printf("<a href=\"scribe_transaction.phtml?transaction=elementDown&page_id=%d&element_id=%d&position=%d#p%d\"><img src=\"images/down.jpg\" border=\"0\" alt=\"move down\"></a>\n", $page_id, $element_id, $position, $position);
691 }
692
693
694 /**********************************************************
695 Function: buttonUp
696 Author: Paul Bramscher
697 Last Modified: 06.23.2003
698 ***********************************************************
699 Purpose:
700 Provide a down button for elements on a PageScribe/CourseLib
701 page which may be moved up.
702 **********************************************************/
703 function buttonUp($page_id, $place_array){
704
705 // Break apart place array
706 $element_id = $place_array[0];
707 $element_order = $place_array[1];
708 $indent_level = $place_array[2];
709 $parent_id = $place_array[3];
710 $position = $place_array[4];
711
712 // Move up
713 printf("<a href=\"scribe_transaction.phtml?transaction=elementUp&page_id=%d&element_id=%d&position=%d#p%d\"><img src=\"images/up.jpg\" border=\"0\" alt=\"move up\"></a>\n", $page_id, $element_id, $position, $position);
714 }
715
716
717 /**********************************************************
718 Function: copyElement
719 Author: Paul Bramscher
720 Last Modified: 06.23.2003
721 ***********************************************************
722 Purpose:
723 Query the user to copy either the selected element
724 singly or (if present) all descendants. Note that we also
725 pass the current staff id, since each staffperson has
726 his/her unique copy-paste buffer.
727 **********************************************************/
728 function copyElement($con, $place_array, $page_id, $element_id, $sess_staff_id) {
729
730 // Break apart place array
731 // $element_id = $place_array[0];
732 $element_order = $place_array[1];
733 $indent_level = $place_array[2];
734 // $parent_id = $place_array[3];
735 $position = $place_array[4];
736
737 // Build an HTML passable place array
738 $place_array_HTML = $place_array[0] . "," . $place_array[1] . "," . $place_array[2] . "," . $place_array[3] . "," . $place_array[4];
739
740 // Table
741 printf("<BR><table width=\"25%%\" class=\"backLight\" border=\"1\">\n");
742
743 // Row header
744 printf("<tr><td class=\"cellPlain\">\n");
745 printf("Copy Element");
746 printf("</td></tr>\n");
747
748 // Determine number of children
749 $num_children = parentIs($con, $element_id, $page_id);
750
751 // Cut form
752 printf("<form method =\"POST\" action =\"scribe_transaction.phtml\">");
753 printf("<input type =\"hidden\" name =\"transaction\" value =\"copyPasteElement\">");
754 printf("<input type = \"hidden\" name=\"place_array_HTML\" value =\"%s\">", $place_array_HTML);
755 printf("<input type =\"hidden\" name =\"page_id\" value =\"%d\">", $page_id);
756 printf("<input type =\"hidden\" name =\"sess_staff_id\" value =\"%d\">", $sess_staff_id);
757
758 // Display the element
759 printf("<tr><td>\n");
760 printf("<b>Item:</b><br>\n");
761 displayElement($con, $element_id, $page_id);
762 printf("<BR>\n");
763
764 if ($num_children > 0) {
765 printf("Element is a parent. How do you wish to copy?<BR><BR>");
766 printf("<select name =\"copysingle\">");
767 printf("<option value =\"0\" selected>Copy element and all descendants</option>");
768 printf("<option value =\"1\">Copy this element only?</option>");
769 printf("</select><BR><BR>");
770 }
771 else {
772 printf("<input type =\"hidden\" name =\"copysingle\" value =\"0\">");
773 printf("Element has no children. Copy this one only.<br><br>");
774 }
775
776 // Interior table
777 printf("<table border=\"0\" cellpadding=\"4\"><tr><td>\n");
778 printf("<input type =\"submit\" value =\"Copy Element\">\n");
779 printf("</form>\n");
780 printf("</td><td>\n");
781
782 // Cancel button
783 printf("<form method =\"POST\" action =\"scribe.phtml?page_id=%d&this_pos=%d#p%d\">",
784 $page_id, $position, $position);
785 printf("<input type=\"hidden\" name=\"cmd\" value=\"\">\n");
786 printf("<input type =\"submit\" value =\"Cancel\">\n");
787 printf("</form>\n");
788
789 // Close interior table
790 printf("</td></tr></table>\n");
791
792 // Close exterior table
793 printf("</td></tr></table>\n");
794 }
795
796
797 /**********************************************************
798 Function: delElement
799 Author: Paul Bramscher
800 Last Modified: 06.23.2003
801 ***********************************************************
802 Purpose:
803 Query the user to (1) delete the current element only,
804 (2) also delete all children (if available), or (3) promote
805 them to the parent level of the deleted element.
806 **********************************************************/
807 function delElement($con, $place_array, $page_id, $element_id) {
808
809 // Break apart place array
810 // $element_id = $place_array[0];
811 $element_order = $place_array[1];
812 $indent_level = $place_array[2];
813 // $parent_id = $place_array[3];
814 $position = $place_array[4];
815
816 // Build an HTML passable place array
817 $place_array_HTML = $place_array[0] . "," . $place_array[1] . "," . $place_array[2] . "," . $place_array[3] . "," . $place_array[4];
818
819 // Table
820 printf("<BR><table width=\"25%%\" class=\"backLight\" border=\"1\">\n");
821
822 // Row header
823 printf("<tr><td class=\"cellPlain\">\n");
824 printf("Delete Element");
825 printf("</td></tr>\n");
826
827 // Determine number of children
828 $num_children = parentIs($con, $element_id, $page_id);
829
830 // Delete form
831 printf("<form method =\"POST\" action =\"scribe_transaction.phtml\">");
832 printf("<input type =\"hidden\" name =\"transaction\" value =\"deleteElement\">");
833 printf("<input type = \"hidden\" name=\"place_array_HTML\" value =\"%s\">", $place_array_HTML);
834 printf("<input type =\"hidden\" name =\"page_id\" value =\"%d\">", $page_id);
835
836 // Display the element
837 printf("<tr><td>\n");
838 printf("<b>Item:</b><br>\n");
839 displayElement($con, $element_id, $page_id);
840 printf("<BR>\n");
841
842 if ($num_children > 0) {
843 printf("Element is a parent. How do you wish to delete?<BR><BR>");
844 printf("<select name =\"promote\">");
845 printf("<option value =\"1\" selected>Delete element and promote children</option>");
846 printf("<option value =\"2\">Delete element and all descendants</option>");
847 printf("</select><BR><BR>");
848 }
849 else {
850 printf("<input type =\"hidden\" name =\"promote\" value =\"0\">");
851 printf("Element has no children. Delete this one only.<br><br>");
852 }
853
854 // Interior table
855 printf("<table border=\"0\" cellpadding=\"4\"><tr><td>\n");
856 printf("<input type =\"submit\" value =\"Delete!\">\n");
857 printf("</form>\n");
858
859 // Cancel button
860 printf("</td><td>");
861 printf("<form method =\"POST\" action =\"scribe.phtml?page_id=%d&this_pos=%d#p%d\">",
862 $page_id, $position, $position);
863 printf("<input type=\"hidden\" name=\"cmd\" value=\"\">\n");
864 printf("<input type =\"submit\" value =\"Cancel\">\n");
865 printf("</form>\n");
866
867 // Close interior table
868 printf("</td></tr></table>\n");
869
870 // Close exterior table
871 printf("</td></tr></table>\n");
872 }
873
874
875 /**********************************************************
876 Function: displayElement
877 Author: Paul Bramscher
878 Last Modified: 06.23.2003
879 ***********************************************************
880 Purpose:
881 Output the "title" of any element type. Note that this
882 also include free-text label type elements, as well as
883 a concatenated first-name, last-name staff member type
884 element.
885 **********************************************************/
886 function displayElement ($con, $element_id, $page_id) {
887
888 // Build a join to cover the possible element types
889 $sql = "SELECT l.location, s.last_name, s.first_name, r.title, e.label, v.service, b.subject
890 FROM
891 element e
892 LEFT JOIN resource r using (resource_id)
893 LEFT JOIN location l on e.location_id = l.location_id
894 LEFT JOIN staff s on e.staff_id = s.staff_id
895 LEFT JOIN service v on e.service_id = v.service_id
896 LEFT JOIN subject b on e.subject_id = b.subject_id
897 WHERE page_id = "
898 . $page_id
899 . " AND element_id = "
900 . $element_id;
901
902 $rs = mysql_query($sql, $con);
903 $row = mysql_fetch_array ($rs);
904
905 // Pull out the possible display values
906 $location = $row["location"];
907 $last_name = $row["last_name"];
908 $first_name = $row["first_name"];
909 $title = $row["title"];
910 $label = $row["label"];
911 $service = $row["service"];
912 $subject = $row["subject"];
913
914 // Determine which one
915 if (strlen($title) > 1) printf("%s<BR>", $title);
916 else if (strlen($label) > 1) printf("%s<BR>", $label);
917 else if (strlen($location) > 1) printf("%s<BR>", $location);
918 else if (strlen($service) > 1) printf("%s<BR>", $service);
919 else if (strlen($subject) > 1) printf("%s<BR>", $subject);
920 else if (strlen($last_name) > 1) {
921 if (strlen($first_name) > 1) printf("%s", $first_name);
922 printf(" %s<BR>", $last_name);
923 }
924
925 }
926
927
928 /**********************************************************
929 Function: displayHeader
930 Author: Paul Bramscher
931 Last Modified: 11.21.2003
932 ***********************************************************
933 Purpose:
934 In edit mode, offer a form to the author of a PageScribe or
935 CourseLib page the ability to edit the page/course title.
936 Note that the actual data is prefixed with either "Page Title"
937 or "Course Title" depending on the type of page it is.
938 **********************************************************/
939 function displayHeader ($con, $page_id, $page_title,
940 $pagetitle_style, $pagetype_id) {
941
942 // Determine label name
943 if ($pagetype_id == 3) $label = "Course Title";
944 else $label = "Page Title";
945
946 // Table
947 printf("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td align=\"left\">\n");
948
949 // Edit scribe header form
950 printf("<form method=\"POST\" action = \"scribe.phtml?page_id=%d\" >\n", $page_id);
951 printf("<input type = \"Hidden\" name = \"cmd\" value = \"editHeader\" >\n");
952 if ($pagetitle_style > 0) printf("<b>%s:</b> <span class=\"S%d\">%s</span>\n", $label, $pagetitle_style, $page_title);
953 else printf("<b>%s:</b> %s\n", $label, $page_title);
954 printf("<input type = \"image\" src=\"images/edit.gif\" name =\"edit\" alt=\"edit\">\n");
955 printf("</td>\n");
956
957 // Close form
958 printf("</form>\n");
959
960 // Edit page title style
961 printf("<td>&nbsp;");
962 pageTitleStyle($con, $page_id, $pagetitle_style);
963
964 // Close table
965 printf("</td></tr></table>\n");
966
967 }
968
969
970 /**********************************************************
971 Function: editButtons
972 Author: Paul Bramscher
973 Last Modified: 06.23.2003
974 ***********************************************************
975 Purpose:
976 Display the style elements (1-5) that may be applied to
977 the given element. The currently-enforced style
978 (if non-NULL) is displayed in boldface. If no style
979 is selected, the "X" is bolded.
980 **********************************************************/
981 function editButtons($con, $element_size, $label_text, $label_url,
982 $place_array, $resource_id, $page_id, $element_id){
983
984 // Break apart place array
985 // $element_id = $place_array[0];
986 // $element_order = $place_array[1];
987 // $indent_level = $place_array[2];
988 // $parent_id = $place_array[3];
989 $position = $place_array[4];
990
991 // Initial the bolding variables
992 $bold0 = "";
993 $bold0_close = "";
994 $bold1 = "";
995 $bold1_close = "";
996 $bold2 = "";
997 $bold2_close = "";
998 $bold3 = "";
999 $bold3_close = "";
1000 $bold4 = "";
1001 $bold4_close = "";
1002 $bold5 = "";
1003 $bold5_close = "";
1004
1005 // Display the selected size in bold type
1006 switch ($element_size) {
1007
1008 case 1: $bold1 = "<b>";
1009 $bold1_close = "</b>";
1010 break;
1011 case 2: $bold2 = "<b>";
1012 $bold2_close = "</b>";
1013 break;
1014 case 3: $bold3 = "<b>";
1015 $bold3_close = "</b>";
1016 break;
1017
1018 case 4: $bold4 = "<b>";
1019 $bold4_close = "</b>";
1020 break;
1021 case 5: $bold5 = "<b>";
1022 $bold5_close = "</b>";
1023 break;
1024 default: $bold0 = "<b>";
1025 $bold0_close = "</b>";
1026 break;
1027 }
1028
1029
1030 // Edit
1031 printf("<a href=\"scribe.phtml?page_id=%d&cmd=editElement&this_pos=%d#p%d\"><img src=\"images/edit.gif\" border=\"0\" alt=\"edit\"></a>\n", $page_id, $position, $position);
1032
1033 // Delete
1034 printf("<a href=\"scribe.phtml?page_id=%d&cmd=delElement&this_pos=%d#p%d\"><img src=\"images/delete.gif\" border=\"0\" alt=\"delete\"></a>\n", $page_id, $position, $position);
1035
1036 // Copy
1037 printf("<a href=\"scribe.phtml?page_id=%d&cmd=copyElement&this_pos=%d#p%d\"><img src=\"images/copy.gif\" border=\"0\" alt=\"copy\"></a>\n", $page_id, $position, $position);
1038
1039 // Increase size
1040 // printf("<a href=\"scribe_transaction.phtml?transaction=elementIncrease&page_id=%d&element_id=%d&position=%d#p%d\"><img src=\"images/plus.jpg\" border=\"0\"></a>\n", $page_id, $element_id, $position, $position);
1041
1042 // Decrease size
1043 // printf("<a href=\"scribe_transaction.phtml?transaction=elementDecrease&page_id=%d&element_id=%d&position=%d#p%d\"><img src=\"images/minus.jpg\" border=\"0\"></a>\n", $page_id, $element_id, $position, $position);
1044
1045 // Element size control
1046 printf("Style: [ %s<a href=\"scribe_transaction.phtml?transaction=elementSize&page_id=%d&element_id=%d&size=0&position=%d#p%d\">X</a>%s | ", $bold0, $page_id, $element_id, $position, $position, $bold0_close);
1047 printf("%s<a href=\"scribe_transaction.phtml?transaction=elementSize&page_id=%d&element_id=%d&size=1&position=%d#p%d\">1</a>%s | ", $bold1, $page_id, $element_id, $position, $position, $bold1_close);
1048 printf("%s<a href=\"scribe_transaction.phtml?transaction=elementSize&page_id=%d&element_id=%d&size=2&position=%d#p%d\">2</a>%s | ", $bold2, $page_id, $element_id, $position, $position, $bold2_close);
1049 printf("%s<a href=\"scribe_transaction.phtml?transaction=elementSize&page_id=%d&element_id=%d&size=3&position=%d#p%d\">3</a>%s | ", $bold3, $page_id, $element_id, $position, $position, $bold3_close);
1050 printf("%s<a href=\"scribe_transaction.phtml?transaction=elementSize&page_id=%d&element_id=%d&size=4&position=%d#p%d\">4</a>%s | ", $bold4, $page_id, $element_id, $position, $position, $bold4_close);
1051 printf("%s<a href=\"scribe_transaction.phtml?transaction=elementSize&page_id=%d&element_id=%d&size=5&position=%d#p%d\">5</a>%s ]\n", $bold5, $page_id, $element_id, $position, $position, $bold5_close);
1052
1053
1054 }
1055
1056
1057 /**********************************************************
1058 Function: editElement
1059 Author: Paul Bramscher
1060 Last Modified: 06.25.2003
1061 ***********************************************************
1062 Purpose:
1063 Build a form to edit the incoming element. Depending on
1064 the type of element, different sorts of functionality
1065 occurs.
1066 **********************************************************/
1067 function editElement($con, $place_array, $page_id, $element_id) {
1068
1069 // Break apart place array
1070 // $element_id = $place_array[0];
1071 // $element_order = $place_array[1];
1072 // $indent_level = $place_array[2];
1073 // $parent_id = $place_array[3];
1074 $position = $place_array[4];
1075
1076 // Retrieve the element's information
1077 $sql = "SELECT * FROM element e
1078 LEFT JOIN resource r using (resource_id)
1079 LEFT JOIN service v on e.service_id = v.service_id
1080 LEFT JOIN location l on e.location_id = l.location_id
1081 LEFT JOIN staff s on e.staff_id = s.staff_id
1082 LEFT JOIN subject b on e.subject_id = b.subject_id
1083 WHERE page_id = " . $page_id . " AND element_id = " . $element_id
1084 . " ORDER BY e.element_order";
1085
1086 $rs = mysql_query($sql, $con);
1087 $row = mysql_fetch_array ($rs);
1088
1089 // General element fields
1090 $element_descr = $row["element_descr"];
1091
1092 // If a text label
1093 $label = $row["label"];
1094 $label = textOutHTML($label);
1095 $label_url = $row["label_url"];
1096
1097
1098 // Flag if this is a text label element type, to ensure no blank entries
1099 if (strlen($label) > 0) $label_flag = 1;
1100 else $label_flag = 0;
1101
1102 // If a resource
1103 $resource_id = $row["resource_id"];
1104 $annotation = $row["annotation"];
1105 $url = $row["url"];
1106 $title = $row["title"];
1107 $title = textOutHTML($title);
1108
1109 // If a location
1110 $location_id = $row["location_id"];
1111 $location = $row["location"];
1112 $location = textOutHTML($location);
1113 $location_descr = $row["location_descr"];
1114 $mainURL = $row["mainURL"];
1115
1116 // If a staffperson
1117 $staff_id = $row["staff_id"];
1118 $last_name = $row["last_name"];
1119 $last_name = textOutHTML($last_name);
1120 $first_name = $row["first_name"];
1121 $first_name = textOutHTML($first_name);
1122 $staff_account = $row["staff_account"];
1123
1124 // If a service
1125 $service = $row["service"];
1126 $service = textOutHTML($service);
1127 $serviceDescr = $row["serviceDescr"];
1128 $service_id = $row["service_id"];
1129 $serviceURL = $row["serviceURL"];
1130
1131 // If an RQS subject
1132 $subject = $row["subject"];
1133 $subject = textOutHTML($subject);
1134 $subject_descr = $row["subject_descr"];
1135 $subject_id = $row["subject_id"];
1136 $subjectURL = $GLOBAL_RQS_URL."rqs.phtml?subject_id=".$subject_id;
1137
1138 // Set flag whether a custom description exists
1139 if (strlen($element_descr) < 1) $descr_status = "Dynamic";
1140 else $descr_status = "Custom";
1141
1142 // Determine the description and label
1143 if ($resource_id > 0) {
1144 $display_label = "<b>(Resource)</b> " . $title;
1145 $display_descr = $annotation;
1146 }
1147 else if ($location_id > 0) {
1148 $display_label = "<b>(Location)</b> " . $location;
1149 $display_descr = $location_descr;
1150 }
1151 else if ($staff_id > 0) {
1152 $display_label = "<b>(Staff)</b> " . $first_name . " " . $last_name;
1153 }
1154 else if ($subject_id > 0) {
1155 $display_label = "<b>(RQS Subject)</b> " . $subject;
1156 $display_descr = $subject_descr;
1157 }
1158 else if ($service_id > 0) {
1159 $display_label = "<b>(Service)</b> " . $service;
1160 $display_descr = $serviceDescr;
1161 }
1162
1163 // Table
1164 printf("<br><table width =\"45%%\" border=\"1\" class=\"backLight\">\n");
1165
1166 // Row header
1167 printf("<tr><td class=\"cellPlain\">\n");
1168 printf("Edit Element");
1169 printf("</td></tr>\n");
1170
1171 // Edit form
1172 printf("<form method=\"POST\" action = \"scribe_transaction.phtml\" >\n");
1173 printf("<input type=\"hidden\" name=\"transaction\" value=\"updateScribeElement\">\n");
1174 printf("<input type=\"hidden\" name=\"element_id\" value=\"%d\">\n", $element_id);
1175 printf("<input type=\"hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
1176 printf("<input type=\"hidden\" name=\"position\" value=\"%d\">\n", $position);
1177 printf("<input type=\"hidden\" name=\"label_flag\" value=\"%d\">\n", $label_flag);
1178
1179 // Item Display
1180 printf("<tr><td>\n");
1181 printf("<b>Item:</b><br>");
1182 if ($label_flag == 0) printf("%s<BR><BR>\n", $display_label);
1183 else {
1184 printf("<input type=\"text\" name =\"label\" value=\"%s\" size=\"40\"><BR><BR>\n", $label);
1185 }
1186
1187 // If a text label
1188 if ($label_flag == 1) {
1189 printf("<b>Wrap with URL:</b><br>\n");
1190
1191 if (strlen($label_url) < 1) $label_url = "http://";
1192 printf("<input type=\"text\" name=\"label_url\" size = \"55\" value=\"%s\"><br><br>\n", $label_url);
1193 }
1194
1195 if ($label_flag == 0) {
1196
1197 // Description status
1198 printf("<b>Current description status:</b> %s<br><br>", $descr_status);
1199 printf("Initially the dynamic description (if any) is supplied below. If you wish to customize, make changes ");
1200 printf("and save. If you don't wish to customize, please cancel this operation. ");
1201 printf("Clearing out all characters (including spaces, etc.) will revert back to the dynamic description. ");
1202 printf("The advantage of dynamic is that changes made to the source record will be reflected here in real-time.<br><br>\n");
1203
1204 }
1205
1206 // Description
1207 printf("<b>Description:</b><BR>\n");
1208 if (strlen($element_descr) < 1) $element_descr = $display_descr;
1209 printf("<textarea name =\"element_descr\" rows=\"5\" cols=\"45\">\n");
1210 printf("%s", $element_descr);
1211 printf("</textarea><br><br>\n");
1212
1213 // Interior table
1214 printf("<table border=\"0\" cellpadding=\"4\"><tr><td>\n");
1215 if ($label_flag == 1) printf("<input type= \"submit\" value=\"Save Changes\">");
1216 else printf("<input type= \"submit\" value=\"Save Custom Description\">");
1217 printf("</form>\n");
1218 printf("</td><td>\n");
1219
1220 printf("<form method =\"POST\" action =\"scribe.phtml?page_id=%d&this_pos=%d#p%d\">",
1221 $page_id, $position, $position);
1222 printf("<input type=\"hidden\" name=\"cmd\" value=\"\">\n");
1223 printf("<input type =\"submit\" value =\"Cancel\">\n");
1224 printf("</form>\n");
1225
1226 // Close interior table
1227 printf("</td></tr></table>\n");
1228
1229 // Close exterior table
1230 printf("</td></tr></table>\n");
1231
1232 }
1233
1234
1235 /**********************************************************
1236 Function: editHeader
1237 Author: Paul Bramscher
1238 Last Modified: 06.23.2003
1239 ***********************************************************
1240 Purpose:
1241 Form to edit the supplied page_id title.
1242 **********************************************************/
1243 function editHeader ($con, $course_id, $page_id, $page_title, $pagetype_id) {
1244
1245 // Determine label name
1246 if ($pagetype_id == 3) $label = "Course Title";
1247 else $label = "Page Title";
1248
1249 // Edit scribe header form
1250 printf("<form method=\"POST\" action = \"scribe_transaction.phtml\" >\n");
1251 printf("<b>%s:</b><br>\n", $label);
1252 printf("<textarea name =\"page_title\" rows = \"3\" cols = \"50\">\n");
1253 printf("%s", $page_title);
1254 printf("</textarea>\n ");
1255
1256 // Save or cancel
1257 printf("<input type=\"submit\" value =\"Save\">\n");
1258 // printf("<input type = \"image\" src=\"images/save.jpg\" name =\"save\" alt=\"save\">\n");
1259 printf("<a href=\"scribe.phtml?page_id=%d\">Cancel</a>\n", $page_id);
1260
1261 printf("<input type = \"Hidden\" name = \"transaction\" value = \"updateScribeHeader\" >\n");
1262 printf("<input type = \"hidden\" name=\"page_id\" value =\"%d\">\n", $page_id);
1263 printf("<input type = \"hidden\" name=\"pagetype_id\" value=\"%d\">\n", $pagetype_id);
1264 printf("<input type = \"hidden\" name=\"course_id\" value=\"%d\">\n", $course_id);
1265
1266 // Close form
1267 printf("</form>\n");
1268 }
1269
1270
1271 /**********************************************************
1272 Function: formAssignPageStaff
1273 Author: Paul Bramscher
1274 Last Modified: 06.23.2003
1275 ***********************************************************
1276 Purpose:
1277 Assign authoring staff to the supplied page id. This may
1278 be as primary coordinator, or secondary maintainers with
1279 access. By default, of course, the creator of the page is
1280 coordinator. Assigning him/her as a secondary maintainer
1281 (in addition to coordinator) offers no benefits.
1282 **********************************************************/
1283 function formAssignPageStaff($con, $page_id, $staff_coordinator){
1284
1285 // Table definition
1286 printf("<center>\n");
1287 printf("<table width=\"\80%%\" border=\"1\" cellpadding=\"4\" class=\"backLight\" >\n");
1288 printf("<tr><td colspan=\"2\" class=\"cellPlain\">\n");
1289 printf("Assign Page Staff");
1290 printf("</td></tr>\n");
1291
1292 // Primary coordinator
1293 printf("<tr><td colspan=\"2\">\n");
1294 printf("<center>\n");
1295 printf("<form method = \"POST\" action = \"scribe_transaction.phtml\" >\n");
1296 printf("<input type = \"Hidden\" name = \"page_id\" value = \"%d\" >\n", $page_id);
1297 printf("<input type = \"Hidden\" name = \"transaction\" value = \"assignStaffCoordinator\" >\n");
1298 printf("<b>Page Coordinator:</b> ");
1299 printf("<select name =\"staff_coordinator\">\n");
1300 dropDownStaffSelected($con, $staff_coordinator);
1301 printf("</select>\n");
1302 printf("<input type=\"submit\" value=\"Reassign Coordinator!\"><br>\n");
1303 printf("</center>\n");
1304 printf("<B>Important Note:</b> You may accidentally remove your own access to this page if you remove ");
1305 printf("yourself as coordinator, are not listed as a maintainer, and do not have cross-page editing access.");
1306 printf("</form></td></tr>\n");
1307
1308 // Available staff
1309 // Omit the '(N/A)' staff
1310 $omit_string = "WHERE staff_id > 1";
1311
1312 // Omit any pre-selected staff in page_staff
1313 $in_string = getNotIn($con, "staff_id", "page_id", $page_id, "page_staff");
1314 if (strlen($in_string) > 0) $omit_string .= " AND staff_id NOT IN " . $in_string;
1315
1316 // Form for maintainer assignments
1317 printf("<form method = \"POST\" action = \"scribe_transaction.phtml\" >\n");
1318 printf("<input type = \"Hidden\" name = \"page_id\" value = \"%d\" >", $page_id);
1319 printf("<input type = \"Hidden\" name = \"transaction\" value = \"assignPageStaff\" >\n");
1320
1321 // Available staff
1322 printf("<tr><td valign = \"top\" >\n");
1323 printf("<br><strong>Available Maintainers:<br></strong>\n");
1324 printf("<select name = \"staff_id_array[]\" multiple size = \"5\" >\n");
1325 dropDownStaffOmit($con, $omit_string);
1326 printf("</select><br><br>\n");
1327 printf("<center>");
1328 printf("<input type = \"Submit\" value = \" >> \" >");
1329 printf("</center>");
1330 printf("</form>");
1331 printf("</td>");
1332
1333 // Current staff
1334 printf("<td valign = \"top\" >\n");
1335 printf("<form method = \"POST\" action = \"scribe_transaction.phtml\" >\n");
1336 printf("<input type = \"Hidden\" name = \"page_id\" value = \"%d\" >\n", $page_id);
1337 printf("<input type = \"Hidden\" name = \"transaction\" value = \"deletePageStaff\" >\n");
1338 printf("<br><strong>Selected Maintainers:</strong><br>\n");
1339 printf("<select name =\"staff_list_array[]\" multiple size = 5>\n");
1340 dropDownPageStaff($con, $page_id);
1341 printf("</select><br><br>\n");
1342 printf("<center>\n");
1343 printf("<input type = \"Submit\" value =\" << \">\n");
1344 printf("</center>\n");
1345 printf("</form>\n");
1346 printf("</td></tr>\n");
1347
1348 // Close window
1349 printf("<tr><td align=\"center\" colspan=\"2\">\n");
1350 printf("<form method =\"POST\" action=\"scribe.phtml?page_id=%d\">\n", $page_id);
1351 printf("<input type=\"submit\" value=\"Close This Window\">\n");
1352 printf("</form>\n");
1353 printf("</td></tr>\n");
1354
1355 // Close table
1356 printf("</table>\n");
1357 printf("</center><br>\n");
1358 }
1359
1360
1361 /**********************************************************
1362 Function: formCourse
1363 Author: Paul Bramscher
1364 Last Modified: 06.24.2003
1365 ***********************************************************
1366 Purpose:
1367 This function draws out CourseLib specific fields and
1368 offers them as forms available for edit. Note that the
1369 "active" variable, if set to a corresponding field name,
1370 will turn one of the fields into an active edit-mode form.
1371 While inactive, the form -- when clicked -- turns that field
1372 active.
1373 **********************************************************/
1374 function formCourse($con, $active, $page_id) {
1375
1376 // Retrieve current information
1377 $sql = "SELECT
1378 c.course_id,
1379 c.coursesub_id,
1380 c.course_num,
1381 c.course_section,
1382 c.term_id,
1383 c.course_year,
1384 c.campus_id,
1385 c.courseheader,
1386 c.introheader1,
1387 c.intromessage1,
1388 c.introheader2,
1389 c.intromessage2,
1390 s.coursesub,
1391 t.term,
1392 p.campus,
1393 g.published
1394
1395 FROM
1396 course c
1397 LEFT JOIN term t using (term_id)
1398 LEFT JOIN campus p on c.campus_id = p.campus_id
1399 LEFT JOIN coursesub s on c.coursesub_id = s.coursesub_id
1400 LEFT JOIN page g on c.page_id = g.page_id
1401
1402 WHERE
1403 c.page_id = " . $page_id;
1404
1405
1406 /*
1407 // Retrieve current information
1408 $sql = "SELECT *
1409 FROM
1410 course c
1411 LEFT JOIN term t using (term_id)
1412 LEFT JOIN campus p on c.campus_id = p.campus_id
1413 LEFT JOIN coursesub s on c.coursesub_id = s.coursesub_id
1414
1415 WHERE
1416 page_id = " . $page_id;
1417 */
1418
1419 $rs = mysql_query($sql, $con);
1420 $row = mysql_fetch_array ($rs);
1421
1422 $course_id = $row["course_id"];
1423 $staff_id_created = $row["staff_id_created"];
1424 $staff_id_edited = $row["staff_id_edited"];
1425 $coursesub_id = $row["coursesub_id"];
1426 $coursesub = $row["coursesub"];
1427 $course_num = $row["course_num"];
1428 $course_section = $row["course_section"];
1429 $term_id = $row["term_id"];
1430 $term = $row["term"];
1431 $course_year = $row["course_year"];
1432 $campus_id = $row["campus_id"];
1433 $campus = $row["campus"];
1434 $courseheader = $row["courseheader"];
1435 $introheader1 = $row["introheader1"];
1436 $intromessage1 = $row["intromessage1"];
1437 $introheader2 = $row["introheader2"];
1438 $intromessage2 = $row["intromessage2"];
1439 $published = $row["published"];
1440
1441 // Run strings through the HTML cleaner for output
1442 $course_title = textOutHTML($course_title);
1443 $course_section = textOutHTML($course_section);
1444 $introheader1 = textOutHTML($introheader1);
1445 $introheader2 = textOutHTML($introheader2);
1446
1447 // Table
1448 printf("<table width=\"100%%\" border =\"0\" cellpadding=\"0\" cellspacing=\"0\">\n");
1449
1450
1451 /***********************
1452 ** Course Page Header **
1453 ***********************/
1454
1455 printf("<tr><td width=\"25%%\"><b>Course Page Header:</b></td>\n");
1456
1457
1458 // Active
1459 if ($active == "courseheader") {
1460 printf("<form method=\"POST\" action =\"scribe_transaction.phtml\">\n");
1461 printf("<td colspan=\"3\">\n");
1462 printf("<input type=\"Hidden\" name=\"transaction\" value=\"updateScribeCourse\">\n");
1463 printf("<input type=\"Hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
1464 printf("<input type=\"Hidden\" name=\"course_id\" value=\"%d\">\n", $course_id);
1465 printf("<input type=\"Hidden\" name=\"field_name\" value=\"courseheader\">\n");
1466 printf("<input type =\"text\" size=\"50\" name=\"field_value\" value = \"%s\" >\n", $courseheader);
1467
1468 // Save or cancel
1469 printf("<input type=\"submit\" value =\"Save\">\n");
1470 // printf("<input type = \"image\" src=\"images/save.jpg\" name =\"save\" alt=\"save\">\n");
1471 printf("<a href=\"scribe.phtml?page_id=%d\">Cancel</a>\n", $page_id);
1472
1473 printf("</td>\n");
1474 printf("</form>\n");
1475
1476 }
1477
1478 // Inactive
1479 else {
1480 printf("<form method=\"POST\" action=\"scribe.phtml?page_id=%d\">", $page_id);
1481 printf("<td colspan=\"3\">\n");
1482 printf("<input type=\"Hidden\" name=\"active\" value=\"courseheader\">");
1483 printf("%s ", $courseheader);
1484 printf("<input type = \"image\" src=\"images/edit.gif\" name =\"edit\" alt=\"edit\">\n");
1485 printf("</td>\n");
1486 printf("</form>\n");
1487 }
1488 printf("</tr>\n");
1489
1490
1491 /*******************
1492 ** Course Subject **
1493 *******************/
1494
1495
1496 printf("<tr><td><b>Course Designator (required):</b></td>\n");
1497
1498 // Active
1499 if ($active == "coursesub") {
1500 printf("<form method=\"POST\" action =\"scribe_transaction.phtml\">\n");
1501 printf("<td colspan=\"3\">\n");
1502 printf("<input type=\"Hidden\" name=\"transaction\" value=\"updateScribeCourse\">\n");
1503 printf("<input type=\"Hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
1504 printf("<input type=\"Hidden\" name=\"course_id\" value=\"%d\">\n", $course_id);
1505 printf("<input type=\"Hidden\" name=\"field_name\" value=\"coursesub_id\">\n");
1506 printf("<select name =\"field_value\">\n");
1507
1508 // Published pages may not be set to N/A or null course designators
1509 $limit = "";
1510 if ($published == 1) $limit = " WHERE coursesub_id > 1";
1511 dropDownCoursesubSelected($con, $limit, $coursesub_id);
1512 printf("</select> \n");
1513
1514 // Save or cancel
1515 printf("<input type=\"submit\" value =\"Save\">\n");
1516 printf("<a href=\"scribe.phtml?page_id=%d\">Cancel</a>\n", $page_id);
1517
1518 printf("</td>\n");
1519 printf("</form>\n");
1520 }
1521
1522 // Inactive
1523 else {
1524 printf("<form method=\"POST\" action=\"scribe.phtml?page_id=%d\">", $page_id);
1525 printf("<td colspan=\"3\">\n");
1526 printf("<input type=\"Hidden\" name=\"active\" value=\"coursesub\">");
1527 printf("%s ", $coursesub);
1528 printf("<input type = \"image\" src=\"images/edit.gif\" name =\"edit\" alt=\"edit\">\n");
1529 printf("</td>\n");
1530 printf("</form>\n");
1531 }
1532
1533 printf("</tr>\n");
1534
1535 /******************
1536 ** Course Number **
1537 ******************/
1538
1539 printf("<tr><td align=\"left\"><b>Course Number</b>:&nbsp;&nbsp;</td>\n");
1540
1541
1542 // Active
1543 if ($active == "course_num") {
1544 printf("<form method=\"POST\" action =\"scribe_transaction.phtml\">\n");
1545 printf("<td width=\"25%%\">\n");
1546 printf("<input type=\"Hidden\" name=\"transaction\" value=\"updateScribeCourse\">\n");
1547 printf("<input type=\"Hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
1548 printf("<input type=\"Hidden\" name=\"course_id\" value=\"%d\">\n", $course_id);
1549 printf("<input type=\"Hidden\" name=\"field_name\" value=\"course_num\">\n");
1550 printf("<input type =\"text\" size=\"10\" name=\"field_value\" value = \"%s\" >\n", $course_num);
1551
1552 // Save or cancel
1553 printf("<input type=\"submit\" value =\"Save\">\n");
1554 // printf("<input type = \"image\" src=\"images/save.jpg\" name =\"save\" alt=\"save\">\n");
1555 printf("<a href=\"scribe.phtml?page_id=%d\">Cancel</a>\n", $page_id);
1556
1557 printf("</td>\n");
1558 printf("</form>\n");
1559 }
1560
1561 // Inactive
1562 else {
1563 printf("<form method=\"POST\" action=\"scribe.phtml?page_id=%d\">", $page_id);
1564 printf("<td width=\"25%%\">\n");
1565 printf("<input type=\"Hidden\" name=\"active\" value=\"course_num\">");
1566 printf("%s ", $course_num);
1567 printf("<input type = \"image\" src=\"images/edit.gif\" name =\"edit\" alt=\"edit\">\n");
1568 printf("</td>\n");
1569 printf("</form>\n");
1570 }
1571
1572
1573 /*******************
1574 ** Course Section **
1575 *******************/
1576
1577
1578 printf("<td align=\"right\" width=\"25%%\"><b>Section:</b>&nbsp;&nbsp;</td>\n");
1579
1580 // Active
1581 if ($active == "course_section") {
1582 printf("<form method=\"POST\" action =\"scribe_transaction.phtml\">\n");
1583 printf("<td width=\"25%%\">\n");
1584 printf("<input type=\"Hidden\" name=\"transaction\" value=\"updateScribeCourse\">\n");
1585 printf("<input type=\"Hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
1586 printf("<input type=\"Hidden\" name=\"course_id\" value=\"%d\">\n", $course_id);
1587 printf("<input type=\"Hidden\" name=\"field_name\" value=\"course_section\">\n");
1588 printf("<input type =\"text\" size=\"10\" name=\"field_value\" value = \"%s\" >\n", $course_section);
1589
1590 // Save or cancel
1591 printf("<input type=\"submit\" value =\"Save\">\n");
1592 // printf("<input type = \"image\" src=\"images/save.jpg\" name =\"save\" alt=\"save\">\n");
1593 printf("<a href=\"scribe.phtml?page_id=%d\">Cancel</a>\n", $page_id);
1594
1595 printf("</td>\n");
1596 printf("</form>\n");
1597 }
1598
1599 // Inactive
1600 else {
1601 printf("<form method=\"POST\" action=\"scribe.phtml?page_id=%d\">", $page_id);
1602 printf("<td width=\"25%%\">\n");
1603 printf("<input type=\"Hidden\" name=\"active\" value=\"course_section\">");
1604 printf("%s ", $course_section);
1605 printf("<input type = \"image\" src=\"images/edit.gif\" name =\"edit\" alt=\"edit\">\n");
1606 printf("</td>\n");
1607 printf("</form>\n");
1608 }
1609 printf("</tr>\n");
1610
1611
1612 /***********
1613 ** Campus **
1614 ***********/
1615
1616 printf("<tr><td><b>Campus:</b></td>\n");
1617
1618 // Active
1619 if ($active == "campus") {
1620 printf("<form method=\"POST\" action =\"scribe_transaction.phtml\">\n");
1621 printf("<td colspan=\"3\">\n");
1622 printf("<input type=\"Hidden\" name=\"transaction\" value=\"updateScribeCourse\">\n");
1623 printf("<input type=\"Hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
1624 printf("<input type=\"Hidden\" name=\"course_id\" value=\"%d\">\n", $course_id);
1625 printf("<input type=\"Hidden\" name=\"field_name\" value=\"campus_id\">\n");
1626 printf("<select name =\"field_value\">\n");
1627 dropDownFieldSelected($con, "campus", "campus", "campus_id", " WHERE campus_id > 0", $campus_id);
1628 printf("</select> \n");
1629 printf("<!-- id was: %d -->", $campus_id);
1630
1631 // Save or cancel
1632 printf("<input type=\"submit\" value =\"Save\">\n");
1633 // printf("<input type = \"image\" src=\"images/save.jpg\" name =\"save\" alt=\"save\">\n");
1634 printf("<a href=\"scribe.phtml?page_id=%d\">Cancel</a>\n", $page_id);
1635
1636 printf("</td>\n");
1637 printf("</form>\n");
1638 }
1639
1640 // Inactive
1641 else {
1642 printf("<form method=\"POST\" action=\"scribe.phtml?page_id=%d\">", $page_id);
1643 printf("<td colspan=\"3\">\n");
1644 printf("<input type=\"Hidden\" name=\"active\" value=\"campus\">");
1645 printf("%s ", $campus);
1646 printf("<input type = \"image\" src=\"images/edit.gif\" name =\"edit\" alt=\"edit\">\n");
1647 printf("</td>\n");
1648 printf("</form>\n");
1649 }
1650 printf("</tr>\n");;
1651
1652
1653 /*********
1654 ** Term **
1655 *********/
1656
1657 printf("<tr><td><b>Term:</b></td>\n");
1658
1659 // Active
1660 if ($active == "term") {
1661 printf("<form method=\"POST\" action =\"scribe_transaction.phtml\">\n");
1662 printf("<td>\n");
1663 printf("<input type=\"Hidden\" name=\"transaction\" value=\"updateScribeCourse\">\n");
1664 printf("<input type=\"Hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
1665 printf("<input type=\"Hidden\" name=\"course_id\" value=\"%d\">\n", $course_id);
1666 printf("<input type=\"Hidden\" name=\"field_name\" value=\"term_id\">\n");
1667 printf("<select name =\"field_value\">\n");
1668 dropDownFieldSelected($con, "term", "term", "term_id", " WHERE term_id > 0", $term_id);
1669 printf("</select> \n");
1670
1671 // Save or cancel
1672 printf("<input type=\"submit\" value =\"Save\">\n");
1673 // printf("<input type = \"image\" src=\"images/save.jpg\" name =\"save\" alt=\"save\">\n");
1674 printf("<a href=\"scribe.phtml?page_id=%d\">Cancel</a>\n", $page_id);
1675
1676 printf("</td>\n");
1677 printf("</form>\n");
1678 }
1679
1680 // Inactive
1681 else {
1682 printf("<form method=\"POST\" action=\"scribe.phtml?page_id=%d\">", $page_id);
1683 printf("<td>\n");
1684 printf("<input type=\"Hidden\" name=\"active\" value=\"term\">");
1685 printf("%s ", $term);
1686 printf("<input type = \"image\" src=\"images/edit.gif\" name =\"edit\" alt=\"edit\">\n");
1687 printf("</td>\n");
1688 printf("</form>\n");
1689 }
1690
1691 /*********
1692 ** Year **
1693 *********/
1694
1695 printf("<td align =\"right\" ><b>Year:</b>&nbsp;&nbsp;</td>\n");
1696
1697 // Active
1698 if ($active == "course_year") {
1699 printf("<form method=\"POST\" action =\"scribe_transaction.phtml\">\n");
1700 printf("<td>\n");
1701 printf("<input type=\"Hidden\" name=\"transaction\" value=\"updateScribeCourse\">\n");
1702 printf("<input type=\"Hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
1703 printf("<input type=\"Hidden\" name=\"course_id\" value=\"%d\">\n", $course_id);
1704 printf("<input type=\"Hidden\" name=\"field_name\" value=\"course_year\">\n");
1705 printf("<input type =\"text\" size=\"6\" name=\"field_value\" value = \"%s\" >\n", $course_year);
1706
1707 // Save or cancel
1708 printf("<input type=\"submit\" value =\"Save\">\n");
1709 // printf("<input type = \"image\" src=\"images/save.jpg\" name =\"save\" alt=\"save\">\n");
1710 printf("<a href=\"scribe.phtml?page_id=%d\">Cancel</a>\n", $page_id);
1711
1712 printf("</td>\n");
1713 printf("</form>\n");
1714 }
1715
1716 // Inactive
1717 else {
1718 printf("<form method=\"POST\" action=\"scribe.phtml?page_id=%d\">", $page_id);
1719 printf("<td>\n");
1720 printf("<input type=\"Hidden\" name=\"active\" value=\"course_year\">");
1721 printf("%s ", $course_year);
1722 printf("<input type = \"image\" src=\"images/edit.gif\" name =\"edit\" alt=\"edit\">\n");
1723 printf("</td>\n");
1724 printf("</form>\n");
1725 }
1726 printf("</tr>\n");
1727
1728
1729 /*******************
1730 ** Intro Header 1 **
1731 *******************/
1732
1733 printf("<tr><td align=\"center\" colspan=\"4\"><br><b>Introductory Header 1:</b></td></tr>\n");
1734 printf("<tr><td align=\"center\" valign=\"middle\" colspan=\"6\">\n");
1735
1736 // Active
1737 if ($active == "introheader1") {
1738 printf("<form method=\"POST\" action =\"scribe_transaction.phtml\">\n");
1739 printf("<input type=\"Hidden\" name=\"transaction\" value=\"updateScribeCourse\">\n");
1740 printf("<input type=\"Hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
1741 printf("<input type=\"Hidden\" name=\"course_id\" value=\"%d\">\n", $course_id);
1742 printf("<input type=\"Hidden\" name=\"field_name\" value=\"introheader1\">\n");
1743 printf("<input type =\"text\" size=\"30\" name=\"field_value\" value = \"%s\" >\n", $introheader1);
1744
1745 // Save or cancel
1746 printf("<input type=\"submit\" value =\"Save\">\n");
1747 // printf("<input type = \"image\" src=\"images/save.jpg\" name =\"save\" alt=\"save\">\n");
1748 printf("<a href=\"scribe.phtml?page_id=%d\">Cancel</a>\n", $page_id);
1749
1750 printf("</form>\n");
1751 }
1752
1753 // Inactive
1754 else {
1755 printf("<form method=\"POST\" action=\"scribe.phtml?page_id=%d\">", $page_id);
1756 printf("<input type=\"Hidden\" name=\"active\" value=\"introheader1\">");
1757 printf("%s ", $introheader1);
1758 printf("<input type = \"image\" src=\"images/edit.gif\" name =\"edit\" alt=\"edit\">\n");
1759 printf("</form>\n");
1760 }
1761 printf("</td></tr>\n");
1762
1763
1764 /********************
1765 ** Intro Message 1 **
1766 ********************/
1767
1768 printf("<tr><td colspan=\"4\"><b>Introductory Message 1:</b></td></tr>\n");
1769 printf("<tr><td align=\"left\" valign=\"middle\" colspan=\"6\">\n");
1770
1771 // Active
1772 if ($active == "intromessage1") {
1773 printf("<form method=\"POST\" action =\"scribe_transaction.phtml\">\n");
1774 printf("<input type=\"Hidden\" name=\"transaction\" value=\"updateScribeCourse\">\n");
1775 printf("<input type=\"Hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
1776 printf("<input type=\"Hidden\" name=\"course_id\" value=\"%d\">\n", $course_id);
1777 printf("<input type=\"Hidden\" name=\"field_name\" value=\"intromessage1\">\n");
1778 printf("<textarea rows=\"5\" cols=\"65\" name =\"field_value\" >\n");
1779 printf("%s", $intromessage1);
1780 printf("</textarea>\n");
1781
1782 // Save or cancel
1783 printf("<input type=\"submit\" value =\"Save\">\n");
1784 // printf("<input type = \"image\" src=\"images/save.jpg\" name =\"save\" alt=\"save\">\n");
1785 printf("<a href=\"scribe.phtml?page_id=%d\">Cancel</a>\n", $page_id);
1786
1787 printf("</form>\n");
1788 }
1789
1790 // Inactive
1791 else {
1792 printf("<form method=\"POST\" action=\"scribe.phtml?page_id=%d\">", $page_id);
1793 printf("<input type=\"Hidden\" name=\"active\" value=\"intromessage1\">");
1794 printf("%s ", $intromessage1);
1795 printf("<input type = \"image\" src=\"images/edit.gif\" name =\"edit\" alt=\"edit\">\n");
1796 printf("</form>\n");
1797 }
1798 printf("<br></td></tr>\n");
1799
1800
1801 /*******************
1802 ** Intro Header 2 **
1803 *******************/
1804
1805 printf("<tr><td align=\"center\" colspan=\"4\"><b>Introductory Header 2:</b></td></tr>\n");
1806 printf("<tr><td align=\"center\" valign=\"middle\" colspan=\"4\">\n");
1807
1808 // Active
1809 if ($active == "introheader2") {
1810 printf("<form method=\"POST\" action =\"scribe_transaction.phtml\">\n");
1811 printf("<input type=\"Hidden\" name=\"transaction\" value=\"updateScribeCourse\">\n");
1812 printf("<input type=\"Hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
1813 printf("<input type=\"Hidden\" name=\"course_id\" value=\"%d\">\n", $course_id);
1814 printf("<input type=\"Hidden\" name=\"field_name\" value=\"introheader2\">\n");
1815 printf("<input type =\"text\" size=\"30\" name=\"field_value\" value = \"%s\" >\n", $introheader2);
1816
1817 // Save or cancel
1818 printf("<input type=\"submit\" value =\"Save\">\n");
1819 // printf("<input type = \"image\" src=\"images/save.jpg\" name =\"save\" alt=\"save\">\n");
1820 printf("<a href=\"scribe.phtml?page_id=%d\">Cancel</a>\n", $page_id);
1821
1822 printf("</form>\n");
1823 }
1824
1825 // Inactive
1826 else {
1827 printf("<form method=\"POST\" action=\"scribe.phtml?page_id=%d\">", $page_id);
1828 printf("<input type=\"Hidden\" name=\"active\" value=\"introheader2\">");
1829 printf("%s ", $introheader2);
1830 printf("<input type = \"image\" src=\"images/edit.gif\" name =\"edit\" alt=\"edit\">\n");
1831 printf("</form>\n");
1832 }
1833 printf("</td></tr>\n");
1834
1835 /********************
1836 ** Intro Message 2 **
1837 ********************/
1838
1839 printf("<tr><td colspan=\"4\"><b>Introductory Message 2:</b></td></tr>\n");
1840 printf("<tr><td align=\"left\" valign=\"middle\" colspan=\"4\">\n");
1841
1842 // Active
1843 if ($active == "intromessage2") {
1844 printf("<form method=\"POST\" action =\"scribe_transaction.phtml\">\n");
1845 printf("<input type=\"Hidden\" name=\"transaction\" value=\"updateScribeCourse\">\n");
1846 printf("<input type=\"Hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
1847 printf("<input type=\"Hidden\" name=\"course_id\" value=\"%d\">\n", $course_id);
1848 printf("<input type=\"Hidden\" name=\"field_name\" value=\"intromessage2\">\n");
1849 printf("<textarea rows=\"5\" cols=\"65\" name =\"field_value\" >\n");
1850 printf("%s", $intromessage2);
1851 printf("</textarea>\n");
1852
1853 // Save or cancel
1854 printf("<input type=\"submit\" value =\"Save\">\n");
1855 // printf("<input type = \"image\" src=\"images/save.jpg\" name =\"save\" alt=\"save\">\n");
1856 printf("<a href=\"scribe.phtml?page_id=%d\">Cancel</a>\n", $page_id);
1857
1858 printf("</form>\n");
1859 }
1860
1861 // Inactive
1862 else {
1863 printf("<form method=\"POST\" action=\"scribe.phtml?page_id=%d\">", $page_id);
1864 printf("<input type=\"Hidden\" name=\"active\" value=\"intromessage2\">");
1865 printf("%s ", $intromessage2);
1866 printf("<input type = \"image\" src=\"images/edit.gif\" name =\"edit\" alt=\"edit\">\n");
1867 printf("</form>\n");
1868 }
1869 printf("<br></td></tr>\n");
1870
1871 // Close table
1872 printf("</table>\n");
1873
1874 }
1875
1876
1877 /**********************************************************
1878 Function: formCoursePers
1879 Author: Paul Bramscher
1880 Last Modified: 06.23.2003
1881 ***********************************************************
1882 Purpose:
1883 Allows the selection of existing LibData library staff,
1884 faculty (drawn from the faculty table), or creation of
1885 on-the-fly and non-indexed TA/other staff. Also, it is
1886 possible here to create faculty on the fly.
1887 **********************************************************/
1888 function formCoursePers($con, $active, $course_id, $page_id) {
1889
1890 // Retrieve current information
1891 $sql = "SELECT *
1892 FROM
1893 course_personnel cp
1894 LEFT JOIN staff s using (staff_id)
1895 LEFT JOIN stafftitle st on cp.stafftitle_id = st.stafftitle_id
1896 LEFT JOIN faculty f on cp.faculty_id = f.faculty_id
1897
1898 WHERE
1899 course_id = " . $course_id . " ORDER BY personnel_id";
1900
1901 $rs = mysql_query($sql, $con);
1902
1903 // Table
1904 printf("<table cellpadding = \"0\" cellspacing = \"4\" >\n");
1905
1906 // Display course personnel
1907 printf("<tr><td colspan=\"2\">\n");
1908
1909 // Add course personnel anchor
1910 printf("<a name=\"coursePers\"></a>\n");
1911
1912 printf("<b>Personnel:</b><br>\n");
1913 printf("</td></tr>\n");
1914
1915 while ($row = mysql_fetch_array ($rs)) {
1916
1917 // Initialize
1918 $last_name = "";
1919 $first_name = "";
1920 $x500 = "";
1921 $email = "";
1922 $stafftitle = "";
1923
1924 // Fetch the general stuff
1925 $personnel_id = $row["personnel_id"];
1926 $staff_id = $row["staff_id"];
1927 $faculty_id = $row["faculty_id"];
1928 $stafftitle = $row["stafftitle"];
1929 $stafftitle_id = $row["stafftitle_id"];
1930
1931 // Row is staff. (Not 0, NULL, 1=N/A).
1932 if ($staff_id > 1) {
1933
1934 // Gather the staff table fields
1935 $last_name = $row["last_name"];
1936 $first_name = $row["first_name"];
1937 $x500 = $row["staff_account"];
1938 $email = $x500 . "@umn.edu";
1939
1940 }
1941
1942 // Row is faculty (Not 0, NULL, 1=N/A).
1943 else if ($faculty_id > 1) {
1944
1945 // Gather the faculty table fields
1946 $last_name = $row["faculty_lastname"];
1947 $first_name = $row["faculty_firstname"];
1948 $x500 = $row["faculty_account"];
1949 $email = $row["faculty_email"];
1950
1951 }
1952
1953 // Row is "other", use the freetext fields
1954 else {
1955
1956 // Gather the catch-all fields
1957 $last_name = $row["pers_lastname"];
1958 $first_name = $row["pers_firstname"];
1959 $x500 = $row["pers_account"];
1960 $email = $row["pers_email"];
1961 }
1962
1963
1964 // Display the row, offer delete option
1965 printf("<tr><td>\n");
1966 if ($stafftitle_id > 1) printf("%s: ", $stafftitle);
1967 printf("%s %s <a href=\"mailto:%s\">%s</a><br>\n",
1968 $first_name, $last_name, $email, $email);
1969 printf("</td>\n");
1970
1971 // Offer delete button
1972 printf("<td>\n");
1973 printf("<form method=\"post\" action=\"scribe_transaction.phtml\">\n");
1974 printf("<input type=\"hidden\" name=\"transaction\" value=\"deleteCoursePers\">\n");
1975 printf("<input type=\"hidden\" name=\"personnel_id\" value = \"%d\" >\n", $personnel_id);
1976 printf("<input type=\"hidden\" name=\"course_id\" value = \"%d\" >\n", $course_id);
1977 printf("<input type=\"hidden\" name=\"page_id\" value = \"%d\">\n", $page_id);
1978 printf("<input type=\"submit\" value=\"Remove\">\n");
1979 printf("</td>\n");
1980 printf("</form>\n");
1981
1982 // Close row
1983 printf("</tr>\n");
1984
1985 } // end course_personnel rows
1986
1987 // Close personnel display table
1988 printf("</table>\n");
1989
1990 // Offer an add course personnel button
1991 if ($active != "addCoursePers" ){
1992
1993 // Offer add option
1994 printf("<table><tr><td colspan=\"2\">\n");
1995 printf("<form method=\"post\" action=\"scribe.phtml?page_id=%d#coursePers\">\n", $page_id);
1996 printf("<input type=\"hidden\" name=\"active\" value=\"addCoursePers\">\n");
1997 printf("<input type=\"submit\" value=\"Add Personnel\">\n");
1998 printf("</td></tr></table>\n");
1999 printf("</form>\n");
2000
2001 }
2002
2003 // Add course personnel is active, display the selection form
2004 else {
2005
2006 // Outer box table
2007 printf("<table width = \"40%%\" border=\"1\" cellpadding=\"4\" class=\"backLight\" >\n");
2008 printf("<tr><td class=\"cellPlain\">\n");
2009 printf("Add Course Personnel");
2010 printf("</td></tr>\n");
2011 printf("<td>\n");
2012
2013 // Add form table
2014 printf("<table width = \"100%%\" class=\"backLight\" cellpadding = \"0\" cellspacing = \"4\" >\n");
2015
2016 // "add" is active, offer the add form
2017 printf("<form method=\"post\" action=\"scribe_transaction.phtml\">\n");
2018 printf("<input type=\"hidden\" name=\"transaction\" value=\"insertCoursePers\">\n");
2019 printf("<input type=\"hidden\" name=\"course_id\" value=\"%d\">\n", $course_id);
2020 printf("<input type=\"hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
2021
2022 // Staff title
2023 printf("<tr><td valign=\"top\" >\n");
2024 printf("<b>Personnel Title:</b>\n");
2025 printf("</td><td colspan = \"2\" valign=\"top\" >\n");
2026 printf("<select name=\"stafftitle_id\">\n");
2027 dropDownField($con, "stafftitle", "stafftitle", "stafftitle_id");
2028 printf("</select><br><br>");
2029 printf("</td></tr>\n");
2030
2031 // Select one of the following...
2032 printf("<tr><td colspan=\"3\" valign=\"top\" >\n");
2033 printf("Select <b>one</b> of the following:\n");
2034 printf("</td></tr>\n");
2035
2036 // HR for readability
2037 printf("<tr><td colspan=\"3\">\n");
2038 printf("<hr>\n");
2039 printf("</td></tr>\n");
2040
2041 // Staff
2042 printf("<tr><td valign=\"top\">\n");
2043 printf("<b>Library Staff:</b>\n");
2044 printf("</td><td colspan = \"2\" valign=\"top\" >\n");
2045 printf("<select name=\"staff_id\">\n");
2046 dropDownStaff($con);
2047 printf("</select>");
2048 printf("</td></tr>\n");
2049
2050 // HR for readability
2051 printf("<tr><td colspan=\"3\">\n");
2052 printf("<hr>\n");
2053 printf("<b>OR</b><br><br>\n");
2054 printf("</td></tr>\n");
2055
2056 // Faculty
2057 printf("<tr><td valign=\"top\">\n");
2058 printf("<b>U Faculty:</b>\n");
2059 printf("</td><td colspan = \"2\" valign=\"top\" >\n");
2060 printf("<select name=\"faculty_id\">\n");
2061 dropDownFaculty($con);
2062 printf("</select>");
2063 printf("</td></tr>\n");
2064
2065 // HR for readability
2066 printf("<tr><td colspan=\"3\">\n");
2067 printf("<hr>\n");
2068 printf("<b>OR Fill out the following:</b><br><br>\n");
2069 printf("<b>Important Note:</b> You may enter faculty on-the-fly here if they
2070 are not present in the drop-down list above. TA's and non-affiliated
2071 instructors may be also entered. Be sure to click the 'faculty'
2072 radio button below if you wish to index your entry as a faculty person.
2073 Do not enter library staff here.<br><br>");
2074 printf("</td></tr>\n");
2075
2076 // Or freetext
2077 printf("<tr><td>\n");
2078 printf("<b>Last name:</b> ");
2079 printf("</td><td colspan = \"2\" >\n");
2080 printf("<input type =\"text\" name =\"pers_lastname\" size=\"30\">\n");
2081 printf("</td></tr>\n");
2082 printf("<tr><td>\n");
2083 printf("<b>First name:</b> ");
2084 printf("</td><td colspan = \"2\" >\n");
2085 printf("<input type =\"text\" name =\"pers_firstname\" size=\"20\">\n");
2086 printf("</td></tr>\n");
2087 printf("<tr><td>\n");
2088 printf("<b>x500 (if applicable):</b> ");
2089 printf("</td><td colspan = \"2\" >\n");
2090 printf("<input type =\"text\" name =\"pers_account\" size=\"15\">\n");
2091 printf("</td></tr>\n");
2092 printf("<tr><td>\n");
2093 printf("<b>E-mail:</b> ");
2094 printf("</td><td colspan = \"2\" >\n");
2095 printf("<input type =\"text\" name =\"pers_email\" size=\"30\">\n");
2096 printf("</td></tr>\n");
2097
2098 // Entry type
2099 printf("<tr><td colspan=\"3\"><br>\n");
2100 printf("<b>Faculty</b> <input type =\"radio\" name =\"pers_type\" value=\"faculty\" checked>\n");
2101 printf("<b>TA/Other</b> <input type =\"radio\" name =\"pers_type\" value=\"other\">\n");
2102 printf("</td></tr>\n");
2103
2104 // HR for readability
2105 printf("<tr><td colspan=\"3\">\n");
2106 printf("<hr>\n");
2107 printf("</td></tr>\n");
2108
2109 // Submit or reset form
2110 printf("<tr><td align=\"right\">\n");
2111 printf("<input type=\"submit\" value=\"Submit\"> ");
2112 printf("</td><td align=\"center\">\n");
2113 printf("<input type=\"reset\" value=\"Reset\">\n");
2114 printf("</td>\n");
2115 printf("</form>\n");
2116
2117 // Cancel form
2118 printf("<td align=\"left\">\n");
2119 printf("<form method=\"post\" action=\"scribe.phtml?page_id=%d\">\n", $page_id);
2120 printf("<input type=\"submit\" value=\"Cancel\">\n");
2121 printf("</td></tr>\n");
2122 printf("</form>\n");
2123
2124 }
2125
2126 // Close add form table
2127 printf("</table>\n");
2128
2129 // Close outer table
2130 printf("</td></tr></table>\n");
2131
2132 }
2133
2134
2135 /**********************************************************
2136 Function: formPageHeader
2137 Author: Paul Bramscher
2138 Last Modified: 01.27.2004
2139 ***********************************************************
2140 Purpose:
2141 This function allows the editing of the supplied page id
2142 pageheader field.
2143 **********************************************************/
2144 function formPageHeader($con, $active, $page_id) {
2145
2146 // Retrieve current information
2147 $sql = "SELECT
2148 pageheader
2149 FROM
2150 page
2151 WHERE
2152 page_id = " . $page_id;
2153
2154
2155 $rs = mysql_query($sql, $con);
2156 $row = mysql_fetch_array ($rs);
2157
2158 $pageheader = $row["pageheader"];
2159
2160 // Run strings through the HTML cleaner for output
2161 $pageheader = textOutHTML($pageheader);
2162
2163
2164 /****************
2165 ** Page Header **
2166 ****************/
2167
2168 printf("<b>Page Header:</b><br>\n");
2169
2170
2171 // Table
2172 printf("<table border =\"0\" cellpadding=\"0\" cellspacing=\"0\">\n");
2173 printf("<tr>\n");
2174
2175
2176 // Active
2177 if ($active == "pageheader") {
2178 printf("<form method=\"POST\" action =\"scribe_transaction.phtml\">\n");
2179 printf("<td>\n");
2180 printf("<input type=\"Hidden\" name=\"transaction\" value=\"updatePageHeader\">\n");
2181 printf("<input type=\"Hidden\" name=\"page_id\" value=\"%d\">\n", $page_id);
2182 printf("<textarea name =\"pageheader\" rows=\"5\" cols=\"80\">\n");
2183 printf($pageheader);
2184 printf("</textarea>\n");
2185
2186 // Save or cancel
2187 printf("<input type=\"submit\" value =\"Save\">\n");
2188 printf("<a href=\"scribe.phtml?page_id=%d\">Cancel</a>\n", $page_id);
2189
2190 printf("</td>\n");
2191 printf("</form>\n");
2192
2193 }
2194
2195 // Inactive
2196 else {
2197 printf("<form method=\"POST\" action=\"scribe.phtml?page_id=%d\">", $page_id);
2198 printf("<td align=\"left\">\n");
2199 printf("<input type=\"Hidden\" name=\"active\" value=\"pageheader\">");
2200 printf("%s ", $pageheader);
2201 printf("<input type = \"image\" src=\"images/edit.gif\" name =\"edit\" alt=\"edit\">\n");
2202 printf("</td>\n");
2203 printf("</form>\n");
2204 }
2205 printf("</tr>\n");
2206
2207 // Close table
2208 printf("</table><br>\n");
2209 }
2210
2211
2212 /**********************************************************
2213 Function:pageTitleStyle
2214 Author: Paul Bramscher
2215 Last Modified: 11.21.2003
2216 ***********************************************************
2217 Purpose:
2218 Display the style elements (1-5) that may be applied to
2219 the CLPS page title. The currently-enforced style
2220 (if non-NULL) is displayed in boldface. If no style
2221 is selected, the "X" is bolded.
2222 **********************************************************/
2223 function pageTitleStyle($con, $page_id, $pagetitle_style){
2224
2225 // Initial the bolding variables
2226 $bold0 = "";
2227 $bold0_close = "";
2228 $bold1 = "";
2229 $bold1_close = "";
2230 $bold2 = "";
2231 $bold2_close = "";
2232 $bold3 = "";
2233 $bold3_close = "";
2234 $bold4 = "";
2235 $bold4_close = "";
2236 $bold5 = "";
2237 $bold5_close = "";
2238
2239 // Display the selected size in bold type
2240 switch ($pagetitle_style) {
2241
2242 case 1: $bold1 = "<b>";
2243 $bold1_close = "</b>";
2244 break;
2245 case 2: $bold2 = "<b>";
2246 $bold2_close = "</b>";
2247 break;
2248 case 3: $bold3 = "<b>";
2249 $bold3_close = "</b>";
2250 break;
2251
2252 case 4: $bold4 = "<b>";
2253 $bold4_close = "</b>";
2254 break;
2255 case 5: $bold5 = "<b>";
2256 $bold5_close = "</b>";
2257 break;
2258 default: $bold0 = "<b>";
2259 $bold0_close = "</b>";
2260 break;
2261 }
2262
2263 // Style control
2264 printf("Style: [ %s<a href=\"scribe_transaction.phtml?transaction=updatePageTitleStyle&page_id=%d&pagetitle_style=0\">X</a>%s | ", $bold0, $page_id, $bold0_close);
2265 printf("%s<a href=\"scribe_transaction.phtml?transaction=updatePageTitleStyle&page_id=%d&pagetitle_style=1\">1</a>%s | ", $bold1, $page_id, $bold1_close);
2266 printf("%s<a href=\"scribe_transaction.phtml?transaction=updatePageTitleStyle&page_id=%d&pagetitle_style=2\">2</a>%s | ", $bold2, $page_id, $bold2_close);
2267 printf("%s<a href=\"scribe_transaction.phtml?transaction=updatePageTitleStyle&page_id=%d&pagetitle_style=3\">3</a>%s | ", $bold3, $page_id, $bold3_close);
2268 printf("%s<a href=\"scribe_transaction.phtml?transaction=updatePageTitleStyle&page_id=%d&pagetitle_style=4\">4</a>%s | ", $bold4, $page_id, $bold4_close);
2269 printf("%s<a href=\"scribe_transaction.phtml?transaction=updatePageTitleStyle&page_id=%d&pagetitle_style=5\">5</a>%s ]\n", $bold5, $page_id, $bold5_close);
2270
2271 }
2272
2273
2274 /**********************************************************
2275 Function: readButtons
2276 Author: Paul Bramscher
2277 Last Modified: 08.25.2003
2278 ***********************************************************
2279 Purpose:
2280 Display read-only buttons (currently only copy an element),
2281 rather than the full authoring set of buttons on a scribe
2282 page.
2283 **********************************************************/
2284 function readButtons($con, $element_size, $label_text, $label_url,
2285 $place_array, $resource_id, $page_id, $element_id){
2286
2287 // Break apart place array
2288 // $element_id = $place_array[0];
2289 // $element_order = $place_array[1];
2290 // $indent_level = $place_array[2];
2291 // $parent_id = $place_array[3];
2292 $position = $place_array[4];
2293
2294 // Initial the bolding variables
2295 $bold0 = "";
2296 $bold0_close = "";
2297 $bold1 = "";
2298 $bold1_close = "";
2299 $bold2 = "";
2300 $bold2_close = "";
2301 $bold3 = "";
2302 $bold3_close = "";
2303 $bold4 = "";
2304 $bold4_close = "";
2305 $bold5 = "";
2306 $bold5_close = "";
2307
2308 // Display the selected size in bold type
2309 switch ($element_size) {
2310
2311 case 1: $bold1 = "<b>";
2312 $bold1_close = "</b>";
2313 break;
2314 case 2: $bold2 = "<b>";
2315 $bold2_close = "</b>";
2316 break;
2317 case 3: $bold3 = "<b>";
2318 $bold3_close = "</b>";
2319 break;
2320
2321 case 4: $bold4 = "<b>";
2322 $bold4_close = "</b>";
2323 break;
2324 case 5: $bold5 = "<b>";
2325 $bold5_close = "</b>";
2326 break;
2327 default: $bold0 = "<b>";
2328 $bold0_close = "</b>";
2329 break;
2330 }
2331
2332 // Copy
2333 printf("<a href=\"scribe_read.phtml?page_id=%d&cmd=copyElement&this_pos=%d#p%d\"><img src=\"images/copy.gif\" border=\"0\" alt=\"copy\"></a>\n", $page_id, $position, $position);
2334
2335 }
2336 ?>

  ViewVC Help
Powered by ViewVC 1.1.26