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
-->
<?php
if ($_SESSION['typeU'] == 'visiteur'):
if($_SESSION['typeU'] == 'visiteur'):
?>
<li>
<a href="#submenu1" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
@ -21,13 +21,11 @@
</a>
<ul class="collapse show nav flex-column ms-1" id="submenu1" data-bs-parent="#menu">
<li class="w-100">
<a href="controleurs/c_gestionFiche.php" class="nav-link px-0"> <span
class="d-none d-sm-inline">Gérer ses fiches</span>
<a href="../controleurs/c_gestionFiche.php" class="nav-link px-0"> <span class="d-none d-sm-inline">Gérer ses fiches</span>
</a>
</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 class="d-none d-sm-inline">Nouvelle Fiche</span>
</a>
</li>
</ul>
@ -36,19 +34,17 @@
<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>
</li>
<?php endif; if ($_SESSION['typeU'] == 'comptable'): ?>
<!--
Partie comptable
-->
<?php endif;
if ($_SESSION['typeU'] == 'comptable'): ?>
<li>
<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>
</a>
<ul class="collapse show nav flex-column ms-1" id="submenu2" data-bs-parent="#menu">
<li class="w-100">
<a href="../controleurs/c_gestionFiche.php" class="nav-link px-0"> <span
class="d-none d-sm-inline">A valider</span>
<a href="../controleurs/c_gestionFiche.php" class="nav-link px-0"> <span class="d-none d-sm-inline">A valider</span>
</a>
</li>
<li>

View File

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

View File

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