本文整理汇总了PHP中Phpfox::clearMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP Phpfox::clearMessage方法的具体用法?PHP Phpfox::clearMessage怎么用?PHP Phpfox::clearMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phpfox
的用法示例。
在下文中一共展示了Phpfox::clearMessage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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'), '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' => '© ' . 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) {
$content = $View->getContent();
示例2: run
public function run()
{
if ($this->_bUpgrade && (int) substr($this->_getCurrentVersion(), 0, 1) < 2 && file_exists(PHPFOX_DIR . '.htaccess')) {
$sHtaccessContent = file_get_contents(PHPFOX_DIR . '.htaccess');
if (preg_match('/RewriteEngine/i', $sHtaccessContent)) {
exit('In order for us to continue with the upgrade you will need to rename or remove the file ".htaccess".');
}
}
$sStep = $this->_oReq->get('step') ? strtolower($this->_oReq->get('step')) : 'start';
// $this->_oTpl->setTitle(self::getPhrase('phpfox_installer'))->setBreadcrumb(self::getPhrase('phpfox_installer'));
$bPass = false;
if (!in_array($sStep, $this->_aSteps)) {
if (in_array($sStep, $this->_aModuleInstalls)) {
$bPass = true;
} else {
exit('Invalid step.');
}
}
$sMethod = '_' . $sStep;
$iStep = 0;
foreach ($this->_aSteps as $iKey => $sMyStep) {
if ($sMyStep === $sStep) {
$iStep = $iKey - 1;
break;
}
}
if ($bPass === false && isset($this->_aSteps[$iStep]) && !$this->_isPassed($this->_aSteps[$iStep])) {
$this->_oUrl->forward($this->_step($this->_aSteps[$iStep]));
}
$this->_sStep = $sStep;
$this->_oTpl->assign(['sUrl' => $this->_sUrl]);
if (method_exists($this, $sMethod)) {
$data = call_user_func(array(&$this, $sMethod));
if (!Phpfox_Error::isPassed()) {
$data = ['errors' => Phpfox_Error::get()];
}
if ($sStep != 'start' && !is_array($data)) {
$content = $this->_oTpl->getLayout($sStep, true);
$data = ['content' => $content];
}
if (is_array($data)) {
header('Content-type: application/json');
echo json_encode($data);
exit;
}
} else {
$sStep = 'start';
}
if (!file_exists($this->_oTpl->getLayoutFile($sStep))) {
$sStep = 'default';
}
list($aBreadCrumbs, $aBreadCrumbTitle) = $this->_oTpl->getBreadCrumb();
/*
$this->_oTpl->setImage(array(
'ajax_small' => 'ajax/small.gif',
'ajax_large' => 'ajax/large.gif',
'loading_animation' => 'misc/loading_animation.gif',
'close' => 'misc/close.gif'
)
);
*/
$base = self::getHostPath() . 'PF.Base/';
$this->_oTpl->setHeader(array('<script>var BasePath = \'' . self::getHostPath() . '\';</script>', '<link href="' . $base . 'theme/install/default/style/default/css/layout.css" rel="stylesheet">', '<link href="' . $base . 'static/css/font-awesome.min.css" rel="stylesheet">', '<script src="' . $base . 'static/jscript/jquery/jquery.js"></script>', '<script src="' . $base . 'static/jscript/install.js"></script>'))->assign(array('sTemplate' => $sStep, 'sLocaleDirection' => 'ltr', 'sLocaleCode' => 'en', 'sUrl' => $this->_sUrl, 'aErrors' => Phpfox_Error::get(), 'sPublicMessage' => Phpfox::getMessage(), 'aBreadCrumbs' => $aBreadCrumbs, 'aBreadCrumbTitle' => $aBreadCrumbTitle, 'aSteps' => $this->_getSteps(), 'sCurrentVersion' => Phpfox::getVersion()));
if ($this->_bUpgrade) {
$this->_oTpl->setTitle('Upgrading from: ' . $this->_getCurrentVersion());
}
$this->_oTpl->getLayout('template');
Phpfox::clearMessage();
}
示例3: 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' => '© ' . 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;
}
}
示例4: run
//.........这里部分代码省略.........
->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' => '© ' . 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'))
{
$iTotalMembersOnline = Phpfox::getService('log.session')->getOnlineMembers();
if ($iTotalMembersOnline > Phpfox::getParam('core.phpfox_max_users_online') && $iTotalMembersOnline > (int) Phpfox::getParam('core.phpfox_total_users_online_mark'))
{
$oDb = Phpfox::getLib('database');
$oDb->update(Phpfox::getT('setting'), array('value_actual' => (int) $iTotalMembersOnline), 'var_name = \'phpfox_total_users_online_mark\'');
$sPastHistory = Phpfox::getParam('core.phpfox_total_users_online_history');
$aPastHistory = array();
if (!empty($sPastHistory) && Phpfox::getLib('parse.format')->isSerialized($sPastHistory))
{
$aPastHistory = unserialize($sPastHistory);
}
示例5: run
public function run()
{
if (defined('PHPFOX_IS_HOSTED_SCRIPT')) {
$this->_update();
exit;
}
if ($this->_bUpgrade && (int) substr($this->_getCurrentVersion(), 0, 1) < 2 && file_exists(PHPFOX_DIR . '.htaccess')) {
$sHtaccessContent = file_get_contents(PHPFOX_DIR . '.htaccess');
if (preg_match('/RewriteEngine/i', $sHtaccessContent)) {
exit('In order for us to continue with the upgrade you will need to rename or remove the file ".htaccess".');
}
}
$sStep = $this->_oReq->get('req2') ? strtolower($this->_oReq->get('req2')) : 'key';
$this->_oTpl->setTitle(self::getPhrase('phpfox_installer'))->setBreadcrumb(self::getPhrase('phpfox_installer'));
$bPass = false;
if (!in_array($sStep, $this->_aSteps)) {
if (in_array($sStep, $this->_aModuleInstalls)) {
$bPass = true;
} else {
exit('Invalid step.');
}
}
$sMethod = '_' . $sStep;
$iStep = 0;
foreach ($this->_aSteps as $iKey => $sMyStep) {
if ($sMyStep === $sStep) {
$iStep = $iKey - 1;
break;
}
}
if ($bPass === false && isset($this->_aSteps[$iStep]) && !$this->_isPassed($this->_aSteps[$iStep])) {
$this->_oUrl->forward($this->_step($this->_aSteps[$iStep]));
}
$this->_sStep = $sStep;
if (method_exists($this, $sMethod)) {
call_user_func(array(&$this, $sMethod));
} else {
$sStep = 'key';
}
if (PHPFOX_DEBUG) {
$this->_oTpl->setHeader(array('debug.css' => 'style_css'));
}
if (!file_exists($this->_oTpl->getLayoutFile($sStep))) {
$sStep = 'default';
}
list($aBreadCrumbs, $aBreadCrumbTitle) = $this->_oTpl->getBreadCrumb();
$this->_oTpl->setImage(array('ajax_small' => 'ajax/small.gif', 'ajax_large' => 'ajax/large.gif', 'loading_animation' => 'misc/loading_animation.gif', 'close' => 'misc/close.gif'));
$this->_oTpl->setHeader(array('<link rel="shortcut icon" type="image/x-icon" href="' . Phpfox_Installer::getHostPath() . 'favicon.ico?v=' . $this->_oTpl->getStaticVersion() . '" />', 'layout.css' => 'style_css', 'thickbox.css' => 'style_css', 'jquery/jquery.js' => 'static_script', 'common.js' => 'static_script', 'main.js' => 'static_script', 'thickbox/thickbox.js' => 'static_script'))->assign(array('sTemplate' => $sStep, 'sLocaleDirection' => 'ltr', 'sLocaleCode' => 'en', 'sUrl' => $this->_sUrl, 'aErrors' => Phpfox_Error::get(), 'sPublicMessage' => Phpfox::getMessage(), 'aBreadCrumbs' => $aBreadCrumbs, 'aBreadCrumbTitle' => $aBreadCrumbTitle, 'aSteps' => $this->_getSteps()));
if ($this->_bUpgrade) {
$this->_oTpl->setTitle('Upgrading from: ' . $this->_getCurrentVersion());
}
header("X-Content-Encoded-By: phpFox " . PhpFox::getVersion());
$this->_oTpl->getLayout('template');
Phpfox::clearMessage();
}