--- a/lib/jquery.js +++ b/lib/jquery.js --- a/search.php +++ b/search.php @@ -1,8 +1,31 @@ -search ABNs + --- a/search_autosuggest.php +++ b/search_autosuggest.php @@ -6,7 +6,7 @@ $aResults = array(); $count = 0; if ($len) { - $query = "SELECT supplierName as info, supplierABN as id, supplierName as value, count(*) as count + $query = "SELECT supplierName, supplierABN, supplierName, count(*) as count FROM `contractnotice` WHERE supplierName LIKE '$input%' GROUP BY supplierName @@ -17,12 +17,12 @@ while ($row = mysql_fetch_array($result, MYSQL_BOTH)) { $count++; $aResults[] = array( - "id" => "supplier-".$row['id'], - "value" => htmlspecialchars($row['value']) , + "id" => "supplier-".$row['supplierABN'].'-'.$row['supplierName'], + "value" => htmlspecialchars($row['supplierName']) , "info" => htmlspecialchars("Supplier - ". $row['count']." records") ); } - $query = "SELECT agencyName as info, agencyName as id, agencyName as value, count(*) as count + $query = "SELECT agencyName, count(*) as count FROM `contractnotice` WHERE agencyName LIKE '$input%' GROUP BY agencyName @@ -32,8 +32,8 @@ while ($row = mysql_fetch_array($result, MYSQL_BOTH)) { $count++; $aResults[] = array( - "id" => "agency-".$row['id'], - "value" => htmlspecialchars($row['value']) , + "id" => "agency-".$row['agencyName'], + "value" => htmlspecialchars($row['agencyName']) , "info" => htmlspecialchars("Government Agency - ". $row['count']." records") ); } --- a/style.css +++ b/style.css @@ -11,17 +11,22 @@ } #search, form { -display: inline; float: right; margin-top: -1px; } #sitenav { + width: 99%; text-align: left; padding: 5px; border-top:1px solid black; border-bottom:1px solid black; +} + +#sitenav.a { + +display: inline; } #content { @@ -40,3 +45,25 @@ #ft { font-size: 66%; } + +// div collapse from http://roshanbh.com.np/2008/03/expandable-collapsible-toggle-pane-jquery.html +p { +padding: 0 0 1em; +} +.msg_list { +margin: 0px; +padding: 0px; +width: 383px; +} +.msg_head { +padding: 5px 10px; +cursor: pointer; +position: relative; +background-color:#FFCCCC; +margin:1px; +} +.msg_body { +padding: 5px 10px 15px; +background-color:#F4F4F8; +} +// div collapse