-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.php
123 lines (93 loc) · 3.32 KB
/
routes.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
session_start();
ob_start();
require_once("./config.php");
require_once("./info.php");
require_once("./src/controllers/pagesController.php");
require_once("./src/controllers/routingController.php");
require_once("./src/resources/html.php");
date_default_timezone_set('UTC');
setlocale(LC_TIME, 'es_ES.UTF-8');
$pages = new PagesController();
$router = new Router('PagesController@error404');
/*-------------------------------------*/
$pages->topHTML();
/*-------------------------------------*/
if(isset($_GET['page'])){
switch ($_GET['page']) {
case 'home':
$pages->updateScripts(["./assets/js/pages/home.js"]);
$pages->menuHTML();
break;
case 'login':
$pages->updateScripts(["./assets/js/pages/login.js"]);
break;
case 'signup':
$pages->updateScripts(["./assets/js/pages/signup.js"]);
break;
case 'forgotpassword':
$pages->updateScripts(["./assets/js/pages/forgotpassword.js"]);
break;
case 'recoverpass':
$pages->updateScripts(["./assets/js/pages/recoverpass.js"]);
break;
case 'myprofile':
$pages->updateScripts(["./assets/js/pages/myprofile.js"]);
$pages->menuHTML();
break;
case 'settings':
$pages->updateScripts(["./assets/js/pages/settings.js"]);
$pages->menuHTML();
break;
case 'user':
$pages->updateScripts(["./assets/js/pages/user.js"]);
$pages->menuHTML();
break;
case 'termsandconditions':
$pages->menuHTML();
break;
case 'privacypolicy':
$pages->menuHTML();
break;
case 'about':
$pages->menuHTML();
break;
case 'cookies':
$pages->menuHTML();
break;
case 'contact':
$pages->updateScripts(["./assets/js/pages/contact.js"]);
$pages->menuHTML();
break;
case 'exchange':
$pages->updateScripts(["./assets/js/pages/exchange.js"]);
$pages->menuHTML();
break;
case 'tutorials':
$pages->menuHTML();
break;
}
}
/*-------------------------------------*/
$router->add('/', 'PagesController@index');
$router->add('/home', 'PagesController@home');
$router->add('/login', 'PagesController@login');
$router->add('/signup', 'PagesController@signup');
$router->add('/logout','PagesController@logout');
$router->add('/forgotpassword', 'PagesController@forgotpassword');
$router->add('/recoverpass', 'PagesController@recoverpass');
$router->add('/myprofile', 'PagesController@myprofile');
$router->add('/settings', 'PagesController@settings');
$router->add('/user', 'PagesController@user');
$router->add('/termsandconditions', 'PagesController@termsandconditions');
$router->add('/privacypolicy', 'PagesController@privacypolicy');
$router->add('/about', 'PagesController@about');
$router->add('/cookies', 'PagesController@useofcookies');
$router->add('/contact', 'PagesController@contact');
$router->add('/exchange', 'PagesController@exchange');
$router->add('/tutorials', 'PagesController@tutorials');
$router->run();
/*-------------------------------------*/
/*-------------------------------------*/
$pages->bottomHTML();
/*-------------------------------------*/