function display($tpl = null) { $state = $this->get('State'); $this->params = $state->get("parameters.menu"); $this->offers = $this->get('Offers'); $this->orderBy = JRequest::getVar("orderBy", ""); $this->categorySearch = JRequest::getVar('categorySearch', null); $this->citySearch = JRequest::getVar('citySearch', null); $this->regionSearch = JRequest::getVar('regionSearch', null); $this->zipCode = JRequest::getVar('zipcode'); $searchkeyword = JRequest::getVar('searchkeyword'); if (isset($searchkeyword)) { $this->searchkeyword = $searchkeyword; } $this->categories = JRequest::getVar("Categories"); $categoryId = $this->get('CategoryId'); if (!empty($categoryId)) { $this->categoryId = $categoryId; $this->category = $this->get('Category'); } $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); if ($this->appSettings->enable_search_filter_offers) { $this->searchFilter = $this->get('SeachFilter'); } $this->location = $this->get("Location"); $session = JFactory::getSession(); $this->radius = $session->get('radius'); $this->pagination = $this->get('Pagination'); $this->sortByOptions = $this->get('SortByConfiguration'); parent::display($tpl); }
function display($tpl = null) { $this->packages = $this->get('Packages'); $this->companyId = JRequest::getVar("claimCompanyId"); $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); parent::display($tpl); }
function display($tpl = null) { $this->item = $this->get('Item'); $this->state = $this->get('State'); $this->translations = JBusinessDirectoryTranslations::getAllTranslations(BUSSINESS_DESCRIPTION_TRANSLATION, $this->item->id); $this->translationsSlogan = JBusinessDirectoryTranslations::getAllTranslations(BUSSINESS_SLOGAN_TRANSLATION, $this->item->id); $this->languages = JBusinessUtil::getLanguages(); $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); $this->categoryOptions = JBusinessUtil::getCategoriesOptions(true); //get all upgrade packages - cannot downgrade $price = 0; if (!empty($this->item->lastActivePackage) && $this->item->lastActivePackage->expired == false) { $price = $this->item->lastActivePackage->price; } $this->packageOptions = JBusinessDirectoryHelper::getPackageOptions($price); $this->location = $this->get('Location'); $user = JFactory::getUser(); if ($this->item->userId != $user->id && $this->item->id != 0) { $msg = JText::_("LNG_ACCESS_RESTRICTED"); $app =& JFactory::getApplication(); $app->redirect(JRoute::_('index.php?option=com_jbusinessdirectory&view=managecompanies', $msg)); } $layout = JRequest::getVar("layout"); if (!empty($layout)) { $this->setLayout($layout); } parent::display($tpl); }
public function getHtmlFields() { $language = JBusinessUtil::getCurrentLanguageCode(); $html = ''; $html .= sprintf('<input type="hidden" name="sid" id="sid" value="%s">', $this->accountNumber); $html .= sprintf('<input type="hidden" name="mode" id="mode" value="2CO">'); $html .= sprintf('<input type="hidden" name="li_0_type" id="li_#_type" value="product">'); $html .= sprintf('<input type="hidden" name="li_0_name" id="li_#_name" value="%s">', $this->itemName); $html .= sprintf('<input type="hidden" name="li_0_tangible" id="li_#_tangible" value="N">'); $html .= sprintf('<input type="hidden" name="li_0_quantity" id="li_#_quantity" value="1">'); $html .= sprintf('<input type="hidden" name="x_receipt_link_url" id="x_receipt_link_url" value="%s">', $this->returnUrl); $html .= sprintf('<input type="hidden" name="li_0_price" value="%.2f" />', $this->amount); $html .= sprintf('<input type="hidden" name="currency_code" value="%s" />', $this->currencyCode); $html .= sprintf('<input type="hidden" name="merchant_order_id" value="%s" />', $this->itemNumber); $html .= sprintf('<input type="hidden" name="lang" value="%s" />', $language); $html .= sprintf('<input type="hidden" name="street_address" value="%s" />', $this->billingDetails->address); $html .= sprintf('<input type="hidden" name="city" value="%s" />', $this->billingDetails->city); $html .= sprintf('<input type="hidden" name="state" value="%s" />', $this->billingDetails->region); $html .= sprintf('<input type="hidden" name="zip" value="%s" />', $this->billingDetails->postal_code); $html .= sprintf('<input type="hidden" name="country" value="%s" />', $this->billingDetails->country); $html .= sprintf('<input type="hidden" name="phone" value="%s" />', $this->billingDetails->phone); $html .= sprintf('<input type="hidden" name="card_holder_name" value="%s" />', $this->billingDetails->first_name . " " . $this->billingDetails->last_name); $html .= sprintf('<input type="hidden" name="email" value="%s" />', $this->billingDetails->email); return $html; }
function display($tpl = null) { $this->companies = $this->get('UserCompanies'); $this->item = $this->get('Item'); $this->state = $this->get('State'); $this->states = JBusinessDirectoryHelper::getStatuses(); $this->translations = JBusinessDirectoryTranslations::getAllTranslations(OFFER_DESCRIPTION_TRANSLATION, $this->item->id); $this->languages = JBusinessUtil::getLanguages(); //check if user has access to offer $user = JFactory::getUser(); $found = false; foreach ($this->companies as $company) { if ($company->userId == $user->id && $this->item->companyId == $company->id) { $found = true; } } $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); $this->categoryOptions = JBusinessUtil::getCategoriesOptions(true); //redirect if the user has no access and the event is not new if (!$found && $this->item->id != 0) { $msg = JText::_("LNG_ACCESS_RESTRICTED"); $app =& JFactory::getApplication(); $app->redirect(JRoute::_('index.php?option=com_jbusinessdirectory&view=managecompanyoffers', $msg)); } parent::display($tpl); }
function display($tpl = null) { $state = $this->get('State'); $this->params = $state->get("parameters.menu"); $categoryId = JRequest::getVar('categoryId'); $this->assignRef('categoryId', $categoryId); $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); $events = $this->get('Events'); $this->assignRef('events', $events); //dump($events); $categories = $this->get('Categories'); $this->assignRef('categories', $categories); if ($this->appSettings->enable_search_filter_events) { $serachFilter = $this->get('SeachFilter'); $this->assignRef('searchFilter', $serachFilter); } $categoryId = $this->get('CategoryId'); if (!empty($categoryId)) { $this->categoryId = $categoryId; $this->category = $this->get('Category'); } $pagination = $this->get('Pagination'); $this->assignRef('pagination', $pagination); parent::display($tpl); }
function display($tpl = null) { $offerId = JRequest::getVar('offerId'); $this->assignRef('offerId', $offerId); $offers = $this->get('Offer'); $this->assignRef('offer', $offers); $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); parent::display($tpl); }
function display($tpl = null) { $state = $this->get('State'); $this->params = $state->get("parameters.menu"); $categoryId = JRequest::getVar('categoryId'); $this->letter = JRequest::getVar('letter'); $this->companies = $this->get('CompaniesByLetter'); $this->letters = $this->get('UsedLetter'); $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); $pagination = $this->get('Pagination'); $this->assignRef('pagination', $pagination); parent::display($tpl); }
function display($tpl = null) { $layout = JRequest::getVar('layout', null); if (isset($layout)) { $tpl = $layout; } $this->paymentMethods = $this->get('paymentMethods'); $this->order = $this->get('Order'); $this->state = $this->get('State'); $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); $this->companyId = JRequest::getVar("companyId"); $this->discount_code = JRequest::getVar("discount_code", ""); parent::display($tpl); }
function display($tpl = null) { $tabId = JRequest::getVar('tabId'); if (!isset($tabId)) { $tabId = 1; } $this->tabId = $tabId; $this->company = $this->get('Company'); $this->companyAttributes = $this->get('CompanyAttributes'); $this->pictures = $this->get('CompanyImages'); $this->videos = $this->get('CompanyVideos'); $this->offers = $this->get('CompanyOffers'); $this->events = $this->get('CompanyEvents'); $this->reviews = $this->get('Reviews'); $this->reviewCriterias = $this->get('ReviewCriterias'); $this->rating = $this->get('UserRating'); $this->ratingCount = $this->get('RatingsCount'); //$this->userCompany = $this->get('UserCompanies'); $this->viewCount = $this->get('ViewCount'); $this->package = $this->get('package'); if (!empty($this->package)) { $this->videos = array_slice($this->videos, 0, $this->package->max_videos); $this->pictures = array_slice($this->pictures, 0, $this->package->max_pictures); } $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); if (JRequest::getVar('layout2') != '') { $tpl = JRequest::getVar('layout2'); } else { if ($this->appSettings->company_view == 1) { $tpl = null; } else { if ($this->appSettings->company_view == 2) { $tpl = "style_3"; } else { if ($this->appSettings->company_view == 4) { $tpl = "style_4"; } else { $tpl = "onepage"; } } } } if ($this->company->state == 0 || $this->company->approved == COMPANY_STATUS_DISAPPROVED || $this->appSettings->enable_packages && empty($this->package)) { $tpl = "inactive"; } $session = JFactory::getSession(); $this->location = $session->get('location'); parent::display($tpl); }
/** * Display the view */ public function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $layout = JRequest::getVar("layout"); if (isset($layout)) { $tpl = $layout; } $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } parent::display($tpl); }
function __construct() { $this->letter = JRequest::getVar('letter'); parent::__construct(); $mainframe = JFactory::getApplication(); // Get pagination request variables $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); $limitstart = JRequest::getVar('limitstart', 0, '', 'int'); // In case limit has been changed, adjust it $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0; $this->setState('limit', $limit); $this->setState('limitstart', $limitstart); $appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); $this->enablePackages = $appSettings->enable_packages; $this->showPendingApproval = $appSettings->show_pending_approval == 1; $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); }
function display($tpl = null) { $state = $this->get('State'); $this->params = $state->get("parameters.menu"); $categories = $this->get('Categories'); $this->assignRef('categories', $categories); $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); if ($this->appSettings->category_view == 1) { $tpl = "accordion"; } else { if ($this->appSettings->category_view == 3) { $tpl = "grid"; } else { $tpl = null; } } parent::display($tpl); }
function getOrder($orderId) { $orderTable = JTable::getInstance("Order", "JTable", array()); $orderTable->load($orderId); $properties = $orderTable->getProperties(1); $order = JArrayHelper::toObject($properties, 'JObject'); $discountCode = JRequest::getVar("discount_code"); $ignoreCount = false; if (empty($discountCode) && !empty($order->discount_code)) { $discountCode = $order->discount_code; $ignoreCount = true; } $appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); $order->discount_amount = 0; if (!empty($discountCode)) { $discountTable = JTable::getInstance("Discount", "JTable", array()); $discount = $discountTable->getDiscount($discountCode, $ignoreCount); if (!empty($discount)) { $discount->package_ids = explode(",", $discount->package_ids); if (in_array($order->package_id, $discount->package_ids)) { $order->discount = $discount; if ($discount->price_type == 1) { $order->discount_amount = $discount->value; } else { $order->discount_amount = $order->initial_amount * $discount->value / 100; } } } } $order->amount = $order->initial_amount - $order->discount_amount; $order->vat_amount = $appSettings->vat * $order->amount / 100; $order->amount += $order->vat_amount; $packageTable = JTable::getInstance("Package", "JTable", array()); $order->package = $packageTable->getPackage($order->package_id); $user = JFactory::getUser(); $billingDetailsTable = JTable::getInstance("BillingDetails", "JTable", array()); $order->billingDetails = $billingDetailsTable->getBillingDetails($user->id); return $order; }
function display($tpl = null) { $session = JFactory::getSession(); $this->companies = $this->get('Items'); $this->viewType = JRequest::getVar("view-type", LIST_VIEW); $categoryId = $this->get('CategoryId'); $filterActive = JRequest::getVar("filter_active"); if (!empty($categoryId) && empty($filterActive)) { $this->categoryId = $categoryId; $this->category = $this->get('Category'); } $this->selectedCategories = $this->get("SelectedCategories"); $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); $this->categories = implode(";", $this->get("SelectedCategories")); if (!empty($this->categories)) { $this->categories .= ";"; } $searchkeyword = JRequest::getVar('searchkeyword'); if (isset($searchkeyword)) { $this->searchkeyword = $searchkeyword; } $this->location = $this->get("Location"); $this->radius = $session->get('radius'); if ($this->appSettings->enable_search_filter) { $this->searchFilter = $this->get('SearchFilter'); } $this->pagination = $this->get('Pagination'); $this->orderBy = JRequest::getVar("orderBy", "packageOrder desc"); $this->categorySearch = JRequest::getVar('categorySearch', null); $this->citySearch = JRequest::getVar('citySearch', null); $this->regionSearch = JRequest::getVar('regionSearch', null); $this->zipCode = JRequest::getVar('zipcode'); $this->maincategories = $this->get("MainCategories"); $this->subcategories = $this->get("SubCategories"); $this->sortByOptions = $this->get('SortByConfiguration'); $session = JFactory::getSession(); $this->location = $session->get('location'); parent::display($tpl); }
/** * Data for the markers consisting of a name, a LatLng and a zIndex for * the order in which these markers should display on top of each * other. */ var companies = [ <?php $db = JFactory::getDBO(); $index = 1; foreach ($this->offers as $offer) { $description = str_replace("\r\n", "", $offer->short_description); $description = str_replace("\\'", "", $description); $description = $db->escape($description); $marker = 0; $contentString = '<div id="map-content">' . '<h1 id="firstHeading" class="firstHeading">' . $db->escape($offer->subject) . '</h1>' . '<p>' . (!empty($offer->picture_path) ? '<img src="' . JURI::root() . PICTURES_PATH . $offer->picture_path . '" alt="' . $db->escape($offer->subject) . '">' : "") . JBusinessUtil::truncate(strip_tags($description), 180, ' … ', true) . '</p>' . '<p><a href="' . $db->escape(JBusinessUtil::getOfferLink($offer->id, $offer->alias)) . '">' . JText::_("LNG_MORE_INFO", true) . '</a></p>' . '</div>'; if (!empty($offer->latitude) && !empty($offer->longitude)) { echo "['" . $db->escape($offer->subject) . "', " . $offer->latitude . "," . $offer->longitude . ", 4,'" . $contentString . "','" . $index . "','" . $marker . "']," . "\n"; } $index++; } ?> ]; function setMarkers(map, locations) { // Add markers to the map // Marker sizes are expressed as a Size of X,Y // where the origin of the image (0,0) is located // in the top left of the image.
# Technical Support: Forum - http://www.cmsjunkie.com/forum/j-businessdirectory/?p=1 -------------------------------------------------------------------------*/ defined('_JEXEC') or die('Restricted access'); require_once JPATH_COMPONENT_SITE . '/classes/attributes/attributeservice.php'; $user = JFactory::getUser(); $document = JFactory::getDocument(); $config = new JConfig(); $title = JText::_("LNG_CATALOG") . ' | ' . $config->sitename; $description = $this->appSettings->meta_description; $document->setTitle($title); $document->setDescription($description); $document->setMetaData('keywords', $this->appSettings->meta_keywords); jimport('joomla.application.module.helper'); // this is where you want to load your module position $modules = JModuleHelper::getModules('categories-catalog'); $appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); $fullWidth = true; ?> <?php if (!empty($this->params) && $this->params->get('show_page_heading', 1)) { ?> <div class="page-header"> <h1 class="title"> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1> </div> <?php } ?>
foreach ($category["subCategories"] as $cat) { if ($i > 10) { break; } echo $i++ == 1 ? '' : '|'; ?> <a class="categoryLink" title="<?php echo $cat[0]->name; ?> " alt="<?php echo $cat[0]->name; ?> " href="<?php echo JBusinessUtil::getCategoryLink($cat[0]->id, $cat[0]->alias); ?> " > <?php echo $cat[0]->name; ?> </a> <?php } ?> <div class="clear"></div> </div> <?php if ($k % 3 == 0) {
function __construct() { parent::__construct(); $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); $this->eventId = JRequest::getVar('eventId'); }
?> </a> <?php } ?> </td> </TR> <?php $i++; } ?> </tbody> </table> <input type="hidden" name="option" value="<?php echo JBusinessUtil::getComponentName(); ?> " /> <input type="hidden" name="task" id="task" value="" /> <input type="hidden" name="companyId" value="" /> <input type="hidden" id="cid" name="cid" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="filter_order" value="<?php echo $listOrder; ?> " /> <input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?> " /> <?php
<div class="event-location"> <?php echo $event->location; ?> - <?php echo JBusinessUtil::getDateGeneralFormat($event->start_date) . " " . JText::_("LNG_UNTIL") . " " . JBusinessUtil::getDateGeneralFormat($event->end_date); ?> </div> <div class="event-type"> <?php echo $event->eventType; ?> </div> <div class="event-desciption"> <?php echo JBusinessUtil::truncate($event->description, 250); ?> </div> </div> </div> <div class="clear"></div> </li> <?php } } else { echo JText::_("LNG_NO_EVENT_FOUND"); } ?> </ul> </div>
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.cmsjunkie.com # Technical Support: Forum - http://www.cmsjunkie.com/forum/j-businessdirectory/?p=1 -------------------------------------------------------------------------*/ defined('_JEXEC') or die('Restricted access'); $user = JFactory::getUser(); $uri = JURI::getInstance(); $current = $uri->toString(array('scheme', 'host', 'port', 'path')); $company = $this->company; $url = $current; //set metainfo $document = JFactory::getDocument(); $config = new JConfig(); $appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); $title = stripslashes($company->name) . " | " . $config->sitename; $description = !empty($company->description) ? strip_tags(JBusinessUtil::truncate($company->description, 300)) : $appSettings->meta_description; $document->setTitle($title); $document->setDescription($description); $document->setMetaData('keywords', $appSettings->meta_keywords . "," . $company->keywords); $document->addCustomTag('<meta property="og:title" content="' . $title . '"/>'); $document->addCustomTag('<meta property="og:description" content="' . $description . '"/>'); if (isset($this->company->logoLocation) && $this->company->logoLocation != '') { $document->addCustomTag('<meta property="og:image" content="' . JURI::root() . PICTURES_PATH . $this->company->logoLocation . '" /> '); } $document->addCustomTag('<meta property="og:type" content="website"/>'); $document->addCustomTag('<meta property="og:url" content="' . $url . '"/>'); $document->addCustomTag('<meta property="og:site_name" content="' . $config->sitename . '"/>'); //set canonical url if ($appSettings->enable_seo) { $document = JFactory::getDocument(); foreach ($document->_links as $key => $value) {
<li class="review"> <div class="review-content"> <h4><?php echo $review->subject; ?> </h4> <div class="review-author"> <p class="review-by-content"> <span class="reviewer-name"> <?php echo $review->name; ?> </span>, <span class="review-date"><?php echo JBusinessUtil::getDateGeneralFormat($review->creationDate); ?> </span> </p> </div> <div class="rating-block"> <?php if (!empty($review->scores) && !empty($review->criteriaNames)) { ?> <div class="review-rating" itemtype="http://schema.org/Rating" itemscope="" itemprop="reviewRating"> <span itemprop="ratingValue"><?php echo number_format($review->rating, 1); ?> </span> </div>
<div class="post-content"> <h1 class="post-title"><a href="<?php echo JBusinessUtil::getCompanyLink($company); ?> "><?php echo $company->name; ?> </a></h1> <span class="post-date" ><span itemprop="street-address"><?php echo JBusinessUtil::getAddressText($company); ?> </span></span> <p class="company-clasificaiton"> <span class="post-category"> <a rel="nofollow" href="<?php echo JBusinessUtil::getCategoryLink($company->mainCategoryId, $company->mainCategoryAlias); ?> "><?php echo $company->mainCategory; ?> </a> </span> <br/> <span> <?php if (isset($company->typeName)) { ?> <?php echo $company->typeName; ?> <?php }
function display($tpl = null) { $this->orders = $this->get('Orders'); $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings(); parent::display($tpl); }
public static function prepareEmail($data, $company, $siteName, $billingInformation, $templEmail, $vat) { $user = JFactory::getUser($company->userId); $customerName = $user->username; $templEmail = str_replace(EMAIL_CUSTOMER_NAME, $customerName, $templEmail); $siteAddress = JURI::root(); $templEmail = str_replace(EMAIL_SITE_ADDRESS, $siteAddress, $templEmail); $templEmail = str_replace(EMAIL_COMPANY_NAME, $siteName, $templEmail); $templEmail = str_replace(EMAIL_ORDER_ID, $data->order_id, $templEmail); $paymentMethod = $data->details->processor_type; $templEmail = str_replace(EMAIL_PAYMENT_METHOD, $paymentMethod, $templEmail); if (!empty($data->paid_at)) { $templEmail = str_replace(EMAIL_ORDER_DATE, JBusinessUtil::getDateGeneralFormat($data->paid_at), $templEmail); } else { $templEmail = str_replace(EMAIL_ORDER_DATE, JBusinessUtil::getDateGeneralFormat($data->details->payment_date), $templEmail); } $totalAmount = $data->amount_paid; if (empty($data->amount_paid)) { $totalAmount = $data->amount; } $templEmail = str_replace(EMAIL_TOTAL_PRICE, JBusinessUtil::getPriceFormat($totalAmount), $templEmail); $templEmail = str_replace(EMAIL_TAX_AMOUNT, JBusinessUtil::getPriceFormat($data->package->price * $vat / 100), $templEmail); $templEmail = str_replace(EMAIL_SUBTOTAL_PRICE, JBusinessUtil::getPriceFormat($data->package->price), $templEmail); $templEmail = str_replace(EMAIL_SERVICE_NAME, $data->service, $templEmail); $templEmail = str_replace(EMAIL_UNIT_PRICE, JBusinessUtil::getPriceFormat($data->package->price), $templEmail); $templEmail = str_replace(EMAIL_BILLING_INFORMATION, $billingInformation, $templEmail); return "<div style='width: 600px;'>" . $templEmail . '</div>'; }
echo JText::_('LNG_COMPANY_DETAILS'); ?> </strong></td> </tr> <tr> <td><a href="<?php echo JBusinessUtil::getCompanyLink($this->event->company); ?> "> <?php echo $this->event->company->name; ?> </a></td> </tr> <tr> <td><i class="dir-icon-map-marker dir-icon-large"></i> <?php echo JBusinessUtil::getAddressText($this->event->company); ?> </td> </tr> <tr> <td><i class="dir-icon-phone dir-icon-large"></i> <a href="tel:<?php echo $this->event->company->phone; ?> "><?php echo $this->event->company->phone; ?> </a></td> </tr> <tr> <td><a href="<?php echo $this->event->company->website;
public function prepareSearchAttribtues() { $this->keyword = JRequest::getVar('searchkeyword'); $this->keywordLocation = JRequest::getVar('searchkeywordLocation'); $this->categoryId = JRequest::getVar('categoryId', null); $this->citySearch = JRequest::getVar('citySearch', null); $this->typeSearch = JRequest::getVar('typeSearch', null); $this->regionSearch = JRequest::getVar('regionSearch', null); $this->countrySearch = JRequest::getVar('countrySearch', null); $this->categorySearch = JRequest::getVar('categorySearch'); $this->zipCode = JRequest::getVar('zipcode'); $this->radius = JRequest::getVar('radius'); $this->preserve = JRequest::getVar('preserve', null); $resetSearch = JRequest::getVar('resetSearch', null); if (!empty($this->categorySearch) || isset($this->preserve)) { $this->categoryId = $this->categorySearch; } $session = JFactory::getSession(); if (isset($this->categoryId) || !empty($resetSearch)) { $session->set('categorySearch', $this->categoryId); $session->set('searchkeyword', ""); $session->set('searchkeywordLocation', ""); $session->set('typeSearch', ""); $session->set('citySearch', ""); $session->set('regionSearch', ""); $session->set('countrySearch', ""); $session->set('zipcode', ""); $session->set('customAtrributes', ""); } if (isset($this->typeSearch)) { $session->set('typeSearch', $this->typeSearch); } if (isset($this->citySearch)) { $session->set('citySearch', $this->citySearch); } if (isset($this->regionSearch)) { $session->set('regionSearch', $this->regionSearch); } if (isset($this->countrySearch)) { $session->set('countrySearch', $this->countrySearch); } if (isset($this->keyword)) { $session->set('searchkeyword', $this->keyword); } if (isset($this->keywordLocation)) { $session->set('searchkeywordLocation', $this->keywordLocation); } if (isset($this->zipCode)) { $session->set('zipcode', $this->zipCode); } if (isset($this->radius)) { $session->set('radius', $this->radius); } $this->keyword = $session->get('searchkeyword'); $this->keywordLocation = $session->get('searchkeywordLocation'); $this->typeSearch = $session->get('typeSearch'); $this->citySearch = $session->get('citySearch'); $this->regionSearch = $session->get('regionSearch'); $this->countrySearch = $session->get('countrySearch'); $this->categorySearch = $session->get('categorySearch'); $this->zipCode = $session->get('zipcode'); $this->radius = $session->get('radius'); $this->location = null; $geolocation = JRequest::getVar('geolocation', null); if (isset($geolocation)) { $session->set("geolocation", $geolocation); } $geolocation = $session->get("geolocation"); // test if geo location is determined and set location array if ($this->appSettings->enable_geolocation && $geolocation) { $geoLatitutde = JRequest::getVar('geo-latitude', null); $geoLongitude = JRequest::getVar('geo-longitude', null); if (!empty($geoLatitutde)) { $session->set('geo-latitude', $geoLatitutde); } if (!empty($geoLongitude)) { $session->set('geo-longitude', $geoLongitude); } $geoLatitutde = $session->get('geo-latitude'); $geoLongitude = $session->get('geo-longitude'); if (!empty($geoLatitutde) && !empty($geoLongitude)) { $this->location = array(); $this->location["latitude"] = $geoLatitutde; $this->location["longitude"] = $geoLongitude; } } $this->featured = JRequest::getVar('featured', null); if ($this->appSettings->metric == 0) { $this->radius = $this->radius * 0.621371; } $this->enablePackages = $this->appSettings->enable_packages; $this->showPendingApproval = $this->appSettings->show_pending_approval == 1; if (isset($this->zipCode) && $this->zipCode != "") { $this->location = JBusinessUtil::getCoordinates($this->zipCode); } if (!empty($this->location)) { $session->set("location", $this->location); } //prepare custom attributes $data = JRequest::get('post'); $this->customAtrributes = array(); foreach ($data as $key => $value) { if (strpos($key, "attribute") === 0) { $attributeId = explode("_", $key); $attributeId = $attributeId[1]; if (!empty($value)) { $this->customAtrributes[$attributeId] = $value; } } } if (!empty($this->customAtrributes)) { foreach ($this->customAtrributes as &$customAttribute) { if (is_array($customAttribute)) { $customAttribute = implode(",", $customAttribute); } } $session->set('customAtrributes', $this->customAtrributes); } $this->customAtrributes = $session->get('customAtrributes'); }
echo JTEXT::_("LNG_BOOKMARKS_INFO"); ?> </p> </a> </li> <li class="option-button"> <a class="box box-inset" href="<?php echo JRoute::_('index.php?option=com_jbusinessdirectory&view=billingdetails&layout=edit'); ?> "> <img alt="<?php echo JTEXT::_("LNG_BILLING_DETAILS"); ?> " src="<?php echo JURI::base() . "components/" . JBusinessUtil::getComponentName() . '/assets/images/user.png'; ?> " /> <h3> <?php echo JTEXT::_("LNG_BILLING_DETAILS"); ?> </h3> <p> <?php echo JTEXT::_("LNG_BILLING_DETAILS_INFO"); ?> </p> </a> </li> </ul>
var companies = [ <?php $db = JFactory::getDBO(); if (!isset($companies)) { $companies = $this->companies; } $index = 1; foreach ($companies as $company) { $description = str_replace("\r\n", "", $company->short_description); $description = str_replace("\\'", "", $description); $description = $db->escape($description); $marker = 0; if (!empty($company->categoryMaker)) { $marker = JURI::root() . PICTURES_PATH . $company->categoryMaker; } $contentString = '<div class="info-box">' . '<div class="title">' . $db->escape($company->name) . '</div>' . '<div class="info-box-content">' . '<div class="address" itemtype="http://schema.org/PostalAddress" itemscope="" itemprop="address">' . $db->escape(JBusinessUtil::getAddressText($company)) . '</div>' . '<div class="info-phone"><i class="dir-icon-phone"></i> ' . $db->escape($company->phone) . '</div>' . '<a href="' . $db->escape(JBusinessUtil::getCompanyLink($company)) . '"><i class="dir-icon-external-link"></i> ' . $db->escape(JText::_("LNG_MORE_INFO", true)) . '</a>' . '</div>' . '<div class="info-box-image">' . (isset($company->logoLocation) && strlen($company->logoLocation) > 3 ? '<img src="' . JURI::root() . PICTURES_PATH . $company->logoLocation . '" alt="' . $db->escape($company->name) . '">' : "") . '</div>' . '</div>'; if (!empty($company->latitude) && !empty($company->longitude) && (isset($company->packageFeatures) && in_array(GOOGLE_MAP, $company->packageFeatures) || !$appSettings->enable_packages)) { echo "['" . $db->escape($company->name) . "', \"{$company->latitude}\",\"{$company->longitude}\", 4,'" . $contentString . "','" . $index . "','" . $marker . "']," . "\n"; } if (!empty($company->locations) && (isset($company->packageFeatures) && in_array(GOOGLE_MAP, $company->packageFeatures) || !$appSettings->enable_packages)) { $locations = explode(",", $company->locations); foreach ($locations as $location) { $loc = explode("|", $location); echo "['" . htmlspecialchars($company->name, ENT_QUOTES) . "', \"{$loc['0']}\",\"{$loc['1']}\", 4,'" . $contentString . "','" . $index . "','" . $marker . "']," . "\n"; } } $index++; } ?> ];