/
base.php
50 lines (40 loc) · 1.36 KB
/
base.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Base extends Controller_Template{
public $template = 'v_base';
protected $user;
protected $auth;
protected $cache;
protected $session;
// protected $captcha;
public function before()
{
parent::before();
I18n::lang('ru');
Cookie::$salt = 'eqw67dakbs';
Session::$default = 'cookie';
//$this->cache = Cache::instance('file');
$this->session = Session::instance();
$this->auth = Auth::instance();
$this->user = $this->auth->get_user();
// $captcha = Captcha::instance();
// Подключаем стили и скрипты
$this->template->styles = array();
$this->template->scripts = array();
//Вывод в шаблон
$this->template->title = null;
$this->template->site_name = null;
$this->template->description = null;
$this->template->page_title = null;
//Подключаем главный шаблон
$this->template->main = null;
$this->template->userarea = null;
$this->template->top_menu = View::factory('v_top_menu');
$this->template->manufactures = null;
$this->template->left_categories = null;
$this->template->slider_banner = null;
$this->template->block_left = array();
$this->template->block_center = array();
$this->template->block_right = array();
$this->template->block_footer = null;
}
}