当前位置: 首页>>代码示例>>PHP>>正文


PHP Phpfox::getLib方法代码示例

本文整理汇总了PHP中Phpfox::getLib方法的典型用法代码示例。如果您正苦于以下问题:PHP Phpfox::getLib方法的具体用法?PHP Phpfox::getLib怎么用?PHP Phpfox::getLib使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Phpfox的用法示例。


在下文中一共展示了Phpfox::getLib方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: process

 /**
  * Class process method wnich is used to execute this component.
  */
 public function process()
 {
     $bIsEdit = false;
     if ($iId = $this->request()->getInt('id')) {
         if ($aPackage = Phpfox::getService('subscribe')->getForEdit($iId)) {
             $bIsEdit = true;
             $this->template()->assign('aForms', $aPackage);
             $this->setParam('currency_value_val[cost]', unserialize($aPackage['cost']));
             if (!empty($aPackage['recurring_cost'])) {
                 $this->setParam('currency_value_val[recurring_cost]', unserialize($aPackage['recurring_cost']));
             }
         }
     }
     if ($aVals = $this->request()->getArray('val')) {
         if ($bIsEdit) {
             if (Phpfox::getService('subscribe.process')->update($aPackage['package_id'], $aVals)) {
                 $this->url()->send('admincp.subscribe.add', array('id' => $aPackage['package_id']), Phpfox::getPhrase('subscribe.package_successfully_update'));
             }
         } else {
             if (Phpfox::getService('subscribe.process')->add($aVals)) {
                 $this->url()->send('admincp.subscribe', null, Phpfox::getPhrase('subscribe.package_successfully_added'));
             }
         }
     }
     $this->template()->setTitle($bIsEdit ? Phpfox::getPhrase('subscribe.editing_subscription_package') . ': ' . $aPackage['title'] : Phpfox::getPhrase('subscribe.create_new_subscription_package'))->setBreadcrumb(Phpfox::getPhrase('subscribe.subscription_packages'), $this->url()->makeUrl('admincp.subscribe'))->setBreadcrumb($bIsEdit ? Phpfox::getPhrase('subscribe.editing') . ': ' . Phpfox::getLib('locale')->convert($aPackage['title']) : Phpfox::getPhrase('subscribe.create_new_subscription_package'), null, true)->assign(array('aUserGroups' => Phpfox::getService('user.group')->get(), 'bIsEdit' => $bIsEdit));
 }
开发者ID:Lovinity,项目名称:EQM,代码行数:29,代码来源:add.class.php

示例2: __construct

 /**
  * Based on what CDN module is selected here is where we load the CDN class and initiat the object.
  *
  * @param array $aParams Array of any special params to pass to the module CDN class
  */
 public function __construct($aParams = array())
 {
     if (!$this->_oObject) {
         $sCdn = Phpfox::getParam('core.cdn_service') == '' ? 's3' : Phpfox::getParam('core.cdn_service');
         $this->_oObject = Phpfox::getLib('phpfox.cdn.module.' . $sCdn, $aParams);
     }
 }
开发者ID:Lovinity,项目名称:EQM,代码行数:12,代码来源:cdn.class.php

示例3: setHash

 public function setHash($sCode)
 {
     if (Phpfox::getParam('core.store_only_users_in_session')) {
         $oRequest = Phpfox::getLib('request');
         $oSession = Phpfox::getLib('session');
         $sSessionHash = $oSession->get('sessionhash');
         $bCreate = true;
         if (!empty($sSessionHash)) {
             $bCreate = false;
             $aRow = $this->database()->select('*')->from(Phpfox::getT('log_session'))->where('session_hash = \'' . $this->database()->escape($sSessionHash) . '\'')->execute('getSlaveRow');
             if (isset($aRow['session_hash'])) {
                 $this->database()->update(Phpfox::getT('log_session'), array('captcha_hash' => $this->_getHash($sCode, $sSessionHash)), "session_hash = '" . $sSessionHash . "'");
             } else {
                 $bCreate = true;
             }
         }
         if ($bCreate) {
             $sSessionHash = $oRequest->getSessionHash();
             $this->database()->insert(Phpfox::getT('log_session'), array('session_hash' => $sSessionHash, 'id_hash' => $oRequest->getIdHash(), 'captcha_hash' => $this->_getHash($sCode, $sSessionHash), 'user_id' => Phpfox::getUserId(), 'last_activity' => PHPFOX_TIME, 'location' => '', 'is_forum' => '0', 'forum_id' => 0, 'im_hide' => 0, 'ip_address' => '', 'user_agent' => ''));
             $oSession->set('sessionhash', $sSessionHash);
         }
     } else {
         $iId = $this->_oSession->getSessionId();
         $this->database()->update(Phpfox::getT('log_session'), array('captcha_hash' => $this->_getHash($sCode, $iId)), "session_hash = '" . $iId . "'");
     }
 }
