19 |
|
|
20 |
// If stats are enabled, add a hit to the page load statistics |
// If stats are enabled, add a hit to the page load statistics |
21 |
if ($libstats == 1) { |
if ($libstats == 1) { |
22 |
pageLoadStats($con, $page_id); |
pageLoadStats($page_id); |
23 |
} |
} |
24 |
|
|
25 |
|
|
32 |
// Debugging |
// Debugging |
33 |
// printf("sql was: %s<BR>", $sql); |
// printf("sql was: %s<BR>", $sql); |
34 |
|
|
35 |
$rs = mysql_query($sql, $con); |
$rs = mysql_tryquery($sql); |
36 |
$row = mysql_fetch_array ($rs); |
$row = mysql_fetch_array ($rs, MYSQL_ASSOC); |
37 |
|
|
38 |
// Fetch data |
// Fetch data |
39 |
$pagetype_id = $row["pagetype_id"]; |
$pagetype_id = $row["pagetype_id"]; |
94 |
**********************************************/ |
**********************************************/ |
95 |
|
|
96 |
if ($pagetype_id == 3) { |
if ($pagetype_id == 3) { |
97 |
displayCourseHeader($con, $page_id, $pagetitle_style); |
displayCourseHeader($page_id, $pagetitle_style); |
98 |
displayCoursePers($con, $page_id); |
displayCoursePers($page_id); |
99 |
|
|
100 |
// Display HR |
// Display HR |
101 |
printf("<hr><br>\n"); |
printf("<hr><br>\n"); |
125 |
** Display Table of Contents ** |
** Display Table of Contents ** |
126 |
******************************/ |
******************************/ |
127 |
if ($display_toc == 1) { |
if ($display_toc == 1) { |
128 |
displayTOC($con, $page_id, $wrap_toc); |
displayTOC($page_id, $wrap_toc); |
129 |
} |
} |
130 |
|
|
131 |
|
|
144 |
|
|
145 |
$sql = "SELECT * FROM element e |
$sql = "SELECT * FROM element e |
146 |
LEFT JOIN resource r using (resource_id) |
LEFT JOIN resource r using (resource_id) |
147 |
|
LEFT JOIN vendor d on r.vendor_id = d.vendor_id |
148 |
LEFT JOIN service v on e.service_id = v.service_id |
LEFT JOIN service v on e.service_id = v.service_id |
149 |
LEFT JOIN location l on e.location_id = l.location_id |
LEFT JOIN location l on e.location_id = l.location_id |
150 |
LEFT JOIN staff s on e.staff_id = s.staff_id |
LEFT JOIN staff s on e.staff_id = s.staff_id |
152 |
WHERE page_id = " . $page_id |
WHERE page_id = " . $page_id |
153 |
. " ORDER BY e.element_order"; |
. " ORDER BY e.element_order"; |
154 |
|
|
155 |
$rs = mysql_query($sql, $con); |
$rs = mysql_tryquery($sql); |
156 |
|
|
157 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = mysql_fetch_array ($rs, MYSQL_ASSOC)) { |
158 |
|
|
159 |
// General element information |
// General element information |
160 |
$element_id = $row["element_id"]; |
$element_id = $row["element_id"]; |
174 |
$title = $row["title"]; |
$title = $row["title"]; |
175 |
$call_no = $row["call_no"]; |
$call_no = $row["call_no"]; |
176 |
|
|
177 |
|
$guide_url = $row["guide_url"]; |
178 |
|
$resource_message = $row["resource_message"]; |
179 |
|
$resource_status = $row["resource_status"]; |
180 |
|
$vendor_message = $row["vendor_message"]; |
181 |
|
$vendor_status = $row["vendor_status"]; |
182 |
|
|
183 |
// If a location |
// If a location |
184 |
$location_id = $row["location_id"]; |
$location_id = $row["location_id"]; |
185 |
$location = $row["location"]; |
$location = $row["location"]; |
351 |
printf ("%s", $item_display); |
printf ("%s", $item_display); |
352 |
|
|
353 |
// If a span class is being used, close it now |
// If a span class is being used, close it now |
354 |
if ($element_size > 0) printf ("</span>\n"); |
if ($element_size > 0) printf ("</span>\n"); |
|
|
|
355 |
|
|
356 |
// Display URL if toggled and available |
// Display URL if toggled and available |
357 |
if (strlen($printable_url) > 0 && $display_urls == 1) printf("<BR>%s\n", $printable_url); |
if (strlen($printable_url) > 0 && $display_urls == 1) printf("<BR>%s\n", $printable_url); |
358 |
|
|
359 |
|
// Handle down/alert messages |
360 |
|
if ($vendor_status > 0 || $resource_status > 0) { |
361 |
|
|
362 |
|
printf("<br><img src =\"images/chain.jpg\" alt=\"Resource Temporarily Unavailable\">\n"); |
363 |
|
printf("<span class=\"error\">\n"); |
364 |
|
if (strlen($vendor_message) > 1) printf("%s\n", $vendor_message); |
365 |
|
else if (strlen($resource_message) > 1) printf("%s\n", $resource_message); |
366 |
|
printf("</span>\n"); |
367 |
|
} |
368 |
|
|
369 |
// Display description |
// Display description |
370 |
if (strlen($item_descr) > 0) printf("<BR>%s\n", $item_descr); |
if (strlen($item_descr) > 0) printf("<BR>%s\n", $item_descr); |
404 |
|
|
405 |
// Display page coordinator |
// Display page coordinator |
406 |
if ($staff_coordinator > 0) { |
if ($staff_coordinator > 0) { |
407 |
$display_page_coord = lookupStaff($con, $staff_coordinator); |
$display_page_coord = lookupStaff($staff_coordinator); |
408 |
$staff_email = lookupField($con, "staff", "staff_id", $staff_coordinator, "staff_email"); |
$staff_email = lookupField("staff", "staff_id", $staff_coordinator, "staff_email"); |
409 |
|
|
410 |
if (strlen($display_page_coord) > 0 && strlen($staff_email) > 0) { |
if (strlen($display_page_coord) > 0 && strlen($staff_email) > 0) { |
411 |
printf("<span class=\"S5\">\n"); |
printf("<span class=\"S5\">\n"); |