Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirection d'acceuille vers Valider Fiches #26

Merged
merged 6 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* @package GSB
* @author Réseau CERTA <contact@reseaucerta.org>
* @author José GIL <jgil@ac-nice.fr>
* @author Marco Clin
* @author Lucas Bruel <lucasfox@outlook.fr>
* @copyright 2017 Réseau CERTA
* @license Réseau CERTA
* @version GIT: <0>
Expand Down Expand Up @@ -42,6 +44,9 @@
case 'accueil':
include PATH_CTRLS . 'c_accueil.php';
break;
case 'validerFiches':
include PATH_CTRLS . 'c_validerFiches.php';
break;
case 'gererFrais':
include PATH_CTRLS . 'c_gererFrais.php';
break;
Expand Down
5 changes: 4 additions & 1 deletion resources/Outils/Utilitaires.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* @package GSB
* @author Cheri Bibi - Réseau CERTA <contact@reseaucerta.org>
* @author José GIL <jgil@ac-nice.fr>
* @author Marco Clin
* @author Lucas Bruel <lucasfox@outlook.fr>
* @copyright 2017 Réseau CERTA
* @license Réseau CERTA
* @version GIT: <0>
Expand Down Expand Up @@ -38,11 +40,12 @@ public static function estConnecte(): bool
*
* @return null
*/
public static function connecter($idVisiteur, $nom, $prenom): void
public static function connecter($idVisiteur, $nom, $prenom, bool $isComptable): void
{
$_SESSION['idVisiteur'] = $idVisiteur;
$_SESSION['nom'] = $nom;
$_SESSION['prenom'] = $prenom;
$_SESSION['isComptable'] = $isComptable;
}

/**
Expand Down
1 change: 0 additions & 1 deletion src/Controleurs/c_accueil.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

if ($estConnecte) {
include_once PATH_VIEWS . 'v_entete.php';
$_SESSION['isComptable'] = true; // @TO-DO : Delete it
if ($_SESSION['isComptable']){
include PATH_VIEWS . 'v_accueil_comptable.php';
}
Expand Down
1 change: 1 addition & 0 deletions src/Controleurs/c_connexion.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @package GSB
* @author Réseau CERTA <contact@reseaucerta.org>
* @author José GIL <jgil@ac-nice.fr>
* @author Marco Clin
* @copyright 2017 Réseau CERTA
* @license Réseau CERTA
* @version GIT: <0>
Expand Down
21 changes: 21 additions & 0 deletions src/Controleurs/c_validerFiches.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php


/**
* Gestion des frais
*
* PHP Version 8
*
* @category PPE
* @package GSB
* @author Réseau CERTA <contact@reseaucerta.org>
* @author Lucas Bruel <lucasfox@outlook.fr>
* @copyright 2017 Réseau CERTA
* @license Réseau CERTA
* @version GIT: <0>
* @link http://www.reseaucerta.org Contexte « Laboratoire GSB »
*/

use Outils\Utilitaires;

require PATH_VIEWS . 'v_validerFiches.php';
24 changes: 2 additions & 22 deletions src/Modeles/PdoGsb.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,14 @@
* @package GSB
* @author Cheri Bibi - Réseau CERTA <contact@reseaucerta.org>
* @author José GIL - CNED <jgil@ac-nice.fr>
* @author Marco Clin
* @author Lucas Bruel <lucasfox@outlook.fr>
* @copyright 2017 Réseau CERTA
* @license Réseau CERTA
* @version GIT: <0>
* @link http://www.php.net/manual/fr/book.pdo.php PHP Data Objects sur php.net
*/

/**
* Classe d'accès aux données.
*
* Utilise les services de la classe PDO
* pour l'application GSB
* Les attributs sont tous statiques,
* les 4 premiers pour la connexion
* $connexion de type PDO
* $instance qui contiendra l'unique instance de la classe
*
* PHP Version 8
*
* @category PPE
* @package GSB
* @author Cheri Bibi - Réseau CERTA <contact@reseaucerta.org>
* @author José GIL <jgil@ac-nice.fr>
* @copyright 2017 Réseau CERTA
* @license Réseau CERTA
* @version Release: 1.0
* @link http://www.php.net/manual/fr/book.pdo.php PHP Data Objects sur php.net
*/

namespace Modeles;

use PDO;
Expand Down
9 changes: 4 additions & 5 deletions src/Vues/v_accueil_comptable.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @package GSB
* @author Réseau CERTA <contact@reseaucerta.org>
* @author José GIL <jgil@ac-nice.fr>
* @author Lucas Bruel <lucasfox@outlook.fr>
* @copyright 2017 Réseau CERTA
* @license Réseau CERTA
* @version GIT: <0>
Expand All @@ -34,16 +35,14 @@
<div class="panel-body">
<div class="row">
<div class="col-xs-12 col-md-12">
<a href="#"
<a href="index.php?uc=validerFiches"
class="btn btn-primary btn-lg" role="button">
<span class="glyphicon glyphicon-ok"></span>
<br>Valider des fiches de frais</a>
</div>
<div class="col-xs-12 col-md-12">
<a href="#"
class="btn btn-primary btn-lg" role="button">
<span class="glyphicon glyphicon-ok"></span>
<br>Valider des fiches de frais</a>
<span class="glyphicon glyphicon-euro"></span>
<br>Suivre le paiement des fches de frais</a>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/Vues/v_entete.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
<?php
if ($_SESSION['isComptable']) {
?>
<li <?php if ($uc == 'gererFrais') { ?>class="active"<?php } ?>>
<a href="index.php?uc=gererFrais&action=saisirFrais">
<li <?php if ($uc == 'validerFiches') { ?>class="active"<?php } ?>>
<a href="index.php?uc=validerFiches">
<span class="glyphicon glyphicon-ok"></span>
Valider les fiches de frais
</a>
Expand Down
3 changes: 3 additions & 0 deletions src/Vues/v_validerFiches.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

echo "Ceci est en cours.....";