forked from procnet0/matcha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
52 lines (42 loc) · 2.46 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
<?php
use \Psr\Http\Message\RequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); ini_set('display_errors','On');
session_start();
require 'vendor/autoload.php';
include_once('app/config/database.php');
include_once($_SERVER['DOCUMENT_ROOT'].'/matcha/app/config/setup.php');
if(!is_dir('app/imgprofil/'))
{
mkdir('app/imgprofil/', '0744');
}
$app = new \Slim\App([
'settings' => [
'displayErrorDetails' => true
]
]);
require('app/container.php');
$container = $app->getContainer();
$app->add(new \App\Middlewares\FlashMiddleware($container->view->getEnvironment()));
$app->get("/", \App\Controllers\PagesController::class . ':home')->setName('home');
$app->get("/contact", \App\Controllers\PagesController::class . ':getContact')->setName('contact');
$app->post("/contact", \App\Controllers\PagesController::class . ':postContact');
$app->get("/profil", \App\Controllers\PagesController::class . ':getAccount')->setName('profil');
$app->get("/lookat/{name}", \App\Controllers\PagesController::class . ':lookat')->setName('lookat');
$app->post("/profil", \App\Controllers\PagesController::class . ':postAccount');
$app->get("/recherche", \App\Controllers\PagesController::class . ':getSearch')->setName('recherche');
$app->post("/recherche", \App\Controllers\PagesController::class . ':postSearch');
$app->get("/signUp", \App\Controllers\PagesController::class . ':getMember')->setName('signUp');
$app->post("/signUp", \App\Controllers\PagesController::class . ':postMember');
$app->get("/logout", \App\Controllers\PagesController::class . ':logout')->setName('logout');
$app->post("/UpdateProfil", \App\Controllers\PagesController::class . ':UpdateProfil')->setName('UpdateProfil');
$app->post("/setAsProfil", \App\Controllers\PagesController::class . ':setAsProfil');
$app->post("/updateAccountPict", \App\Controllers\PagesController::class . ':updateAccountPict');
$app->post("/getTagInfo", \App\Controllers\PagesController::class . ':getTagInfo');
$app->post("/updateTagInfo", \App\Controllers\PagesController::class . ':updateTagInfo');
$app->post("/updatePosition", \App\Controllers\PagesController::class . ':updatePosition');
$app->post("/lookat/reportUser", \App\Controllers\PagesController::class . ':reportUser');
$app->post("/lookat/likeUser", \App\Controllers\PagesController::class . ':likeUser');
$app->post("/lookat/blockUser", \App\Controllers\PagesController::class . ':blockUser');
$app->run();
?>