/** * Class process method wnich is used to execute this component. */ public function process() { $oService = Phpfox::getService('younetcore.core'); $oVerify = phpfox::getService('younetcore.verify'); $oFunctions = phpfox::getService('younetcore.functions'); $this->template()->setBreadCrumb(Phpfox::getPhrase('younetcore.younet_plugins_manager')); $this->template()->setHeader(array('tabs.js' => 'module_younetcore', 'sl.js' => 'module_younetcore', 'tab.css' => 'module_younetcore', 'younet.css' => 'module_younetcore', 'slimbox2.css' => 'module_younetcore')); if ($_POST) { if ($this->request()->get('recheck') != phpfox::getPhrase('younetcore.check_problems')) { $aVals = $this->request()->getRequests(); if (isset($aVals['do'])) { unset($aVals['do']); } if (isset($aVals['core'])) { unset($aVals['core']); } if (isset($aVals['req1'])) { unset($aVals['req1']); } if (isset($aVals['req2'])) { unset($aVals['req2']); } $product_id = isset($aVals['m']) ? $aVals['m'] : ""; $oVerify->verified($aVals, $product_id); $this->url()->send('admincp.younetcore'); } else { $oService->rmc(); $oService->rma(); $this->url()->send('admincp.younetcore'); } } $oService->checkYouNetProducts(); $aProducts = $oService->getPhpFoxProducts(false); $this->template()->setTitle(Phpfox::getPhrase('admincp.manage_products'))->setFullSite(true)->assign(array('aProducts' => $aProducts, 'sCoreUrl' => phpfox::getParam('core.path'))); }
/** * Class process method wnich is used to execute this component. */ public function process() { $iLimit = Phpfox::getParam('contest.number_of_contest_featured_block_home_page'); list($iCnt, $aContests) = Phpfox::getService('contest.contest')->getTopContests($sType = 'featured', $iLimit); if ($iCnt <= 0) { return false; } $aContests = $this->_implementStyle($aContests); $this->template()->assign(array('corepath' => phpfox::getParam('core.path'), 'aFeaturedContests' => $aContests, 'bIsAutorun' => Phpfox::getParam('contest.contest_autorun_featured_slideshow'), 'iSpeed' => Phpfox::getParam('contest.contest_featured_slideshow_speed'))); return 'block'; }
public function process() { $iLimit = PHpfox::getParam('contest.number_of_contest_block_home_page'); list($iCnt, $aContests) = Phpfox::getService('contest.contest')->getTopContests($sType = 'premium', $iLimit); $this->template()->assign(array('corepath' => phpfox::getParam('core.path'), 'aPremiumContests' => $aContests, 'iCntPremiumContests' => $iCnt, 'iLimit' => $iLimit)); if ($iCnt == 0 || defined('PHPFOX_IS_USER_PROFILE')) { return false; } else { $this->template()->assign(array('sHeader' => Phpfox::getPhrase('contest.premium_contest'))); } return 'block'; }
public function process() { if (!($aContests = $this->getParam('aContest'))) { return false; } list($iCnt, $aParticipants) = Phpfox::getService('contest.participant')->get($aContests['contest_id'], 0, 16); if ($iCnt <= 0) { return false; } $sViewMoreUrl = $this->url()->permalink('contest', $aContests['contest_id'], $aContests['contest_name']) . 'view_participants/'; $this->template()->assign(array('aParticipants' => $aParticipants, 'corepath' => phpfox::getParam('core.path'), 'aContests' => $aContests, 'sHeader' => Phpfox::getPhrase('contest.participants'), 'aFooter' => array(Phpfox::getPhrase('contest.view_more') => $sViewMoreUrl))); return 'block'; }
public function process() { $aUser = $this->getParam('aUser', false); if (!isset($aUser['user_id'])) { $this->url()->send(''); } $sPrivacyList = "0,1,2,3,4"; if (phpfox::getUserId() != $aUser['user_id']) { $sPrivacyList = "0"; } $sYear = date('Y', PHPFOX_TIME); $aUserReviewPhotos = phpfox::getService('reviewactivity')->getUserPhotos($aUser['user_id'], $sPrivacyList); list($iTotalFriend, $aUserReviewFriends) = phpfox::getService('reviewactivity')->getFriends($aUser['user_id'], $sYear); $sMoreFriend = 0; if ($iTotalFriend > count($aUserReviewFriends)) { $sMoreFriend = $iTotalFriend - count($aUserReviewFriends); } list($iTotalPage, $aUserReviewPages) = phpfox::getService('reviewactivity')->getPages($aUser['user_id'], $sYear); $sMorePage = 0; if ($iTotalPage > count($aUserReviewPages)) { $sMorePage = $iTotalFriend - count($aUserReviewPages); } $sReviewUserName = $aUser['user_name']; /*$this->setParam('aFeed', array( 'comment_type_id' => 'reviewactivity', 'privacy' => $aItem['privacy'], 'comment_privacy' => $aItem['privacy_comment'], 'like_type_id' => 'blog', 'feed_is_liked' => isset($aItem['is_liked']) ? $aItem['is_liked'] : false, 'feed_is_friend' => $aItem['is_friend'], 'item_id' => $aItem['review_id'], 'user_id' => $aItem['user_id'], 'total_comment' => $aItem['total_comment'], 'total_like' => $aItem['total_like'], 'feed_link' => $aItem['bookmark_url'], 'feed_title' => $aItem['title'], 'feed_display' => 'view', 'feed_total_like' => $aItem['total_like'], 'report_module' => 'reviewactivity', 'report_phrase' => Phpfox::getPhrase('reviewactivity.report_this_review_activity'), 'time_stamp' => $aItem['time_stamp'] ) ); */ $this->template()->assign(array('sReviewYear' => $sYear, 'sReviewUserName' => $sReviewUserName, 'sCoreUrl' => phpfox::getParam('core.path'), 'iTotalFriend' => $iTotalFriend, 'aUserReviewFriends' => $aUserReviewFriends, 'iTotalPage' => $iTotalPage, 'aUserReviewPages' => $aUserReviewPages, 'sMorePage' => $sMorePage, 'sMoreFriend' => $sMoreFriend)); $this->template()->setBreadCrumb(Phpfox::getPhrase('reviewactivity.review_activities')); $this->template()->assign(array('aUserReviewPhotos' => $aUserReviewPhotos, 'aReviewUser' => $aUser))->setHeader(array('reviewactivity.css' => 'module_reviewactivity', 'reviewactivity.js' => 'module_reviewactivity', 'jquery.cycle.all.js' => 'module_reviewactivity')); }
public function process() { Phpfox::getService('contest.contest.process')->checkAndUpdateStatusOfContests(); $this->template()->setBreadcrumb(Phpfox::getPhrase('contest.contest'), $this->url()->makeUrl('contest')); $this->_buildSubsectionMenu(); //search contest $aSearchNumber = array(10, 20, 30, 40); $sActionUrl = $this->url()->makeUrl('contest', array('view' => $this->request()->get('view'))); $this->search()->set(array('type' => 'entry', 'field' => 'en.entry_id', 'search' => 'search', 'search_tool' => array('table_alias' => 'en', 'search' => array('action' => $sActionUrl, 'default_value' => Phpfox::getPhrase('contest.search_entries'), 'name' => 'search', 'field' => 'en.title'), 'sort' => array('latest' => array('en.time_stamp', Phpfox::getPhrase('contest.lastest')), 'most-viewed' => array('en.total_view', Phpfox::getPhrase('contest.most_viewed')), 'most-vote' => array('en.total_vote', Phpfox::getPhrase('contest.most_voted')), 'most-liked' => array('en.total_like', Phpfox::getPhrase('contest.most_liked'))), 'show' => $aSearchNumber))); $sView = $this->request()->get('view', false); $sDefaultType = Phpfox::getService('contest.entry')->getDefaultSearchType($sView); $sType = $this->request()->get('type', $sDefaultType); $iType = Phpfox::getService('contest.constant')->getContestTypeIdByTypeName($sType); $this->search()->setCondition('AND en.type = ' . $iType); $aBrowseParams = array('module_id' => 'contest', 'alias' => 'en', 'field' => 'entry_id', 'table' => Phpfox::getT('contest_entry'), 'hide_view' => array('my')); $this->_view($sView); $this->search()->browse()->params($aBrowseParams)->execute(); $aEntries = $this->search()->browse()->getRows(); //here we should and a funtion corresponding with entry/view // foreach ($aEntries as $key => $aEntry) { $aEntry['status_entry'] = $aEntry['status']; $aEntry['approve'] = $aEntry['status_entry'] == 1 ? 0 : 1; $aEntry['deny'] = $aEntry['status_entry'] == 2 ? 0 : 1; $is_entry_winning = Phpfox::getService("contest.entry")->CheckExistEntryWinning($aEntry['entry_id']); $aEntry['winning'] = $aEntry['contest_status'] == 5 && $is_entry_winning == 0 ? 1 : 0; $aEntry['offaction'] = 0; if ($aEntry['contest_user_id'] != Phpfox::getUserId() && !PHpfox::isAdmin()) { $aEntry['offaction'] = 1; } $aEntry = Phpfox::getService('contest.entry')->retrieveEntryPermission($aEntry); $aEntries[$key] = $aEntry; } Phpfox::getLib('pager')->set(array('page' => $this->search()->getPage(), 'size' => $this->search()->getDisplay(), 'count' => $this->search()->browse()->getCount())); $this->template()->assign(array('aEntries' => $aEntries, 'sView' => $sView, 'sType' => $sType, 'bIsEntryIndex' => true, 'corepath' => phpfox::getParam('core.path')))->setHeader(array('pager.css' => 'style_css', 'yncontest.css' => 'module_contest', 'yncontest.js' => 'module_contest')); }
public function process() { Phpfox::getService('contest.contest.process')->checkAndUpdateStatusOfContests(); if (!Phpfox::getService('contest.permission')->canViewBrowseContestModule()) { $this->url()->send('contest.error', array('status' => Phpfox::getService('contest.constant')->getErrorStatusNumber('invalid_permission'))); } if ($this->_checkIsThisAViewDetailRequest()) { return Phpfox::getLib('module')->setController('contest.view'); } if ($this->_checkIsThisAViewEntriesRequest()) { return Phpfox::getLib('module')->setController('contest.entry.index'); } $this->template()->setBreadcrumb(Phpfox::getPhrase('contest.contest'), $this->url()->makeUrl('contest')); //check profile $bIsProfile = false; $aUser = null; if (defined('PHPFOX_IS_AJAX_CONTROLLER')) { $bIsProfile = true; $aUser = Phpfox::getService('user')->get($this->request()->get('profile_id')); $this->setParam('aUser', $aUser); } else { $bIsProfile = $this->getParam('bIsProfile'); if ($bIsProfile === true) { $aUser = $this->getParam('aUser'); } } // detect to show slide show and other blocks $bInHomepage = $this->_checkIsInHomePage(); $this->_buildSubsectionMenu(); //search contest $aSearchNumber = array(12, 24, 36, 48); $sActionUrl = $bIsProfile === true ? $this->url()->makeUrl($aUser['user_name'], array('contest', 'view' => $this->request()->get('view'))) : $this->url()->makeUrl('contest', array('view' => $this->request()->get('view'))); $this->search()->set(array('type' => 'contest', 'field' => 'ct.contest_id', 'search' => 'search', 'search_tool' => array('table_alias' => 'ct', 'search' => array('action' => $sActionUrl, 'default_value' => Phpfox::getPhrase('contest.search_contests'), 'name' => 'search', 'field' => 'ct.contest_name'), 'custom_filters' => $this->_getCustomFilters(), 'sort' => array('latest' => array('ct.time_stamp', Phpfox::getPhrase('contest.latest')), 'most-participant' => array('ct.total_participant', Phpfox::getPhrase('contest.most_participants')), 'most-viewed' => array('ct.total_view', Phpfox::getPhrase('contest.most_viewed')), 'most-favorited' => array('ct.total_favorite', Phpfox::getPhrase('contest.most_favorited')), 'most-liked' => array('ct.total_like', Phpfox::getPhrase('contest.most_liked'))), 'show' => $aSearchNumber))); $sView = $this->request()->get('view', false); $this->_view($sView, $bIsProfile, $aUser); //removed contest $this->search()->setCondition(' AND ct.is_deleted = 0'); if ($sView != "my") { $this->search()->setCondition(' AND ct.is_active = 1'); } $accessprofile = true; if ($bIsProfile === true) { if ($aUser['user_id'] != Phpfox::getUserId()) { $this->search()->setCondition('AND (ct.contest_status = 4 || ct.contest_status = 5)'); $accessprofile = false; } } if ($this->request()->get($bIsProfile === true ? 'req3' : 'req2') == 'category') { if ($aContestCategory = Phpfox::getService('contest.category')->getForEdit($this->request()->getInt($bIsProfile === true ? 'req4' : 'req3'))) { $this->template()->setBreadCrumb(Phpfox::getPhrase('contest.category')); $this->search()->setCondition('AND rc.category_id = ' . $this->request()->getInt($bIsProfile === true ? 'req4' : 'req3')); $this->template()->setTitle(Phpfox::getLib('locale')->convert($aContestCategory['name'])); $this->template()->setBreadCrumb(Phpfox::getLib('locale')->convert($aContestCategory['name']), $this->url()->makeUrl('current'), true); $this->search()->setFormUrl($this->url()->permalink(array('contest.category', 'view' => $this->request()->get('view')), $aContestCategory['category_id'], $aContestCategory['name'])); } } // Custom filter $this->_setFilterCondition(); // Setup search params $aBrowseParams = array('module_id' => 'contest', 'alias' => 'ct', 'field' => 'contest_id', 'table' => Phpfox::getT('contest'), 'hide_view' => array('my')); $this->search()->browse()->params($aBrowseParams)->execute(); $aContests = Phpfox::getService('contest.contest')->implementsContestFields($this->search()->browse()->getRows()); $aContests = $this->_implementStyle($aContests); foreach ($aContests as &$aContest) { $aContest = Phpfox::getService('contest.contest')->retrieveContestPermissions($aContest); $aContest['is_show_ending_soon_label'] = Phpfox::getService('contest.contest')->isShowContestEndingSoonLabel($aContest['contest_id']); } Phpfox::getLib('pager')->set(array('page' => $this->search()->getPage(), 'size' => $this->search()->getDisplay(), 'count' => $this->search()->browse()->getCount())); $this->template()->assign(array('bInHomepage' => $bInHomepage, 'aContests' => $aContests, 'corepath' => phpfox::getParam('core.path'), 'sView' => $sView, 'bIsProfile' => $bIsProfile, 'accessprofile' => $accessprofile)); $this->template()->setHeader(array('jquery.divslideshow-1.1.js' => 'module_contest', 'pager.css' => 'style_css', 'yncontest.css' => 'module_contest', 'flexslider.css' => 'module_contest', 'jquery.flexslider-min.js' => 'module_contest', 'block.css' => 'module_contest', 'yncontest.js' => 'module_contest')); if ($sView == 'closed') { $this->setParam('global_moderation', array('name' => 'contest', 'ajax' => 'contest.moderation', 'menu' => array(array('phrase' => Phpfox::getPhrase('contest.delete'), 'action' => 'delete')))); } }
/** * Class process method wnich is used to execute this component. */ public function process() { $sModule = $this->getParam('m'); $aToken = $this->getParam('token'); $this->template()->assign(array('aToken' => $aToken, 'sCoreUrl' => phpfox::getParam('core.path'))); }
public function process() { #View type $sView = $this->_getView(); $this->setParam('sView', $sView); #Get contest $aCallback = $this->getParam('aCallback', false); $iContestId = $this->request()->getInt($aCallback !== false ? $aCallback['request'] : 'req2'); Phpfox::getService('contest.contest.process')->checkAndUpdateStatusOfAContest($iContestId); $aContest = Phpfox::getService('contest.contest')->getContestById($iContestId, $bIsCache = false); // FUDGE Lovinity October 18, 2015: Forbid viewing of blog if user is blocked $bIsBlocked = Phpfox::getService('user.block')->isBlocked($aContest['user_id'], Phpfox::getUserId()); $bIsBlocked2 = Phpfox::getService('user.block')->isBlocked(Phpfox::getUserId(), $aContest['user_id']); if (!$aContest['can_view_browse_contest'] || $aContest['is_deleted'] == 1 || $bIsBlocked || $bIsBlocked2) { $this->url()->send('contest.error', array('status' => Phpfox::getService('contest.constant')->getErrorStatusNumber('invalid_permission'))); } // END FUDGE $this->_deleteNotification(); $aContest = Phpfox::getService('contest.contest')->implementsContestFields($aContest); $aContest['total_view'] = Phpfox::getService('contest.contest.process')->viewContest($aContest['contest_id'], $aContest['total_view']); $this->setParam("aContest", $aContest); $this->template()->setBreadcrumb(Phpfox::getPhrase('contest.contest'), $this->url()->makeUrl('contest')); $is_hidden_action = Phpfox::getService('contest.permission')->canHideAction($aContest); $sTypeName = Phpfox::getService('contest.constant')->getContestTypeNameByTypeId($aContest['type']); //to make facebook know the image $sImageUrl = sprintf(Phpfox::getParam('core.url_pic') . 'contest/' . $aContest['image_path'], ''); #Switch type of view #View entry detail if ($sView == 'entry') { $iEntryId = $this->request()->get('entry'); $aEntry = Phpfox::getService('contest.entry')->getContestEntryById($iEntryId); if (!$aEntry) { Phpfox::getLib('url')->send('subscribe'); } $this->_entryDeleteNotification(); if (!$aEntry['can_view_entry_detail']) { Phpfox::getLib('url')->send('subscribe'); } $aEntry['total_view'] = Phpfox::getService('contest.entry.process')->viewEntry($aEntry['entry_id'], $aEntry['total_view']); $sImageUrl = sprintf(Phpfox::getParam('core.url_pic') . $aEntry['image_path'], ''); $this->setParam('aEntry', $aEntry); $aEntry = $this->_entryImplementFields($aEntry); $sTemplateViewPath = Phpfox::getService('contest.entry')->getTemplateViewPath($aEntry['type']); //display box comment,like and share $this->_entryBoxComment($aEntry); $this->template()->setBreadCrumb(Phpfox::getLib('parse.output')->shorten($aEntry['contest_name'], 40, '...'), $this->url()->permalink('contest', $aContest['contest_id'], $aContest['contest_name']), true)->setBreadCrumb('', '', true)->setEditor(array('load' => 'simple'))->assign(array('aEntry' => $aEntry, 'sTemplateViewPath' => $sTemplateViewPath, 'core_path' => Phpfox::getParam('core.path'))); $this->template()->setMeta(array('keywords' => $this->template()->getKeywords($aEntry['title']), 'description' => $aEntry['summary'], 'og:description' => $aEntry['summary'], 'og:title' => $aEntry['title'], 'og:url' => $aEntry['bookmark_url'])); } else { #Default view of contest if ($sView == 'default') { $aSearchNumber = array(12, 24, 36, 48); $sActionUrl = $this->url()->makeUrl('contest/' . $iContestId, array('view' => $this->request()->get('view'))); $this->search()->set(array('type' => 'entry', 'field' => 'en.entry_id', 'search' => 'search', 'search_tool' => array('table_alias' => 'en', 'search' => array('action' => $sActionUrl, 'default_value' => Phpfox::getPhrase('contest.search_entries'), 'name' => 'search', 'field' => 'en.title'), 'sort' => array('latest' => array('en.time_stamp', Phpfox::getPhrase('contest.lastest')), 'most-viewed' => array('en.total_view', Phpfox::getPhrase('contest.most_viewed')), 'most-vote' => array('en.total_vote', Phpfox::getPhrase('contest.most_voted')), 'most-liked' => array('en.total_like', Phpfox::getPhrase('contest.most_liked'))), 'show' => $aSearchNumber))); $this->search()->setCondition('AND en.contest_id = ' . $aContest['contest_id']); if ($is_hidden_action) { $this->search()->setCondition('AND en.status = 1'); } $aBrowseParams = array('module_id' => 'contest', 'alias' => 'en', 'field' => 'entry_id', 'table' => Phpfox::getT('contest_entry'), 'hide_view' => array('my')); $this->search()->browse()->params($aBrowseParams)->execute(); $aEntries = $this->search()->browse()->getRows(); Phpfox::getLib('pager')->set(array('page' => $this->search()->getPage(), 'size' => $this->search()->getDisplay(), 'count' => $this->search()->browse()->getCount())); foreach ($aEntries as $key => $aEntry) { $aEntry['status_entry'] = $aEntry['status']; $aEntry['approve'] = $aEntry['status'] == 1 ? 0 : 1; $aEntry['deny'] = $aEntry['status'] == 2 ? 0 : 1; $is_entry_winning = Phpfox::getService("contest.entry")->CheckExistEntryWinning($aEntry['entry_id']); $aEntry['winning'] = $aEntry['contest_status'] == 5 && $is_entry_winning == 0 ? 1 : 0; $aEntry['offaction'] = 0; if ($aEntry['contest_user_id'] != Phpfox::getUserId() && !PHpfox::isAdmin()) { $aEntry['offaction'] = 1; } $aEntry = Phpfox::getService('contest.entry')->retrieveEntryPermission($aEntry); $aEntries[$key] = $aEntry; } $this->template()->assign(array('aEntries' => $aEntries, 'corepath' => phpfox::getParam('core.path'))); $global_moderation = array('name' => 'contestentry', 'ajax' => 'contest.moderateEntry', 'menu' => array(array('phrase' => Phpfox::getPhrase('contest.approve'), 'action' => 'approve'), array('phrase' => Phpfox::getPhrase('contest.deny'), 'action' => 'deny'))); if ($aContest['contest_status'] == 5) { $global_moderation['menu'][] = array('phrase' => Phpfox::getPhrase('contest.set_as_winning_entries'), 'action' => 'set_as_winning_entries'); } $this->setParam('global_moderation', $global_moderation); } #View winning entries if ($sView == 'winning') { $global_moderation = array('name' => 'contestentry', 'ajax' => 'contest.moderateEntry', 'menu' => array(array('phrase' => 'Delete from the list', 'action' => 'delete'))); $this->setParam('global_moderation', $global_moderation); } #For announcement $aValidation = array('headline' => array('def' => 'required', 'title' => Phpfox::getPhrase('contest.fill_headline_for_announcement')), 'content' => array('def' => 'required', 'title' => Phpfox::getPhrase('contest.add_content_to_announcement'))); $oValid = Phpfox::getLib('validator')->set(array('sFormName' => 'core_js_contest_form', 'aParams' => $aValidation)); if ($aVals = $this->request()->getArray('val')) { if ($oValid->isValid($aVals)) { $aVals['user_id'] = Phpfox::getUserId(); $aVals['contest_id'] = $aContest['contest_id']; $iId = Phpfox::getService('contest.announcement.process')->add($aVals); } } $announcement = 0; if ($iId = $this->request()->get('announcement')) { $announcement = $iId; } #Comment container $aContest['bookmark_url'] = Phpfox::permalink('contest', $aContest['contest_id'], $aContest['contest_name']); $this->_boxComment($aContest); $this->template()->assign(array('announcement' => $announcement, 'sContestWarningMessage' => $this->_getContestWarningMessage($aContest))); $aValidatorPhrases = Phpfox::getService('contest.helper')->getPhrasesForValidator(); $this->template()->setPhrase($aValidatorPhrases); $this->template()->setMeta(array('keywords' => $this->template()->getKeywords($aContest['contest_name']), 'description' => $aContest['short_description'], 'og:description' => $aContest['short_description'], 'og:title' => $aContest['contest_name'], 'og:url' => $aContest['bookmark_url'])); } $aContest['is_show_ending_soon_label'] = Phpfox::getService('contest.contest')->isShowContestEndingSoonLabel($aContest['contest_id']); $bIsShowRegisterService = false; if ($this->request()->get('registerservice') && Phpfox::getService('contest.permission')->canRegisterService($aContest['contest_id'], Phpfox::getUserId())) { $bIsShowRegisterService = true; } if ($sTypeName == 'music') { $this->template()->setHeader(array('mediaelementplayer.min.css' => 'module_contest', 'mejs-audio-skins.css' => 'module_contest', 'mediaelement-and-player.min.js' => 'module_contest', 'controller_player.js' => 'module_contest')); } $this->template()->assign(array('aContest' => $aContest, 'sView' => $sView, 'is_hidden_action' => $is_hidden_action, 'showaction' => true, 'aContestStatus' => Phpfox::getService('contest.constant')->getAllContestStatus(), 'bIsShowRegisterService' => $bIsShowRegisterService))->setMeta(array('og:image' => $sImageUrl, 'og:type' => 'website'))->setHeader(array('yncontest.css' => 'module_contest', 'yncontest.js' => 'module_contest', 'block.css' => 'module_contest', 'jquery.validate.js' => 'module_contest', 'jquery/plugin/jquery.highlightFade.js' => 'static_script', 'jquery/plugin/jquery.scrollTo.js' => 'static_script', 'quick_edit.js' => 'static_script', 'comment.css' => 'style_css', 'pager.css' => 'style_css', 'feed.js' => 'module_feed', '<link rel="image_src" href="' . $sImageUrl . '" />')); }
public function process() { $aContest = $this->getParam('aContest'); $this->template()->assign(array('sHeader' => Phpfox::getPhrase('contest.contest_owner'), 'corepath' => phpfox::getParam('core.path'), 'aItem' => $aContest)); return 'block'; }
public function exportXML($contentXML, $fileTemplate) { /* * Change to wordpress. */ $file = ""; if ($fileTemplate == 'wordpresstemplate') { //$file = 'blog.wordpress.' . date('Y-m-d', time()) . '.xml'; $file = 'wordpress.' . date('Y-m-d', time()) . '.xml'; } else { if ($fileTemplate == 'bloggertemplate') { //$file = 'blog.blogger.' . date('Y-m-d', time()) . '.xml'; $file = 'blogger.' . date('Y-m-d', time()) . '.xml'; } else { if ($fileTemplate == 'tumblrtemplate') { //$file = 'blog.tumblr.' . date('Y-m-d', time()) . '.xml'; $file = 'tumblr.' . date('Y-m-d', time()) . '.xml'; } } } if ($contentXML != null) { $path = PHPFOX_DIR_FILE . 'export'; $path2 = phpfox::getParam('core.path') . 'file/export'; $aParts = explode('/', Phpfox::getParam('core.build_format')); foreach ($aParts as $sPart) { $sDate = date($sPart) . '/'; $path .= $sDate; $path2 .= $sDate; if (!is_dir($path)) { @mkdir($path, 0777); @chmod($path, 0777); } } $filename = $path . PHPFOX_DS . $file; $f = fopen($filename, 'w+'); fwrite($f, $contentXML); fclose($f); $exportFile = $path2 . $file; } $this->downloader($filename, 'xml'); }
<?php if (phpfox::isModule('livenotification')) { phpfox::getLib('template')->setHeader(array('core.js' => 'module_livenotification', 'core.css' => 'module_livenotification')); $iDelayCheck = (int) phpfox::getParam('livenotification.notification_check'); $iDelayClean = (int) phpfox::getParam('livenotification.notification_clean'); phpfox::getLib('template')->setHeader(array('<script type="text/javascript">var ln_delay_check = ' . $iDelayCheck . ', ln_delay_clean = ' . $iDelayClean . ';</script>')); }