function searchResults($cat1 = 'ALL', $categoty = '', $loc) { $retstr = '<div class="searchresult">'; $retstr .= 'Below shows the <span class="emphasis">lastest</span> postings for '; if (empty($cat1)) { $findstr = 'ALL ' . $categoty; } else { $findstr = Jobs::getCat1NameById($cat1) . ' ' . $categoty; } /* if (strtolower($region) == strtolower($city)) { $location = 'All ' . $city; } else { $location = $region . ' of ' . $city; } */ $location = ""; $searchRule = Location::getSearchRule($coutry); logfire('search resutl searchrule', $searchRule); if ($searchRule == 1 || $searchRule == 2) { if (!empty($city)) { $location = $city; } } if (!empty($state)) { if (empty($location)) { $location = $state; } else { $location .= ' ' . $state; } } if (!empty($coutry)) { if (empty($location)) { $location = $coutry; } else { $location .= ', ' . $coutry; } } $retstr .= '<span class="emphasis">' . $findstr . '</span> '; $retstr .= 'in <span class="emphasis">' . $location . '</span>. '; $retstr .= '</div>'; return $retstr; }