More unspsc
[contractdashboard.git] / search.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/*
 search ABNs
search agency name
search categories
search supplier names
--search supplier postcodes/suburbs/cities--
search CN number
search description full text
*/
include('./lib/common.inc.php');
if ($_REQUEST['searchID']) {
$searchIDParts = explode("-",$_REQUEST['searchID']);
$type = array_shift($searchIDParts);
$host  = $_SERVER['HTTP_HOST'];
$uri   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
 
if ($type == "agency") {
header("Location: http://$host$uri/displayAgency.php?agency=".implode("-",$searchIDParts));
}
if ($type == "supplier") {
header("Location: http://$host$uri/displaySupplier.php?supplier=".implode("-",$searchIDParts));
}
exit;
} else {
include_header("Search Results");
print_r($_REQUEST);
include_footer();
}
?>