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


PHP Site::template方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->strict_resources = array();
     array_unshift($this->plugins_dir, __DIR__ . '/helpers');
     $paths = Module::paths('helpers');
     foreach ($paths as $v) {
         if (is_dir($v)) {
             $this->plugins_dir[] = $v;
         }
     }
     $this->use_sub_dirs = false;
     $this->template_dir = array();
     $this->template_dir[] = App::path() . "/sites/" . Site::key() . '/';
     $template = 'default';
     if (Site::template()) {
         $template = Site::template();
         $this->template_dir[] = App::path() . "/templates/" . $template . '/';
     }
     $this->template_dir[] = App::path() . "/default/";
     $this->compile_dir = App::templaterCompiled() . '/' . md5(Site::key() . ":" . $template);
     @mkdir($this->compile_dir);
     $this->cache_dir = App::templaterCache();
 }
开发者ID:evgeny-v-z,项目名称:framework,代码行数:24,代码来源:Templater.php

示例2: dirname

<?php

#---Define--
mb_internal_encoding("UTF-8");
define('ROOT', dirname(__FILE__) . '/../');
#Default Page
define('default_page', 'main');
#Admin_login
define('admin_login', 'keks.tlt@gmail.com');
#Автозагрузчики
include ROOT . 'classes/_autoload.php';
include ROOT . 'models/_autoload.php';
include ROOT . 'controllers/_autoload.php';
#Подключение библиотеки SQL
SQL::connect(include ROOT . 'config/db.php');
#User Init
User::LoginByCookie(Request::cookie('userid', ''));
#QueryStringload
Request::Load();
#WebSite Init
$controller = mb_strtolower(Request::GetPart(0, default_page));
$action = Request::GetPart(1, 'index');
//if (!User::isLogged()) $controller = 'login';
#Загрузка шаблонизатора
Site::$home = 'http://localhost/promspace/';
Site::$template = 'main';
Site::$title = 'PromSpace - Вся промышленность России';
Site::$keywords = 'Вся промышленность России, Предприятия России, Компании России';
Site::Show($controller, $action);
开发者ID:kekstlt,项目名称:promspace,代码行数:29,代码来源:index.php

示例3: header

            @unlink('install.php');
            // Redirect to main page
            header('location: index.php');
        }
    } else {
        include 'install.php';
    }
} else {
    // Load Engine init file
    require_once ROOT . DS . 'engine' . DS . '_init.php';
    // Check for maintenance mod
    if ('on' == Option::get('maintenance_status')) {
        // Set maintenance mode for all except admin and editor
        if (Session::exists('user_role') and (Session::get('user_role') == 'admin' or Session::get('user_role') == 'editor')) {
            // Monstra show this page :)
        } else {
            header('HTTP/1.1 503 Service Temporarily Unavailable');
            header('Status: 503 Service Temporarily Unavailable');
            header('Retry-After: 600');
            die(Text::toHtml(Option::get('maintenance_message')));
        }
    }
    // Frontend pre render
    Action::run('frontend_pre_render');
    // Load site template
    require MINIFY . DS . 'theme.' . Site::theme() . '.' . Site::template() . '.template.php';
    // Frontend pre render
    Action::run('frontend_post_render');
    // Flush (send) the output buffer and turn off output buffering
    ob_end_flush();
}
开发者ID:rowena-altastratus,项目名称:altastratus,代码行数:31,代码来源:index.php

示例4: jQuery

		<title>Group Office - <?php 
echo Site::controller()->getPageTitle();
?>
</title>
		<link rel="shortcut icon" type="image/x-icon" href="<?php 
echo Site::template()->getUrl();
?>
favicon.ico">
		<!-- Latest compiled and minified CSS -->
		<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">

		<!-- Optional theme -->
		<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">

		<link rel="stylesheet" href="<?php 
echo Site::template()->getUrl();
?>
css/site.css">

		<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <!-- Latest compiled and minified JavaScript -->
		<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>

		<script type="text/javascript">
			$(function() {				
				$('a[href^="#"]').bind('click.smoothscroll',function (e) {
						e.preventDefault();
						var target = this.hash;
								$target = $(target);
开发者ID:ajaboa,项目名称:crmpuan,代码行数:31,代码来源:main.php

示例5: start

 public function start()
 {
     Site::$template = 'start';
 }
开发者ID:kekstlt,项目名称:promspace,代码行数:4,代码来源:MainController.php


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