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


PHP Phpfox_Error::getDisplay方法代码示例

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


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

示例1: loadProfileBlock

 public function loadProfileBlock()
 {
     die('sdsdg');
     exit;
     $sProfileUrl = str_replace('profile_', '', $this->get('url'));
     if ($this->get('url') == 'profile_info') {
         $sProfileUrl = 'profile';
     }
     if (!Phpfox::isModule($sProfileUrl)) {
         Phpfox_Error::set('Trying to load an invalid module.');
     } else {
         if (!Phpfox::hasCallback($sProfileUrl, 'getAjaxProfileController')) {
             Phpfox_Error::set('Unable to load the section you are looking for.');
         }
     }
     if (Phpfox_Error::isPassed()) {
         $oModule = Phpfox::getLib('module');
         $oTpl = Phpfox::getLib('template');
         $oTpl->assign(array('bIsAjaxLoader' => true));
         $aStyleInUse = $oTpl->getStyleInUse();
         $oModule->loadBlocks();
         $aUrlParams = array($this->get('user_name'));
         if ($this->get('url') != 'profile') {
             $aUrlParams[] = str_replace('profile_', '', $this->get('url'));
         }
         Phpfox::getLib('url')->setParam($aUrlParams);
         $oModule->setController(Phpfox::callback($sProfileUrl . '.getAjaxProfileController'));
         if ($aStyleInUse['total_column'] == '3') {
             $oTpl->assign(array('aBlocks1' => $oTpl->bIsSample ? true : Phpfox::getLib('module')->getModuleBlocks(1), 'aBlocks3' => $oTpl->bIsSample ? true : Phpfox::getLib('module')->getModuleBlocks(3), 'aAdBlocks1' => $oTpl->bIsSample ? true : (Phpfox::isModule('ad') ? Phpfox::getService('ad')->getForBlock(1) : null), 'aAdBlocks3' => $oTpl->bIsSample ? true : (Phpfox::isModule('ad') ? Phpfox::getService('ad')->getForBlock(3) : null)));
         } else {
             $oTpl->assign(array('aBlocks1' => array(), 'aBlocks3' => array(), 'aAdBlocks1' => array(), 'aAdBlocks3' => array()));
         }
         $oTpl->assign(array('sPublicMessage' => Phpfox::getMessage(), 'aErrors' => Phpfox_Error::getDisplay() ? Phpfox_Error::get() : array(), 'aStyleInUse' => $aStyleInUse));
         list($aBreadCrumbs, $aBreadCrumbTitle) = $oTpl->getBreadCrumb();
         $this->remove('#js_temp_breadcrumb');
         if (count($aBreadCrumbs)) {
             foreach ($aBreadCrumbs as $sLink => $sPhrase) {
                 $this->append('h1', '<span id="js_temp_breadcrumb"><span class="profile_breadcrumb">&#187;</span><a href="' . $sLink . '">' . $sPhrase . '</a></span>');
                 break;
             }
         }
         $oTpl->getLayout($oTpl->sDisplayLayout);
         $this->html($aStyleInUse['total_column'] == '3' ? '#content_load_data' : '#content', $this->getContent(false));
         if ($this->get('url') == 'profile_info') {
             $this->call('$Core.loadProfileInfo();');
         }
     } else {
         $this->html('#js_profile_block_view_data_' . $this->get('url'), implode('', Phpfox_Error::get()));
     }
     $this->call('$Core.loadInit();');
 }
开发者ID:laiello,项目名称:kr-indian,代码行数:51,代码来源:ajax.class.php

示例2: run


