Compare commits
1 Commits
v0.0.1c-pr
...
v0.0.1c-tg
Author | SHA1 | Date | |
---|---|---|---|
e55df1b480 |
21
Class/class.gestionFiche.php
Normal file
21
Class/class.gestionFiche.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
class Class_gestionFiche
|
||||
{
|
||||
private $pdo = null;
|
||||
|
||||
public function __construct(PdoGsb $pDO)
|
||||
{
|
||||
$this->pdo = $pDO->getPdoGsb();
|
||||
}
|
||||
|
||||
public function getLesUtilisateurs(): array
|
||||
{
|
||||
$req = 'SELECT "uId", "uNom", "uPrenom" FROM utilisateur WHERE "uStatut"!=0 ORDER BY "uNom" ASC;';
|
||||
$result = $this->pdo->prepare($req);
|
||||
$result ->execute();
|
||||
|
||||
return $result->fetchAll();
|
||||
}
|
||||
|
||||
}
|
@ -10,20 +10,16 @@ class Class_newFiche
|
||||
$this->pdo = $pDO->getPdoGsb();
|
||||
}
|
||||
|
||||
|
||||
public function listFraisForfaitaires(): array
|
||||
{
|
||||
$req = 'SELECT "fLibelle", round("fMontant", 2) AS "fMontant", "fId" FROM forfait';
|
||||
$req = 'SELECT "fLibelle", "fMontant" FROM forfait';
|
||||
$result = $this->pdo->prepare($req);
|
||||
$result->execute();
|
||||
|
||||
return $result->fetchAll();
|
||||
}
|
||||
|
||||
public function listFraisHF():array
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function endInter(string $id)
|
||||
{
|
||||
$req = "UPDATE intervention
|
||||
|
@ -1,15 +1,9 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
require_once(__DIR__ . '/../Class/class.gestionFiche.php');
|
||||
$gestionFiche = new Class_gestionFiche($pdo);
|
||||
|
||||
$LesUtilisateurs = $gestionFiche->getLesUtilisateurs(); //RENVOIE LISTE USERS
|
||||
|
||||
$_SESSION['typeU'] = 'comptable';
|
||||
|
||||
|
||||
include("../vues/v_gestionFiches.php");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
@ -2,6 +2,8 @@
|
||||
require_once(__DIR__ . '/../Class/class.newFiche.php');
|
||||
|
||||
$newFiche = new Class_newFiche($pdo);
|
||||
$typesFraisForfaitaires = $newFiche->listFraisForfaitaires();
|
||||
$liste = $newFiche->listFraisForfaitaires();
|
||||
|
||||
var_dump($liste);
|
||||
|
||||
include(__DIR__ . '/../vues/v_newFiche.php');
|
||||
|
@ -21,11 +21,11 @@
|
||||
</a>
|
||||
<ul class="collapse show nav flex-column ms-1" id="submenu1" data-bs-parent="#menu">
|
||||
<li class="w-100">
|
||||
<a href="index.php?direction=gestionFiche" 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>
|
||||
@ -44,7 +44,7 @@
|
||||
</a>
|
||||
<ul class="collapse show nav flex-column ms-1" id="submenu2" data-bs-parent="#menu">
|
||||
<li class="w-100">
|
||||
<a href="index.php?direction=gestionFiche" 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>
|
||||
|
@ -53,7 +53,7 @@ if (!isset($_REQUEST['direction'])) {
|
||||
break;
|
||||
|
||||
case 'gestionFiche':
|
||||
include(__DIR__ . "/controleurs/c_gestionFiche.php");
|
||||
include("controleurs/c_gestionFiche.php");
|
||||
break;
|
||||
|
||||
case 'home':
|
||||
|
@ -1,95 +1,63 @@
|
||||
<?php
|
||||
var_dump($_SESSION['test']);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Page accueil</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
|
||||
crossorigin="anonymous"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row flex-nowrap">
|
||||
<?php include('../include/menu.php') ?>
|
||||
|
||||
<div class="col py-3">
|
||||
<center>
|
||||
<div class="col-3 mb-4">
|
||||
<h3>Gerer mes fiches de frais</h3>
|
||||
<br>
|
||||
<?php
|
||||
if ($_SESSION['typeU'] == 'comptable') {
|
||||
echo '<select class="form-select" name="selVisiteur" id="">
|
||||
<center>
|
||||
<div class="col-3 mb-4">
|
||||
<h3>Gerer mes fiches de frais</h3>
|
||||
<br>
|
||||
<?php
|
||||
if ($_SESSION['typeU'] == 'comptable') {
|
||||
echo '<select class="form-select" name="selVisiteur" id="">
|
||||
<option value="visiteur1">Visiteur 1</option></select>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</center>
|
||||
|
||||
<div class="col-11 d-flex mx-auto">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Mois</th>
|
||||
<th scope="col">Total</th>
|
||||
<th scope="col">Statut</th>
|
||||
<th scope="col">Détails</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Novembre</th>
|
||||
<td>351 €</td>
|
||||
<td>en cours...</td>
|
||||
<td><a href="#">voir</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Octobre</th>
|
||||
<td>1458 €</td>
|
||||
<td>en cours...</td>
|
||||
<td><a href="#">voir</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Septembre</th>
|
||||
<td>1112 €</td>
|
||||
<td>classé</td>
|
||||
<td><a href="#">voir</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-4 d-flex mx-auto">
|
||||
<nav aria-label="...">
|
||||
<ul class="pagination">
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link">Previous</a>
|
||||
</li>
|
||||
<li class="page-item"><a class="page-link" href="#">1</a></li>
|
||||
<li class="page-item active" aria-current="page">
|
||||
<a class="page-link" href="#">2</a>
|
||||
</li>
|
||||
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="#">Next</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</center>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<div class="col-11 d-flex mx-auto">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Mois</th>
|
||||
<th scope="col">Total</th>
|
||||
<th scope="col">Statut</th>
|
||||
<th scope="col">Détails</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Novembre</th>
|
||||
<td>351 €</td>
|
||||
<td>en cours...</td>
|
||||
<td><a href="#">voir</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Octobre</th>
|
||||
<td>1458 €</td>
|
||||
<td>en cours...</td>
|
||||
<td><a href="#">voir</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Septembre</th>
|
||||
<td>1112 €</td>
|
||||
<td>classé</td>
|
||||
<td><a href="#">voir</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-4 d-flex mx-auto">
|
||||
<nav aria-label="...">
|
||||
<ul class="pagination">
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link">Previous</a>
|
||||
</li>
|
||||
<li class="page-item"><a class="page-link" href="#">1</a></li>
|
||||
<li class="page-item active" aria-current="page">
|
||||
<a class="page-link" href="#">2</a>
|
||||
</li>
|
||||
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="#">Next</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
@ -4,9 +4,6 @@
|
||||
<p>Mois de Novembre 2023</p>
|
||||
</center>
|
||||
<br>
|
||||
<!--
|
||||
Liste des frais forfaitaires
|
||||
-->
|
||||
<h3 class="fw-bold offset-1">Frais forfaitaires</h3>
|
||||
<div class="col-11 d-flex mx-auto my-3">
|
||||
<table class="table table-striped-columns align-middle">
|
||||
@ -19,32 +16,17 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider border-secondary-subtle">
|
||||
<?php
|
||||
foreach ($typesFraisForfaitaires as $key => $value):
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<?= $value['fLibelle'] ?>
|
||||
</th>
|
||||
<td><input type="text" name="fraisForfait-<?= $value['fId'] ?>" class="form-control"></td>
|
||||
<td>
|
||||
<?= $value['fMontant'] ?> €
|
||||
</td>
|
||||
<td>0€</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th scope="row">Hotel</th>
|
||||
<td><input type="text" class="form-control"></td>
|
||||
<td>20 €</td>
|
||||
<td>400€</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<span class="border-3 border-bottom border-black col-10 mx-auto my-5 d-flex"></span>
|
||||
|
||||
<!--
|
||||
Listes des frais Hors Forfaits
|
||||
-->
|
||||
<h3 class="fw-bold offset-1">Hors forfait</h3>
|
||||
<div class="col-11 d-flex mx-auto my-3">
|
||||
<table class="table table-striped-columns align-middle">
|
||||
|
Reference in New Issue
Block a user