Esempio n. 1
0
echo SearchConstants::CURRENT_PAGE_ID;
?>
" value="<?php 
echo $bandSearchParameters->getVariable(SearchConstants::CURRENT_PAGE_ID);
?>
"/>
			<input type="hidden" id="<?php 
echo SearchConstants::PAGING_AMOUNT_ID;
?>
" name="<?php 
echo SearchConstants::PAGING_AMOUNT_ID;
?>
" value="<?php 
echo $bandSearchParameters->getVariable(SearchConstants::PAGING_AMOUNT_ID);
?>
"/>
		</form>

		<?php 
SearchUtilities::writeSearchInfo($bandSearchResults, $bandSearchParameters);
SearchUtilities::writeSearchMessages($bandSearchResults);
$bandSkeletons = $bandSearchResults->getVariable(SearchResults::SKELETONS);
$editable = true;
require_once $config->getIncludeURL(Config::INCLUDES_PATH, "views%bands%band_results_view.php");
SearchUtilities::writeSearchInfo($bandSearchResults, $bandSearchParameters);
SearchUtilities::writeSearchPages($bandSearchResults, $bandSearchParameters);
?>
	</div>
<?php 
//Output the footer information
$templateUtilities->writePageFooter();
Esempio n. 2
0
 /**
  * Restaurant Search function
  * route: /restaurants/search
  * Optional URL params: all (search_key to be used), name, rating, cuisine, orderby
  *
  * @return Response
  */
 public function searchAction()
 {
     $params = Input::get();
     $search_results = SearchUtilities::restaurantSearch($params);
     return response()->json($search_results);
 }
?>
" name="<?php 
echo LocationConstants::LOCATION_CITY_INPUT_ID;
?>
" value="<?php 
echo $advertisementSearchParameters->getVariable(LocationConstants::LOCATION_CITY_INPUT_ID);
?>
"/>
			<input type="hidden" id="<?php 
echo LocationConstants::LOCATION_REGION_INPUT_ID;
?>
" name="<?php 
echo LocationConstants::LOCATION_REGION_INPUT_ID;
?>
" value="<?php 
echo $advertisementSearchParameters->getVariable(LocationConstants::LOCATION_REGION_INPUT_ID);
?>
"/>
		</form>

		<?php 
SearchUtilities::writeSearchInfo($advertisementSearchResults, $advertisementSearchParameters);
SearchUtilities::writeSearchMessages($advertisementSearchResults);
$advertisementSkeletons = $advertisementSearchResults->getVariable(SearchResults::SKELETONS);
require_once $config->getIncludeURL(Config::INCLUDES_PATH, "views%advertisements%advertisement_results_view.php");
SearchUtilities::writeSearchInfo($advertisementSearchResults, $advertisementSearchParameters);
SearchUtilities::writeSearchPages($advertisementSearchResults, $advertisementSearchParameters);
?>
	</div>