//.........这里部分代码省略.........
         Phpfox::getLib('session')->set('redirect', Phpfox_Url::instance()->getFullUrl(true));
     }
     if (!defined('PHPFOX_NO_CSRF')) {
         Phpfox::getService('log.session')->verifyToken();
     }
     ($sPlugin = Phpfox_Plugin::get('run')) ? eval($sPlugin) : false;
     if (!self::isAdminPanel()) {
         if (!Phpfox::isMobile() && !PHPFOX_IS_AJAX_PAGE && Phpfox::isModule('rss') && !defined('PHPFOX_IS_USER_PROFILE')) {
             $aFeeds = Phpfox::getService('rss')->getLinks();
             if (is_array($aFeeds) && count($aFeeds)) {
                 foreach ($aFeeds as $sLink => $sPhrase) {
                     $oTpl->setHeader('<link rel="alternate" type="application/rss+xml" title="' . $sPhrase . '" href="' . $sLink . '" />');
                 }
             }
         }
         $aPageLastLogin = Phpfox::isModule('pages') && Phpfox::getUserBy('profile_page_id') ? Phpfox::getService('pages')->getLastLogin() : false;
         $oTpl->assign(array('aMainMenus' => $oTpl->getMenu('main'), 'aSubMenus' => $oTpl->getMenu(), 'bIsUsersProfilePage' => defined('PHPFOX_IS_USER_PROFILE') ? true : false, 'sGlobalUserFullName' => Phpfox::isUser() ? Phpfox::getUserBy('full_name') : null, 'sFullControllerName' => str_replace(array('.', '/'), '_', Phpfox_Module::instance()->getFullControllerName()), 'iGlobalProfilePageId' => Phpfox::getUserBy('profile_page_id'), 'aGlobalProfilePageLogin' => $aPageLastLogin));
         $oTpl->setEditor();
         if (Phpfox::isModule('captcha')) {
             $sCaptchaHeader = Phpfox::getParam('captcha.recaptcha_header');
             if (strlen(preg_replace('/\\s\\s+/', '', $sCaptchaHeader)) > 0) {
                 $oTpl->setHeader(array($sCaptchaHeader));
             }
         }
         if (Phpfox::isModule('notification') && Phpfox::isUser() && Phpfox::getParam('notification.notify_on_new_request')) {
             $oTpl->setHeader('cache', array('update.js' => 'module_notification'));
         }
     }
     if (!PHPFOX_IS_AJAX_PAGE && ($sHeaderFile = $oTpl->getHeaderFile())) {
         ($sPlugin = Phpfox_Plugin::get('run_get_header_file_1')) ? eval($sPlugin) : false;
         require_once $sHeaderFile;
     }
     list($aBreadCrumbs, $aBreadCrumbTitle) = $oTpl->getBreadCrumb();
     $oTpl->assign(array('aErrors' => Phpfox_Error::getDisplay() ? Phpfox_Error::get() : array(), 'sPublicMessage' => Phpfox::getMessage(), 'sLocaleDirection' => $aLocale['direction'], 'sLocaleCode' => $aLocale['language_code'], 'sLocaleFlagId' => $aLocale['image'], 'sLocaleName' => $aLocale['title'], 'aBreadCrumbs' => $aBreadCrumbs, 'aBreadCrumbTitle' => $aBreadCrumbTitle, 'sCopyright' => '&copy; ' . Phpfox::getPhrase('core.copyright') . ' ' . Phpfox::getParam('core.site_copyright')));
     Phpfox::clearMessage();
     unset($_SESSION['phpfox']['image']);
     if (Phpfox::getParam('core.cron')) {
         require_once PHPFOX_DIR_CRON . 'exec.php';
     }
     if ($oReq->isPost()) {
         header('X-Is-Posted: true');
         exit;
     }
     if ($oReq->get('is_ajax_get')) {
         header('X-Is-Get: true');
         exit;
     }
     if (defined('PHPFOX_SITE_IS_OFFLINE')) {
         $oTpl->sDisplayLayout = 'blank';
         unset($View);
     }
     if (!PHPFOX_IS_AJAX_PAGE && $oTpl->sDisplayLayout && !isset($View) || !PHPFOX_IS_AJAX_PAGE && self::isAdminPanel()) {
         $oTpl->getLayout($oTpl->sDisplayLayout);
     }
     if (PHPFOX_IS_AJAX_PAGE) {
         header('Content-type: application/json; charset=utf-8');
         /*
         if (isset($View) && $View instanceof \Core\View) {
         	$content = $View->getContent();
         }
         else {
         	Phpfox_Module::instance()->getControllerTemplate();
         	$content = ob_get_contents(); ob_clean();
         }
         */
         if ($View instanceof \Core\View) {
开发者ID:html5ravi,项目名称:phpfox,代码行数:67,代码来源:phpfox.class.php

示例3: run


//.........这里部分代码省略.........
											'im.are_you_sure'
										)
									)
									->setImage(array(
											'misc_minimize' => 'misc/minimize.gif'
										)
									)
									->setHeader('cache', array(
										'im.js' => 'module_im',
										'im.css' => 'style_css',								
										// 'player/' . Phpfox::getParam('core.default_music_player') . '/core.js' => 'static_script',
									)
								)
								->setHeader(array(
										'<script type="text/javascript">oCore[\'im.is_hidden\'] = \'' . Phpfox::getUserBy('im_hide') . '\';</script>',
										// '<script type="text/javascript">$(function() { $Core.player.load({id: \'js_im_player\', type: \'music\'}); });</script>'
									)
								);
							}
						}
					}										
				}
			
		}
		
		if (!PHPFOX_IS_AJAX_PAGE && ($sHeaderFile = $oTpl->getHeaderFile()))
		{
        	require_once($sHeaderFile);
		}
		
		list($aBreadCrumbs, $aBreadCrumbTitle) = $oTpl->getBreadCrumb();

		$oTpl->assign(array(
				'aErrors' => (Phpfox_Error::getDisplay() ? Phpfox_Error::get() : array()),
				'sPublicMessage' => Phpfox::getMessage(),
				'sLocaleDirection' => $aLocale['direction'],
				'sLocaleCode' => $aLocale['language_code'],
				'sLocaleFlagId' => $aLocale['image'],
				'sLocaleName' => $aLocale['title'],
				'aRequests' => Phpfox::getLib('request')->getRequests(),
				'aBreadCrumbs' => $aBreadCrumbs,
				'aBreadCrumbTitle' => $aBreadCrumbTitle,
				'sCopyright' => '&copy; ' . Phpfox::getPhrase('core.copyright') . ' ' . Phpfox::getParam('core.site_copyright')
			)
		);		

		Phpfox::clearMessage();		
		
		unset($_SESSION['phpfox']['image']);		
	
		if (Phpfox::getParam('core.cron'))
		{
			require_once(PHPFOX_DIR_CRON . 'exec.php');
		}

		if (!PHPFOX_IS_AJAX_PAGE && $oTpl->sDisplayLayout)
		{			
			$oTpl->getLayout($oTpl->sDisplayLayout);
		}

		if (Phpfox::getParam('language.cache_phrases'))
		{
			Phpfox::getLib('locale')->cache();
		}		
		
		if (!PHPFOX_IS_AJAX_PAGE && Phpfox::getParam('core.phpfox_is_hosted'))
