-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
38 lines (26 loc) · 873 Bytes
/
index.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
<?php
/**
* @author Héctor Laura
*
*/
error_reporting(E_ALL);
//error_reporting(E_ALL & ~E_NOTICE);
header('Content-type: text/html; charset=utf-8');
//sacamos la ruta real
$rutaReal = dirname(__FILE__);
$dir = str_replace('\\', '/', $rutaReal);
require($dir . '/includes/configs/config.inc.php');
require(DIR_INC . 'core.inc.php');
//sacamos la página que queremos cargar
$tpl = $p->get_pagina(POS_PAG);
$p->smarty->debugging = 0;
$p->smarty->caching = false;
$tpl_file = 'file:' . DIR_PLUG . $p->plugin . '/tpl/' . $tpl['inc'];
$p->smarty->assign('tpl', (($p->smarty->templateExists($tpl_file)) ? $tpl_file : 'inc.404.tpl'));
//We check if it has to be included in main or in a independent tpl
if($tpl['in_main']){
$p->smarty->display('site.main.tpl');
}else{
$p->smarty->display($tpl_file);
}//fin else
//$p->get_memory();