-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
63 lines (40 loc) · 1.21 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/**
* Inicia una sesion
*/
session_start();
require "lib/vector.inc.php";
require "lib/loader.inc.php";
require "lib/templates.inc.php";
require "lib/templatesAdmin.inc.php";
require "lib/fragment.inc.php";
require "lib/fragmentAdmin.inc.php";
require "lib/helpers.inc.php";
require "lib/news.inc.php";
require "lib/videos.inc.php";
require "lib/products.inc.php";
require "lib/productCategories.inc.php";
require "lib/productCart.inc.php";
require "lib/config.inc.php";
require "lib/users.inc.php";
require "lib/db.inc.php";
if(!is_array(\config\load("config/config.ini"))){
die("No se encuentra el archivo de configuración :(");
}
if(isset($_POST['email'])&&isset($_POST['clave'])){
\user\login($_POST["email"], $_POST["clave"]);
}
\templates\header();
if(isset($_GET["pagina"])){
if(isset($_GET['admin'])){
$found = \templates\admin\page($_GET['pagina']);
}else{
$found = \templates\page($_GET["pagina"]);
}
if ( ! $found ){
\templates\error("404");
}
}else{
\templates\page('inicio'); //De lo contrario, cargamos la pagina por defecto
}
\templates\footer();