--- trunk/rqs.phtml 2004/03/18 20:21:08 71
+++ trunk/rqs.phtml 2004/03/18 20:33:37 72
@@ -37,10 +37,10 @@
// Initialize
$subject_id = (int) $subject_id;
$exists = 0;
-$exists = existsRow($con, "subject", "subject_id", $subject_id);
+$exists = existsRow("subject", "subject_id", $subject_id);
// If this subject is valid, increment stats
-if ($subject_id > 1 && $exists == 1) subLoadStats($con, $subject_id);
+if ($subject_id > 1 && $exists == 1) subLoadStats($subject_id);
/***********************************
@@ -48,8 +48,8 @@
***********************************/
// Determine if there are related PageScribe or RQS pages
-$other_ps = existsRow($con, "sub_page", "subject_id", $subject_id);
-$other_rqs = existsRow($con, "sub_othersub", "subject_id", $subject_id);
+$other_ps = existsRow("sub_page", "subject_id", $subject_id);
+$other_rqs = existsRow("sub_othersub", "subject_id", $subject_id);
// if printer friendly version don't print the TOC
@@ -77,14 +77,14 @@
}
$sql .= " ORDER BY mi.masterinfotype, i.infotype";
- $rs = xx_query($sql, $con);
+ $rs = xx_tryquery($sql);
$rows = xx_num_rows($rs);
// initialize
$last_masterinfotype_id = 0;
$rowcount = 0;
- while ($row = xx_fetch_array ($rs)) {
+ while ($row = xx_fetch_array ($rs, xx_ASSOC)) {
// Fetch information types for this subject
$infotype_id = $row["infotype_id"];
@@ -93,11 +93,11 @@
$masterinfotype = $row["masterinfotype"];
if ($last_masterinfotype_id == 0 || ($last_masterinfotype_id != $masterinfotype_id)) {
- printf("%s
\n", $subject_id, $masterinfotype_id, $masterinfotype);
+ printf("%s
\n", $subject_id, $masterinfotype_id, $masterinfotype);
printf("
\n"); printf(" | \n"); - printf(" | \n"); + printf(" | \n");
// Display the resource
if (strlen($url) > 0 ) {
@@ -238,10 +250,10 @@
. $resource_id
. " AND rf.feature_id = f.feature_id";
- $f_rs = xx_query($f_sql, $con);
+ $f_rs = xx_tryquery($f_sql);
- while ($f_row = xx_fetch_array ($f_rs)) {
+ while ($f_row = xx_fetch_array ($f_rs, xx_ASSOC)) {
$image_path = $f_row["image_path"];
$image_alt = $f_row["image_alt"];
printf(" ", $image_path, $image_alt);
@@ -252,6 +264,16 @@
printf(" %s\n", $url); } + // Handle down/alert messages + if ($vendor_status > 0 || $resource_status > 0) { + + printf(" \n"); + printf("\n"); + if (strlen($vendor_message) > 1) printf("%s \n", $vendor_message); + else if (strlen($resource_message) > 1) printf("%s \n", $resource_message); + printf("\n"); + } + // Display other items if (strlen($coverage) > 0) printf(" %s", $coverage); if (strlen($annotation) > 0) printf(" %s", $annotation); @@ -259,7 +281,7 @@ // Link to library holdings if something was supplied for catalog number if (strlen($cat_num) > 0) - printf(" Check Catalog", $cat_num); + printf(" Check Catalog", $cat_num); // Swap variables $last_m = $masterinfotype; @@ -282,8 +304,8 @@ subject.sublocation_id = location.location_id"; // Fetch the values -$rs = xx_query($sql, $con); -$row = xx_fetch_array ($rs); +$rs = xx_tryquery($sql); +$row = xx_fetch_array ($rs, xx_ASSOC); $location_id = $row["location_id"]; $location = $row["location"]; $location_descr = $row["location_descr"]; @@ -331,12 +353,12 @@ sub_loc.location_id = location.location_id"; // Fetch the values -$rs = xx_query($sql, $con); +$rs = xx_tryquery($sql); // Initialize $rowcount = 0; -while ($row = xx_fetch_array ($rs)) { +while ($row = xx_fetch_array ($rs, xx_ASSOC)) { $location_id = $row["location_id"]; $location = $row["location"]; @@ -387,11 +409,11 @@ /**************************************************************** ** Hunt for related subject pages & display them if they exist ** ****************************************************************/ -$othersubs = existsRow($con, "sub_othersub", "subject_id", $subject_id); +$othersubs = existsRow("sub_othersub", "subject_id", $subject_id); if ($othersubs > 0) { printf("
\n"; } @@ -399,11 +421,11 @@ /******************************************************************* ** Hunt for related PageScribe pages & display them if they exist ** *******************************************************************/ -$pages = existsRow($con, "sub_page", "subject_id", $subject_id); +$pages = existsRow("sub_page", "subject_id", $subject_id); if ($pages > 0) { printf("
|