Esempio n. 1
0
 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();
 }
Esempio n. 2
0
<?php

#---Define--
mb_internal_encoding("UTF-8");
define('ROOT', dirname(__FILE__) . '/../');
#Default Page
define('default_page', 'main');
#Admin_login
define('admin_login', '*****@*****.**');
#Автозагрузчики
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);
Esempio n. 3
0
            @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();
}
Esempio n. 4
0
		<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);
Esempio n. 5
0
 public function start()
 {
     Site::$template = 'start';
 }