-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
executable file
·139 lines (86 loc) · 3.86 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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?php
require_once('vendor/autoload.php');
use App\Config\Connection;
use App\Config\Config;
$app = new Slim\App(
[
'settings' => [
'displayErrorDetails' => true
]
]
);
$container = $app->getContainer();
$container['view'] = function ($container)
{
$view = new \Slim\Views\Twig(__DIR__ . '/public/Views', [
'cache' => false
]);
$view->addExtension(
new \Slim\Views\TwigExtension(
$container->router, $container->request->getUri()
)
);
return $view;
};
include 'App/Config/ControllerList.php';
session_start();
$app->get('/', 'UserController:index')->setName('HomeUser');
$app->get('/forgot/password',
'UserController:iForgotMyPassword')->setName('ForgotPasswordUser');
$app->get('/reset/password/{codeForReset}',
'UserController:resetMyPassword')->setName('ResetPasswordUser');
$app->get('/area/{functionAccess}',
'UserController:homeAccessUser')->setName('AreaUser');
$app->get('/area/{functionAccess}/myaccount/{tokenUser}',
'UserController:myAccountUserShow')->setName('MyAccountUser');
$app->get('/area/{functionAccess}/list/{areaChoice}[/{page}]',
'UserController:listItens')->setName('ListObjects');
$app->get('/area/{functionAccess}/show/{areaChoice}/{idItem}',
'UserController:showItens')->setName('ShowObjects');
$app->get('/area/{functionAccess}/create/{areaChoice}',
'UserController:createItem')->setName('CreateObjects');
$app->get('/area/{functionAccess}/update/{areaChoice}/{idItem}[/{idUser}]',
'UserController:updateItem')->setName('UpdateObjects');
$app->get('/area/{functionAccess}/search/EE/exit',
'UserController:recordExitCondominium')->setName('UpdateExitObjects');
$app->get('/area/{functionAccess}/exit/for/update/{idItem}',
'UserController:recordExitCondominiumForUpdate')->setName('UpdateExitEE');
$app->get('/area/{functionAccess}/report',
'UserController:reportRequest')->setName('ReportRequest');
$app->post('/login/request',
'UserController:consultLoginRequest')->setName('LoginUser');
$app->post('/destroyer/login/request',
'UserController:destroyerLoginRequest')->setName('logoutUser');
$app->post('/update/MyAccount',
'UserController:updateMyAccountInfo')->setName('UpdateMyAccountUser');
$app->any('/update/MyAccount/new/photo/{token}',
'UserController:updateAccountNewPhoto')->setName('UpdateMyPhotoAccountUser');
$app->post('/update/MyAccount/run/photoforprofile',
'UserController:updateMyPhotoForProfile')->setName('UpdateForProfilePhoto');
$app->post('/update/MyAccount/for/residents',
'UserController:updateUserForResidents')->setName('UpdateForResidents');
$app->any('/create/photo/temp/{photoTemp}',
'UserController:updateAccountNewPhoto')->setName('StoragePhotoForTemporary');
$app->any('/storage/new/{typeRegister}',
'UserController:storageNewItem')->setName('StorageNewPerson');
$app->post('/storage/new/EE/Entrance',
'UserController:storageRecordEE')->setName('StorageNewEE');
$app->any('/update/new/info/{areaChoice}/{idItem}[/{idUser}]',
'UserController:updateItemNewInfo')->setName('UpdatePerson');
$app->any('/update/new/photo/foruser/photoprofile/{areaChoice}',
'UserController:updateNewPhotoForUser')->setName('UpdatePhotoPerson');
$app->any('/search/user/forvisit',
'UserController:searchVisitForEE')->setName('SearchForEE');
$app->any('/search/user/exit/validate',
'UserController:searchVisitForExit')->setName('SearchForEE');
$app->post('/storage/new/EE/Exit',
'UserController:storageRecordExit')->setName('StorageNewExit');
$app->post('/deleted/item',
'UserController:deletedItemNow')->setName('DeletedItem');
$app->get('/report/export/forUser',
'UserController:reportExport')->setName('ExportReport');
$app->post('/forgot/password/send',
'UserController:sendEmailForgot')->setName('ForgotPasswordUserSend');
$app->post('/forgot/update/password/send/for/forgot',
'UserController:sendEmailForgotUpdate')->setName('ForgotPasswordUserUpdate');
$app->run();