enorme push
This commit is contained in:
20
tpCrudTwig/public/users/details.php
Normal file
20
tpCrudTwig/public/users/details.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
|
||||
$SERVER_ROOT = $_SERVER['DOCUMENT_ROOT'] . "/tpCrudTwig";
|
||||
|
||||
require_once($SERVER_ROOT . "/src/User.php");
|
||||
require_once($SERVER_ROOT . "/src/Twig.php");
|
||||
|
||||
if (isset($_GET['id']) && !empty($_GET['id'])) {
|
||||
$id = strip_tags($_GET['id']);
|
||||
$user = GetUser($id);
|
||||
if (!$user) {
|
||||
header('Location: index.php');
|
||||
}
|
||||
} else {
|
||||
header('Location: index.php');
|
||||
}
|
||||
|
||||
renderTwig("users/details.twig", array("user" => $user));
|
||||
Reference in New Issue
Block a user