开发者ID:googlesky,项目名称:snsp.vn,代码行数:26,代码来源:captcha.class.php

示例4: process

 /**
  * Class process method wnich is used to execute this component.
  */
 public function process()
 {
     if ($aVals = $this->request()->getArray('val')) {
         Phpfox::isUser(true);
         Phpfox::getUserParam('comment.can_post_comments', true);
         if (($iFlood = Phpfox::getUserParam('comment.comment_post_flood_control')) !== 0) {
             $aFlood = array('action' => 'last_post', 'params' => array('field' => 'time_stamp', 'table' => Phpfox::getT('comment'), 'condition' => 'type_id = \'' . Phpfox::getLib('database')->escape($aVals['type']) . '\' AND user_id = ' . Phpfox::getUserId(), 'time_stamp' => $iFlood * 60));
             // actually check if flooding
             if (Phpfox::getLib('spam')->check($aFlood)) {
                 Phpfox_Error::set(Phpfox::getPhrase('comment.posting_a_comment_a_little_too_soon_total_time', array('total_time' => Phpfox::getLib('spam')->getWaitTime())));
             }
         }
         if (Phpfox::getLib('parse.format')->isEmpty($aVals['text'])) {
             Phpfox_Error::set(Phpfox::getPhrase('feed.add_some_text_to_your_comment'));
         }
         if (Phpfox_Error::isPassed() && ($iId = Phpfox::getService('comment.process')->add($aVals))) {
             $this->url()->send('feed.view', array('id' => $this->request()->getInt('id')), Phpfox::getPhrase('feed.successfully_added_your_comment'));
         }
     }
     if ($iLikeType = $this->request()->getInt('liketype')) {
         if (Phpfox::getService('feed.process')->like($this->request()->getInt('id'), $iLikeType)) {
             $this->url()->send('feed.view', array('id' => $this->request()->getInt('id')), $iLikeType == '1' ? Phpfox::getPhrase('feed.successfully_liked_this_feed') : Phpfox::getPhrase('feed.successfully_unliked_this_feed'));
         }
     }
     list($iFeedCount, $aFeeds) = Phpfox::getService('feed')->get(null, $this->request()->getInt('id'), 1);
     $iCommentCnt = 0;
     $aComments = array();
     if (Phpfox::getParam('feed.allow_comments_on_feeds')) {
         list($iCommentCnt, $aComments) = Phpfox::getService('comment')->get('cmt.*', array("AND cmt.type_id = 'feed'", 'AND cmt.item_id = ' . (int) $aFeeds[0]['feed_id'], 'AND cmt.view_id = 0'), 'cmt.time_stamp ASC');
     }
     if (!count($aFeeds)) {
         return Phpfox_Error::display(Phpfox::getPhrase('feed.not_a_valid_feed'));
     }
     $this->template()->setMobileHeader(array('feed.css' => 'module_feed'))->assign(array('iFeedId' => $aFeeds[0]['feed_id'], 'aFeeds' => $aFeeds, 'aComments' => $aComments));
 }
开发者ID:googlesky,项目名称:snsp.vn,代码行数:38,代码来源:view-mobile.class.php

