--- branches/paul/admin/res_results_brief.phtml 2004/03/07 19:15:27 66
+++ branches/paul/admin/res_results_brief.phtml 2004/03/18 19:24:54 67
@@ -16,6 +16,16 @@
printf("\n");
+// Default access settings
+$sess_time_human = "";
+$sess_staff_account = "";
+$sess_staff_id = 0;
+$sess_access_level = 0;
+$sess_access = "";
+$sess_last_name = "";
+$sess_first_name = "";
+
+
// Page header
require_once ($GLOBAL_ADMIN_HEADER);
@@ -49,9 +59,13 @@
// Make sure some criteria was chosen (i.e. we don't want to return ALL records)
// However, a "*" for record_id means a wildcard.
- if ($account_created == "" && $account_modified == "" && $subject == "" && $author == "" && $annotation == "" && $subject_id < 1 && $title == "" &&
- $date_created == "" && $date_modified == "" && $location =="" && $location_id < 1 &&
- $infotype_id =="" && $resource_id < 1 && $resource_id != "*" && $cat_num < 1 && $url =="" && $call_no =="" && $feature_id < 1) $problem = 2;
+ if ($account_created == "" && $account_modified == "" && $subject == "" &&
+ $author == "" && $annotation == "" && $subject_id < 1 && $title == "" &&
+ $date_created == "" && $date_modified == "" && $location =="" &&
+ $location_id < 1 && $infotype_id =="" && $resource_id < 1 &&
+ $resource_id != "*" && $cat_num < 1 && $url =="" && $call_no =="" &&
+ $feature_id < 1 && $feature_id < 1 && $vendor_id < 1 &&
+ $guide_url == "") $problem = 2;
if ($resource_id == "*") $resource_id = "";
// Algorithm is cleared to search
@@ -126,6 +140,13 @@
$sql .= " AND (r.url LIKE '%" . $url . "%')";
}
+ // If user limited by help/guide url
+ if ($guide_url != ""){
+
+ $guide_url = textSearchmySQL($guide_url);
+ $sql .= " AND (r.guide_url LIKE '%" . $guide_url . "%')";
+ }
+
// If user limited by title
if ($title !=""){
@@ -175,6 +196,13 @@
. $location_id
. ")";
}
+
+ // If user limited by vendor id
+ if ($vendor_id > 0){
+ $sql .= " AND (r.vendor_id ="
+ . $vendor_id
+ . ")";
+ }
// If user limited by call number
if ($call_no !=""){
@@ -229,14 +257,8 @@
$sql .= " ORDER BY " . $orderby . " " . $orderdir;
}
- // Debugging
- //printf("sql was: %s
", $sql);
-
-
- if ( !$rs = mysql_query ( $sql, $con ) ) {
- sql_err ( $sql ) And bailout();
- }
-
+ $rs = mysql_tryquery($sql);
+
// Table
printf("