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


PHP Layout::checkSettings方法代码示例

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


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

示例1: admin


//.........这里部分代码省略.........
             $files = PHPWS_File::readDirectory(PHPWS_SOURCE_DIR . 'templates/cache', false, true);
             if (!empty($files) && is_array($files)) {
                 foreach ($files as $fn) {
                     $delete_cache_path = "templates/cache/{$fn}";
                     if (is_file($delete_cache_path)) {
                         unlink('templates/cache/' . $fn);
                     }
                 }
             }
             PHPWS_Core::goBack();
             break;
         case 'clear_cache':
             if (!Current_User::authorized('layout')) {
                 Current_User::disallow();
             }
             PHPWS_Cache::clearCache();
             PHPWS_Core::goBack();
             break;
         case 'moveBox':
             $result = Layout_Admin::moveBox();
             PHPWS_Error::logIfError($result);
             javascript('close_refresh');
             Layout::nakedDisplay();
             break;
         case 'postMeta':
             if (!Current_User::authorized('layout')) {
                 Current_User::disallow();
             }
             Layout_Admin::postMeta();
             if (isset($_POST['key_id'])) {
                 javascript('close_refresh');
                 Layout::nakedDisplay();
                 exit;
             }
             Layout::reset();
             $title = dgettext('layout', 'Edit Meta Tags');
             $template['MESSAGE'] = dgettext('layout', 'Meta Tags updated.');
             $content[] = Layout_Admin::metaForm();
             break;
         case 'demo_fail':
             unset($_SESSION['Layout_Settings']);
             Layout::checkSettings();
             PHPWS_Core::reroute('index.php?module=layout&action=admin&command=confirmThemeChange');
             break;
         case 'demo_theme':
             $title = dgettext('layout', 'Confirm Theme Change');
             $content[] = dgettext('layout', 'If you are happy with the change, click the appropiate button.');
             $content[] = dgettext('layout', 'Failure to respond in ten seconds, reverts phpWebSite to the default theme.');
             $content[] = Layout_Admin::confirmThemeChange();
             break;
         case 'postTheme':
             if (!Current_User::authorized('layout')) {
                 Current_User::disallow();
             }
             if ($_POST['default_theme'] != $_SESSION['Layout_Settings']->current_theme) {
                 Layout::reset($_POST['default_theme']);
                 PHPWS_Core::reroute('index.php?module=layout&action=admin&command=demo_theme&authkey=' . Current_User::getAuthKey());
             } else {
                 PHPWS_Settings::set('layout', 'include_css_order', (int) $_POST['include_css_order']);
                 PHPWS_Settings::save('layout');
                 $title = dgettext('layout', 'Themes');
                 $content[] = Layout_Admin::adminThemes();
             }
             break;
         case 'theme':
             $title = dgettext('layout', 'Themes');
             $content[] = Layout_Admin::adminThemes();
             break;
         case 'js_style_change':
             $content = Layout_Admin::jsStyleChange();
             if (empty($content)) {
                 javascript('close_refresh');
             }
             Layout::nakedDisplay($content, dgettext('layout', 'Change CSS'));
             break;
         case 'page_meta_tags':
             $content = Layout_Admin::pageMetaTags((int) $_REQUEST['key_id']);
             if (empty($content)) {
                 javascript('close_refresh');
             }
             Layout::nakedDisplay($content, dgettext('layout', 'Set meta tags'));
             break;
         case 'move_popup':
             if (!Current_User::authorized('layout')) {
                 Current_User::disallow();
             }
             Layout_Admin::moveBoxMenu();
             break;
     }
     $template['TITLE'] = $title;
     if (isset($content)) {
         $template['CONTENT'] = implode('<br />', $content);
     }
     if (isset($message)) {
         $template['MESSAGE'] = $message;
     }
     $final = PHPWS_Template::process($template, 'layout', 'main.tpl');
     $panel->setContent($final);
     Layout::add(PHPWS_ControlPanel::display($panel->display()));
 }
开发者ID:par-orillonsoft,项目名称:phpwebsite,代码行数:101,代码来源:LayoutAdmin.php

示例2: set

 /**
  * Unlike the add function, which appends a content variable's
  * data, set OVERWRITES the current values
  */
 public static function set($text, $module = null, $contentVar = null)
 {
     Layout::checkSettings();
     if (!isset($contentVar)) {
         $contentVar = DEFAULT_CONTENT_VAR;
     }
     $GLOBALS['Layout'][$module][$contentVar] = NULL;
     Layout::add($text, $module, $contentVar);
 }
开发者ID:sysulsj,项目名称:phpwebsite,代码行数:13,代码来源:Layout.php

示例3:

<?php

/**
 * @author Matthew McNaney <mcnaney at gmail dot com>
 * @version $Id$
 */
Layout::checkSettings();
if (Current_User::allow('layout')) {
    Layout::miniLinks();
}
开发者ID:par-orillonsoft,项目名称:phpwebsite,代码行数:10,代码来源:runtime.php


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