<?php 
$templateUtilities->writePageFooter();
 public function searchForBandMembersAdvanced($bandID, $firstName, $lastName, $gender, $ageRange, $country, $state, $city, $region, $searchType, $currentPage, $pagingAmount, $dbConnection = null)
 {
     $memberSearchResults = null;
     $memberSkeletons = null;
     $countryID = null;
     $stateID = null;
     $cityID = null;
     $regionID = null;
     try {
         $memberSearchParameters = new SearchParameters();
         $memberSearchParameters->setVariable(SearchConstants::SEARCH_TYPE_INPUT_ID, $searchType);
         $memberSearchParameters->setVariable(SearchConstants::CURRENT_PAGE_ID, $currentPage);
         $memberSearchParameters->setVariable(SearchConstants::PAGING_AMOUNT_ID, $pagingAmount);
         $memberSearchParameters->setVariable(MemberSearchConstants::BAND_INPUT_ID, $bandID);
         //These elements are common to both search types
         $countryID = SearchUtilities::processSelectValues($country, 'defaultValue', '0');
         if ($countryID != null) {
             $stateID = SearchUtilities::processSelectValues($state, 'defaultValue', '0');
         }
         if ($stateID != null) {
             $cityID = SearchUtilities::processSelectValues($city, 'defaultValue', '0');
         }
         if ($cityID != null) {
             $regionID = SearchUtilities::processSelectValues($region, 'defaultValue', '0');
         }
         $memberSearchParameters->setVariable(LocationConstants::LOCATION_COUNTRY_INPUT_ID, $countryID);
         $memberSearchParameters->setVariable(LocationConstants::LOCATION_STATE_INPUT_ID, $stateID);
         $memberSearchParameters->setVariable(LocationConstants::LOCATION_CITY_INPUT_ID, $cityID);
         $memberSearchParameters->setVariable(LocationConstants::LOCATION_REGION_INPUT_ID, $regionID);
         $memberSearchParameters->setVariable(MemberSearchConstants::FIRST_NAME_INPUT_ID, $firstName);
         $memberSearchParameters->setVariable(MemberSearchConstants::LAST_NAME_INPUT_ID, $lastName);
         $memberSearchParameters->setVariable(MemberSearchConstants::GENDER_INPUT_ID, $gender);
         $memberSearchParameters->setVariable(MemberSearchConstants::AGE_INPUT_ID, $lastName);
         $memberCount = MemberSearchDao::getMemberSearchCount($memberSearchParameters, $dbConnection);
         $memberSkeletons = MemberSearchDao::searchMembers($memberSearchParameters, $ageRange);
         $memberSearchResults = new SearchResults();
         $memberSearchResults->setVariable(SearchResults::SEARCH_PARAMETERS, $memberSearchParameters);
         $memberSearchResults->setVariable(SearchResults::SKELETONS, $memberSkeletons);
         $memberSearchResults->setVariable(SearchResults::COUNT, $memberCount);
         $memberSearchResults->setVariable(SearchResults::PAGE_COUNT, ceil($memberCount / $pagingAmount));
     } catch (Exception $e) {
         $memberSearchResults = null;
         echo 'Caught exception: ', $e->getMessage(), "\n";
     }
     return $memberSearchResults;
 }
 public function browseAdvertisementByLocation($country, $state, $city, $region, $searchType, $currentPage, $pagingAmount, $dbConnection = null)
 {
     $advertisementSearchResults = null;
     $advertisementSkeletons = null;
     $countryID = null;
     $stateID = null;
     $cityID = null;
     $regionID = null;
     try {
         //Construct Search Parameter object
         $advertisementSearchParameters = new SearchParameters();
         $advertisementSearchParameters->setVariable(SearchConstants::CURRENT_PAGE_ID, $currentPage);
         $advertisementSearchParameters->setVariable(SearchConstants::PAGING_AMOUNT_ID, $pagingAmount);
         //These elements are common to both search types
         $countryID = SearchUtilities::processSelectValues($country, 'defaultValue', '0');
         if ($countryID != null) {
             $stateID = SearchUtilities::processSelectValues($state, 'defaultValue', '0');
         }
         if ($stateID != null) {
             $cityID = SearchUtilities::processSelectValues($city, 'defaultValue', '0');
         }
         if ($cityID != null) {
             $regionID = SearchUtilities::processSelectValues($region, 'defaultValue', '0');
         }
         $advertisementSearchParameters->setVariable(LocationConstants::LOCATION_COUNTRY_INPUT_ID, $countryID);
         $advertisementSearchParameters->setVariable(LocationConstants::LOCATION_STATE_INPUT_ID, $stateID);
         $advertisementSearchParameters->setVariable(LocationConstants::LOCATION_CITY_INPUT_ID, $cityID);
         $advertisementSearchParameters->setVariable(LocationConstants::LOCATION_REGION_INPUT_ID, $regionID);
         $advertisementCount = AdvertisementSearchDao::getSearchAdvertisementsCount($advertisementSearchParameters, $dbConnection);
         $advertisementSkeletons = AdvertisementSearchDao::searchAdvertisements($advertisementSearchParameters, $dbConnection);
         $advertisementSearchResults = new SearchResults();
         $advertisementSearchResults->setVariable(SearchResults::SEARCH_PARAMETERS, $advertisementSearchParameters);
         $advertisementSearchResults->setVariable(SearchResults::SKELETONS, $advertisementSkeletons);
         $advertisementSearchResults->setVariable(SearchResults::COUNT, $advertisementCount);
         $advertisementSearchResults->setVariable(SearchResults::PAGE_COUNT, ceil($advertisementCount / $pagingAmount));
     } catch (Exception $e) {
         $advertisementSearchResults = null;
         echo 'Caught exception: ', $e->getMessage(), "\n";
     }
     return $advertisementSearchResults;
 }
echo LocationConstants::LOCATION_CITY_INPUT_ID;
?>
" value="<?php 
echo $memberSearchParameters->getVariable(LocationConstants::LOCATION_CITY_INPUT_ID);
?>
"/>
			<input type="hidden" id="<?php 
echo LocationConstants::LOCATION_REGION_INPUT_ID;
?>
" name="<?php 
echo LocationConstants::LOCATION_REGION_INPUT_ID;
?>
" value="<?php 
echo $memberSearchParameters->getVariable(LocationConstants::LOCATION_REGION_INPUT_ID);
?>
"/>
		</form>

		<?php 
SearchUtilities::writeSearchInfo($memberSearchResults, $memberSearchParameters);
SearchUtilities::writeSearchMessages($memberSearchResults);
$memberSkeletons = $memberSearchResults->getVariable(SearchResults::SKELETONS);
require_once $config->getIncludeURL(Config::INCLUDES_PATH, "views%musicians%musician_results_view.php");
SearchUtilities::writeSearchInfo($memberSearchResults, $memberSearchParameters);
SearchUtilities::writeSearchPages($memberSearchResults, $memberSearchParameters);
?>
	</div>

<?php 
//Output the footer information
$templateUtilities->writePageFooter();