16 |
printf("</HEAD>\n"); |
printf("</HEAD>\n"); |
17 |
|
|
18 |
|
|
19 |
|
// Default access settings |
20 |
|
$sess_time_human = ""; |
21 |
|
$sess_staff_account = ""; |
22 |
|
$sess_staff_id = 0; |
23 |
|
$sess_access_level = 0; |
24 |
|
$sess_access = ""; |
25 |
|
$sess_last_name = ""; |
26 |
|
$sess_first_name = ""; |
27 |
|
|
28 |
|
|
29 |
// Page header |
// Page header |
30 |
require_once ($GLOBAL_ADMIN_HEADER); |
require_once ($GLOBAL_ADMIN_HEADER); |
31 |
|
|
59 |
// Make sure some criteria was chosen (i.e. we don't want to return ALL records) |
// Make sure some criteria was chosen (i.e. we don't want to return ALL records) |
60 |
// However, a "*" for record_id means a wildcard. |
// However, a "*" for record_id means a wildcard. |
61 |
|
|
62 |
if ($account_created == "" && $account_modified == "" && $subject == "" && $author == "" && $annotation == "" && $subject_id < 1 && $title == "" && |
if ($account_created == "" && $account_modified == "" && $subject == "" && |
63 |
$date_created == "" && $date_modified == "" && $location =="" && $location_id < 1 && |
$author == "" && $annotation == "" && $subject_id < 1 && $title == "" && |
64 |
$infotype_id =="" && $resource_id < 1 && $resource_id != "*" && $cat_num < 1 && $url =="" && $call_no =="" && $feature_id < 1) $problem = 2; |
$date_created == "" && $date_modified == "" && $location =="" && |
65 |
|
$location_id < 1 && $infotype_id =="" && $resource_id < 1 && |
66 |
|
$resource_id != "*" && $cat_num < 1 && $url =="" && $call_no =="" && |
67 |
|
$feature_id < 1 && $feature_id < 1 && $vendor_id < 1 && |
68 |
|
$guide_url == "") $problem = 2; |
69 |
if ($resource_id == "*") $resource_id = ""; |
if ($resource_id == "*") $resource_id = ""; |
70 |
|
|
71 |
// Algorithm is cleared to search |
// Algorithm is cleared to search |
140 |
$sql .= " AND (r.url LIKE '%" . $url . "%')"; |
$sql .= " AND (r.url LIKE '%" . $url . "%')"; |
141 |
} |
} |
142 |
|
|
143 |
|
// If user limited by help/guide url |
144 |
|
if ($guide_url != ""){ |
145 |
|
|
146 |
|
$guide_url = textSearchmySQL($guide_url); |
147 |
|
$sql .= " AND (r.guide_url LIKE '%" . $guide_url . "%')"; |
148 |
|
} |
149 |
|
|
150 |
// If user limited by title |
// If user limited by title |
151 |
if ($title !=""){ |
if ($title !=""){ |
152 |
|
|
196 |
. $location_id |
. $location_id |
197 |
. ")"; |
. ")"; |
198 |
} |
} |
199 |
|
|
200 |
|
// If user limited by vendor id |
201 |
|
if ($vendor_id > 0){ |
202 |
|
$sql .= " AND (r.vendor_id =" |
203 |
|
. $vendor_id |
204 |
|
. ")"; |
205 |
|
} |
206 |
|
|
207 |
// If user limited by call number |
// If user limited by call number |
208 |
if ($call_no !=""){ |
if ($call_no !=""){ |
257 |
$sql .= " ORDER BY " . $orderby . " " . $orderdir; |
$sql .= " ORDER BY " . $orderby . " " . $orderdir; |
258 |
} |
} |
259 |
|
|
260 |
// Debugging |
$rs = xx_tryquery($sql); |
261 |
//printf("sql was: %s<BR>", $sql); |
|
|
|
|
|
|
|
|
if ( !$rs = xx_query ( $sql, $con ) ) { |
|
|
sql_err ( $sql ) And bailout(); |
|
|
} |
|
|
|
|
262 |
// Table |
// Table |
263 |
printf("<center><table width=\"90%%\" border =\"1\" bgcolor =\"#ffffff\" cellpadding=\"4\">"); |
printf("<center><table width=\"90%%\" border =\"1\" bgcolor =\"#ffffff\" cellpadding=\"4\">"); |
264 |
|
|
281 |
$rowcount = 0; |
$rowcount = 0; |
282 |
|
|
283 |
// Cycle through the result set of unique reference id's. |
// Cycle through the result set of unique reference id's. |
284 |
while ( $row = xx_fetch_array ( $rs ) ) { |
while ( $row = xx_fetch_array ($rs, xx_ASSOC)) { |
285 |
$resource_id = $row["resource_id"]; |
$resource_id = $row["resource_id"]; |
286 |
$title = Trim($row["title"]); |
$title = Trim($row["title"]); |
287 |
$publisher = Trim($row["publisher"]); |
$publisher = Trim($row["publisher"]); |