-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
27 lines (23 loc) · 761 Bytes
/
Copy pathindex.php
File metadata and controls
27 lines (23 loc) · 761 Bytes
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
<?php
session_start();
$session = session_id();
define('PATH', getcwd() . '/');
define('CONFIG', 'config/');
require_once(CONFIG . 'conf.php');
require_once(LIB . 'vendor/autoload.php');
require_once(MODELS . 'User.php');
require_once(LIB . 'Router.php');
require_once(LIB . 'helpers.php');
require_once(LIB . 'Db.php');
require_once(CONFIG . 'conf.hybridauth.php');
$Router = new Router();
$url = $Router->getUrl();
$action = $Router->getAction();
$page = $Router->getPage();
$smarty = new Smarty();
$db = DB::getInstance();
$user = User::getInstance();
$isConnected = !empty($_SESSION['connected']) ? 1 : 0;
$smarty->assign('session', $_SESSION);
$smarty->assign('isConnected', $isConnected);
require_once CONTROLLERS . $Router->getController() . '.php';