resolv merge + pdo

This commit is contained in:
pierre renaudot 2023-12-21 10:52:21 +01:00
commit 674514ed06
4 changed files with 64 additions and 48 deletions

View File

@ -0,0 +1,15 @@
<?php
session_start();
$_SESSION['typeU'] = 'comptable';
include("../vues/v_gestionFiches.php");
?>

View File

@ -13,50 +13,46 @@
Partie visiteur Partie visiteur
--> -->
<?php <?php
if ($_SESSION['typeU'] == 'visiteur'): if($_SESSION['typeU'] == 'visiteur'):
?> ?>
<li> <li>
<a href="#submenu1" data-bs-toggle="collapse" class="nav-link px-0 align-middle"> <a href="#submenu1" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<i class="fs-4 bi-speedometer2"></i> <span class="ms-1 d-none d-sm-inline">Fiche de frais</span> <i class="fs-4 bi-speedometer2"></i> <span class="ms-1 d-none d-sm-inline">Fiche de frais</span>
</a> </a>
<ul class="collapse show nav flex-column ms-1" id="submenu1" data-bs-parent="#menu"> <ul class="collapse show nav flex-column ms-1" id="submenu1" data-bs-parent="#menu">
<li class="w-100"> <li class="w-100">
<a href="controleurs/c_gestionFiche.php" class="nav-link px-0"> <span <a href="../controleurs/c_gestionFiche.php" class="nav-link px-0"> <span class="d-none d-sm-inline">Gérer ses fiches</span>
class="d-none d-sm-inline">Gérer ses fiches</span> </a>
</a> </li>
</li> <li>
<li> <a href="../index.php?direction=nouvelleFiche" class="nav-link px-0"> <span class="d-none d-sm-inline">Nouvelle Fiche</span>
<a href="index.php?direction=nouvelleFiche" class="nav-link px-0"> <span </a>
class="d-none d-sm-inline">Nouvelle Fiche</span> </li>
</a> </ul>
</li> </li>
</ul> <li>
</li> <a href="#" class="nav-link px-0 align-middle">
<li> <i class="fs-4 bi-table"></i> <span class="ms-1 d-none d-sm-inline">Visites</span></a>
<a href="#" class="nav-link px-0 align-middle"> </li>
<i class="fs-4 bi-table"></i> <span class="ms-1 d-none d-sm-inline">Visites</span></a> <?php endif; if ($_SESSION['typeU'] == 'comptable'): ?>
</li> <!--
<!--
Partie comptable Partie comptable
--> -->
<?php endif; <li>
if ($_SESSION['typeU'] == 'comptable'): ?> <a href="#submenu2" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<li> <i class="fs-4 bi-speedometer2"></i> <span class="ms-1 d-none d-sm-inline">Fiche de frais</span>
<a href="#submenu2" data-bs-toggle="collapse" class="nav-link px-0 align-middle"> </a>
<i class="fs-4 bi-speedometer2"></i> <span class="ms-1 d-none d-sm-inline">Fiche de frais</span> <ul class="collapse show nav flex-column ms-1" id="submenu2" data-bs-parent="#menu">
</a> <li class="w-100">
<ul class="collapse show nav flex-column ms-1" id="submenu2" data-bs-parent="#menu"> <a href="../controleurs/c_gestionFiche.php" class="nav-link px-0"> <span class="d-none d-sm-inline">A valider</span>
<li class="w-100"> </a>
<a href="../controleurs/c_gestionFiche.php" class="nav-link px-0"> <span </li>
class="d-none d-sm-inline">A valider</span> <li>
</a> <a href="#" class="nav-link px-0"> <span class="d-none d-sm-inline">Historique</span>
</li> </a>
<li> </li>
<a href="#" class="nav-link px-0"> <span class="d-none d-sm-inline">Historique</span> </ul>
</a> </li>
</li>
</ul>
</li>
<?php endif; ?> <?php endif; ?>
</ul> </ul>
<hr> <hr>

View File

@ -42,7 +42,9 @@ if (!isset($_REQUEST['direction'])) {
<body> <body>
<div class="container-fluid"> <div class="container-fluid">
<div class="row flex-nowrap"> <div class="row flex-nowrap">
<?php include('include/menu.php'); ?> <?php
include('include/menu.php');
?>
<div class="col py-3"> <div class="col py-3">
<?php <?php
switch ($_REQUEST['direction']) { switch ($_REQUEST['direction']) {
@ -53,6 +55,7 @@ if (!isset($_REQUEST['direction'])) {
case 'gestionFiche': case 'gestionFiche':
include("controleurs/c_gestionFiche.php"); include("controleurs/c_gestionFiche.php");
break; break;
case 'home': case 'home':
include("controleurs/c_homePage.php"); include("controleurs/c_homePage.php");
break; break;
@ -62,7 +65,7 @@ if (!isset($_REQUEST['direction'])) {
break; break;
default: default:
include("controleurs/c_gestionFiche.php"); include("controleurs/c_homePage.php");
break; break;
} }
?> ?>

View File

@ -25,10 +25,12 @@ var_dump($_SESSION['test']);
<div class="col-3 mb-4"> <div class="col-3 mb-4">
<h3>Gerer mes fiches de frais</h3> <h3>Gerer mes fiches de frais</h3>
<br> <br>
<select class="form-select" name="selVisiteur" id=""> <?php
<option value="visiteur1">Visiteur 1</option> if ($_SESSION['typeU'] == 'comptable') {
</select> echo '<select class="form-select" name="selVisiteur" id="">
<option value="visiteur1">Visiteur 1</option></select>';
}
?>
</div> </div>
</center> </center>