示例5: process

 /**
  * Class process method wnich is used to execute this component.
  */
 public function process()
 {
     // assign the categories
     $this->template()->assign(array('aCategories' => Phpfox::getService('contact.contact')->getCategories()));
     // create the captcha check JS
     // they need to input some text always
     $aValidation = array('text' => Phpfox::getPhrase('contact.fill_in_some_text_for_your_message'), 'category_id' => Phpfox::getPhrase('contact.you_need_to_choose_a_category'), 'subject' => Phpfox::getPhrase('contact.provide_a_subject'), 'full_name' => Phpfox::getPhrase('contact.provide_your_full_name'));
     // do they need to complete a captcha challenge?
     if (Phpfox::isModule('captcha') && Phpfox::getParam('contact.contact_enable_captcha')) {
         $aValidation['image_verification'] = Phpfox::getPhrase('captcha.complete_captcha_challenge');
     }
     // They always need to input their email address
     $aValidation['email'] = array('def' => 'email', 'title' => Phpfox::getPhrase('contact.provide_a_valid_email'));
     $oValid = Phpfox::getLib('validator')->set(array('sFormName' => 'js_contact_form', 'aParams' => $aValidation));
     // check if we're getting a request:
     if ($aVals = $this->request()->getArray('val')) {
         // check the fields are valid
         if ($oValid->isValid($aVals)) {
             if (Phpfox::getService('contact.contact')->sendContactMessage($aVals)) {
                 if (!empty($aVals['category_id']) && $aVals['category_id'] == 'phpfox_sales_ticket') {
                     $this->url()->send('contact', array('sent' => 'true'));
                 } else {
                     $this->url()->send('contact', null, Phpfox::getPhrase('contact.your_message_was_successfully_sent'));
                 }
             } else {
                 $this->template()->assign(array('aContactErrors' => Phpfox_Error::set(Phpfox::getPhrase('error.site_email_not_set'))));
             }
         }
     }
     if (Phpfox::isUser()) {
         $this->template()->assign(array('sFullName' => Phpfox::getUserBy('full_name'), 'sEmail' => Phpfox::getUserBy('email')));
     }
     $this->template()->setTitle(Phpfox::getPhrase('contact.contact_us'))->setBreadcrumb(Phpfox::getPhrase('contact.contact_us'))->assign(array('sCreateJs' => $oValid->createJs(), 'sGetJsForm' => $oValid->getJsForm(), 'bIsSent' => $this->request()->get('sent')))->setFullSite();
 }
开发者ID:googlesky,项目名称:snsp.vn,代码行数:37,代码来源:index.class.php

示例6: getGlobalNotifications

 public function getGlobalNotifications()
 {
     $iTotal = Phpfox::getService('notification')->getUnseenTotal();
     if ($iTotal > 0) {
         Phpfox::getLib('ajax')->call('$(\'#js_total_new_notifications\').html(\'' . (int) $iTotal . '\').css({display: \'block\'}).show();');
     }
 }
开发者ID:googlesky,项目名称:snsp.vn,代码行数:7,代码来源:callback.class.php

示例7: export

 public function export($sProduct, $sModuleId = null)
 {
     $aCond = array();
     $aCond[] = "me.product_id = '" . $this->database()->escape($sProduct) . "'";
     if ($sModuleId !== null) {
         $aCond[] = "AND me.module_id = '" . $sModuleId . "'";
     }
     $aRows = $this->database()->select('me.*, m.module_id AS module_name, p.title AS product_name, pm.var_name as parent_var_name')->from($this->_sTable, 'me')->join(Phpfox::getT('module'), 'm', 'm.module_id = me.module_id')->join(Phpfox::getT('product'), 'p', 'p.product_id = me.product_id')->leftjoin(Phpfox::getT('menu'), 'pm', 'pm.menu_id = me.parent_id')->where($aCond)->execute('getRows');
     if (!count($aRows)) {
         return false;
     }
     $oXmlBuilder = Phpfox::getLib('xml.builder');
     $oXmlBuilder->addGroup('menus');
     foreach ($aRows as $aRow) {
         if (!empty($aRow['disallow_access'])) {
             $aGroups = unserialize($aRow['disallow_access']);
             $aRow['disallow_access'] = array();
             foreach ($aGroups as $iGroup) {
                 if (!in_array($iGroup, array(1, 2, 3, 4))) {
                     continue;
                 }
                 $aRow['disallow_access'][] = $iGroup;
             }
             $aRow['disallow_access'] = serialize($aRow['disallow_access']);
         }
         $aTag = array('module_id' => $aRow['module_id'], 'parent_var_name' => $aRow['parent_var_name'], 'm_connection' => $aRow['m_connection'], 'var_name' => $aRow['var_name'], 'ordering' => $aRow['ordering'], 'url_value' => $aRow['url_value'], 'version_id' => $aRow['version_id'], 'disallow_access' => $aRow['disallow_access'], 'module' => $aRow['module_name']);
         if (!empty($aRow['mobile_icon'])) {
             $aTag['mobile_icon'] = $aRow['mobile_icon'];
         }
         $oXmlBuilder->addTag('menu', '', $aTag);
     }
     $oXmlBuilder->closeGroup();
     return true;
 }
