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 model\MdlAdmin;
use Exception; use Exception;
class AdminController extends AbsController class AdminController
{ {
public function showAllUsers(): void { public function showAllUsers(): void {
global $twig; global $twig;

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

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

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

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

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

@ -22,8 +22,8 @@
<body id="page-top"> <body id="page-top">
<!-- Navigation--> <!-- Navigation-->
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav"> <nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
<div class="container px-4 px-lg-5"> <div class="container">
<a class="navbar-brand" href="#page-top">Logo</a> <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" <button class="navbar-toggler navbar-toggler-right" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false"
aria-label="Toggle navigation"> aria-label="Toggle navigation">
@ -34,7 +34,7 @@
<ul class="navbar-nav ms-auto"> <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="#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="#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> </ul>
</div> </div>
</div> </div>
@ -68,7 +68,7 @@
</div> </div>
</section> </section>
<!-- --> <!-- -->
<section class="projects-section"> <section class="projects-section">
<div class="container px-4 px-lg-5" id="game"> <div class="container px-4 px-lg-5" id="game">

@ -24,7 +24,7 @@
<div class="center-wrap"> <div class="center-wrap">
<div class="section text-center"> <div class="section text-center">
<h4 class="mb-4 pb-3">Log In</h4> <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"> <div class="form-group">
<input type="email" name="logemail" class="form-style" placeholder="Your Email" id="logemail" autocomplete="off"> <input type="email" name="logemail" class="form-style" placeholder="Your Email" id="logemail" autocomplete="off">
<i class="input-icon uil uil-at"></i> <i class="input-icon uil uil-at"></i>

Loading…
Cancel
Save