开发者ID:hoanghd,项目名称:tools,代码行数:67,代码来源:phpfox.class.php

示例4: run


//.........这里部分代码省略.........
        }
        if (!defined('PHPFOX_NO_CSRF')) {
            Phpfox::getService('log.session')->verifyToken();
        }
        ($sPlugin = Phpfox_Plugin::get('run')) ? eval($sPlugin) : false;
        if (!self::isAdminPanel()) {
            if (!Phpfox::isMobile() && !PHPFOX_IS_AJAX_PAGE && Phpfox::isModule('rss') && !defined('PHPFOX_IS_USER_PROFILE')) {
                $aFeeds = Phpfox::getService('rss')->getLinks();
                if (is_array($aFeeds) && count($aFeeds)) {
                    foreach ($aFeeds as $sLink => $sPhrase) {
                        $oTpl->setHeader('<link rel="alternate" type="application/rss+xml" title="' . $sPhrase . '" href="' . $sLink . '" />');
                    }
                }
            }
            $aPageLastLogin = Phpfox::isModule('pages') && Phpfox::getUserBy('profile_page_id') ? Phpfox::getService('pages')->getLastLogin() : false;
            $oTpl->assign(array('aMainMenus' => $oTpl->getMenu('main'), 'aRightMenus' => $oTpl->getMenu('main_right'), 'aAppMenus' => $oTpl->getMenu('explore'), 'aSubMenus' => $oTpl->getMenu(), 'aFooterMenu' => $oTpl->getMenu('footer'), 'aBlocks1' => $oTpl->bIsSample ? true : Phpfox::getLib('module')->getModuleBlocks(1), 'aBlocks3' => $oTpl->bIsSample ? true : Phpfox::getLib('module')->getModuleBlocks(3), 'aAdBlocks1' => $oTpl->bIsSample ? true : (Phpfox::isModule('ad') ? Phpfox::getService('ad')->getForBlock(1, false, false) : null), 'aAdBlocks3' => $oTpl->bIsSample ? true : (Phpfox::isModule('ad') ? Phpfox::getService('ad')->getForBlock(3, false, false) : null), 'bIsUsersProfilePage' => defined('PHPFOX_IS_USER_PROFILE') ? true : false, 'sStyleLogo' => $oTpl->getStyleLogo(), 'aStyleInUse' => $oTpl->getStyleInUse(), 'sGlobalUserFullName' => Phpfox::isUser() ? Phpfox::getUserBy('full_name') : null, 'aGlobalUser' => Phpfox::isUser() ? Phpfox::getUserBy(null) : array(), 'sFullControllerName' => str_replace(array('.', '/'), '_', Phpfox::getLib('module')->getFullControllerName()), 'iGlobalProfilePageId' => Phpfox::getUserBy('profile_page_id'), 'aGlobalProfilePageLogin' => $aPageLastLogin, 'aInstalledApps' => Phpfox::isUser() && Phpfox::isModule('apps') ? Phpfox::getService('apps')->getInstalledApps() : array(), 'sSiteTitle' => Phpfox::getParam('core.site_title')));
            $oTpl->setEditor();
            if (isset($aPageLastLogin['style_id']) && $aPageLastLogin['style_id'] > 0) {
                Phpfox::getLib('template')->testStyle($aPageLastLogin['style_id']);
            }
            if (Phpfox::isModule('captcha')) {
                $sCaptchaHeader = Phpfox::getParam('captcha.recaptcha_header');
                if (strlen(preg_replace('/\\s\\s+/', '', $sCaptchaHeader)) > 0) {
                    $oTpl->setHeader(array($sCaptchaHeader));
                }
            }
            if (!PHPFOX_IS_AJAX_PAGE && !defined('PHPFOX_SKIP_IM')) {
                if (!defined('PHPFOX_IN_DESIGN_MODE')) {
                    if (Phpfox::isUser() && Phpfox::isModule('subscribe') && Phpfox::getParam('subscribe.subscribe_is_required_on_sign_up') && Phpfox::getUserBy('user_group_id') == '2' && (int) Phpfox::getUserBy('subscribe_id') > 0) {
                    } else {
                        if (Phpfox::isModule('notification') && Phpfox::isUser() && Phpfox::getParam('notification.notify_on_new_request')) {
                            $oTpl->setHeader('cache', array('update.js' => 'module_notification'));
                        }
                        if (!Phpfox::isMobile() && Phpfox::isModule('im') && Phpfox::isUser() && Phpfox::getUserBy('profile_page_id') <= 0 && Phpfox::getParam('im.enable_im_in_footer_bar') && !$oTpl->bIsSample) {
                            $oTpl->setPhrase(array('im.conversations', 'im.more_conversations', 'im.are_you_sure'))->setImage(array('misc_minimize' => 'misc/minimize.gif'))->setHeader('cache', array('im.js' => 'module_im', 'im.css' => 'style_css', 'player/' . Phpfox::getParam('core.default_music_player') . '/core.js' => 'static_script'))->setHeader(array('<script type="text/javascript">oCore[\'im.is_hidden\'] = \'' . Phpfox::getUserBy('im_hide') . '\';</script>', '<script type="text/javascript">$Behavior.loadMusicPlayer = function() { if (typeof $f == \'undefined\') { $Core.loadStaticFile(\'' . $oTpl->getStyle('static_script', 'player/' . Phpfox::getParam('core.default_music_player') . '/' . Phpfox::getParam('core.default_music_player')) . '.js\'); } else { $Core.player.load({id: \'js_im_player\', type: \'music\'}); } $Behavior.loadMusicPlayer = function() {} }</script>'));
                        }
                    }
                }
            }
        }
        if (!PHPFOX_IS_AJAX_PAGE && ($sHeaderFile = $oTpl->getHeaderFile())) {
            ($sPlugin = Phpfox_Plugin::get('run_get_header_file_1')) ? eval($sPlugin) : false;
            require_once $sHeaderFile;
        }
        list($aBreadCrumbs, $aBreadCrumbTitle) = $oTpl->getBreadCrumb();
        /* Delayed unlink, we now delete all the images */
        if (Phpfox::getParam('core.keep_files_in_server') == false) {
            $oSess = Phpfox::getLib('session');
            $aFiles = $oSess->get('deleteFiles');
            if (is_array($aFiles)) {
                foreach ($aFiles as $sFile) {
                    if (file_exists($sFile)) {
                        unlink($sFile);
                    }
                }
            }
            $oSess->remove('deleteFiles');
        }
        $oTpl->assign(array('aErrors' => Phpfox_Error::getDisplay() ? Phpfox_Error::get() : array(), 'sPublicMessage' => Phpfox::getMessage(), 'sLocaleDirection' => $aLocale['direction'], 'sLocaleCode' => $aLocale['language_code'], 'sLocaleFlagId' => $aLocale['image'], 'sLocaleName' => $aLocale['title'], 'aRequests' => Phpfox::getLib('request')->getRequests(), 'aBreadCrumbs' => $aBreadCrumbs, 'aBreadCrumbTitle' => $aBreadCrumbTitle, 'sCopyright' => '&copy; ' . Phpfox::getPhrase('core.copyright') . ' ' . Phpfox::getParam('core.site_copyright')));
        Phpfox::clearMessage();
        unset($_SESSION['phpfox']['image']);
        if (Phpfox::getParam('core.cron')) {
            require_once PHPFOX_DIR_CRON . 'exec.php';
        }
        if (!PHPFOX_IS_AJAX_PAGE && $oTpl->sDisplayLayout) {
            $oTpl->getLayout($oTpl->sDisplayLayout);
        }
        if (Phpfox::getParam('language.cache_phrases')) {
            Phpfox::getLib('locale')->cache();
        }
        // Use GZIP to output the data if we can
        if (Phpfox::getParam('core.use_gzip') && !PHPFOX_IS_AJAX_PAGE) {
            $sContent = ob_get_contents();
            ob_clean();
            if (function_exists('gzencode')) {
                $sGzipContent = gzencode($sContent, Phpfox::getParam('core.gzip_level'), FORCE_GZIP);
            } else {
                if (function_exists('gzcompress') && function_exists('crc32')) {
                    $iSize = strlen($sContent);
                    $iCrc = crc32($sContent);
                    $sGzipContent = "‹ÿ";
                    $sGzipContent .= substr(gzcompress($sContent, Phpfox::getParam('core.gzip_level')), 2, -4);
                    $sGzipContent .= pack('V', $iCrc);
                    $sGzipContent .= pack('V', $iSize);
                }
            }
            $sOutputContent = isset($sGzipContent) ? $sGzipContent : $sContent;
            if (Phpfox::getParam('core.check_body_for_text') && !defined('PHPFOX_INSTALLER') && Phpfox::getLib('request')->get('req1') != 'ad') {
                if (!preg_match(Phpfox::getParam('core.check_body_regex'), $sContent)) {
                    header(Phpfox::getParam('core.check_body_header'));
                    echo Phpfox::getParam('core.check_body_offline_message');
                    exit;
                }
            }
            if (isset($sGzipContent)) {
                header("Content-Encoding: " . (in_array('x-gzip', Phpfox::getParam('core.gzip_encodings')) ? "x-gzip" : "gzip"));
            }
            echo $sOutputContent;
        }
    }
开发者ID:googlesky,项目名称:snsp.vn,代码行数:101,代码来源:phpfox.class.php


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