开发者ID:googlesky,项目名称:snsp.vn,代码行数:34,代码来源:menu.class.php

示例8: process

 /**
  * Class process method wnich is used to execute this component.
  */
 public function process()
 {
     Phpfox::getUserParam('language.can_manage_lang_packs', true);
     $bNoJsValidation = $this->getParam('bNoJsValidation');
     $aModules = Phpfox::getService('admincp.module')->getModules();
     $aLanguages = Phpfox::getService('language')->get();
     if ($sPhrase = $this->getParam('sVar')) {
         $aParts = explode('.', $sPhrase);
         $sPhrase = $aParts[1];
     }
     /*
     $aValidation = array(
     	'var_name' => array(
     		'def' => 'required',
     		'title' => Phpfox::getPhrase('language.select_varname')
     	)
     );
     */
     $aValidation = array();
     $oValid = Phpfox::getLib('validator')->set(array('sFormName' => 'js_phrase_form', 'aParams' => $aValidation));
     if ($aVals = $this->request()->getArray('val')) {
         if (empty($aVals['var_name']) && isset($aVals['text']['en'])) {
             $aVals['var_name'] = $aVals['text']['en'];
         }
         if (empty($aVals['var_name'])) {
             Phpfox_Error::set('Provide a var name.');
         }
         // Check that all the fields are valid
         if ($oValid->isValid($aVals)) {
             // Check to make sure the phrase has not already been added
             if ($sIsPhrase = Phpfox::getService('language.phrase')->isPhrase($aVals)) {
                 Phpfox_Error::set(Phpfox::getPhrase('language.phrase_already_created', array('phrase' => $sIsPhrase)) . ' - ' . Phpfox::getPhrase($sIsPhrase));
                 $sCachePhrase = $sIsPhrase;
             } else {
                 $sVarName = Phpfox::getService('language.phrase.process')->prepare($aVals['var_name']);
                 if (isset($aVals['module'])) {
                     $aParts = explode('|', $aVals['module']);
                     $sVarName = $aParts[1] . '.' . $sVarName;
                 }
                 $sCached = Phpfox::getPhrase('language.phrase_added', array('phrase' => $sVarName));
                 // Add the new phrase
                 $sPhrase = Phpfox::getService('language.phrase.process')->add($aVals);
                 // Verify if we have a return URL, if we do send them there instead
                 if ($sReturn = $this->request()->get('return')) {
                     $this->url()->forward($sReturn, $sCached);
                 } else {
                     Phpfox::getLib('session')->set('cache_new_phrase', $sVarName);
                     // Phrase added lets send them back to the same page with a message that the phrase was added
                     $this->url()->send('admincp.language.phrase.add', array('last-module' => $aParts[1]), $sCached);
                 }
             }
         }
     }
     if (!isset($sCachePhrase) && ($sCachePhrase = Phpfox::getLib('session')->get('cache_new_phrase'))) {
         Phpfox::getLib('session')->remove('cache_new_phrase');
     }
     // Assign needed vars to the template
     $this->template()->assign(array('aProducts' => Phpfox::getService('admincp.product')->get(), 'aModules' => $aModules, 'aLanguages' => $aLanguages, 'sCreateJs' => $oValid->createJS(), 'sGetJsForm' => $bNoJsValidation ? 'return true;' : $oValid->getJsForm(), 'sReturn' => ($sReturn = $this->request()->get('return')) ? $sReturn : $this->getParam('sReturnUrl'), 'sVar' => $sPhrase, 'sCachePhrase' => isset($sCachePhrase) ? $sCachePhrase : '', 'sLastModuleId' => $this->request()->get('last-module')))->setBreadCrumb(Phpfox::getPhrase('language.add_phrase'))->setTitle(Phpfox::getPhrase('language.add_phrase'));
     ($sPlugin = Phpfox_Plugin::get('language.component_controller_admincp_phrase_add_process')) ? eval($sPlugin) : false;
 }
