sdis29-1/controleurs/c_disponibilitée.php
2023-11-06 17:25:16 +01:00

25 lines
569 B
PHP

<?php
session_start();
include (__DIR__ . '/../include/class.pdo.php');
$pdo = PdoBD::getPdoBD();
if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'garde') {
$pdo->majGarde(
$_SESSION['cis'],
$_POST['pompier'],
$_POST['date'],
$_POST['tranche'],
$_POST['garde']
);
} elseif (isset($_REQUEST['option']) && $_REQUEST['option'] == 'dispo') {
$pdo->majActivite(
$_SESSION['cis'],
$_SESSION['idUtilisateur'],
$_POST['date'],
$_POST['tranche'],
$_POST['dispo']
);
}