Merge remote-tracking branch 'origin/php' into php

php
Patrick BRUGIERE 1 year ago
commit 2a267099ca

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 KiB

@ -6,7 +6,7 @@ use config\Validation;
use model\MdlAdmin;
use Exception;
class AdminController extends AbsController
class AdminController
{
public function showAllUsers(): void {
global $twig;

@ -23,8 +23,8 @@ class FrontController
$router->map('GET|POST', '/admin/[i:id]/[a:action]?', 'Admin');
$router->map('GET|POST', '/teacher/[i:id]/[a:action]?', 'Teacher');
$router->map('GET|POST', '/student/[i:id]/[a:action]?', 'Student');
$router->map('GET|POST', '/abs/[a:action]?', 'Abs');
$router->map('GET|POST', '/abs/[a:action]/[i:id]', 'Abs');
$router->map('GET|POST', '/user/[a:action]?', 'User');
$router->map('GET|POST', '/user/[a:action]/[i:id]', 'User');
$twig->addGlobal('base', $altorouterPath);
@ -38,10 +38,10 @@ class FrontController
$action = Validation::val_action($match['params']['action'] ?? null);
$id = $match['params']['id'] ?? null;
if ($target == 'Abs') {
$abs = new AbsController();
if (is_callable(array($abs, $action)))
call_user_func_array(array($abs, $action), array($match['params']));
if ($target == 'User') {
$userCtrl = new UserController();
if (is_callable(array($userCtrl, $action)))
call_user_func_array(array($userCtrl, $action), array($match['params']));
}
else {
switch ($action) {
@ -75,7 +75,7 @@ class FrontController
break;
}
else (new AbsController())->login();
else (new UserController())->login();
}
}
}

@ -6,7 +6,7 @@ use model\MdlTeacher;
use gateway\VocabularyListGateway;
use Exception;
class TeacherController extends AbsController
class TeacherController
{
public function affAllStudent(): void
{

@ -10,7 +10,7 @@ use model\MdlStudent;
use model\VocabularyList;
use model\Translation;
class AbsController
class UserController
{
public function showAccountInfos(): void {

@ -34,10 +34,7 @@ body {
}
.flipped {
background: url("../assets/img/quizz.jpeg");
background-position: center;
background-repeat: no-repeat;
background-attachment: scroll;
background: url("../assets/img/carte.png") no-repeat scroll center;
background-size: cover;
}

@ -614,6 +614,11 @@ progress {
line-height: 1;
}
.logo {
margin-top: 10%;
height: 10vh;
}
.figure-caption {
font-size: 0.875em;
color: #6c757d;
@ -11333,10 +11338,4 @@ body {
.app-badge {
height: 3rem;
}
/* .separateur{
display: block;
margin: 0 auto;
width: 20%;
} */
}

@ -22,8 +22,8 @@
<body id="page-top">
<!-- Navigation-->
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
<div class="container px-4 px-lg-5">
<a class="navbar-brand" href="#page-top">Logo</a>
<div class="container">
<a class="navbar-brand" href="#page-top"><img class="logo" src="{{base}}/assets/img/logo.png"/></a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false"
aria-label="Toggle navigation">
@ -34,7 +34,7 @@
<ul class="navbar-nav ms-auto">
<li class="nav-item"><a class="nav-link" href="#game">Game</a></li>
<li class="nav-item"><a class="nav-link" href="#download">Download</a></li>
<li class="nav-item"><a class="nav-link" href="{{base}}/abs/login">My account</a></li>
<li class="nav-item"><a class="nav-link" href="{{base}}/user/login">My account</a></li>
</ul>
</div>
</div>
@ -68,7 +68,7 @@
</div>
</section>
<!-- -->
<section class="projects-section">
<div class="container px-4 px-lg-5" id="game">

@ -24,7 +24,7 @@
<div class="center-wrap">
<div class="section text-center">
<h4 class="mb-4 pb-3">Log In</h4>
<form action="{{base}}/abs/confirmLogin" method="POST">
<form action="{{base}}/user/confirmLogin" method="POST">
<div class="form-group">
<input type="email" name="logemail" class="form-style" placeholder="Your Email" id="logemail" autocomplete="off">
<i class="input-icon uil uil-at"></i>

Loading…
Cancel
Save