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,7 +13,7 @@
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">
@ -21,13 +21,11 @@
</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 <a href="../index.php?direction=nouvelleFiche" class="nav-link px-0"> <span class="d-none d-sm-inline">Nouvelle Fiche</span>
class="d-none d-sm-inline">Nouvelle Fiche</span>
</a> </a>
</li> </li>
</ul> </ul>
@ -36,19 +34,17 @@
<a href="#" class="nav-link px-0 align-middle"> <a href="#" class="nav-link px-0 align-middle">
<i class="fs-4 bi-table"></i> <span class="ms-1 d-none d-sm-inline">Visites</span></a> <i class="fs-4 bi-table"></i> <span class="ms-1 d-none d-sm-inline">Visites</span></a>
</li> </li>
<?php endif; if ($_SESSION['typeU'] == 'comptable'): ?>
<!-- <!--
Partie comptable Partie comptable
--> -->
<?php endif;
if ($_SESSION['typeU'] == 'comptable'): ?>
<li> <li>
<a href="#submenu2" data-bs-toggle="collapse" class="nav-link px-0 align-middle"> <a href="#submenu2" 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="submenu2" data-bs-parent="#menu"> <ul class="collapse show nav flex-column ms-1" id="submenu2" 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">A valider</span>
class="d-none d-sm-inline">A valider</span>
</a> </a>
</li> </li>
<li> <li>

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>