$this->_oTemplate->getIconUrl('member_menu_icon.png'), 'item_img_alt' => $sTitle, 'item_link' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'airfares/', 'item_onclick' => '', 'item_title' => $sTitle, 'extra_info' => '', ); return $oMemberMenu->getGetExtraMenuLink($aLinkInfo); } function serviceFeedbackRss($iLength = 0) { return $this->actionRss($iLength); } function serviceMyBlock($iStart = 0, $iPerPage = 0) { if(!$this->isLogged()) return MsgBox(_t('_aqb_airfare_msg_no_results')); if(empty($iPerPage)) $iPerPage = $this->_oConfig->getPerPage(); return $this->_oTemplate->displayBlock(array( 'sample_type' => 'owner', 'sample_params' => array('owner_id' => $this->_oTextData->getAuthorId()), 'viewer_type' => $this->_oTextData->getViewerType(), 'start' => $iStart, 'count' => $iPerPage )); } /** * Action methods */ function serviceActionBlock($sUri) { $aParams = is_numeric($sUri) ? array('sample_type' => 'id', 'id' => $sUri) : array('sample_type' => 'uri', 'uri' => $sUri); $aEntry = $this->_oDb->getEntries($aParams); $sModuleUri = $this->_oConfig->getUri(); if($aEntry['status'] != BX_TD_STATUS_ACTIVE) return MsgBox(_t('_' . $sModuleUri . '_msg_no_results')); $sModuleUri = $this->_oConfig->getUri(); if($this->_isDeleteAllowed($aEntry['author_id'])) { $this->_oTemplate->addJsTranslation(array('_' . $sModuleUri . '_msg_success_delete', '_' . $sModuleUri . '_msg_failed_delete')); $aReplacement['del_' . $sModuleUri . '_title'] = _t('_' . $sModuleUri . '_actions_delete'); $aReplacement['del_' . $sModuleUri . '_script'] = $this->_oConfig->getJsObject() . '.deleteEntry(' . $aEntry['id'] . ')'; } else $aReplacement['del_' . $sModuleUri . '_title'] = ''; if($this->_isEditAllowed($aEntry['author_id'])) { $aReplacement['edit_' . $sModuleUri . '_title'] = _t('_' . $sModuleUri . '_actions_edit'); $aReplacement['edit_aqb_airfare_url'] = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'post/' . $aEntry['uri']; } else { $aReplacement['edit_' . $sModuleUri . '_title'] = ''; } $aReplacement['share_' . $sModuleUri . '_title'] = ''; if($this->_isShareAllowed($aEntry)) { $aReplacement['share_' . $sModuleUri . '_title'] = _t('_Share'); $aReplacement['share_' . $sModuleUri . '_script'] = "showPopupAnyHtml('" . BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . "share_popup/" . $aEntry['id'] . "')"; } return $GLOBALS['oFunctions']->genObjectsActions($aReplacement, $this->_oConfig->getUri()); } function actionSharePopup($iEntry) { header('Content-type:text/html;charset=utf-8'); $sUri = $this->_oConfig->getUri(); $aEntry = $this->_oDb->getEntries(array('sample_type' => 'id', 'id' => (int)$iEntry)); if(!$aEntry) { echo MsgBox(_t('_' . $sUri . '_msg_no_results')); exit; } $sEntryUrl = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $this -> _oDb -> getRegionUrlById($aEntry['region']) . '/' . $aEntry['uri']; require_once (BX_DIRECTORY_PATH_INC . "shared_sites.inc.php"); echo getSitesHtml($sEntryUrl); exit; } function serviceImageBlock($sUri){ $aParams = is_numeric($sUri) ? array('sample_type' => 'id', 'id' => $sUri) : array('sample_type' => 'uri', 'uri' => $sUri); $aEntry = $this -> _oDb -> getEntries($aParams); if (empty($aEntry)) return MsgBox(_t('_aqb_airfare_msg_no_results')); return $this -> _oTemplate -> getPackageDescription($aEntry); } function serviceInfoBlock($sUri){ $aParams = is_numeric($sUri) ? array('sample_type' => 'id', 'id' => $sUri) : array('sample_type' => 'uri', 'uri' => $sUri); $aEntry = $this -> _oDb -> getEntries($aParams); if (empty($aEntry)) return MsgBox(_t('_aqb_airfare_msg_no_results')); if (!(int)$aEntry['type']){ bx_import('BxBaseIndexPageView'); return BxBaseIndexPageView::getBlockCode_SabreIntegration(); } return $this -> _oTemplate -> getPackageInfo($aEntry); } function serviceViewBlock($sUri) { $aParams = is_numeric($sUri) ? array('sample_type' => 'id', 'id' => $sUri) : array('sample_type' => 'uri', 'uri' => $sUri); $aEntry = $this->_oDb->getEntries($aParams); $sModuleUri = $this->_oConfig->getUri(); $oView = new BxDolViews('bx_' . $sModuleUri, $aEntry['id']); $oView->makeView(); $this->_oTemplate->setPageTitle($aEntry['caption']); $GLOBALS['oTopMenu']->setCustomSubHeader($aEntry['caption']); $GLOBALS['oTopMenu']->setCustomBreadcrumbs(array( _t('_' . $sModuleUri . '_top_menu_item') => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'index/', $aEntry['caption'] => '') ); return $this -> _oTemplate -> displayList(array( 'sample_type' => 'view', 'viewer_type' => $this->_oTextData->getViewerType(), 'uri' => $aEntry['uri'] )); } function serviceGetWallData(){ return array( 'handlers' => array( array( 'alert_unit' => 'aqb_airfare', 'alert_action' => 'post', 'module_uri' => 'aqb_airfare', 'module_class' => 'Module', 'module_method' => 'get_wall_post' ) ), 'alerts' => array( array('unit' => 'aqb_airfare', 'action' => 'post') ) ); } function serviceGetWallPost($aEvent) { $aParams = array('sample_type' => 'id', 'id' => $aEvent['object_id']); $aEntry = $this->_oDb->getEntries($aParams); $content=$this->_oTemplate->parseHtmlByName('wall_post.html', array( 'caption' =>$aEntry['caption'], 'categories' => $aEntry['categories'], 'restaurant' => $aEntry['restaurant'], 'address' => $aEntry['address'], 'content' => $aEntry['snippet'], 'link' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aEntry['uri'] )); return array( 'title' => _t('_aqb_airfare_wall_added_new').' '.$aEntry['caption'], 'description' => $aEntry['snippet'], 'content' => $content ); } function actionGetAqbAirfareFind($sSampleType = 'all', $iStart = 0, $iPerPage = 0) { return $this -> actionGetEntries($sSampleType, $iStart, $iPerPage); } function actionIndex() { $sMenu = ""; if(isAdmin()) { $sLink = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'post/'; $sCaption = _t('_aqb_airfare_lcaption_post'); $sMenu = BxDolPageView::getBlockCaptionMenu(mktime(), array( 'fdb_post' => array('href' => $sLink, 'title' => $sCaption) )); } $sContent = $this->serviceArchiveBlock(); $aParams = array( 'css' => array('view.css', 'cmts.css', 'post.css'), 'title' => array( 'page' => _t('_aqb_airfare_pcaption_all'), 'block' => _t('_aqb_airfare_bcaption_view_all') ), 'content' => array( 'page_header_text' => $sMenu, 'page_main_code' => $sContent ) ); $this->_oTemplate->getPageCode($aParams); } function actionPost($sName = '') { if(!empty($sName)) $sContentForm = $this->serviceEditBlock(process_db_input($sName, BX_TAGS_STRIP)); else if(isset($_POST['id'])) $sContentForm = $this->serviceEditBlock((int)$_POST['id']); else $sContentForm = $this->servicePostBlock(); $sContentForm = DesignBoxContent(_t('_aqb_airfare_bcaption_post'), $sContentForm, 1); $aParams = array( 'index' => 3, 'css' => array('view.css', 'post.css'), 'title' => array( 'page' => _t('_aqb_airfare_pcaption_post'), 'block' => _t('_aqb_airfare_bcaption_view_all') ), 'content' => array( 'page_code_form' => $sContentForm ) ); $this->_oTemplate->getPageCode($aParams); } function actionAirfares($sAuthorName = '') { if(empty($sAuthorName)) $sAuthorName = $this->_sUserName; $sMenu = ""; if($sAuthorName == $this->_sUserName) { $sLink = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'post/'; $sCaption = _t('_aqb_airfare_lcaption_post'); $sMenu = BxDolPageView::getBlockCaptionMenu(mktime(), array( 'fdb_post' => array('href' => $sLink, 'title' => $sCaption) )); } $sTitle = $sAuthorName == $this->_sUserName ? 'my' : 'profile'; $aParams = array( 'css' => array('view.css'), 'title' => array( 'page' => _t('_aqb_airfare_pcaption_view_' . $sTitle), 'block' => _t('_aqb_airfare_bcaption_view_' . $sTitle) ), 'content' => array( 'page_menu_code' => $sMenu, 'page_main_code' => $this->serviceMyBlock() ) ); $this->_oTemplate->getPageCode($aParams); } function actionTags() { $sUri = $this->_oConfig->getUri(); $oTags = new BxTemplTagsModule(array('type' => '' . $sUri, 'orderby' => 'popular'), _t('_' . $sUri . '_bcaption_all_tags'), BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'tag'); $aParams = array( 'index' => 1, 'css' => array('view.css','post.css'), 'title' => array( 'page' => _t('_' . $sUri . '_pcaption_tags') ), 'content' => array( 'page_main_code' => $oTags->getCode() ) ); $this->_oTemplate->getPageCode($aParams); } function actionCategory($sCategory = '', $iPage = 1, $iPerPage = 0) { $sUri = $this->_oConfig->getUri(); $sBaseUri = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri(); $sContent = MsgBox(_t('_' . $sUri . '_msg_no_results')); if(!empty($sCategory)) list($sCategoryDisplay, $sContent) = $this->getCategoryContent($sCategory, $iPage, $iPerPage); $aParams = array( 'title' => array( 'page' => _t('_' . $sUri . '_pcaption_category', $sCategoryDisplay), 'block' => _t('_' . $sUri . '_bcaption_category', $sCategoryDisplay) ), 'breadcrumb' => array( _t('_' . $sUri . '_top_menu_item') => $sBaseUri . 'home/', _t('_' . $sUri . '_categories_top_menu_sitem') => $sBaseUri . 'categories/', $sCategoryDisplay => '' ), 'content' => array( 'page_main_code' => $sContent ) ); $this->_oTemplate->getPageCode($aParams); } function actionAdmin() { $GLOBALS['iAdminPage'] = 1; require_once(BX_DIRECTORY_PATH_INC . 'admin_design.inc.php'); check_logged(); if(!@isAdmin()) { send_headers_page_changed(); login_form("", 1); exit; } //--- Process actions ---// $mixedResultSettings = ''; if(isset($_POST['save']) && isset($_POST['cat'])) { $mixedResultSettings = $this->setSettings($_POST); } $sFilterValue = ''; if(isset($_GET['aqb_airfare-filter'])) $sFilterValue = process_db_input($_GET['aqb_airfare-filter'], BX_TAGS_STRIP); $sContent = DesignBoxAdmin(_t('_aqb_airfare_bcaption_settings'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $this->getSettingsForm($mixedResultSettings)))); ///$sContent .= DesignBoxAdmin(_t('_aqb_airfare_bcaption_view_admin'), $this->serviceAdminBlock(0, 0, $sFilterValue)); $aParams = array( 'title' => array( 'page' => _t('_aqb_airfare_pcaption_admin') ), 'content' => array( 'page_main_code' => $sContent ) ); $this->_oTemplate->getPageCodeAdmin($aParams); } /** * Private methods. */ function _createObjectCmts($iId) { return new AqbAirFareCmts($this->_oConfig->getCommentsSystemName(), $iId); } function _createObjectVoting($iId) { return new AqbAirFareVoting($this->_oConfig->getVotesSystemName(), $iId); } function _isDeleteAllowed($iAuthorId = 0, $bPerform = false) { if(isAdmin()) return true; return false; } function _isEditAllowed($iAuthorId = 0, $bPerform = false) { if(isAdmin()) return true; return false; } function _isCommentsAllowed(&$aEntry) { return $this->_oPrivacy->check('comment', $aEntry['id'], $this->_oTextData->getAuthorId()); } function _isVotesAllowed(&$aEntry) { return $this->_oPrivacy->check('vote', $aEntry['id'], $this->_oTextData->getAuthorId()); } function actionView($iRegion, $sName = '') { $sUri = $this -> _oConfig -> getUri(); $oPage = bx_instance($this->_oConfig->getClassPrefix() . 'PageView', array($sName, $this), $this->_aModule); $sRegionTitle = $this -> _oDb -> getRegionById($iRegion); $sModuleUri = $this -> _oConfig-> getUri(); if (!$sName){ if(empty($iPerPage)) $iPerPage = $this->_oConfig->getPerPage(); if(isAdmin()) { $sLink = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'post/'; $sCaption = _t('_aqb_airfare_lcaption_post'); $sMenu = BxDolPageView::getBlockCaptionMenu(mktime(), array( 'fdb_post' => array('href' => $sLink, 'title' => $sCaption) )); } $sContent = $this -> _oTemplate -> displayBlock(array( 'sample_type' => 'region', 'sample_params' => array('region' => (int)$iRegion), 'viewer_type' => $this->_oTextData->getViewerType(), 'start' => $iStart, 'count' => $iPerPage )); $aParams = array( 'css' => array('view.css', 'cmts.css', 'post.css'), 'title' => array( 'page' => _t('_aqb_airfare_top_menu_package_item', $sRegionTitle), 'block' => _t('_aqb_airfare_top_menu_package_item', $sRegionTitle) ), 'content' => array( 'page_header_text' => $sMenu, 'page_main_code' => $sContent ) ); $GLOBALS['oTopMenu']->setCustomSubHeader($sRegionTitle); $GLOBALS['oTopMenu']->setCustomBreadcrumbs(array( _t('_aqb_airfares_home_top_menu_sitem') => BX_DOL_URL_ROOT . $this -> _oConfig -> getBaseUri() . "view/" . $this -> _oDb -> getRegionUrlById($iRegion)) ); $sTitle = _t('_' . $this -> _oConfig -> _sSystemPrefix . '_pcaption_all') . ' - ' . $sRegionTitle . ' - ' . $this -> _oDb -> getParam('site_title'); /*$this -> _oTemplate -> setPageDescription(_t('_sys_meta_book_now', $sTitle)); $this -> _oTemplate -> addPageKeywords($sTitle , ' - '); $this -> _oTemplate -> setPageTitle(_t('_' . $this -> _sSystemPrefix . 'pcaption_all') . ' - ' . $sRegionTitle . ' - ' . $GLOBALS['title']);*/ $aParams['title']['page'] = $sTitle = _t('_aqb_airfare_region_title', $sRegionTitle, $this -> _oDb -> getParam('site_title')); $this -> _oTemplate -> setPageDescription(_t('_aqb_airfare_region_description', $sRegionTitle)); $this -> _oTemplate -> addPageKeywords(_t('_aqb_airfare_region_keywords', $sRegionTitle)); $this -> _oTemplate -> getPageCode($aParams); exit; } $aParams = is_numeric($sUri) ? array('sample_type' => 'id', 'id' => $sName) : array('sample_type' => 'uri', 'uri' => $sName); $aEntry = $this -> _oDb -> getEntries($aParams); /*$sSubTitle = !$aEntry['caption'] ? _t('_' . $this -> _oConfig -> _sSystemPrefix . '_pcaption_all') : $aEntry['caption']; $sTitle = $sSubTitle . ' - ' . $sRegionTitle . ' - ' . $this -> _oDb -> getParam('site_title'); $this -> _oTemplate -> setPageDescription(_t('_sys_meta_book_now', $aEntry['sub_title'])); $this -> _oTemplate -> addPageKeywords( "{$aEntry['tags']},{$sSubTitle}", ',');*/ $this -> _oTemplate -> setPageDescription(_t('_aqb_airfare_deal_description', $aEntry['sub_title'], $sRegionTitle)); $sTitle = _t('_aqb_airfare_deal_title', $aEntry['caption'], "{$aEntry['currency']} {$aEntry['price']}") . '- ' . $sRegionTitle; $this -> _oTemplate -> addPageKeywords( _t('_aqb_airfare_deal_keywords', $sRegionTitle) . ",{$aEntry['tags']}, {$aEntry['sub_title']}"); $sModuleUri = $this->_oConfig->getUri(); $GLOBALS['oTopMenu']->setCustomSubHeader($aEntry['caption']); $GLOBALS['oTopMenu']->setCustomBreadcrumbs(array(_t('_aqb_airfare_top_menu_package_item', $sRegionTitle) => BX_DOL_URL_ROOT . $this -> _oConfig -> getBaseUri() . "view/" . $this -> _oDb -> getRegionUrlById($iRegion), $aEntry['caption'] => '')); $aParams = array( 'title' => array( 'page' => $sTitle ), 'index' => 1, 'js' => array('main.js'), 'css' => array('view.css', 'cmts.css'), 'content' => array( 'page_main_code' => $this -> _oTemplate -> getViewJs(true) . $oPage->getCode() ) ); $this->_oTemplate->getPageCode($aParams); } function serviceArchiveBlock($iStart = 0, $iPerPage = 0, $bShowEmpty = true) { if(empty($iPerPage)) $iPerPage = $this->_oConfig->getPerPage(); return $this -> _oTemplate -> displayBlock(array( 'sample_type' => 'archive', 'viewer_type' => $this->_oTextData->getViewerType(), 'start' => $iStart, 'count' => $iPerPage, 'show_empty' => $bShowEmpty )); } function serviceGetTourDescription($sUri){ if (!$sUri) return array(); $aResult = $this -> _oDb -> getItemByUri($sUri); $aResult['view_link'] = BX_DOL_URL_ROOT . $this -> _oConfig -> getBaseUri() . "view/" . $this -> _oDb -> getRegionUrlById($aResult['region']) . "/{$sUri}"; return $aResult; } function _uploadImage($sBasePath, $aImage) { $sFileExtension = $aImage['extension']; $sFolder = $this->_oConfig->getImagePath(). '/'; ///exit; if(file_exists($sBasePath)) mkdir($sFolder); else return ''; $sFileName = mktime() . sprintf(rand(0, 1000), '%04d'); if(!move_uploaded_file($aImage['tmp_name'], $sBasePath . $sFileName . "." . $sFileExtension)) return false; imageResize($sBasePath, $sFolder . $sFileName . "_b." . $sFileExtension, $this->_oConfig->getBigImageWidth(), $this->_oConfig->getBigImageHeight()); imageResize($sBasePath, $sFolder . $sFileName . "." . $sFileExtension, $this->_oConfig->getImageWidth(), $this->_oConfig->getImageHeight()); list($iWidth, $iHeight) = getimagesize($sFolder . $sFileName . "." . $sFileExtension); list($iWidth_b, $iHeight_b) = getimagesize($sFolder . $sFileName . "_b." . $sFileExtension); return array('name' => $sFileName . "." . $sFileExtension, 'width' => $iWidth, 'height' => $iHeight, 'name_b' =>$sFileName . "_b." . $sFileExtension,'width_b' => $iWidth_b, 'height_b' => $iHeight_b); } function file_exists_2($filePath){ return ($ch = curl_init($filePath)) ? @curl_close($ch) || true : false; } function serviceGetExpiredDeals(){ $aDeals = $this -> _oDb -> getExpiredDeals(); $aResult = array(); if (!empty($aDeals)){ foreach($aDeals as $iKey => $aValue){ $aResult[] = array( 'caption' => $aValue['caption'], 'sub_title' => $aValue['sub_title'], 'image' => !$aValue['image'] ? '' : '', 'exp_in' => _format_when(time() - $aValue['expire']), 'currency' => $aValue['currency'], 'price' => (float)$aValue['price'], 'destination' => $this -> _oDb -> getOne("SELECT `grpCountryName` FROM `grpCountryNames` WHERE `grpCountryID` = '{$aValue['destination']}' LIMIT 1"), 'ex_from' => $aValue['ex_from'], 'link' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . "view/" . $this -> _oDb -> getRegionUrlById($aValue['region']) . "/{$aValue['uri']}", ); } } return $aResult; } function actionGetDealsForView(){ echo $this -> serviceGetDealsForView(); } function serviceGetDealsForView(){ $this -> _oTemplate -> addCss(array('view.css', 'view_search.css', 'cmts.css', 'post.css')); $sContent = $this -> _oTemplate -> displayBlock(array( 'sample_type' => 'random', 'viewer_type' => $this->_oTextData->getViewerType(), 'start' => 0, 'count' => 6 )); echo $sContent; exit; } function serviceDeleteExpiredDeals(){ return $this -> _oDb -> deleteExpiredDeals(); } function actionDeleteImages(){ $aValues = $this -> _oDb -> getEntries(array('sample_type' => 'all')); $aFiles = array(); $this -> inDirFiles; foreach($aValues as $iKey => $aValue){ $aFiles[] = substr($aValue['image'], 2); $aFiles[] = substr($aValue['imagebig'], 2); } $this -> get_directory_list($this -> _oConfig -> getHomePath() . 'data/'); foreach($this -> inDirFiles as $iK => $aVal){ if (!in_array($aVal['name'], $aFiles)){ unlink($aVal['path']); } } } function get_directory_list($path){ global $filesCount, $dirCount; if(is_dir($path)){ $dh = opendir($path); $dirCount = 0; while (false !== ($dir = readdir($dh))) { if (is_dir($path . $dir) && $dir !== '.' && $dir !== '..') { $dirCount++; $subdir = $path . $dir . '/'; $this -> get_directory_list($subdir); } elseif($dir !== '.' && $dir !== '..') { $filesCount++; //echo "'" . $path . $dir . "',
"; $this -> inDirFiles[] = array('path' => $path . $dir, 'name' => $dir); } } closedir($dh); } else { print "Директорий не найдено"; } } } ?>
Fatal error: Class 'AqbAirFareModule' not found in /var/www/vhosts/planettravel.co.nz/httpdocs/inc/classes/BxDolRequest.php on line 109