开发者ID:Lovinity,项目名称:EQM,代码行数:63,代码来源:add.class.php

示例9: process

 /**
  * Controller
  */
 public function process()
 {
     if (!$this->getParam('bIsValidImage')) {
         return false;
     }
     $aUser = $this->getParam('aUser');
     $aPhoto = $this->getParam('aPhoto');
     $bIsInPhoto = $this->getParam('is_in_photo');
     if ($aPhoto === null) {
         return false;
     }
     $sCategories = '';
     if (isset($aPhoto['categories']) && is_array($aPhoto['categories'])) {
         foreach ($aPhoto['categories'] as $aCategory) {
             $sCategories .= $aCategory[0] . ',';
         }
         $sCategories = rtrim($sCategories, ',');
     }
     $aInfo = array(Phpfox::getPhrase('photo.added') => '<span itemprop="dateCreated">' . Phpfox::getTime(Phpfox::getParam('photo.photo_image_details_time_stamp'), $aPhoto['time_stamp']) . '</span>', Phpfox::getPhrase('photo.category') => $sCategories, Phpfox::getPhrase('photo.file_size') => Phpfox_File::instance()->filesize($aPhoto['file_size']), Phpfox::getPhrase('photo.resolution') => $aPhoto['width'] . '×' . $aPhoto['height'], Phpfox::getPhrase('photo.comments') => $aPhoto['total_comment'], Phpfox::getPhrase('photo.views') => '<span itemprop="interactionCount">' . $aPhoto['total_view'] . '</span>', Phpfox::getPhrase('photo.rating') => round($aPhoto['total_rating']), Phpfox::getPhrase('photo.battle_wins') => round($aPhoto['total_battle']), Phpfox::getPhrase('photo.downloads') => $aPhoto['total_download']);
     if ($bIsInPhoto) {
         unset($aInfo[Phpfox::getPhrase('photo.added')]);
     }
     foreach ($aInfo as $sKey => $mValue) {
         if (empty($mValue)) {
             unset($aInfo[$sKey]);
         }
     }
     $this->template()->assign(array('sHeader' => Phpfox::getPhrase('photo.image_details'), 'aPhotoDetails' => $aInfo, 'bIsInPhoto' => $bIsInPhoto, 'sUrlPath' => preg_match("/\\{file\\/pic\\/(.*)\\/(.*)\\.jpg\\}/i", $aPhoto['destination'], $aMatches) ? Phpfox::getParam('core.path') . str_replace(array('{', '}'), '', $aMatches[0]) : ($aPhoto['server_id'] && Phpfox::getParam('core.allow_cdn') ? Phpfox::getLib('cdn')->getUrl(Phpfox::getParam('photo.url_photo') . sprintf($aPhoto['destination'], '_500'), $aPhoto['server_id']) : Phpfox::getParam('photo.url_photo') . sprintf($aPhoto['destination'], '_500'))));
     // return 'block';
 }
开发者ID:nima7r,项目名称:phpfox-dist,代码行数:33,代码来源:detail.class.php

