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 |
|
|
31 |
|
|
32 |
// printf("sql was: %s<BR>", $sql); |
// printf("sql was: %s<BR>", $sql); |
33 |
|
|
34 |
$rs = mysql_query($sql, $con); |
$rs = mysql_tryquery($sql); |
35 |
$row = mysql_fetch_array ($rs); |
$row = mysql_fetch_array ($rs, MYSQL_ASSOC); |
36 |
|
|
37 |
// Fetch data |
// Fetch data |
38 |
$pagetype_id = $row["pagetype_id"]; |
$pagetype_id = $row["pagetype_id"]; |
98 |
**********************************************/ |
**********************************************/ |
99 |
|
|
100 |
if ($pagetype_id == 3) { |
if ($pagetype_id == 3) { |
101 |
displayCourseHeader($con, $page_id, $pagetitle_style); |
displayCourseHeader($page_id, $pagetitle_style); |
102 |
displayCoursePers($con, $page_id); |
displayCoursePers($page_id); |
103 |
|
|
104 |
// Display HR |
// Display HR |
105 |
printf("<hr><br>\n"); |
printf("<hr><br>\n"); |
130 |
** Display Table of Contents ** |
** Display Table of Contents ** |
131 |
******************************/ |
******************************/ |
132 |
if ($display_toc == 1) { |
if ($display_toc == 1) { |
133 |
displayTOC($con, $page_id, $wrap_toc); |
displayTOC($page_id, $wrap_toc); |
134 |
} |
} |
135 |
|
|
136 |
|
|
149 |
|
|
150 |
$sql = "SELECT * FROM element e |
$sql = "SELECT * FROM element e |
151 |
LEFT JOIN resource r using (resource_id) |
LEFT JOIN resource r using (resource_id) |
152 |
|
LEFT JOIN vendor d on r.vendor_id = d.vendor_id |
153 |
LEFT JOIN service v on e.service_id = v.service_id |
LEFT JOIN service v on e.service_id = v.service_id |
154 |
LEFT JOIN location l on e.location_id = l.location_id |
LEFT JOIN location l on e.location_id = l.location_id |
155 |
LEFT JOIN staff s on e.staff_id = s.staff_id |
LEFT JOIN staff s on e.staff_id = s.staff_id |
157 |
WHERE page_id = " . $page_id |
WHERE page_id = " . $page_id |
158 |
. " ORDER BY e.element_order"; |
. " ORDER BY e.element_order"; |
159 |
|
|
160 |
$rs = mysql_query($sql, $con); |
$rs = mysql_tryquery($sql); |
161 |
|
|
162 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = mysql_fetch_array ($rs, MYSQL_ASSOC)) { |
163 |
|
|
164 |
// General element information |
// General element information |
165 |
$element_id = $row["element_id"]; |
$element_id = $row["element_id"]; |
179 |
$title = $row["title"]; |
$title = $row["title"]; |
180 |
$call_no = $row["call_no"]; |
$call_no = $row["call_no"]; |
181 |
|
|
182 |
|
$guide_url = $row["guide_url"]; |
183 |
|
$resource_message = $row["resource_message"]; |
184 |
|
$resource_status = $row["resource_status"]; |
185 |
|
$vendor_message = $row["vendor_message"]; |
186 |
|
$vendor_status = $row["vendor_status"]; |
187 |
|
|
188 |
// If a location |
// If a location |
189 |
$location_id = $row["location_id"]; |
$location_id = $row["location_id"]; |
190 |
$location = $row["location"]; |
$location = $row["location"]; |
356 |
// If a span class is being used, close it now |
// If a span class is being used, close it now |
357 |
if ($element_size > 0) printf ("</span>\n"); |
if ($element_size > 0) printf ("</span>\n"); |
358 |
|
|
|
|
|
359 |
// Display URL if toggled and available |
// Display URL if toggled and available |
360 |
if (strlen($item_url) > 0 && $display_urls == 1) printf("<BR>%s<BR>\n", $item_url); |
if (strlen($item_url) > 0 && $display_urls == 1) printf("<BR>%s<BR>\n", $item_url); |
361 |
|
|
362 |
|
// Handle down/alert messages |
363 |
|
if ($vendor_status > 0 || $resource_status > 0) { |
364 |
|
|
365 |
|
printf("<br><img src =\"images/chain.jpg\" alt=\"Resource Temporarily Unavailable\">\n"); |
366 |
|
printf("<span class=\"error\">\n"); |
367 |
|
if (strlen($vendor_message) > 1) printf("%s\n", $vendor_message); |
368 |
|
else if (strlen($resource_message) > 1) printf("%s\n", $resource_message); |
369 |
|
printf("</span>\n"); |
370 |
|
} |
371 |
|
|
372 |
// Display description |
// Display description |
373 |
if (strlen($item_descr) > 0) printf("<BR>%s\n", $item_descr); |
if (strlen($item_descr) > 0) printf("<BR>%s\n", $item_descr); |
374 |
|
|
406 |
|
|
407 |
// Display page coordinator |
// Display page coordinator |
408 |
if ($staff_coordinator > 0) { |
if ($staff_coordinator > 0) { |
409 |
$display_page_coord = lookupStaff($con, $staff_coordinator); |
$display_page_coord = lookupStaff($staff_coordinator); |
410 |
$staff_email = lookupField($con, "staff", "staff_id", $staff_coordinator, "staff_email"); |
$staff_email = lookupField("staff", "staff_id", $staff_coordinator, "staff_email"); |
411 |
|
|
412 |
if (strlen($display_page_coord) > 0 && strlen($staff_email) > 0) { |
if (strlen($display_page_coord) > 0 && strlen($staff_email) > 0) { |
413 |
printf("<span class=\"S5\">\n"); |
printf("<span class=\"S5\">\n"); |