protected function buildRefineUri($businessType, $formData) { if (strtolower($formData['cat2']) == strtolower('Any')) { $formData['cat2name'] = 'Any'; } else { $refcat2 = new Refcategory(); $formData['cat2name'] = $refcat2->getCatNameById($formData['cat2']); } if (strtolower($formData['cat3']) == 26) { $formData['cat3name'] = 'Any'; } else { $refcat3 = new Refcat1(); $formData['cat3name'] = $refcat3->getCatNameById($formData['cat3']); } return parent::buildRefineUri($businessType, $formData); }
public function getTitle() { $title = $this->_pstCategory->address; $location = new Location($this->_posting->locId); $suburb = $location->getSuburb(); if (!empty($suburb)) { $title .= ' <span class="titleend">(' . $suburb . ')</span>'; } if ($this->_posting->cat2 == 630) { $type = 'For Sale'; } else { if ($this->_posting->cat2 == 638) { $type = 'For Lease'; } else { if ($this->_posting->cat2 == 645) { $type = 'For Share'; } } } $title .= '<br /><span class="titlesecond">' . $type; $cat1Table = new Refcat1(); $title .= ' by ' . $cat1Table->getCatNameById($this->_posting->cat1) . ' - ' . $this->_posting->priceDisplay . ' - ' . ' Bed: ' . Tag::getUnitsAmount($this->_pstCategory->rooms) . ', Bath: ' . Tag::getUnitsAmount($this->_pstCategory->baths) . ', Cars: ' . Tag::getUnitsAmount($this->_pstCategory->parking) . "</span>"; return $title; }
public function getCat1NameById($cat1) { $refCat1Tables = new Refcat1(); return $refCat1Tables->getCatNameById($cat1); }
public function getCatsString($showCat1 = true) { $retString = ''; if (!empty($this->_posting->cat1) && $showCat1) { $refcat1 = new Refcat1(); $retString = $refcat1->getCatNameById($this->_posting->cat1); } if (!empty($this->_posting->cat2)) { $refcat = new Refcategory(); $cat = $refcat->getCatNameById($this->_posting->cat2); if (empty($retString)) { $retString = $cat; } else { $retString .= ', ' . $cat; } } if (!empty($this->_posting->cat3)) { $refcat = new Refcategory(); $cat = $refcat->getCatNameById($this->_posting->cat3); if (empty($retString)) { $retString = $cat; } else { $retString .= ', ' . $cat; } } if (!empty($this->_posting->cat4)) { $refcat = new Refcategory(); $cat = $refcat->getCatNameById($this->_posting->cat4); if (empty($retString)) { $retString = $cat; } else { $retString .= ', ' . $cat; } } if (!empty($this->_posting->cat5)) { $refcat = new Refcategory(); $cat = $refcat->getCatNameById($this->_posting->cat5); if (empty($retString)) { $retString = $cat; } else { $retString .= ', ' . $cat; } } return $retString; }
public function getTitle() { $title = ""; $cat2 = ""; $cat3 = ""; $catTables = new Refcategory(); if (!empty($this->_posting->cat2)) { $cat2 = $catTables->getCatNameById($this->_posting->cat2); } if (!empty($this->_posting->cat3)) { $cat3 = $catTables->getCatNameById($this->_posting->cat3); } $title .= $this->_pstCategory->makeYear . ' ' . $cat2 . ' ' . $cat3; $location = new Location($this->_posting->locId); $suburb = $location->getSuburb(); $title .= '<br /><span class="titlesecond">'; $cat1Table = new Refcat1(); $title .= $cat1Table->getCatNameById($this->_posting->cat1) . ' - ' . $this->_posting->priceDisplay . '<span class="titleend"> (' . $suburb . ")</span>" . "</span>"; return $title; }
protected function buildRefineUri($businessType, $formData) { try { echo str_replace(' ', '', strtolower($businessType)) . 'basicrefine'; if (array_key_exists('cat1', $formData) && !empty($formData['cat1']) && strtolower($formData['cat1']) != strtolower('ALL') && strtolower($formData['cat1']) != strtolower('Any')) { $refcat1 = new Refcat1(); $formData['cat1name'] = $refcat1->getCatNameById($formData['cat1']); } /* if (strtolower($formData['cat2']) == strtolower('ALL')) { $formData['cat2name'] = 'ALL'; } else{ $refcat2 = new Refcategory(); $formData['cat2name'] = $refcat2->getCatNameById($formData['cat2']); } if (strtolower($formData['cat3']) == strtolower('ALL')) { $formData['cat3name'] = 'ALL'; } else{ $refcat3 = new Refcategory(); $formData['cat3name'] = $refcat3->getCatNameById($formData['cat3']); } */ if (array_key_exists('suburbid', $formData) && !empty($formData['suburbid']) && strtolower($formData['suburbid']) != strtolower('ALL')) { $locationid = $formData['suburbid']; } elseif (array_key_exists('regionid', $formData) && !empty($formData['regionid']) && strtolower($formData['regionid']) != strtolower('ALL')) { $locationid = $formData['regionid']; } elseif (array_key_exists('cityid', $formData) && !empty($formData['cityid']) && strtolower($formData['cityid']) != strtolower('ALL')) { $locationid = $formData['cityid']; } elseif (array_key_exists('stateid', $formData) && !empty($formData['stateid']) && strtolower($formData['stateid']) != strtolower('ALL')) { $locationid = $formData['stateid']; } $location = new Location($locationid); $formData['country'] = $location->getCountry(); $formData['city'] = $location->getUriCity(); $formData['state'] = $location->getUriState(); $formData['locationid'] = $locationid; logfire('city', $formData['city']); logfire('state', $formData['state']); //logfire('cat3name', $formData['cat3name']); echo 'sss' . '1'; $formData = Common::encodeUriParams($formData); return Tag::url(str_replace(' ', '', strtolower($businessType)) . 'basicrefine', Common::arrayToStdClass($formData)); } catch (Exception $e) { echo $e; } }