示例10: process

 /**
  * Controller
  */
 public function process()
 {
     $aLanguage = Phpfox::getService('language')->getLanguage($this->request()->get('id'));
     if (!isset($aLanguage['language_id'])) {
         return Phpfox_Error::display(Phpfox::getPhrase('language.not_a_valid_language_package'));
     }
     $iPage = $this->request()->getInt('page', 0);
     $aXml = Phpfox::getService('core')->getModulePager('phrases', $iPage, 5);
     if ($aXml === false) {
         $sPhrase = Phpfox::getPhrase('language.successfully_imported_missing_phrases');
         Phpfox::getLib('cache')->remove('locale', 'substr');
         if ($this->request()->get('check') == 'true') {
             $this->url()->send('admincp.language', null, $sPhrase);
         } else {
             $this->url()->send('admincp.language.missing', array('id' => $aLanguage['language_id'], 'check' => 'true'));
         }
     }
     $aModules = array();
     if (is_array($aXml)) {
         $iMissing = Phpfox::getService('language.phrase.process')->findMissingPhrases($aLanguage['language_id'], $aXml, $this->request()->get('check') == 'true' ? true : false);
         foreach ($aXml as $sModule => $sPhrases) {
             $aModules[] = $sModule;
         }
         $this->template()->setHeader('<meta http-equiv="refresh" content="2;url=' . $this->url()->makeUrl('admincp.language.missing', array('id' => $aLanguage['language_id'], 'check' => $this->request()->get('check'), 'page' => $iPage + 1)) . '">');
     }
     $this->template()->setTitle(Phpfox::getPhrase('language.find_missing_phrases'))->setBreadcrumb(Phpfox::getPhrase('language.manage_language_packages'), $this->url()->makeUrl('admincp.language'))->setBreadcrumb(Phpfox::getPhrase('language.find_missing_phrases'), $this->url()->makeUrl('current'))->setBreadcrumb($aLanguage['title'], null, true)->assign(array('aModules' => $aModules, 'iMissing' => $iMissing));
 }
开发者ID:lev1976g,项目名称:core,代码行数:30,代码来源:missing.class.php

示例11: update

 public function update($aVals)
 {
     $this->database()->update($this->_sTable, array('parent_id' => (int) $aVals['category_id'], 'name' => Phpfox::getLib('parse.input')->clean($aVals['name'], 255)), 'category_id = ' . $aVals['edit_id']);
     // Remove from cache
     $this->cache()->remove('photo_category', 'substr');
     return true;
 }
开发者ID:googlesky,项目名称:snsp.vn,代码行数:7,代码来源:process.class.php

示例12: process

 /**
  * Class process method wnich is used to execute this component.
  */
 public function process()
 {
     return Phpfox_Error::display('This section has been depreciated');
     Phpfox::getUserParam('comment.can_moderate_comments', true);
     if ($aIds = $this->request()->getArray('id')) {
         if ($this->request()->get('approve')) {
             foreach ($aIds as $iId) {
                 Phpfox::getService('feed.process')->approve($iId);
             }
             $this->url()->send('admincp.feed', array('view' => 'approval'), Phpfox::getPhrase('feed.profile_comment_s_successfully_approved'));
         } else {
             foreach ($aIds as $iId) {
                 Phpfox::getService('feed.process')->deleteFeed($iId);
             }
             $this->url()->send('admincp.feed', array('view' => 'approval'), Phpfox::getPhrase('feed.profile_comment_s_successfully_deleted'));
         }
     }
     $iPage = $this->request()->getInt('page');
     $aPages = array(20, 30, 40, 50);
     $aDisplays = array();
     foreach ($aPages as $iPageCnt) {
         $aDisplays[$iPageCnt] = Phpfox::getPhrase('core.per_page', array('total' => $iPageCnt));
     }
     $aFilters = array('search' => array('type' => 'input:text', 'search' => "AND ls.name LIKE '%[VALUE]%'"), 'display' => array('type' => 'select', 'options' => $aDisplays, 'default' => '20'), 'sort' => array('type' => 'select', 'options' => array('time_stamp' => Phpfox::getPhrase('comment.last_activity'), 'rating ' => Phpfox::getPhrase('comment.rating')), 'default' => 'time_stamp', 'alias' => 'feed'), 'sort_by' => array('type' => 'select', 'options' => array('DESC' => Phpfox::getPhrase('core.descending'), 'ASC' => Phpfox::getPhrase('core.ascending')), 'default' => 'DESC'));
     $oSearch = Phpfox::getLib('search')->set(array('type' => 'feeds', 'filters' => $aFilters, 'search' => 'search'));
     $oSearch->setCondition('AND feed.view_id = 1');
     list($iCnt, $aFeeds) = Phpfox::getService('feed')->getForBrowse($oSearch->getConditions(), $oSearch->getSort(), $oSearch->getPage(), $oSearch->getDisplay());
     Phpfox::getLib('pager')->set(array('page' => $iPage, 'size' => $oSearch->getDisplay(), 'count' => $oSearch->getSearchTotal($iCnt)));
     $this->template()->setTitle(Phpfox::getPhrase('comment.comment_title'))->setBreadcrumb(Phpfox::getPhrase('comment.comment_title'), $this->url()->makeUrl('admincp.comment'))->setHeader('cache', array('comment.css' => 'style_css', 'pager.css' => 'style_css'))->assign(array('aFeeds' => $aFeeds, 'bIsCommentAdminPanel' => true));
 }
开发者ID:Lovinity,项目名称:EQM,代码行数:33,代码来源:index.class.php

示例13: process

 /**
  * Class process method wnich is used to execute this component.
  */
 public function process()
 {
     if (!($aPurchase = Phpfox::getService('subscribe.purchase')->getInvoice($this->request()->getInt('id')))) {
         return Phpfox_Error::display(Phpfox::getPhrase('subscribe.unable_to_find_this_invoice'));
     }
     $this->template()->setTitle(Phpfox::getPhrase('subscribe.membership_packages'))->setBreadcrumb(Phpfox::getPhrase('subscribe.membership_packages'), $this->url()->makeUrl('subscribe'))->setBreadcrumb(Phpfox::getPhrase('subscribe.subscriptions'), $this->url()->makeUrl('subscribe.list'))->setBreadcrumb(Phpfox::getPhrase('subscribe.order_purchase_id_title', array('purchase_id' => $aPurchase['purchase_id'], 'title' => Phpfox::getLib('locale')->convert($aPurchase['title']))), null, true)->assign(array('aPurchase' => $aPurchase));
 }
开发者ID:Lovinity,项目名称:EQM,代码行数:10,代码来源:view.class.php

示例14: process

 /**
  * Class process method wnich is used to execute this component.
  */
 public function process()
 {
     $this->url()->send('music');
     Phpfox::isUser(true);
     if (Phpfox::getParam('music.music_user_group_id') == Phpfox::getUserBy('user_group_id')) {
         $this->url()->send('music');
     }
     $aUser = array('full_name' => Phpfox::getUserBy('full_name'));
     $aSettings = Phpfox::getService('custom')->getForEdit(array('user_main', 'user_panel', 'profile_panel'), Phpfox::getUserId(), Phpfox::getParam('music.music_user_group_id'));
     $aParams = array('full_name' => Phpfox::getPhrase('music.provide_a_artist_band_name'), 'agree' => Phpfox::getPhrase('music.tick_the_box_to_agree_to_our_terms_and_privacy_policy'));
     foreach ($aSettings as $sKey => $aSetting) {
         if ($aSetting['is_required']) {
             $aParams['custom_field_' . $aSetting['field_id']] = array('title' => Phpfox::getPhrase('music.provide_a_value_for') . ': ' . Phpfox::getPhrase($aSetting['phrase_var_name']), 'def' => 'required', 'php_id' => 'custom[' . $aSetting['field_id'] . ']');
         }
     }
     $oValid = Phpfox::getLib('validator')->set(array('sFormName' => 'js_form', 'aParams' => $aParams));
     if ($aVals = $this->request()->getArray('val')) {
         if ($oValid->isValid($aVals)) {
             if (Phpfox::getService('music.process')->convertMember($aVals, $this->request()->getArray('custom'))) {
                 $this->url()->send('music', null, Phpfox::getPhrase('music.you_have_successfully_converted_your_account'));
             }
         }
     }
     $this->template()->setTitle(Phpfox::getPhrase('music.musician_registration'))->setBreadcrumb(Phpfox::getPhrase('music.music'), $this->url()->makeUrl('music'))->setBreadcrumb(Phpfox::getPhrase('music.registration'), null, true)->setFullSite()->assign(array('aForms' => $aUser, 'sCreateJs' => $oValid->createJS(), 'sGetJsForm' => $oValid->getJsForm(), 'aSettings' => $aSettings));
 }
开发者ID:googlesky,项目名称:snsp.vn,代码行数:28,代码来源:register.class.php

示例15: add

 public function add($aVals, $bIsCustom = false, $aCallback = null)
 {
     if (!defined('PHPFOX_FORCE_IFRAME')) {
         define('PHPFOX_FORCE_IFRAME', true);
     }
     if (empty($aVals['privacy_comment'])) {
         $aVals['privacy_comment'] = 0;
     }
     if (empty($aVals['privacy'])) {
         $aVals['privacy'] = 0;
     }
     $iId = $this->database()->insert($this->_sTable, array('user_id' => Phpfox::getUserId(), 'is_custom' => $bIsCustom ? '1' : '0', 'module_id' => $aCallback === null ? null : $aCallback['module'], 'item_id' => $aCallback === null ? 0 : $aCallback['item_id'], 'parent_user_id' => isset($aVals['parent_user_id']) ? (int) $aVals['parent_user_id'] : 0, 'link' => $this->preParse()->clean($aVals['link']['url'], 255), 'image' => isset($aVals['link']['image_hide']) && $aVals['link']['image_hide'] == '1' || !isset($aVals['link']['image']) ? null : $this->preParse()->clean($aVals['link']['image'], 255), 'title' => isset($aVals['link']['title']) ? $this->preParse()->clean($aVals['link']['title'], 255) : '', 'description' => isset($aVals['link']['description']) ? $this->preParse()->clean($aVals['link']['description'], 200) : '', 'status_info' => empty($aVals['status_info']) ? null : $this->preParse()->prepare($aVals['status_info']), 'privacy' => (int) $aVals['privacy'], 'privacy_comment' => (int) $aVals['privacy_comment'], 'time_stamp' => PHPFOX_TIME, 'has_embed' => empty($aVals['link']['embed_code']) ? '0' : '1'));
     if (!empty($aVals['link']['embed_code'])) {
         $this->database()->insert(Phpfox::getT('link_embed'), array('link_id' => $iId, 'embed_code' => $this->preParse()->prepare($aVals['link']['embed_code'])));
     }
     if ($aCallback === null && isset($aVals['parent_user_id']) && $aVals['parent_user_id'] != Phpfox::getUserId()) {
         $aUser = $this->database()->select('user_name')->from(Phpfox::getT('user'))->where('user_id = ' . (int) $aVals['parent_user_id'])->execute('getRow');
         $sLink = Phpfox::getLib('url')->makeUrl($aUser['user_name'], array('plink-id' => $iId));
         Phpfox::getLib('mail')->to($aVals['parent_user_id'])->subject(array('link.full_name_posted_a_link_on_your_wall', array('full_name' => Phpfox::getUserBy('full_name'))))->message(array('link.full_name_posted_a_link_on_your_wall_message', array('full_name' => Phpfox::getUserBy('full_name'), 'link' => $sLink)))->notification('comment.add_new_comment')->send();
         if (Phpfox::isModule('notification')) {
             Phpfox::getService('notification.process')->add('feed_comment_link', $iId, $aVals['parent_user_id']);
         }
     }
     $this->_iLinkId = $iId;
     return $bIsCustom ? $iId : Phpfox::getService('feed.process')->callback($aCallback)->add('link', $iId, $aVals['privacy'], $aVals['privacy_comment'], isset($aVals['parent_user_id']) ? (int) $aVals['parent_user_id'] : 0);
 }
开发者ID:googlesky,项目名称:snsp.vn,代码行数:26,代码来源:process.class.php


注:本文中的Phpfox::getLib方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。