Compare commits
8 Commits
v0.0.1.d-p
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
7d09299dcb | ||
|
6f165b76f2 | ||
|
062e417a9c | ||
|
591b6a0d41 | ||
|
443c0225ae | ||
|
aa0701334e | ||
|
5fdb28c44e | ||
|
ea3ea7cb5f |
@ -3,8 +3,6 @@ session_start();
|
||||
|
||||
include (__DIR__ . '/../include/class.pdo.php');
|
||||
|
||||
var_dump($_POST);
|
||||
|
||||
$pdo = PdoBD::getPdoBD();
|
||||
|
||||
if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'garde') {
|
||||
|
@ -9,44 +9,72 @@
|
||||
// Auteur : pascal-blain@wanadoo.fr '
|
||||
//*****************************************'
|
||||
$action = $_REQUEST['action'];
|
||||
switch($action)
|
||||
{
|
||||
case 'voir':
|
||||
{
|
||||
include("vues/v_entete.php");
|
||||
if(!isset($_REQUEST['zSemaine'])){$_REQUEST['zSemaine'] = date('W');}
|
||||
$semaine = $_REQUEST['zSemaine'];
|
||||
if(!isset($_REQUEST['zAnnee'])){$_REQUEST['zAnnee'] = date('Y');}
|
||||
$annee = $_REQUEST['zAnnee'];
|
||||
$premierJour = strtotime("+$semaine weeks",mktime(0,0,0,1,1,$annee));
|
||||
if (date('w',$premierJour) != 1){$premierJour = strtotime("last monday",$premierJour);}
|
||||
$lesTranches = $pdo->getParametre("tranche");
|
||||
$lesTypesDispos = $pdo->getParametre("dispo");
|
||||
$titre="CIS"; //Centre d'incendie et de secours :";
|
||||
$lesCasernes = $pdo->getLesCasernes($_SESSION["adr1"]);
|
||||
include("vues/v_choixCaserne.php");
|
||||
$lesPompiers = $pdo->getLesPompiers($choix);
|
||||
$lesInterventions=$pdo->getLesInterventions($choix);
|
||||
$intervention=1;
|
||||
$lesParticipants= $pdo->getLesParticipants($choix, $intervention);
|
||||
include("vues/v_Intervention.php");
|
||||
break;
|
||||
}
|
||||
switch ($action) {
|
||||
case 'voir': {
|
||||
include("vues/v_entete.php");
|
||||
|
||||
//-----------------------------------------
|
||||
case 'majGarde':
|
||||
{
|
||||
$pdo->majGarde($_REQUEST["ztLaDate"], $_REQUEST["ztLaTranche"], $_REQUEST["ztExGarde"], $_REQUEST["ztPompier"]);
|
||||
header ('location: index.php?choixTraitement=gardes&action=voir&zSemaine='.$_REQUEST["zSemaine"].'&zAnnee='.$_REQUEST["zAnnee"]);
|
||||
break;
|
||||
}
|
||||
|
||||
include("vues/v_Intervention.php");
|
||||
break;
|
||||
}
|
||||
case 'nouvelle': {
|
||||
include("vues/v_entete.php");
|
||||
$lesCasernes = $pdo->getLesCasernes($_SESSION["adr1"]);
|
||||
$lesMotifs = $pdo->motifIntervention();
|
||||
|
||||
$tranche = $pdo->getCurrentTranche();
|
||||
$date = date('Y-m-d');
|
||||
|
||||
$lesPompiers = $pdo->getPompiersDispo($date, $tranche, 2904);
|
||||
|
||||
include("vues/v_nouvelleIntervention.php");
|
||||
|
||||
break;
|
||||
}
|
||||
case 'listePompier':
|
||||
require_once ("../include/class.pdo.php");
|
||||
|
||||
$pdo = PdoBD::getPdoBD();
|
||||
|
||||
$tranche = $pdo->getCurrentTranche();
|
||||
$date = date('Y-m-d');
|
||||
|
||||
$lesPompiers = $pdo->getPompiersDispo($date, $tranche, $_GET['cis']);
|
||||
|
||||
echo(json_encode($lesPompiers));
|
||||
|
||||
//-----------------------------------------
|
||||
default :
|
||||
{
|
||||
echo 'erreur d\'aiguillage !'.$action;
|
||||
break;
|
||||
}
|
||||
case 'nouvelleInter':
|
||||
require_once ("../include/class.pdo.php");
|
||||
|
||||
$pdo = PdoBD::getPdoBD();
|
||||
//var_dump($_REQUEST);
|
||||
|
||||
$listePompier = $_POST['listePompier'];
|
||||
$data = $_POST['dataForm'];
|
||||
|
||||
$pdo->newIntervention(
|
||||
intval($data['motif']),
|
||||
intval($data['caserne']),
|
||||
$data['adresse'],
|
||||
$data['commentaire'],
|
||||
$listePompier
|
||||
);
|
||||
//var_dump($listePompier);
|
||||
|
||||
break;
|
||||
//-----------------------------------------
|
||||
case 'majGarde': {
|
||||
$pdo->majGarde($_REQUEST["ztLaDate"], $_REQUEST["ztLaTranche"], $_REQUEST["ztExGarde"], $_REQUEST["ztPompier"]);
|
||||
header('location: index.php?choixTraitement=gardes&action=voir&zSemaine=' . $_REQUEST["zSemaine"] . '&zAnnee=' . $_REQUEST["zAnnee"]);
|
||||
break;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
default: {
|
||||
echo 'erreur d\'aiguillage !' . $action;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*
|
||||
table equipe:
|
||||
@ -64,4 +92,4 @@ iTranche tinyint(3)
|
||||
iHeureDebut datetime
|
||||
iHeureFin datetime
|
||||
*/
|
||||
?>
|
||||
?>
|
@ -9,132 +9,130 @@
|
||||
// Auteur : pascal.blain@ac-dijon.fr '
|
||||
//*****************************************'
|
||||
$action = $_REQUEST['action'];
|
||||
switch($action) {
|
||||
case 'voir':
|
||||
{
|
||||
$formulaire = "choixP"; //Donne le focus dans le form
|
||||
$champ = "lstPompiers";
|
||||
include("vues/v_entete.php");
|
||||
switch ($action) {
|
||||
case 'voir': {
|
||||
$formulaire = "choixP"; //Donne le focus dans le form
|
||||
$champ = "lstPompiers";
|
||||
include("vues/v_entete.php");
|
||||
|
||||
$lesLignes = $pdo->getLesPompiers($_SESSION['cis']);
|
||||
include("vues/v_choixPompier.php"); // Formulaire de choix des pompiers
|
||||
$lesLignes = $pdo->getLesPompiers($_SESSION['cis']);
|
||||
include("vues/v_choixPompier.php"); // Formulaire de choix des pompiers
|
||||
|
||||
$lesInfosPompier = $pdo->getInfosPompier("*",$choix);
|
||||
$lesTranches = $pdo->getParametre("tranche");
|
||||
$lesGardes = $pdo->getInfosGardes($choix);
|
||||
$lesInfosPompier = $pdo->getInfosPompier("*", $choix);
|
||||
$lesTranches = $pdo->getParametre("tranche");
|
||||
$lesGardes = $pdo->getInfosGardes($choix);
|
||||
|
||||
if(!isset($_REQUEST['zSemaine'])) {
|
||||
$_REQUEST['zSemaine'] = date('W');
|
||||
}
|
||||
$semaine = $_REQUEST['zSemaine'];
|
||||
|
||||
if(!isset($_REQUEST['zAnnee'])) {
|
||||
$_REQUEST['zAnnee'] = date('Y');
|
||||
}
|
||||
$annee = $_REQUEST['zAnnee'];
|
||||
$lesDispos = $pdo->getDisposHebdo($choix, $semaine, $annee);
|
||||
//echo "annee:".$annee."pompier: ".$choix."semaine : ".$semaine;
|
||||
$premierJour = strtotime("+$semaine weeks", mktime(0,0,0,1,1,$annee));
|
||||
|
||||
if (date('w',$premierJour) != 1){
|
||||
$premierJour = strtotime("last monday", $premierJour);
|
||||
}
|
||||
$lesTypesDispos = $pdo->getParametre("dispo");
|
||||
include("vues/v_fichePompier.php");
|
||||
|
||||
break;
|
||||
}
|
||||
//----------------------------------------- FORMULAIRE DE SAISIE
|
||||
case 'ajouter':
|
||||
case 'modifier':
|
||||
case 'supprimer':
|
||||
{
|
||||
$formulaire = "frmA";
|
||||
$champ = "ztNom";
|
||||
include("vues/v_entete.php");
|
||||
$choix = $_REQUEST['lstPompiers'];
|
||||
$lesInfosPompier = $pdo->getInfosPompier("*",$choix);
|
||||
$lesTypes = $pdo->getParametre("typePer");
|
||||
$lesGrades = $pdo->getParametre("grade");
|
||||
$lesStatuts = $pdo->getParametre("statAgt");
|
||||
include("vues/v_unPompier.php");
|
||||
break;
|
||||
}
|
||||
//----------------------------------------- VALIDATION
|
||||
case 'validerAjouter':
|
||||
case 'validerModifier':
|
||||
case 'validerSupprimer':
|
||||
{
|
||||
$valeur = $_REQUEST['agent'];
|
||||
if ($_REQUEST['zOk'] == "OK")
|
||||
{
|
||||
if ($action === "validerSupprimer") {
|
||||
$pdo->supprimePompier($valeur);
|
||||
if (!isset($_REQUEST['zSemaine'])) {
|
||||
$_REQUEST['zSemaine'] = date('W');
|
||||
}
|
||||
else {
|
||||
$nom = addslashes ($_REQUEST['ztNom']);
|
||||
$prenom = addslashes ($_REQUEST['ztPrenom']);
|
||||
$type = $_REQUEST['lstType'];
|
||||
$grade = $_REQUEST['lstGrade'];
|
||||
$statut = $_REQUEST['lstStatut'];
|
||||
$cis = $_REQUEST['zCis'];
|
||||
$mail = $_REQUEST['ztMail'];
|
||||
$login = $_REQUEST['ztLogin'];
|
||||
$mdp = md5($_REQUEST['ztMdp']); if($_REQUEST['brMdp']==0 AND $action==="validerModifier") {$mdp="*";}
|
||||
$adresse = addslashes ($_REQUEST['ztAdresse']);
|
||||
|
||||
if (strlen($_REQUEST['ztCP']) > 1) {
|
||||
$cp = $_REQUEST['ztCP'];
|
||||
} else {
|
||||
$cp = "Null";
|
||||
}
|
||||
$ville = addslashes($_REQUEST['ztVille']);
|
||||
$semaine = $_REQUEST['zSemaine'];
|
||||
|
||||
if (strlen($_REQUEST['ztTel'])>1) {
|
||||
$tel = str_replace(" ", "", $_REQUEST['ztTel']);
|
||||
$tel=str_replace(".", "", $tel);
|
||||
$tel=str_replace("/", "", $tel);
|
||||
} else {
|
||||
$tel="Null";
|
||||
}
|
||||
$commentaire = addslashes ($_REQUEST['ztObs']);
|
||||
if (!isset($_REQUEST['zAnnee'])) {
|
||||
$_REQUEST['zAnnee'] = date('Y');
|
||||
}
|
||||
$annee = $_REQUEST['zAnnee'];
|
||||
$lesDispos = $pdo->getDisposHebdo($choix, $semaine, $annee);
|
||||
//echo "annee:".$annee."pompier: ".$choix."semaine : ".$semaine;
|
||||
$premierJour = strtotime("+$semaine weeks", mktime(0, 0, 0, 1, 1, $annee));
|
||||
|
||||
if ($action === "validerAjouter") {
|
||||
$pdo->ajoutPompier($cis, $valeur,$nom,$prenom,$statut,$mail,$login,$mdp,$grade,$type,$adresse,$cp,$ville,$tel,$commentaire);
|
||||
$sujet = "nouveau compte";
|
||||
$msg = "Bonjour " . $prenom . " " . $nom . ", \r\nLe Castel vient de créer un compte pour vous ...\r\n";
|
||||
} else {
|
||||
$pdo->majPompier($cis, $valeur,$nom,$prenom,$statut,$mail,$login,$mdp,$grade,$type,$adresse,$cp,$ville,$tel,$commentaire);
|
||||
$sujet = "nouveau mot de passe";
|
||||
$msg = "Bonjour " . $prenom . " " . $nom . ", \r\nLe Castel vient de modifier votre mot de passe ...\r\n";
|
||||
}
|
||||
$entete = "From: Pascal Blain <pascal-blain@wanadoo.fr>\r\n";
|
||||
$entete .= "Mime-Version: 1.0\r\n";
|
||||
$entete .= "Content-type: text/html; charset=utf-8\r\n";
|
||||
$entete .= "\r\n";
|
||||
$msg .= "Statut : " . $statut."\r\n";
|
||||
$msg .= "Identifiant : " . $login."\r\n";
|
||||
$msg .= "Mot de passe : " . $_REQUEST['ztMdp'] . "\r\n";
|
||||
//$pdo->envoyerMail($mail, $sujet, $msg, $entete);
|
||||
}
|
||||
if (date('w', $premierJour) != 1) {
|
||||
$premierJour = strtotime("last monday", $premierJour);
|
||||
}
|
||||
$lesTypesDispos = $pdo->getParametre("dispo");
|
||||
include("vues/v_fichePompier.php");
|
||||
|
||||
break;
|
||||
}
|
||||
header ('location: index.php?choixTraitement=pompiers&action=voir&lstPompiers=' . $valeur);
|
||||
//----------------------------------------- FORMULAIRE DE SAISIE
|
||||
case 'ajouter':
|
||||
case 'modifier':
|
||||
case 'supprimer': {
|
||||
$formulaire = "frmA";
|
||||
$champ = "ztNom";
|
||||
include("vues/v_entete.php");
|
||||
$choix = $_REQUEST['lstPompiers'];
|
||||
$lesInfosPompier = $pdo->getInfosPompier("*", $choix);
|
||||
$lesTypes = $pdo->getParametre("typePer");
|
||||
$lesGrades = $pdo->getParametre("grade");
|
||||
$lesStatuts = $pdo->getParametre("statAgt");
|
||||
include("vues/v_unPompier.php");
|
||||
break;
|
||||
}
|
||||
//----------------------------------------- VALIDATION
|
||||
case 'validerSupprimer':
|
||||
$valeur = $_REQUEST['pId'];
|
||||
$pdo->supprimePompier($valeur);
|
||||
break;
|
||||
}
|
||||
case 'validerAjouter':
|
||||
case 'validerModifier': {
|
||||
|
||||
//-----------------------------------------
|
||||
case 'majActivite':
|
||||
{
|
||||
$pdo->majActivite($_REQUEST["ztLaDate"], $_REQUEST["ztLaTranche"], $_REQUEST["ztExDispo"],$_REQUEST["brDispo"] );
|
||||
header ('location: index.php?choixTraitement=pompiers&action=voir&zSemaine='.$_REQUEST["zSemaine"].'&zAnnee='.$_REQUEST["zAnnee"]);
|
||||
break;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
default :
|
||||
{
|
||||
echo 'erreur d\'aiguillage !'.$action;
|
||||
break;
|
||||
}
|
||||
if (!isset($pdo)) {
|
||||
require_once ("../include/class.pdo.php");
|
||||
$pdo = PdoBD::getPdoBD();
|
||||
}
|
||||
|
||||
$pId = isset($_REQUEST['pId']) ? $_REQUEST['pId'] : $pdo->getLastId($_REQUEST['zCis']);
|
||||
$nom = addslashes($_REQUEST['ztNom']);
|
||||
$prenom = addslashes($_REQUEST['ztPrenom']);
|
||||
$type = $_REQUEST['lstType'];
|
||||
$grade = $_REQUEST['lstGrade'];
|
||||
$statut = $_REQUEST['lstStatut'];
|
||||
$cis = $_REQUEST['zCis'];
|
||||
$mail = $_REQUEST['ztMail'];
|
||||
// $login = strtolower($_REQUEST['ztPrenom'][0]) . strtoupper($_REQUEST['ztNom']);
|
||||
$login = $_REQUEST['ztLogin'];
|
||||
$mdp = md5($login);
|
||||
//$mdp = md5($_REQUEST['ztMdp']);
|
||||
// if ($_REQUEST['brMdp'] == 0 and $action === "validerModifier") {
|
||||
// $mdp = "*";
|
||||
// }
|
||||
$adresse = addslashes($_REQUEST['ztAdresse']);
|
||||
|
||||
if (strlen($_REQUEST['ztCodePostal']) > 1) {
|
||||
$cp = $_REQUEST['ztCodePostal'];
|
||||
} else {
|
||||
$cp = "Null";
|
||||
}
|
||||
$ville = addslashes($_REQUEST['ztVille']);
|
||||
|
||||
if (strlen($_REQUEST['ztTel']) > 0) {
|
||||
$tel = str_replace(" ", "", $_REQUEST['ztTel']);
|
||||
$tel = str_replace(".", "", $tel);
|
||||
$tel = str_replace("/", "", $tel);
|
||||
} else {
|
||||
$tel = "Null";
|
||||
}
|
||||
$commentaire = addslashes($_REQUEST['ztObservation']);
|
||||
|
||||
if (
|
||||
$action === "validerAjouter"
|
||||
&& $pdo->verifDataAjoutPompier($nom, $prenom, $tel, $mail, $login) === true
|
||||
) {
|
||||
//$pdo->ajoutPompier($cis, $pId, $nom, $prenom, $statut, $mail, $login, $mdp, $grade, $type, $adresse, $cp, $ville, $tel, $commentaire);
|
||||
echo(json_encode(array("success"=> "Ajout effectuée")));
|
||||
|
||||
} elseif ($action === "validerModifier") {
|
||||
$pdo->majPompier($cis, $pId, $nom, $prenom, $statut, $mail, $login, $mdp, $grade, $type, $adresse, $cp, $ville, $tel, $commentaire);
|
||||
echo(json_encode(array("success"=> "Modification effectuée")));
|
||||
|
||||
} else {
|
||||
echo(json_encode(array("error"=> "Merci de remplir tous les champs")));
|
||||
}
|
||||
//header('location: index.php?choixTraitement=pompiers&action=voir&lstPompiers=' . $valeur);
|
||||
break;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
case 'majActivite': {
|
||||
$pdo->majActivite($_REQUEST["ztLaDate"], $_REQUEST["ztLaTranche"], $_REQUEST["ztExDispo"], $_REQUEST["brDispo"]);
|
||||
header('location: index.php?choixTraitement=pompiers&action=voir&zSemaine=' . $_REQUEST["zSemaine"] . '&zAnnee=' . $_REQUEST["zAnnee"]);
|
||||
break;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
default: {
|
||||
echo 'erreur d\'aiguillage !' . $action;
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
@ -63,7 +63,7 @@ class PdoBD
|
||||
{
|
||||
$req = "SELECT pCis, pId, pNom, pPrenom, pStatut
|
||||
FROM pompier
|
||||
WHERE pCis=" . $cis . "
|
||||
WHERE pCis = " . $cis . "
|
||||
ORDER BY pNom;";
|
||||
$rs = PdoBD::$monPdo->query($req);
|
||||
if ($rs === false) {
|
||||
@ -78,9 +78,31 @@ class PdoBD
|
||||
*/
|
||||
public function getInfosPompier($login, $mdp)
|
||||
{
|
||||
$req = "SELECT pCis, pId as id, pNom as nom, pPrenom as prenom, pStatut, pMail, pLogin, pMdp, pGrade, pAdresse, pCp, pVille, pBip, pCommentaire,
|
||||
'la caserne' as cNom, 'adresse' as cAdresse, 'telephone' as cTel, 'le groupement' as cGroupement, 'le grade' as wGrade, 'le statut' as wStatut, 'le type' as wType
|
||||
FROM pompier";
|
||||
/*
|
||||
$req = "SELECT pCis, pId as id, pNom as nom, pPrenom as prenom, pStatut, pMail, pLogin, pMdp, pGrade, pAdresse, pCp, pVille, pBip, pCommentaire,
|
||||
'la caserne' as cNom, 'adresse' as cAdresse, 'telephone' as cTel, 'le groupement' as cGroupement, 'le grade' as wGrade, 'le statut' as wStatut, 'le type' as wType
|
||||
FROM pompier";
|
||||
*/
|
||||
$req = "SELECT
|
||||
pCis,
|
||||
pId as id,
|
||||
pNom as nom,
|
||||
pPrenom as prenom,
|
||||
pStatut, pMail,
|
||||
pLogin, pMdp,
|
||||
pAdresse,
|
||||
pCp, pVille,
|
||||
pBip, pCommentaire,
|
||||
a.pLibelle AS wType,
|
||||
b.pLibelle AS wGrade,
|
||||
c.pLibelle AS wStatut,
|
||||
cNom, cAdresse,
|
||||
cTel, cGroupement
|
||||
FROM pompier
|
||||
INNER JOIN caserne ON pompier.pCis = caserne.cId
|
||||
INNER JOIN parametre AS a ON a.pType = 'typePer' AND pompier.pType = a.pIndice
|
||||
INNER JOIN parametre AS b ON b.pType = 'grade' AND pompier.pGrade = b.pIndice
|
||||
INNER JOIN parametre AS c ON c.pType = 'statAgt' AND pompier.pStatut = c.pIndice";
|
||||
if ($login === "*") {
|
||||
$req .= " WHERE pCis=" . $_SESSION['cis'] . " AND pId = $mdp";
|
||||
} else {
|
||||
@ -100,10 +122,9 @@ class PdoBD
|
||||
*/
|
||||
public function majActivite($cis, $idUser, $jour, $tranche, $newDispo)
|
||||
{
|
||||
$existedTranche = 'SELECT aDisponibilite FROM `activite`
|
||||
$existedTranche = 'SELECT aDisponibilite FROM activite
|
||||
WHERE aCis = ' . $cis . ' AND aDateGarde = "' . $jour . '" AND aTranche = ' . $tranche . ' AND aPompier = ' . $idUser . ';';
|
||||
$rs = PdoBD::$monPdo->query($existedTranche);
|
||||
var_dump($rs);
|
||||
|
||||
if ($rs === false) {
|
||||
afficherErreurSQL("Probleme lors de la mise à jour de l'activité dans la base de données.", $existedTranche, PdoBD::$monPdo->errorInfo());
|
||||
@ -124,7 +145,6 @@ class PdoBD
|
||||
AND aDateGarde = "' . $jour . '"
|
||||
AND aTranche = ' . $tranche . ';';
|
||||
}
|
||||
var_dump($req);
|
||||
$rs = PdoBD::$monPdo->exec($req);
|
||||
|
||||
if ($rs === false) {
|
||||
@ -152,13 +172,26 @@ class PdoBD
|
||||
/**
|
||||
* Met à jour une ligne de la table pompier
|
||||
*/
|
||||
public function majPompier($cis, $valeur, $nom, $prenom, $statut, $mail, $login, $mdp, $grade, $type, $adresse, $cp, $ville, $tel, $commentaire)
|
||||
public function majPompier($cis, $pId, $nom, $prenom, $statut, $mail, $login, $mdp, $grade, $type, $adresse, $cp, $ville, $tel, $commentaire)
|
||||
{
|
||||
$grade = 7;
|
||||
$type = 2;
|
||||
$statut = 2;
|
||||
date_default_timezone_set('Europe/Paris');
|
||||
$dateUpdate = date('y-m-d h:i:s');
|
||||
|
||||
|
||||
$req = "
|
||||
|
||||
|
||||
|
||||
|
||||
UPDATE pompier
|
||||
SET pCis ='$cis', pId ='$pId',
|
||||
pNom ='$nom', pPrenom ='$prenom',
|
||||
pStatut ='$statut', pType ='$type',
|
||||
pMail ='$mail', pLogin ='$login',
|
||||
pMdp ='$mdp', pAdresse ='$adresse',
|
||||
pCp ='$cp', pVille ='$ville',
|
||||
pBip ='$tel', pGrade ='$grade',
|
||||
pCommentaire ='$commentaire', pDateModif ='$dateUpdate'
|
||||
WHERE pCis='$cis' AND pId = '$pId'
|
||||
;";
|
||||
$rs = PdoBD::$monPdo->exec($req);
|
||||
if ($rs === false) {
|
||||
@ -183,12 +216,19 @@ class PdoBD
|
||||
/**
|
||||
* ajoute une ligne dans la table pompier
|
||||
*/
|
||||
public function ajoutPompier($cis, $valeur, $nom, $prenom, $statut, $mail, $login, $mdp, $grade, $type, $adresse, $cp, $ville, $tel, $commentaire)
|
||||
public function ajoutPompier($cis, $id, $nom, $prenom, $statut, $mail, $login, $mdp, $grade, $type, $adresse, $cp, $ville, $tel, $commentaire)
|
||||
{
|
||||
$req = "INSERT INTO pompier
|
||||
(pCis,pId,pNom,pPrenom,pStatut,pMail,pLogin,pMdp,pGrade,pType, pAdresse,pCp,pVille,pBip,pCommentaire,pDateEnreg,pDateModif)
|
||||
(pCis,pId,pNom,pPrenom,pStatut,pMail,pLogin,pMdp,pGrade,pType, pAdresse,pCp,pVille,pBip,pCommentaire, pNbGardes, pDateEnreg, pDateModif)
|
||||
VALUES
|
||||
(
|
||||
(" . $cis . ", " . $id . ",
|
||||
'" . $nom . "', '" . $prenom . "',
|
||||
" . $statut . ", '" . $mail . "',
|
||||
'" . $login . "', '" . $mdp . "',
|
||||
" . $grade . ", " . $type . ",
|
||||
'" . $adresse . "', " . $cp . ",
|
||||
'" . $ville . "', '" . $tel . "',
|
||||
'" . $commentaire . "',0 ,CURRENT_DATE, CURRENT_DATE
|
||||
);";
|
||||
$rs = PdoBD::$monPdo->exec($req);
|
||||
if ($rs === false) {
|
||||
@ -233,8 +273,8 @@ class PdoBD
|
||||
|
||||
$req = "SELECT pId, pNom, pPrenom, DATE_FORMAT(aDateGarde,'%d/%m/%Y') as wDate, aTranche, aDisponibilite, aGarde, d.pValeur as dCouleur
|
||||
FROM (activite
|
||||
INNER JOIN parametre t ON t.pType='tranche'AND aTranche=t.pIndice
|
||||
INNER JOIN parametre d ON d.pType='dispo' AND aDisponibilite=d.pIndice
|
||||
INNER JOIN parametre t ON t.pType='tranche'AND aTranche = t.pIndice
|
||||
INNER JOIN parametre d ON d.pType='dispo' AND aDisponibilite = d.pIndice
|
||||
)
|
||||
RIGHT OUTER JOIN pompier ON aCis = pCis AND aPompier=pId
|
||||
WHERE aCis=" . $_SESSION['cis'];
|
||||
@ -318,8 +358,8 @@ class PdoBD
|
||||
$lesDispos[$pompier][$laDate][$couleur] = $uneLigne['dCouleur'];
|
||||
}
|
||||
/* echo "<PRE>";
|
||||
print_r($lesDispos);
|
||||
echo "</PRE>";*/
|
||||
print_r($lesDispos);
|
||||
echo "</PRE>";*/
|
||||
return $lesDispos;
|
||||
}
|
||||
|
||||
@ -503,6 +543,240 @@ class PdoBD
|
||||
return $lesLignes;
|
||||
}
|
||||
|
||||
public function getLastId($pCis): int
|
||||
{
|
||||
$req = "SELECT MAX(pId) + 1 as id FROM pompier WHERE pCis =" . $pCis . ";";
|
||||
$rs = PdoBD::$monPdo->query($req);
|
||||
if ($rs === false) {
|
||||
afficherErreurSQL("Erreur de lma requete pour l'id ajouter", $req, PdoBD::$monPdo->errorInfo());
|
||||
}
|
||||
$id = $rs->fetch();
|
||||
return $id["id"];
|
||||
}
|
||||
|
||||
public function verifDataAjoutPompier(
|
||||
string $nom,
|
||||
string $prenom,
|
||||
string $tel,
|
||||
string $mail,
|
||||
string $login
|
||||
): bool {
|
||||
|
||||
if (empty($nom) || empty($prenom) || empty($tel) || empty($mail) || empty($login)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* PARTIE INTERVENTION
|
||||
*/
|
||||
public function motifIntervention()
|
||||
{
|
||||
$req = "SELECT pIndice, pLibelle
|
||||
FROM `parametre`
|
||||
WHERE pType = 'cateInt'
|
||||
ORDER BY pLibelle;";
|
||||
$cat = PdoBD::$monPdo->query($req);
|
||||
$cat = $cat->fetchAll();
|
||||
|
||||
//Valeur : nbUtilisation
|
||||
//Plancher : Time
|
||||
//Plafond: nbPompier estimé
|
||||
$reqType = "SELECT pIndice, pLibelle, pValeur, pPlancher, pPlafond
|
||||
FROM parametre
|
||||
WHERE pType = 'typeInt'
|
||||
ORDER BY pLibelle;";
|
||||
$type = PdoBD::$monPdo->query($reqType);
|
||||
$type = $type->fetchAll();
|
||||
|
||||
$response = [];
|
||||
|
||||
foreach ($cat as $uneCat) {
|
||||
$table = [];
|
||||
foreach ($type as $row) {
|
||||
if (substr($row['pIndice'], -3, 1) === $uneCat['pIndice']) {
|
||||
array_push($table, $row);
|
||||
}
|
||||
}
|
||||
$response[$uneCat['pLibelle']] = $table;
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function getPompiersDispo(string $date, int $tranche, int $caserne)
|
||||
{
|
||||
$req = "SELECT pompier.pId, pompier.pNom, pompier.pPrenom, g.pLibelle AS statut, 0 AS enIntervention, p.pLibelle, p.pValeur
|
||||
FROM `pompier`
|
||||
INNER JOIN activite ON pompier.pId = activite.aPompier
|
||||
AND activite.aCis = pompier.pCis
|
||||
INNER JOIN parametre p ON p.pType = 'dispo' AND p.pIndice = activite.aDisponibilite
|
||||
INNER JOIN parametre g ON g.pType = 'grade' AND g.pIndice = pompier.pGrade
|
||||
WHERE activite.aGarde = 1
|
||||
AND pCis = :caserne
|
||||
AND activite.aDateGarde = :date
|
||||
AND activite.aTranche = :tranche
|
||||
AND pompier.pId NOT IN(SELECT ePompier
|
||||
FROM equipe
|
||||
INNER JOIN intervention on intervention.iId = equipe.eIntervention AND intervention.iCis = equipe.eCis
|
||||
WHERE intervention.iHeureFin is null
|
||||
AND intervention.iDate = :date
|
||||
AND intervention.iTranche = :tranche
|
||||
AND intervention.iCis = :caserne
|
||||
)
|
||||
|
||||
UNION
|
||||
|
||||
SELECT pompier.pId, pompier.pNom, pompier.pPrenom, g.pLibelle AS statut, 1 AS enIntervention, p.pLibelle, 'grey'
|
||||
FROM equipe
|
||||
INNER JOIN pompier on equipe.ePompier = pompier.pId
|
||||
AND equipe.eCis = pompier.pCis
|
||||
INNER JOIN intervention on intervention.iId = equipe.eIntervention
|
||||
AND intervention.iCis = equipe.eCis
|
||||
INNER JOIN activite on pompier.pId = activite.aPompier
|
||||
AND activite.aCis = pompier.pCis
|
||||
AND activite.aDateGarde = intervention.iDate
|
||||
AND activite.aTranche = intervention.iTranche
|
||||
INNER JOIN parametre p ON p.pType = 'dispo' AND p.pIndice = activite.aDisponibilite
|
||||
INNER JOIN parametre g ON g.pType = 'grade' AND g.pIndice = pompier.pGrade
|
||||
WHERE intervention.iHeureFin is null
|
||||
AND intervention.iTranche = :tranche
|
||||
AND intervention.iDate = :date
|
||||
AND equipe.eCis = :caserne;";
|
||||
|
||||
$result = PdoBD::$monPdo->prepare($req);
|
||||
$result->bindParam(':date', $date); // 2023-09-23
|
||||
$result->bindParam(':tranche', $tranche); //2
|
||||
$result->bindParam(':caserne', $caserne); //2924
|
||||
|
||||
$result->execute();
|
||||
return $result->fetchAll();
|
||||
}
|
||||
|
||||
public function getCurrentTranche()
|
||||
{
|
||||
$req = "SELECT pIndice
|
||||
FROM parametre
|
||||
WHERE pType = 'tranche' AND :heure >= pPlancher AND :heure < pPlafond;";
|
||||
|
||||
$result = PdoBD::$monPdo->prepare($req);
|
||||
$hour = date("H");
|
||||
$result->bindParam(':heure', $hour);
|
||||
$result->execute();
|
||||
$result = $result->fetch();
|
||||
|
||||
return $result['pIndice'];
|
||||
}
|
||||
|
||||
public function getLastIdIntervention(int $cis)
|
||||
{
|
||||
$req = "SELECT iId
|
||||
FROM `intervention`
|
||||
WHERE iCis = :cis;";
|
||||
|
||||
$result = PdoBD::$monPdo->prepare($req);
|
||||
$result->bindParam(':cis', $cis);
|
||||
$result->execute();
|
||||
$result = $result->fetch();
|
||||
$id = isset($result['iId']) ? $result['iId'] : 0;
|
||||
return $id;
|
||||
}
|
||||
/**
|
||||
* Crée une nouvelle intervention
|
||||
*/
|
||||
public function newIntervention(
|
||||
int $motif,
|
||||
int $caserne,
|
||||
string $adresse,
|
||||
string $description,
|
||||
array $pompier
|
||||
) {
|
||||
/**
|
||||
* Nouvelle intervention
|
||||
*/
|
||||
$req = " INSERT INTO intervention
|
||||
VALUES(:caserne, :id, :adresse, :description,
|
||||
NOW(), :tranche, NOW(), NULL, :motif, :nbPompier);";
|
||||
|
||||
$result = PdoBD::$monPdo->prepare($req);
|
||||
$result->bindParam(':caserne', $caserne);
|
||||
$result->bindParam(':adresse', $adresse);
|
||||
$result->bindParam(':description', $description);
|
||||
$result->bindParam(':motif', $motif);
|
||||
|
||||
$nbPompier = count($pompier);
|
||||
$result->bindParam(':nbPompier', $nbPompier);
|
||||
|
||||
$tranche = $this->getCurrentTranche();
|
||||
$result->bindParam(':tranche', $tranche);
|
||||
|
||||
$idIntervention = $this->getLastIdIntervention($caserne) + 1;
|
||||
$result->bindParam(':id', $idIntervention);
|
||||
|
||||
$result->execute();
|
||||
|
||||
/**
|
||||
* Nouvelle équipe
|
||||
*/
|
||||
foreach ($pompier as $value) {
|
||||
var_dump($value);
|
||||
foreach ($value as $key => $value) {
|
||||
$req2 = "INSERT INTO equipe
|
||||
VALUES (:caserne, :pompier, :intervention)";
|
||||
$result2 = PdoBD::$monPdo->prepare($req2);
|
||||
$result2->bindParam('caserne', $caserne);
|
||||
$result2->bindParam('intervention', $idIntervention);
|
||||
|
||||
if ($value == 0) {
|
||||
$result2->bindParam('pompier', $key);
|
||||
|
||||
$result2->execute();
|
||||
} else {
|
||||
$currentIntervention = "SELECT iId
|
||||
FROM intervention
|
||||
LEFT OUTER JOIN equipe on intervention.iId = equipe.eIntervention AND intervention.iCis = equipe.eCis
|
||||
WHERE iHeureFin IS NULL AND equipe.ePompier = :pompier AND equipe.eCis = :caserne;";
|
||||
$curentId = PdoBD::$monPdo->prepare($currentIntervention);
|
||||
$curentId->bindParam('pompier', $key);
|
||||
$curentId->bindParam('caserne', $caserne);
|
||||
$curentId->execute();
|
||||
$curentId = $curentId->fetch();
|
||||
|
||||
|
||||
$reqSuprInter = "DELETE FROM equipe
|
||||
WHERE eCis = :caserne AND ePompier = :pompier AND eIntervention = :intervention";
|
||||
$suprInter = PdoBD::$monPdo->prepare($reqSuprInter);
|
||||
$suprInter->bindParam('caserne', $caserne);
|
||||
$suprInter->bindParam('pompier', $key);
|
||||
$suprInter->bindParam('intervention', $currentId['iId']);
|
||||
$suprInter->execute();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
SELECT pompier.*, 0 AS enIntervention, activite.aDisponibilite
|
||||
FROM `pompier`
|
||||
INNER JOIN activite ON pompier.pId = activite.aPompier AND activite.aCis = pompier.pCis
|
||||
WHERE pCis = 2924 AND activite.aDateGarde = '2023-09-23' AND activite.aTranche = 2 AND activite.aGarde = 1
|
||||
AND pompier.pId NOT IN(SELECT ePompier
|
||||
FROM equipe
|
||||
INNER JOIN intervention on intervention.iId = equipe.eIntervention AND intervention.iCis = equipe.eCis
|
||||
WHERE intervention.iDate = '2023-09-23' AND intervention.iTranche = 2 AND intervention.iHeureFin is null)
|
||||
|
||||
UNION
|
||||
|
||||
SELECT pompier.*, 1 AS enIntervention, activite.aDisponibilite
|
||||
FROM equipe
|
||||
INNER JOIN pompier on equipe.ePompier = pompier.pId AND equipe.eCis = pompier.pCis
|
||||
INNER JOIN activite on pompier.pId = activite.aPompier AND activite.aCis = pompier.pCis
|
||||
INNER JOIN intervention on intervention.iId = equipe.eIntervention AND intervention.iCis = equipe.eCis
|
||||
WHERE intervention.iDate = '2023-09-23' AND intervention.iTranche = 2 AND intervention.iHeureFin is null;
|
||||
*/
|
||||
?>
|
@ -125,7 +125,9 @@ function estTableauEntiers($tabEntiers)
|
||||
$ok = true;
|
||||
foreach($tabEntiers as $unEntier)
|
||||
{
|
||||
if(!estEntierPositif($unEntier)){$ok=false;}
|
||||
if(!estEntierPositif($unEntier)){
|
||||
$ok=false;
|
||||
}
|
||||
}
|
||||
return $ok;
|
||||
}
|
||||
|
113
include/gestionInterventions.js
Normal file
113
include/gestionInterventions.js
Normal file
@ -0,0 +1,113 @@
|
||||
formulaire = $('.formulaire')
|
||||
date = Date.now()
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#motifInter').change(function (e) {
|
||||
let nbPompier = $(this).find(":selected").attr('data-effectif');
|
||||
$('#nbPompierCons').html("Nombre de pompiers conseillé: " + nbPompier);
|
||||
});
|
||||
|
||||
|
||||
$('#caserneInter').change(function () {
|
||||
caserne = $(this).val();
|
||||
//cis
|
||||
$.ajax({
|
||||
url: "./../controleurs/c_interventions.php?action=listePompier&cis=" + caserne,
|
||||
method: "POST", // Méthode HTTP (GET, POST, etc.)
|
||||
dataType: "json", // Type de données attendu
|
||||
error: function (status, error) {
|
||||
// Gérer les erreurs de la requête AJAX
|
||||
console.error("Erreur lors de la requête AJAX :", status, error);
|
||||
},
|
||||
success: function (result) {
|
||||
$('#pompierDispo').html(' ');
|
||||
result.forEach(element => {
|
||||
var ligne = '<div id='
|
||||
+ element['pId']
|
||||
+ ' class="' + element['pLibelle']
|
||||
+ '" data-intervention="' + element['enIntervention']
|
||||
+ '" style = "background-color: ' + element['pValeur'] + ';" draggable = "true" ondragstart = "dragstartHandler(event)" >'
|
||||
+ element['pPrenom'] + ' ' + element['pNom']
|
||||
+ ' (' + element['statut'] + ')'
|
||||
+ '</div> ';
|
||||
|
||||
$('#pompierDispo').append(ligne)
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function dragstartHandler(ev) {
|
||||
// Add the target element's id to the data transfer object
|
||||
ev.dataTransfer.setData("application/my-app", ev.target.id);
|
||||
ev.dataTransfer.effectAllowed = "move";
|
||||
}
|
||||
function dragoverHandler(ev) {
|
||||
ev.preventDefault();
|
||||
ev.dataTransfer.dropEffect = "move";
|
||||
}
|
||||
function dropHandler(ev) {
|
||||
ev.preventDefault();
|
||||
// Get the id of the target and add the moved element to the target's DOM
|
||||
const data = ev.dataTransfer.getData("application/my-app");
|
||||
if (ev.target.id === "target" || ev.target.parentNode.id === "target") {
|
||||
trgt = document.getElementById('target');
|
||||
} else if (ev.target.id === "pompierDispo" || ev.target.parentNode.id === "pompierDispo") {
|
||||
trgt = document.getElementById('pompierDispo');
|
||||
}
|
||||
trgt.appendChild(document.getElementById(data));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* PREPARATION DE L'ENVOIE DU FORMULAIRE
|
||||
*/
|
||||
$(document).on('submit', '#formulaireInter', function(e){
|
||||
e.preventDefault();
|
||||
})
|
||||
|
||||
$(document).on('click', '#sendInter', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
//var data = $('#formulaireInter').serialize();
|
||||
var data = {
|
||||
motif: $('#formulaireInter select[name=motif]').val(),
|
||||
adresse: $('#formulaireInter input[name=adresse]').val(),
|
||||
caserne: $('#formulaireInter select[name=caserne]').val(),
|
||||
commentaire: $('#formulaireInter textarea[name=commentaire]').val()
|
||||
};
|
||||
|
||||
let listePompier = [];
|
||||
$('.pompierIntervenant div').each(function(index){
|
||||
num = $(this).attr('id');
|
||||
dispo = $(this).attr('data-intervention');
|
||||
|
||||
var obj = {};
|
||||
obj[num] = dispo
|
||||
listePompier.push(obj)
|
||||
})
|
||||
|
||||
var sendingData = {
|
||||
"dataForm" : data,
|
||||
"listePompier" : listePompier
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: "./../controleurs/c_interventions.php?action=nouvelleInter",
|
||||
method: "POST", // Méthode HTTP (GET, POST, etc.)
|
||||
data: sendingData,
|
||||
dataType: "json", // Type de données attendu
|
||||
error: function (status, error) {
|
||||
// Gérer les erreurs de la requête AJAX
|
||||
console.error("Erreur lors de la requête AJAX :", status, error);
|
||||
},
|
||||
success: function (result) {
|
||||
//COMPLETE
|
||||
}
|
||||
});
|
||||
|
||||
})
|
@ -195,7 +195,7 @@ function format_euro(valeur) {
|
||||
// ========================= affiche l'onglet choisi
|
||||
function Affiche(ongletChoisi, nb)
|
||||
{
|
||||
for(i=1;i<nb+1;i++)
|
||||
for(i = 1; i < nb+1; i++)
|
||||
{
|
||||
document.getElementById('onglet'+i).className = 'inactif onglet';
|
||||
document.getElementById('contenuOnglet'+i).style.display = 'none';
|
||||
@ -203,9 +203,9 @@ function format_euro(valeur) {
|
||||
document.getElementById('onglet'+ongletChoisi).className = 'actif onglet';
|
||||
document.getElementById('contenuOnglet'+ongletChoisi).style.display = 'block';
|
||||
|
||||
document.getElementById('zOnglet').value=ongletChoisi;
|
||||
document.getElementById('zOnglet').value = ongletChoisi;
|
||||
document.getElementById('zNbOnglets').value=nb;
|
||||
ongletActif=ongletChoisi;
|
||||
ongletActif = ongletChoisi;
|
||||
}
|
||||
// ========================= transfert des données d'une liste à une autre
|
||||
function deplacer_elements(frm, origine, destination) {
|
||||
@ -350,4 +350,89 @@ $(document).on('click', '.click-garde', function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
* Modifier
|
||||
*/
|
||||
$(document).on('click', '.btn-modif', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
if ($(this).attr('id') == 'zModifChef'){ //si le bouton modifier est celui du chef ou nom
|
||||
element = $('.infoPompier-chef')
|
||||
} else {
|
||||
element = $('.infoPompier')
|
||||
}
|
||||
|
||||
if (element.attr('disabled') == 'disabled') {
|
||||
element.attr('disabled', false);
|
||||
$('.btn-valid-modif').css('display', 'block');
|
||||
} else {
|
||||
element.attr('disabled', true);
|
||||
$('.btn-valid-modif').css('display', 'none');
|
||||
}
|
||||
})
|
||||
$(document).on('click', '.btn-valid-modif', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('.infoPompier-chef').attr('disabled', false);
|
||||
data = $('.dataPompier').serialize()
|
||||
$('.infoPompier-chef').attr('disabled', true);
|
||||
$('.infoPompier').attr('disabled', true);
|
||||
$('.btn-valid-modif').css('display', 'none');
|
||||
|
||||
$.ajax({
|
||||
url: "/controleurs/c_pompiers.php?action=validerModifier", // URL de l'API ou de la ressource
|
||||
method: "POST", // Méthode HTTP (GET, POST, etc.)
|
||||
dataType: "json", // Type de données attendu
|
||||
data : data,
|
||||
error: function(xhr, status, error) {
|
||||
// Gérer les erreurs de la requête AJAX
|
||||
console.error("Erreur lors de la requête AJAX :", status, error);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* Ajout d'un pompier
|
||||
*/
|
||||
$(document).on('submit', '.dataPompierAjout', function (e) {
|
||||
e.preventDefault();
|
||||
$('#inputDisabled').attr('disabled', false);
|
||||
|
||||
data = $('.dataPompierAjout').serialize()
|
||||
$('#inputDisabled').attr('disabled', true);
|
||||
|
||||
$.ajax({
|
||||
url: "/controleurs/c_pompiers.php?action=validerAjouter",
|
||||
method: "POST", // Méthode HTTP (GET, POST, etc.)
|
||||
dataType: "json", // Type de données attendu
|
||||
data : data,
|
||||
error: function(xhr, status, error) {
|
||||
// Gérer les erreurs de la requête AJAX
|
||||
console.error("Erreur lors de la requête AJAX :", status, error);
|
||||
},
|
||||
success: function(result) {
|
||||
$('.dataPompierAjout').trigger("reset"); ;
|
||||
$('.notif-ajout').html(result['success'])
|
||||
}
|
||||
});
|
||||
});
|
||||
$(document).on('click', '.btAnnulerAjout', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
window.location.href = "http://sdis29-1/index.php?choixTraitement=pompiers&action=voir&type=a";
|
||||
})
|
||||
$(document).ready(function(){
|
||||
$('#newName, #newUsername').change(function() {
|
||||
newUserName = $('#newUsername').val()[0].toLowerCase();
|
||||
if (newUserName == undefined) {
|
||||
newUserName = '';
|
||||
}
|
||||
newName = $('#newName').val().toUpperCase();
|
||||
|
||||
$('#newLogin').val(newUserName+newName)
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -17,7 +17,9 @@ $pdo = PdoBD::getPdoBD();
|
||||
$estConnecte = estConnecte();
|
||||
|
||||
// on vérifie que le pompier est authentifié
|
||||
if(!isset($_REQUEST['choixTraitement']) || !$estConnecte){$_REQUEST['choixTraitement'] = 'connexion';}
|
||||
if(!isset($_REQUEST['choixTraitement']) || !$estConnecte){
|
||||
$_REQUEST['choixTraitement'] = 'connexion';
|
||||
}
|
||||
|
||||
// on analyse le cas d'utilisation en cours ...
|
||||
$choixTraitement= $_REQUEST['choixTraitement'];
|
||||
@ -33,7 +35,5 @@ switch($choixTraitement)
|
||||
break;
|
||||
}
|
||||
}
|
||||
include("vues/v_pied.php") ;
|
||||
|
||||
var_dump($_SESSION);
|
||||
?>
|
||||
include("vues/v_pied.php") ;
|
||||
|
@ -3,38 +3,40 @@
|
||||
#navigation {
|
||||
position: relative;
|
||||
float: right;
|
||||
top : -2.75em;
|
||||
top: -2.75em;
|
||||
right: 2em;
|
||||
padding: 0em;
|
||||
color: rgb(0,85,227);
|
||||
}
|
||||
#sommaire {
|
||||
float: right;
|
||||
margin-top : 20px;
|
||||
margin-right: -20px;
|
||||
padding: 0em;
|
||||
color: rgb(0,85,227);
|
||||
}
|
||||
#sommaire ul {
|
||||
padding:0;
|
||||
margin:0;
|
||||
list-style-type:none;
|
||||
}
|
||||
#sommaire li
|
||||
{
|
||||
vertical-align: middle;
|
||||
margin-left:2px;
|
||||
float:left; /*pour IE*/
|
||||
color: rgb(0, 85, 227);
|
||||
}
|
||||
|
||||
#sommaire ul li a
|
||||
{
|
||||
vertical-align: middle;
|
||||
display:block;
|
||||
float:left;
|
||||
width:80px;
|
||||
text-decoration:none;
|
||||
text-align:center;
|
||||
#sommaire {
|
||||
float: right;
|
||||
margin-top: 20px;
|
||||
margin-right: -20px;
|
||||
padding: 0em;
|
||||
color: rgb(0, 85, 227);
|
||||
}
|
||||
|
||||
#sommaire ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#sommaire li {
|
||||
vertical-align: middle;
|
||||
margin-left: 2px;
|
||||
float: left;
|
||||
/*pour IE*/
|
||||
}
|
||||
|
||||
#sommaire ul li a {
|
||||
vertical-align: middle;
|
||||
display: block;
|
||||
float: left;
|
||||
width: 80px;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
/*background-color:#6495ED;
|
||||
color:black;
|
||||
//padding:5px;
|
||||
@ -42,371 +44,413 @@
|
||||
border-style:solid;
|
||||
border-color:#DCDCDC #696969 #696969 #DCDCDC; /*pour avoir un effet "outset" avec IE */
|
||||
}
|
||||
#sommaire ul li a:hover
|
||||
{
|
||||
color: purple; /*rgb(0,85,227);*/
|
||||
|
||||
#sommaire ul li a:hover {
|
||||
color: #881600;
|
||||
/*rgb(0,85,227);*/
|
||||
font-size: 16px;
|
||||
/*background-color:#D3D3D3;
|
||||
border-color: #696969 #DCDCDC #DCDCDC #696969; */
|
||||
}
|
||||
}
|
||||
|
||||
#sommaire ul li ul {
|
||||
display:none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#sommaire ul li:hover ul {
|
||||
display:block;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#sommaire li:hover ul li {
|
||||
float:none;
|
||||
}
|
||||
#sommaire li ul {
|
||||
position:absolute;
|
||||
}
|
||||
|
||||
#stats {
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
left: 0.5em;
|
||||
background-color: #ffff00;
|
||||
font-size:0.75em;
|
||||
float: none;
|
||||
}
|
||||
body{
|
||||
background-color: #77AADD;
|
||||
|
||||
#sommaire li ul {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#stats {
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
left: 0.5em;
|
||||
background-color: #ffff00;
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: white;
|
||||
/* //background-image: url(imgs/FONDGLOBAL.jpg); */
|
||||
background-repeat: repeat-x;
|
||||
margin:0% 0%;
|
||||
padding : 0.6em;
|
||||
font-family:"Trebuchet MS",Verdana,Geneva,Arial,Helvetica,sans-serif;
|
||||
font-size:0.8em;
|
||||
margin: 0% 0%;
|
||||
font-family: "Trebuchet MS", Verdana, Geneva, Arial, Helvetica, sans-serif;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
#page {
|
||||
background-color:white;
|
||||
width : 65%;
|
||||
margin : auto ;
|
||||
border : 0.2em solid black;
|
||||
padding : 0.1em;
|
||||
background-color: white;
|
||||
width: 95%;
|
||||
margin: auto;
|
||||
border: 1px solid black;
|
||||
}
|
||||
#entete{
|
||||
background-color:rgb(72,198,236);
|
||||
color : #980101;
|
||||
border: solid 0.1em #980101;
|
||||
|
||||
#entete {
|
||||
background-color: #8B93A7;
|
||||
color: #881600;
|
||||
border: solid 2px #881600;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
height: 100px;
|
||||
padding: 0em;
|
||||
border-collapse: separate;
|
||||
padding: 0 100px;
|
||||
}
|
||||
#pied{
|
||||
clear : both;
|
||||
border : solid 0.2em #980101;
|
||||
margin-left : 18%;
|
||||
margin-top : 1em;
|
||||
padding:0.4em;
|
||||
|
||||
#pied {
|
||||
clear: both;
|
||||
border: solid 0.2em #881600;
|
||||
margin-left: 18%;
|
||||
margin-top: 1em;
|
||||
padding: 0.4em;
|
||||
padding: 0.2em;
|
||||
border-collapse: separate;
|
||||
}
|
||||
#menu{
|
||||
|
||||
#menu {
|
||||
position: relative;
|
||||
float:right;
|
||||
float: right;
|
||||
right: 0px;
|
||||
margin-top : -240px;
|
||||
margin-top: -240px;
|
||||
margin-left: -10px;
|
||||
padding: 0em;
|
||||
background-color:transparent;
|
||||
color: rgb(0,85,227);
|
||||
background-color: transparent;
|
||||
color: rgb(0, 85, 227);
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
#contenu{
|
||||
#contenu {
|
||||
border: none;
|
||||
padding: 1.1em;
|
||||
background-color: white;
|
||||
border-left : groove 0.8em #980101;
|
||||
margin-top : 1.1em;
|
||||
margin-left: 82px; /*162px; /*18%; */
|
||||
/* permet de fixer une hauteur mini sur les navigateurs modernes */
|
||||
min-height:27em;
|
||||
/* pour obtenir le même effet sur IE, sachant que si le contenu dépasse, il "poussera" la hauteur en ne respectant pas la norme. On se joue de ses lacunes */
|
||||
height:27em;
|
||||
border-left: groove 0.8em #881600;
|
||||
margin-top: 1.1em;
|
||||
margin-left: 82px;
|
||||
/*162px; /*18%; */
|
||||
/* permet de fixer une hauteur mini sur les navigateurs modernes */
|
||||
min-height: 27em;
|
||||
/* pour obtenir le même effet sur IE, sachant que si le contenu dépasse, il "poussera" la hauteur en ne respectant pas la norme. On se joue de ses lacunes */
|
||||
height: 27em;
|
||||
}
|
||||
|
||||
a,
|
||||
a:visited,
|
||||
a:hover {
|
||||
color: #881600;
|
||||
}
|
||||
|
||||
|
||||
/* pour rétablir le mauvais effet sur les nav. modernes */
|
||||
html>body #contenu{
|
||||
height:auto;
|
||||
html>body #contenu {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* style à appliquer à la balise ul d'identifiant menulist */
|
||||
ul#menuList{
|
||||
list-style:none;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
width:98%;
|
||||
font-size: 1em;
|
||||
ul#menuList {
|
||||
list-style: none;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
width: 98%;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/* style à appliquer aux éléments de la balise ul d'identifiant menulist */
|
||||
ul#menuList li {
|
||||
position:relative;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
position: relative;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
/* apparences des liens dans listes et sous-listes non numérotées */
|
||||
ul#menuList a {
|
||||
color:rgb(0,85,227);
|
||||
display:block;
|
||||
text-decoration:none;
|
||||
width:100%;
|
||||
color: rgb(0, 85, 227);
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
ul#menuList a:hover {
|
||||
background: rgb(0,85,227);
|
||||
color: white;
|
||||
background: rgb(0, 85, 227);
|
||||
color: white;
|
||||
}
|
||||
|
||||
#entete #logo {
|
||||
float : left;
|
||||
width : 74px;
|
||||
height : 100px;
|
||||
float: left;
|
||||
width: 74px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
#entete h1 {
|
||||
margin-top : 50px;
|
||||
margin-right: 20px;
|
||||
font-size : x-large;
|
||||
text-align: right;
|
||||
margin-top: 50px;
|
||||
margin-right: 20px;
|
||||
font-size: x-large;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#contenu pre {
|
||||
width:95%;
|
||||
overflow : scroll;
|
||||
width: 95%;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
#contenu h2 {
|
||||
font-size : large;
|
||||
text-align:left;
|
||||
margin:0;
|
||||
margin-bottom:0.5em;
|
||||
font-size: large;
|
||||
text-align: left;
|
||||
margin: 0;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.logoValidW3c {
|
||||
display: inline;
|
||||
display: inline;
|
||||
}
|
||||
#libValidW3c{
|
||||
display : inline;
|
||||
vertical-align:middle;
|
||||
|
||||
#libValidW3c {
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Style des formulaires */
|
||||
.corpsForm {
|
||||
border : solid 0.1em #000;
|
||||
border-bottom-width:1px;
|
||||
margin-bottom : 0em;
|
||||
width : 95%;
|
||||
}
|
||||
.piedForm {
|
||||
border-bottom-width : 0.1em;
|
||||
border-left-width : 0.1em;
|
||||
border-right-width : 0.1em;
|
||||
border-top-width : 0em;
|
||||
border-style : solid;
|
||||
border-color : #000;
|
||||
text-align:right ;
|
||||
width : 95%;
|
||||
margin-top:0em;
|
||||
}
|
||||
form {
|
||||
margin-bottom:1em;
|
||||
}
|
||||
.corpsForm legend {
|
||||
font-weight:bold;
|
||||
font-size:1.2em;
|
||||
}
|
||||
.corpsForm label{
|
||||
float: left;
|
||||
text-align:right;
|
||||
width:33%;
|
||||
margin: 0;
|
||||
padding: 0 .5em 0 0;
|
||||
line-height: 1.8;
|
||||
}
|
||||
input, button, textarea, select{
|
||||
font-family:"Trebuchet MS", sans-serif;
|
||||
font-size : 1em;
|
||||
border: solid 0.1em #000;
|
||||
border-bottom-width: 1px;
|
||||
margin-bottom: 0em;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
input:focus{
|
||||
.piedForm {
|
||||
border-bottom-width: 0.1em;
|
||||
border-left-width: 0.1em;
|
||||
border-right-width: 0.1em;
|
||||
border-top-width: 0em;
|
||||
border-style: solid;
|
||||
border-color: #000;
|
||||
text-align: right;
|
||||
width: 95%;
|
||||
margin-top: 0em;
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.corpsForm legend {
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.corpsForm label {
|
||||
float: left;
|
||||
text-align: right;
|
||||
width: 33%;
|
||||
margin: 0;
|
||||
padding: 0 .5em 0 0;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
textarea,
|
||||
select {
|
||||
font-family: "Trebuchet MS", sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
background-color: #ECB2E4;
|
||||
}
|
||||
button{
|
||||
width : 60px;
|
||||
height : 30px;
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
|
||||
button {
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
input:hover, textarea:hover, select:hover{
|
||||
background-color : #FAFAE6;
|
||||
cursor : pointer;
|
||||
|
||||
input:hover,
|
||||
textarea:hover,
|
||||
select:hover {
|
||||
background-color: #FAFAE6;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.controle {
|
||||
width:75px;
|
||||
width: 75px;
|
||||
}
|
||||
|
||||
.controleLong {
|
||||
width:195px;
|
||||
width: 195px;
|
||||
}
|
||||
|
||||
.stNb {
|
||||
width:40px;
|
||||
text-align:center;
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.stNb a:link {
|
||||
color: red;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.stTitre {
|
||||
width:40px;
|
||||
text-align:center;
|
||||
font-weight: bold;
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.stTitre2 {
|
||||
width:80px;
|
||||
text-align:center;
|
||||
font-weight: bold;
|
||||
width: 80px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Le texte des messages d'erreur est de couleur rose sur fond ocre et de
|
||||
taille de caractères légèrement supérieure à la normale */
|
||||
.erreur{
|
||||
background-color:rgb(237,210,229);
|
||||
color:rgb(203,28,128);
|
||||
font-size:1.1em;
|
||||
margin-left:200px;
|
||||
width:75%;
|
||||
.erreur {
|
||||
background-color: rgb(237, 210, 229);
|
||||
color: rgb(203, 28, 128);
|
||||
font-size: 1.1em;
|
||||
margin-left: 200px;
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.centre {
|
||||
text-align:center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.info {
|
||||
background-color:rgb(178,207,81);
|
||||
color : white;
|
||||
font-size:1.1em;
|
||||
width : 95%
|
||||
background-color: rgb(178, 207, 81);
|
||||
color: white;
|
||||
font-size: 1.1em;
|
||||
width: 95%
|
||||
}
|
||||
|
||||
.encadre {
|
||||
border : solid 0.1em #000;
|
||||
width : 100%;
|
||||
border: solid 0.1em #000;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Style pour les liens de la page principale */
|
||||
#contenu .corpsTexte {
|
||||
width:80%;
|
||||
font-size:1.2em;
|
||||
width: 80%;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
/* Style pour les liens de la page principale */
|
||||
#contenu a {
|
||||
font-size : 1.1em;
|
||||
color:gray;
|
||||
text-decoration:none;
|
||||
font-size: 1.1em;
|
||||
color: gray;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#contenu a:hover {
|
||||
text-decoration:underline;
|
||||
background-color : #D9BB7A;
|
||||
font-size : 1em;
|
||||
text-decoration: underline;
|
||||
background-color: #D9BB7A;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/* Style pour les parties importantes de la page principale */
|
||||
#contenu strong {
|
||||
font-weight:bold;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Styles pour les tableaux de la page principale */
|
||||
#contenu table {
|
||||
background-color:#FFF;
|
||||
border : 0.1em solid #777777;
|
||||
color:black;
|
||||
margin-right : auto ;
|
||||
margin-left:0.2em;
|
||||
border-collapse : collapse;
|
||||
background-color: #FFF;
|
||||
border: 0.1em solid #777777;
|
||||
color: black;
|
||||
margin-right: auto;
|
||||
margin-left: 0.2em;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* Style pour les lignes d'en-tête des tableaux */
|
||||
#contenu th {
|
||||
background-color:#E9F1FE;
|
||||
/* //bleu clair ou bleu plus soutenu : #77AADD; */
|
||||
width: 130px;
|
||||
height: 21px;
|
||||
/* //text-align: left; */
|
||||
vertical-align:top;
|
||||
/*font-weight:bold;*/
|
||||
border-bottom:0.1em solid #777777;
|
||||
/* //font-size:1.1em; */
|
||||
}
|
||||
#contenu th {
|
||||
background-color: #E9F1FE;
|
||||
/* //bleu clair ou bleu plus soutenu : #77AADD; */
|
||||
width: 130px;
|
||||
height: 21px;
|
||||
/* //text-align: left; */
|
||||
vertical-align: top;
|
||||
/*font-weight:bold;*/
|
||||
border-bottom: 0.1em solid #777777;
|
||||
/* //font-size:1.1em; */
|
||||
}
|
||||
|
||||
#contenu td {
|
||||
border :1px solid #777777;
|
||||
/* //font-size:1.1em; */
|
||||
}
|
||||
border: 1px solid #777777;
|
||||
/* //font-size:1.1em; */
|
||||
}
|
||||
|
||||
#contenu h3 {
|
||||
font-size : 1.2em;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
table{
|
||||
width:100%;
|
||||
border-collapse:collapse;
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
fieldset{
|
||||
border-radius : 12px;
|
||||
border:2px solid ;
|
||||
border-color: purple;
|
||||
|
||||
fieldset {
|
||||
border-radius: 12px;
|
||||
border: 2px solid;
|
||||
border-color: purple;
|
||||
}
|
||||
legend{
|
||||
font-size: 20px;
|
||||
|
||||
legend {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
table.listeLegere {
|
||||
margin-bottom : 0.3em;
|
||||
margin-bottom: 0.3em;
|
||||
}
|
||||
|
||||
table.stats {
|
||||
width: 80px;
|
||||
/* //150px; */
|
||||
border-collapse:collapse;
|
||||
width: 80px;
|
||||
/* //150px; */
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.stats th {
|
||||
border : dotted rgb(178,207,81) 0.1em;
|
||||
background-color:#E9F1FE;
|
||||
/* //bleu clair */
|
||||
padding: 0em;
|
||||
text-align: center;
|
||||
vertical-align : top;
|
||||
witdh: 33%;
|
||||
border: dotted rgb(178, 207, 81) 0.1em;
|
||||
background-color: #E9F1FE;
|
||||
/* //bleu clair */
|
||||
padding: 0em;
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
witdh: 33%;
|
||||
}
|
||||
|
||||
table.stats td {
|
||||
border : dotted rgb(178,207,81) 0.1em;
|
||||
padding: 0em;
|
||||
text-align: center;
|
||||
vertical-align : top;
|
||||
witdh: 33%;
|
||||
border: dotted rgb(178, 207, 81) 0.1em;
|
||||
padding: 0em;
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
witdh: 33%;
|
||||
}
|
||||
|
||||
/* Tableaux quadrillés utilisés pour l'affichage de listes avec contenu léger*/
|
||||
table.listeLegere th, table.listeLegere td {
|
||||
border : dotted rgb(178,207,81) 0.1em;
|
||||
padding:0.2em;
|
||||
vertical-align : top;
|
||||
/* Tableaux quadrillés utilisés pour l'affichage de listes avec contenu léger*/
|
||||
table.listeLegere th,
|
||||
table.listeLegere td {
|
||||
border: dotted rgb(178, 207, 81) 0.1em;
|
||||
padding: 0.2em;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.listeLegere caption {
|
||||
font-size : 1.1em;
|
||||
text-align : left;
|
||||
margin-bottom : 0.2em;
|
||||
font-size: 1.1em;
|
||||
text-align: left;
|
||||
margin-bottom: 0.2em;
|
||||
}
|
||||
|
||||
table.listeLegere td {
|
||||
width: 100px;
|
||||
vertical-align:top;
|
||||
font-weight:normal;
|
||||
width: 100px;
|
||||
vertical-align: top;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#contenu h2 {
|
||||
@ -415,94 +459,97 @@ table.listeLegere td {
|
||||
font-weight: bold;
|
||||
color: #1D2941;
|
||||
text-decoration: none;
|
||||
border : 1px solid #6988BE;
|
||||
border: 1px solid #6988BE;
|
||||
padding-left: 25px;
|
||||
background-color: #E9F1FE;
|
||||
height : 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
#contenu img {
|
||||
height : 21px;
|
||||
border-style: none;
|
||||
float : left;
|
||||
height: 21px;
|
||||
border-style: none;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#contenu li img:hover {
|
||||
height : 26px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.lesOnglets
|
||||
{
|
||||
.lesOnglets {
|
||||
margin: 0;
|
||||
padding:0 0 0 5px;
|
||||
padding: 0 0 0 5px;
|
||||
}
|
||||
|
||||
.unOnglet
|
||||
{
|
||||
background-color:white;
|
||||
margin-top:-1px;
|
||||
padding:5px;
|
||||
display:none;
|
||||
border:1px solid #AAA;
|
||||
border-radius:4px;
|
||||
-webkit-border-radius:4px;
|
||||
-moz-border-radius:4px;
|
||||
color:#555;
|
||||
.unOnglet {
|
||||
background-color: white;
|
||||
margin-top: -1px;
|
||||
padding: 5px;
|
||||
display: none;
|
||||
border: 1px solid #AAA;
|
||||
border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
color: #555;
|
||||
cursor: text;
|
||||
}
|
||||
.onglet
|
||||
{
|
||||
display:inline-block;
|
||||
margin:5px 2px 0 2px;
|
||||
padding:5px 10px ;
|
||||
border:1px solid #AAA;
|
||||
border-bottom:none;
|
||||
border-radius:5px 5px 0 0;
|
||||
-webkit-border-radius:4px 4px 0 0;
|
||||
-moz-border-radius:4px 4px 0 0;
|
||||
color:#555;
|
||||
|
||||
.onglet {
|
||||
display: inline-block;
|
||||
margin: 5px 2px 0 2px;
|
||||
padding: 5px 10px;
|
||||
border: 1px solid #AAA;
|
||||
border-bottom: none;
|
||||
border-radius: 5px 5px 0 0;
|
||||
-webkit-border-radius: 4px 4px 0 0;
|
||||
-moz-border-radius: 4px 4px 0 0;
|
||||
color: #555;
|
||||
cursor: pointer;
|
||||
font-weight:bold;
|
||||
font-weight: bold;
|
||||
}
|
||||
.inactif
|
||||
{
|
||||
background:#EEE;
|
||||
|
||||
.inactif {
|
||||
background: #EEE;
|
||||
}
|
||||
.inactif:hover
|
||||
{
|
||||
background:#AAA;
|
||||
|
||||
.inactif:hover {
|
||||
background: #AAA;
|
||||
}
|
||||
.actif
|
||||
{
|
||||
background:white;
|
||||
border-bottom:2px solid white;
|
||||
padding-bottom:4px;
|
||||
cursor:text;
|
||||
|
||||
.actif {
|
||||
background: white;
|
||||
border-bottom: 2px solid white;
|
||||
padding-bottom: 4px;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.fdroite {
|
||||
display: inline-block;
|
||||
border-bottom: 7px solid #FFFFFF;
|
||||
border-top: 7px solid #FFFFFF;
|
||||
border-left: 10px solid #9743CC;
|
||||
}
|
||||
|
||||
.fbas {
|
||||
display: inline-block;
|
||||
border-left: 7px solid #FFFFFF;
|
||||
border-right: 7px solid #FFFFFF;
|
||||
border-top: 10px solid #AABBCC;
|
||||
}
|
||||
|
||||
.fgauche {
|
||||
display: inline-block;
|
||||
border-bottom: 7px solid #FFFFFF;
|
||||
border-right: 10px solid #9743CC;
|
||||
border-top: 7px solid #FFFFFF;
|
||||
}
|
||||
|
||||
.fhaut {
|
||||
display: inline-block;
|
||||
border-bottom: 10px solid #AABBCC;
|
||||
border-left: 7px solid #FFFFFF;
|
||||
border-right: 7px solid #FFFFFF;
|
||||
}
|
||||
|
||||
.boite {
|
||||
border: 1px solid #ddd;
|
||||
-webkit-border-radius: 5px;
|
||||
@ -523,7 +570,7 @@ table.listeLegere td {
|
||||
|
||||
#tableau th.semaine {
|
||||
color: #666666;
|
||||
text-align : center;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #fafae0;
|
||||
}
|
||||
@ -548,6 +595,7 @@ table.listeLegere td {
|
||||
background-color: #ffe9e5;
|
||||
color: #000080;
|
||||
}
|
||||
|
||||
.tableau {
|
||||
background-color: #ebeff2;
|
||||
border-color: #3DA9C9;
|
||||
@ -572,6 +620,7 @@ table.listeLegere td {
|
||||
border-width: 1px;
|
||||
border-color: gray;
|
||||
}
|
||||
|
||||
.tableau th div {
|
||||
width: 25px;
|
||||
}
|
||||
@ -613,7 +662,8 @@ table.listeLegere td {
|
||||
background-color: #ffe9e5;
|
||||
color: #000080;
|
||||
}
|
||||
#pompiers{
|
||||
|
||||
#pompiers {
|
||||
background-color: #ebeff2;
|
||||
border-color: #3DA9C9;
|
||||
border-width: 1px;
|
||||
@ -632,7 +682,92 @@ table.listeLegere td {
|
||||
padding: 0px 0px 0px 0px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.select-dispo{
|
||||
|
||||
.select-dispo {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*
|
||||
PARTIE DES INTERVENTIONS
|
||||
*/
|
||||
.nouvelleInter {
|
||||
margin: 0 20px;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.formulaire {
|
||||
width: 50%;
|
||||
border-right: solid 1px black;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.nouvelleInter .formulaire {
|
||||
/* float: right; */
|
||||
}
|
||||
|
||||
.selectionPompier {
|
||||
margin: 0 30px;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.pompierDispo {
|
||||
background-color: #8B93A7;
|
||||
width: 40%;
|
||||
height: 80%;
|
||||
margin: 0 20px;
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.pompierDispo div,
|
||||
.pompierIntervenant div {
|
||||
text-decoration: none;
|
||||
background-color: #FFFFFF;
|
||||
padding: 3px;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pompierIntervenant {
|
||||
background-color: red;
|
||||
width: 40%;
|
||||
height: 200px;
|
||||
margin: 0 20px;
|
||||
padding: 5px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sendInter {
|
||||
width: auto;
|
||||
text-align: center;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.infobulle {
|
||||
position: relative;
|
||||
/* les .infobulle deviennent référents */
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
/* on génère un élément :after lors du survol et du focus :*/
|
||||
|
||||
.infobulle:hover::after,
|
||||
.infobulle:focus::after {
|
||||
content: attr(aria-label);
|
||||
/* on affiche aria-label */
|
||||
position: absolute;
|
||||
top: -2.4em;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
/* on centre horizontalement */
|
||||
z-index: 1;
|
||||
/* pour s'afficher au dessus des éléments en position relative */
|
||||
white-space: nowrap;
|
||||
/* on interdit le retour à la ligne */
|
||||
}
|
@ -12,7 +12,7 @@ if ($_SESSION['statut'] == 1) {
|
||||
$choix = $_SESSION['idUtilisateur'];
|
||||
} else {
|
||||
echo '
|
||||
<select name="lstPompiers" STYLE="width:350px;" onchange="submit();">';
|
||||
<select name="lstPompiers" STYLE="width:auto;" onchange="submit();">';
|
||||
|
||||
if (!isset($_REQUEST['lstPompiers'])) {
|
||||
$choix = $_SESSION['idUtilisateur'];
|
||||
@ -44,7 +44,7 @@ echo ('
|
||||
if ($_SESSION['statut'] == 2) {?>
|
||||
|
||||
<input type="image" id="zNouveau" title="Ajouter" src="images/ajout.gif" onclick="faire('choixP', 'ajouter')">
|
||||
<input type="image" id="zModif" title="Modifier" src="images/modif.gif" onclick="faire('choixP', 'modifier')">
|
||||
<input type="image" class="btn-modif" id="zModifChef" title="Modifier" src="images/modif.gif">
|
||||
<input type="image" id="zSupprime" title="Supprimer" src="images/supprimer.gif" onclick="faire('choixP', 'supprimer')">
|
||||
<input type="image" id="zPremier" title="premier" src="images/goPremier.gif" onclick="premier('choixP','lstPompiers')">
|
||||
<input type="image" id="zPrecedent" title="précédent" src="images/goPrecedent.gif" onclick="precedent('choixP','lstPompiers')">
|
||||
@ -54,13 +54,18 @@ if ($_SESSION['statut'] == 2) {?>
|
||||
<input type="image" id="zSuivant" title="suivant" src="images/goSuivant.gif" onclick="suivant('choixP','lstPompiers')">
|
||||
<input type="image" id="zDernier" title="dernier" src="images/goDernier.gif" onclick="dernier('choixP','lstPompiers')">
|
||||
<?php
|
||||
} else {
|
||||
echo '
|
||||
<input type="image" id="zModif" title="Modifier" src="images/modif.gif" onclick="faire(\'choixP\', \'modifier\')">';
|
||||
}?>
|
||||
} else {
|
||||
echo '
|
||||
<input type="image" class="btn-modif" id="zModif" title="Modifier" src="images/modif.gif">';
|
||||
}?>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="action" value="<?php if($_REQUEST['action']=="liste") {echo "voir";} else {echo $_REQUEST['action'];}?>">
|
||||
<input type="hidden" name="action" value="<?php
|
||||
if($_REQUEST['action'] == "liste") {
|
||||
echo "voir";
|
||||
} else {
|
||||
echo $_REQUEST['action'];
|
||||
}?>">
|
||||
<input type="hidden" name="type" value="<?= isset($_REQUEST['type']) ? $_REQUEST['type'] : '';?>">
|
||||
<input type="hidden" name="zType" value="*">
|
||||
<input type="hidden" name="zIndice" value="*">
|
||||
|
@ -4,6 +4,7 @@
|
||||
<head>
|
||||
<title>SDIS29</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
|
||||
<link href="./styles/styles.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="./images/favicon.ico" />
|
||||
@ -20,7 +21,7 @@
|
||||
$champ = $_REQUEST['zChamp'];
|
||||
}
|
||||
?>
|
||||
<body onload="donner_focus('<?= $formulaire . ',' . $champ;?>');">
|
||||
<body >
|
||||
<div id="page">
|
||||
<div id="entete">
|
||||
<img src="./images/logo.png" id="logo" alt="SDIS29" title="SDIS 29" />
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!-- affichage de la feuille de gardes / Derniere modification le 18/09/2023 à 16h50 par Pascal Blain -->
|
||||
<div style='display: block;' class='unOnglet' id='contenuOnglet1'>
|
||||
<fieldset>
|
||||
<fieldset style='width:80%; margin: 0 auto;'>
|
||||
<legend>Feuille de gardes</legend>
|
||||
<form name="frmDispos" action="index.php?choixTraitement=gardes&action=voir" method="post">
|
||||
<input type="hidden" name="zSemaine" value='<?php echo $semaine; ?>'>
|
||||
|
@ -1,64 +1,65 @@
|
||||
|
||||
<!-- affichage du detail de la fiche pompier / Derniere modification le 18 septembre 2023 par Pascal Blain -->
|
||||
<!-- ------------------------------------------------ fenetre modale en CSS -->
|
||||
<style>
|
||||
.fModale {
|
||||
position : fixed;
|
||||
font-family : Arial, Helvetica, sans-serif;
|
||||
top : 0;
|
||||
right : 0;
|
||||
bottom : 0;
|
||||
left : 0;
|
||||
background : rgba(0,0,0,0.8);
|
||||
z-index : 99999;
|
||||
//display : none;
|
||||
opacity : 0;
|
||||
-webkit-transition: opacity 400ms ease-in;
|
||||
-moz-transition: opacity 400ms ease-in;
|
||||
transition : opacity 400ms ease-in;
|
||||
pointer-events: none;
|
||||
}
|
||||
.fModale {
|
||||
position: fixed;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
z-index: 99999;
|
||||
//display : none;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 400ms ease-in;
|
||||
-moz-transition: opacity 400ms ease-in;
|
||||
transition: opacity 400ms ease-in;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.fModale:target {
|
||||
//display : block;
|
||||
opacity : 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
.fModale:target {
|
||||
//display : block;
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.fModale > div {
|
||||
width : 200px;
|
||||
position : relative;
|
||||
margin : 10% auto;
|
||||
padding : 5px 20px 13px 20px;
|
||||
border-radius: 10px;
|
||||
background : #fff;
|
||||
background : -moz-linear-gradient(#fff, #999);
|
||||
background : -webkit-linear-gradient(#fff, #999);
|
||||
background : -o-linear-gradient(#fff, #999);
|
||||
}
|
||||
.fModale>div {
|
||||
width: 200px;
|
||||
position: relative;
|
||||
margin: 10% auto;
|
||||
padding: 5px 20px 13px 20px;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
background: -moz-linear-gradient(#fff, #999);
|
||||
background: -webkit-linear-gradient(#fff, #999);
|
||||
background: -o-linear-gradient(#fff, #999);
|
||||
}
|
||||
|
||||
.fermer {
|
||||
background : #606061;
|
||||
color : #FFFFFF;
|
||||
line-height : 25px;
|
||||
position : absolute;
|
||||
right : -12px;
|
||||
text-align : center;
|
||||
top : -10px;
|
||||
width : 24px;
|
||||
text-decoration: none;
|
||||
font-weight : bold;
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
border-radius: 12px;
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
-webkit-box-shadow: 1px 1px 3px #000;
|
||||
box-shadow : 1px 1px 3px #000;
|
||||
}
|
||||
.fermer {
|
||||
background: #606061;
|
||||
color: #FFFFFF;
|
||||
line-height: 25px;
|
||||
position: absolute;
|
||||
right: -12px;
|
||||
text-align: center;
|
||||
top: -10px;
|
||||
width: 24px;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
border-radius: 12px;
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
-webkit-box-shadow: 1px 1px 3px #000;
|
||||
box-shadow: 1px 1px 3px #000;
|
||||
}
|
||||
|
||||
.fermer:hover { background: #00d9ff; }
|
||||
.fermer:hover {
|
||||
background: #00d9ff;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
<?php
|
||||
/*-----------------------------------------------------------------
|
||||
Il existe en PHP un opérateur conditionnel dit opérateur ternaire ("?:")
|
||||
Exemple d'utilisation pour l'opérateur ternaire : Affectation d'une valeur par défaut
|
||||
@ -78,139 +79,156 @@ $titre3 = ($_SESSION['statut'] == 1) ? "Mon profil" : "Profil";
|
||||
echo ('
|
||||
<div id="fiche">
|
||||
<ul class="lesOnglets">
|
||||
<li class="actif onglet" id="onglet1" onclick="javascript:Affiche(\'1\',3);">'.$titre1.'</li>
|
||||
<li class="inactif onglet" id="onglet2" onclick="javascript:Affiche(\'2\',3);">'.$titre2.'</li>
|
||||
<li class="inactif onglet" id="onglet3" onclick="javascript:Affiche(\'3\',3);">'.$titre3.'</li>
|
||||
</ul>');
|
||||
<li class="actif onglet" id="onglet1" onclick="javascript:Affiche(\'1\',3);">' . $titre1 . '</li>
|
||||
<li class="inactif onglet" id="onglet2" onclick="javascript:Affiche(\'2\',3);">' . $titre2 . '</li>
|
||||
<li class="inactif onglet" id="onglet3" onclick="javascript:Affiche(\'3\',3);">' . $titre3 . '</li>
|
||||
</ul>');
|
||||
/*================================================================================================== DISPONIBILITEES (1) */
|
||||
echo ("
|
||||
<div style='display: block;' class='unOnglet' id='contenuOnglet1'>
|
||||
<fieldset><legend>X indique une garde</legend>"); ?>
|
||||
<!-- div class="boite" style="margin: 0px 10px;" -->
|
||||
|
||||
<form name="frmDispos" action="index.php?choixTraitement=pompiers&action=voir" method="post">
|
||||
<input type="hidden" maxlength="2" name="zSemaine" value='<?php echo $semaine;?>'>
|
||||
<input type="hidden" maxlength="2" name="zAnnee" value='<?php echo $annee;?>'>
|
||||
</form>
|
||||
<table id="tableau" class="tableau">
|
||||
<tbody>
|
||||
<!-- PARTIE SELCTION SEMAINE -->
|
||||
<tr>
|
||||
<th><input id="sPrecedente" name="gauche" title="semaine précédente" src="images/gauche.gif" onclick="autreSemaine('<?php echo date('W',strtotime("-7 days",$premierJour))."', '".date('Y',strtotime("-7 days",$premierJour))?>')" onmouseover="document.gauche.src='images/gauche_.gif'" onmouseout="document.gauche.src='images/gauche.gif'"type="image"></th>
|
||||
<!-- div class="boite" style="margin: 0px 10px;" -->
|
||||
|
||||
<th colspan="26"><b><big>Semaine <?php echo $semaine." : du lundi ".date('d/m/Y',$premierJour)." au dimanche ".date('d/m/Y',strtotime("6 days",$premierJour))."</big></b></th>";?>
|
||||
<form name="frmDispos" action="index.php?choixTraitement=pompiers&action=voir" method="post">
|
||||
<input type="hidden" maxlength="2" name="zSemaine" value='<?php echo $semaine; ?>'>
|
||||
<input type="hidden" maxlength="2" name="zAnnee" value='<?php echo $annee; ?>'>
|
||||
</form>
|
||||
<table id="tableau" class="tableau">
|
||||
<tbody>
|
||||
<!-- PARTIE SELCTION SEMAINE -->
|
||||
<tr>
|
||||
<th><input id="sPrecedente" name="gauche" title="semaine précédente" src="images/gauche.gif"
|
||||
onclick="autreSemaine('<?php echo date('W', strtotime("-7 days", $premierJour)) . "', '" . date('Y', strtotime("-7 days", $premierJour)) ?>')"
|
||||
onmouseover="document.gauche.src='images/gauche_.gif'"
|
||||
onmouseout="document.gauche.src='images/gauche.gif'" type="image"></th>
|
||||
|
||||
<th><input id="sSuivante" name="droite" title="semaine suivante" src="images/droite.gif" onclick="autreSemaine('<?php echo date('W',strtotime("+7 day",$premierJour))."', '".date('Y',strtotime("+7 day",$premierJour));?>')" onmouseover="document.droite.src='images/droite_.gif'" onmouseout="document.droite.src='images/droite.gif'"type="image"></th>
|
||||
</tr>
|
||||
<th colspan="26"><b><big>Semaine
|
||||
<?php echo $semaine . " : du lundi " . date('d/m/Y', $premierJour) . " au dimanche " . date('d/m/Y', strtotime("6 days", $premierJour)) . "</big></b></th>"; ?>
|
||||
|
||||
<!-- PARTIE AFFICHAGE DES JOURS -->
|
||||
<tr>
|
||||
<th><input id="sSuivante" name="droite" title="semaine suivante" src="images/droite.gif"
|
||||
onclick="autreSemaine('<?php echo date('W', strtotime("+7 day", $premierJour)) . "', '" . date('Y', strtotime("+7 day", $premierJour)); ?>')"
|
||||
onmouseover="document.droite.src='images/droite_.gif'"
|
||||
onmouseout="document.droite.src='images/droite.gif'" type="image"></th>
|
||||
</tr>
|
||||
|
||||
<!-- PARTIE AFFICHAGE DES JOURS -->
|
||||
<tr>
|
||||
<?php
|
||||
$nomJour = array('Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi', 'Dimanche');
|
||||
for($jour = 0; $jour <= 6; $jour++) {
|
||||
for ($jour = 0; $jour <= 6; $jour++) {
|
||||
echo ('<th colspan="4">'
|
||||
. $nomJour[$jour] . ' '
|
||||
. date('d/m', strtotime('+' . $jour . ' day', $premierJour)) . '</th>'
|
||||
);
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
?>
|
||||
</tr>
|
||||
|
||||
<!-- PARTIE AFFICHAGE DES TRANCHES DANS CHAQUE JOURS -->
|
||||
<tr>
|
||||
<?php
|
||||
for($jour = 0; $jour <= 6; $jour++) {
|
||||
for($tranche = 1; $tranche <= 4; $tranche++) {
|
||||
echo '<th class="semaine" style="text-align : center;">' . $tranche . '</th>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
|
||||
<!-- PARTIE SELCTION DES DISPO -->
|
||||
<tr>
|
||||
<!-- PARTIE AFFICHAGE DES TRANCHES DANS CHAQUE JOURS -->
|
||||
<tr>
|
||||
<?php
|
||||
foreach ($lesDispos as $uneLigne) { // $pdo->getDisposHebdo() return les dispo
|
||||
for($jour = 0; $jour <= 6; $jour++) {
|
||||
for ($jour = 0; $jour <= 6; $jour++) {
|
||||
for ($tranche = 1; $tranche <= 4; $tranche++) {
|
||||
echo '<th class="semaine" style="text-align : center;">' . $tranche . '</th>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
|
||||
<!-- PARTIE SELCTION DES DISPO -->
|
||||
<tr>
|
||||
<?php
|
||||
foreach ($lesDispos as $uneLigne) { // $pdo->getDisposHebdo() return les dispo
|
||||
for ($jour = 0; $jour <= 6; $jour++) {
|
||||
$leJour = date('Y-m-d', strtotime('+' . $jour . ' day', $premierJour));
|
||||
$dateTab = date('d/m/Y', strtotime('+' . $jour . ' day', $premierJour));
|
||||
for($tranche = 1; $tranche <= 4; $tranche++){
|
||||
$couleur = 'c' . $tranche;
|
||||
$garde = 'g' . $tranche;
|
||||
$dispo = 'd' . $tranche;
|
||||
echo('
|
||||
for ($tranche = 1; $tranche <= 4; $tranche++) {
|
||||
$couleur = 'c' . $tranche;
|
||||
$garde = 'g' . $tranche;
|
||||
$dispo = 'd' . $tranche;
|
||||
echo ('
|
||||
<td style="height: 20px; background-color: ' . $uneLigne[$dateTab][$couleur] . ';" class="select-dispo" id="' . $leJour . '/' . $tranche . '">' . (($uneLigne[$dateTab][$garde] == 1) ? 'X' : '') . '</td>
|
||||
');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="fenetreDispo" class="fModale">
|
||||
<div>
|
||||
<a href="#" title="Fermer" class="fermer">X</a>
|
||||
<h2>ma disponibilité<br>pour le <label id="ztJour"> </label></h2>
|
||||
<form name="frmActivites" action="index.php?choixTraitement=pompiers&action=majActivite" method="post">
|
||||
<input type="hidden" name="zSemaine" value='<?php echo $semaine;?>'>
|
||||
<input type="hidden" name="zAnnee" value='<?php echo $annee;?>'>
|
||||
<input type="hidden" name="ztLaDate" value=''>
|
||||
<input type="hidden" name="ztLaTranche" value=''>
|
||||
<input type="hidden" name="ztExDispo" value=''>
|
||||
<br>
|
||||
<?php
|
||||
$i=0;
|
||||
foreach ($lesTypesDispos as $uneLigne)
|
||||
{
|
||||
if ($uneLigne["pIndice"]<>3) {
|
||||
echo '<input type="radio" name="brDispo" id="brDispo'.$i.'" value="'.$uneLigne["pIndice"].'"/><label for="brDispo'.$i.'">'.$uneLigne["pLibelle"].'</label><br>';}
|
||||
$i++;
|
||||
?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="fenetreDispo" class="fModale">
|
||||
<div>
|
||||
<a href="#" title="Fermer" class="fermer">X</a>
|
||||
<h2>ma disponibilité<br>pour le <label id="ztJour"> </label></h2>
|
||||
<form name="frmActivites" action="index.php?choixTraitement=pompiers&action=majActivite" method="post">
|
||||
<input type="hidden" name="zSemaine" value='<?php echo $semaine; ?>'>
|
||||
<input type="hidden" name="zAnnee" value='<?php echo $annee; ?>'>
|
||||
<input type="hidden" name="ztLaDate" value=''>
|
||||
<input type="hidden" name="ztLaTranche" value=''>
|
||||
<input type="hidden" name="ztExDispo" value=''>
|
||||
<br>
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ($lesTypesDispos as $uneLigne) {
|
||||
if ($uneLigne["pIndice"] <> 3) {
|
||||
echo '<input type="radio" name="brDispo" id="brDispo' . $i . '" value="' . $uneLigne["pIndice"] . '"/><label for="brDispo' . $i . '">' . $uneLigne["pLibelle"] . '</label><br>';
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
<button onclick="document.forms['frmActivites'].submit()">Valider</button>
|
||||
<button href="#contenuOnglet1">Annuler</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /div -->
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
<button onclick="document.forms['frmActivites'].submit()">Valider</button>
|
||||
<button href="#contenuOnglet1">Annuler</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /div -->
|
||||
<?php
|
||||
echo ("
|
||||
</fieldset>
|
||||
</div>");
|
||||
/*================================================================================================== GARDES (2)*/
|
||||
/*================================================================================================== GARDES (2)*/
|
||||
echo ("
|
||||
<div style='display: none;' class='unOnglet' id='contenuOnglet2'>
|
||||
<fieldset><legend>Gardes réalisées ");
|
||||
if (count($lesGardes)==0) {echo "<i>(aucune garde enregistrée)</i></legend>";} else
|
||||
{
|
||||
echo ("<i>(".count($lesGardes)." gardes)</i></legend>
|
||||
if (count($lesGardes) == 0) {
|
||||
echo "<i>(aucune garde enregistrée)</i></legend>";
|
||||
} else {
|
||||
echo ("<i>(" . count($lesGardes) . " gardes)</i></legend>
|
||||
<table style='border: 0px solid white;'>
|
||||
<tr><th class='controleLong'>Date de la garde</th>");
|
||||
foreach ($lesTranches as $uneLigne) { echo ("<th>".$uneLigne['pLibelle']."</th>");}
|
||||
$dateGarde="premiere";
|
||||
$colonne=1;
|
||||
echo "</tr>";
|
||||
foreach ($lesGardes as $uneLigne)
|
||||
{
|
||||
if ($dateGarde != $uneLigne['wDate'])
|
||||
{
|
||||
if ($dateGarde != "premiere")
|
||||
{
|
||||
while ($colonne<=count($lesTranches)) {echo "<td class='controle' style='text-align : center;'> </td>"; $colonne++;}
|
||||
echo "</tr>
|
||||
";
|
||||
}
|
||||
echo "<tr><td class='controle' style='text-align : center;'>".$uneLigne['wDate']."</td>";
|
||||
$dateGarde = $uneLigne['wDate'];
|
||||
$colonne=1;
|
||||
}
|
||||
while ($colonne<$uneLigne['aTranche']) {echo "<td class='controle' style='text-align : center;'> </td>"; $colonne++;}
|
||||
echo ("<td class='controle' style='text-align : center;background-color : lime;'> </td>");
|
||||
$colonne=$uneLigne['aTranche']+1;
|
||||
foreach ($lesTranches as $uneLigne) {
|
||||
echo ("<th>" . $uneLigne['pLibelle'] . "</th>");
|
||||
}
|
||||
$dateGarde = "premiere";
|
||||
$colonne = 1;
|
||||
echo "</tr>";
|
||||
|
||||
foreach ($lesGardes as $uneLigne) {
|
||||
if ($dateGarde != $uneLigne['wDate']) {
|
||||
if ($dateGarde != "premiere") {
|
||||
while ($colonne <= count($lesTranches)) {
|
||||
echo "<td class='controle' style='text-align : center;'> </td>";
|
||||
$colonne++;
|
||||
}
|
||||
echo "</tr>
|
||||
";
|
||||
}
|
||||
echo "<tr><td class='controle' style='text-align : center;'>" . $uneLigne['wDate'] . "</td>";
|
||||
$dateGarde = $uneLigne['wDate'];
|
||||
$colonne = 1;
|
||||
}
|
||||
while ($colonne < $uneLigne['aTranche']) {
|
||||
echo "<td class='controle' style='text-align : center;'> </td>";
|
||||
$colonne++;
|
||||
}
|
||||
echo ("<td class='controle' style='text-align : center;background-color : lime;'> </td>");
|
||||
$colonne = $uneLigne['aTranche'] + 1;
|
||||
}
|
||||
while ($colonne <= count($lesTranches)) {
|
||||
echo "<td class='controle' style='text-align : center;'> </td>";
|
||||
$colonne++;
|
||||
}
|
||||
while ($colonne<=count($lesTranches)) {echo "<td class='controle' style='text-align : center;'> </td>"; $colonne++;}
|
||||
echo "</tr>";
|
||||
echo ("</table>");
|
||||
}
|
||||
@ -218,41 +236,80 @@ echo ("
|
||||
</fieldset>
|
||||
</div>");
|
||||
/*================================================================================================== COORDONNEES (3) */
|
||||
echo ("
|
||||
echo ("
|
||||
<div style='display: none;' class='unOnglet' id='contenuOnglet3'>
|
||||
<form class='dataPompier' method='post'>
|
||||
<table style='border: 0px solid white;'>
|
||||
<tr>
|
||||
<td style='border :0px;'>
|
||||
<fieldset><legend>Coordonnées</legend>
|
||||
<table>
|
||||
<tr><th style='width:130px;'>Nom</th> <td style='width:130px;'>".$lesInfosPompier['nom']."</td> </tr>
|
||||
<tr><th>Prénom</th> <td>".$lesInfosPompier['prenom']."</td> </tr>
|
||||
<tr><th>Adresse</th> <td>".$lesInfosPompier['pAdresse']."</td> </tr>
|
||||
<tr><th>Code postal</th> <td>".$lesInfosPompier['pCp']."</td> </tr>
|
||||
<tr><th>Ville</th> <td>".$lesInfosPompier['pVille']."</td> </tr>
|
||||
<tr><th>Téléphone</th> <td>".$lesInfosPompier['pBip']."</td> </tr>
|
||||
<tr><th>Adresse électronique</th> <td>".$lesInfosPompier['pMail']."</td> </tr>
|
||||
<tr><th>Nom de compte</th> <td>".$lesInfosPompier['pLogin']."</td></tr>
|
||||
<tr><th> </th> <td> </td> </tr>
|
||||
<tr><th style='width:130px;'>Nom</th> <td style='width:130px;'><input name='ztNom' type='text' class='infoPompier infoPompier-chef' value='" . $lesInfosPompier['nom'] . "' disabled></td> </tr>
|
||||
<tr><th>Prénom</th> <td> <input name='ztPrenom' type='text' class='infoPompier infoPompier-chef' value='" . $lesInfosPompier['prenom'] . "' disabled></td> </tr>
|
||||
<tr><th>Adresse</th> <td> <input name='ztAdresse' type='text' class='infoPompier infoPompier-chef' value='" . $lesInfosPompier['pAdresse'] . "' disabled></td> </tr>
|
||||
<tr><th>Code postal</th> <td> <input name='ztCodePostal' type='text' class='infoPompier infoPompier-chef' value='" . $lesInfosPompier['pCp'] . "' disabled></td> </tr>
|
||||
<tr><th>Ville</th> <td> <input name='ztVille' type='text' class='infoPompier infoPompier-chef' value='" . $lesInfosPompier['pVille'] . "' disabled></td> </tr>
|
||||
<tr><th>Téléphone</th> <td> <input name='ztTel' type='text' class='infoPompier-chef' value='" . $lesInfosPompier['pBip'] . "' disabled></td> </tr>
|
||||
<tr><th>Adresse électronique</th> <td> <input name='ztMail' type='text' class='infoPompier infoPompier-chef' value='" . $lesInfosPompier['pMail'] . "' disabled></td> </tr>
|
||||
<tr><th>Nom de compte</th> <td>" . $lesInfosPompier['pLogin'] . "</td></tr>
|
||||
<input name='pId' type='hidden' class='infoPompier' value='" . $lesInfosPompier['id'] . "' disabled>
|
||||
<br />");
|
||||
echo (" </table>
|
||||
echo ("
|
||||
</table>
|
||||
</fieldset>
|
||||
</td>
|
||||
<td style='border :0px;'>
|
||||
<fieldset><legend>Centre d'Incendie et de Secours</legend>
|
||||
<table>
|
||||
<tr><th style='width:130px;'>Code</th> <td>".$lesInfosPompier['pCis']."</td> </tr>
|
||||
<tr><th>Nom</th> <td>".$lesInfosPompier['cNom']."</td> </tr>
|
||||
<tr><th>Adresse</th> <td>".$lesInfosPompier['cAdresse']."</td> </tr>
|
||||
<tr><th>Téléphone</th> <td>".$lesInfosPompier['cTel']."</td> </tr>
|
||||
<tr><th>Groupement</th> <td>".$lesInfosPompier['cGroupement']."</td> </tr>
|
||||
<tr><th style='width:130px;'>Code</th> <td><input name='zCis' type='text' class='infoPompier-chef' value='" . $lesInfosPompier['pCis'] . "' disabled></td> </tr>
|
||||
<tr><th>Nom</th> <td>" . $lesInfosPompier['cNom'] . "</td> </tr>
|
||||
<tr><th>Adresse</th> <td>" . $lesInfosPompier['cAdresse'] . "</td> </tr>
|
||||
<tr><th>Téléphone</th> <td>" . $lesInfosPompier['cTel'] . "</td> </tr>
|
||||
<tr><th>Groupement</th> <td>" . $lesInfosPompier['cGroupement'] . "</td> </tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset><legend>Fonction</legend>
|
||||
<table>
|
||||
<tr><th>Type</th> <td>".$lesInfosPompier['wType']."</td> </tr>
|
||||
<tr><th>Grade</th> <td>".$lesInfosPompier['wGrade']."</td> </tr>
|
||||
<tr><th>Statut</th> <td>".$lesInfosPompier['wStatut']."</td> </tr> </table>
|
||||
<tr><th>Type</th> <td>
|
||||
<select name='lstType' class='infoPompier-chef' disabled>");
|
||||
foreach ($pdo->getParametre('typePer') as $key => $value) {
|
||||
if ($lesInfosPompier['wType'] == $value['pLibelle']) {
|
||||
echo ("<option value=" . $value['pIndice'] . " selected> " . $value['pLibelle'] . "</option>");
|
||||
} else {
|
||||
echo ("<option value=" . $value['pIndice'] . "> " . $value['pLibelle'] . "</option>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo ("</td> </tr>
|
||||
|
||||
<tr><th>Grade</th> <td>
|
||||
<select name='lstGrade' class='infoPompier-chef' disabled>");
|
||||
foreach ($pdo->getParametre('grade') as $key => $value) {
|
||||
if ($lesInfosPompier['wGrade'] == $value['pLibelle']) {
|
||||
echo ("<option value=" . $value['pIndice'] . " selected> " . $value['pLibelle'] . "</option>");
|
||||
} else {
|
||||
echo ("<option value=" . $value['pIndice'] . "> " . $value['pLibelle'] . "</option>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo ("</td> </tr>
|
||||
|
||||
<tr><th>Statut</th> <td>
|
||||
<select name='lstStatut' class='infoPompier-chef' disabled>");
|
||||
foreach ($pdo->getParametre('statAgt') as $key => $value) {
|
||||
if ($lesInfosPompier['wStatut'] == $value['pLibelle']) {
|
||||
echo ("<option value=" . $value['pIndice'] . " selected> " . $value['pLibelle'] . "</option>");
|
||||
} else {
|
||||
echo ("<option value=" . $value['pIndice'] . "> " . $value['pLibelle'] . "</option>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo ("</td> </tr>
|
||||
</td> </tr>
|
||||
</table>
|
||||
</fieldset></td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -260,12 +317,15 @@ echo (" </table>
|
||||
<fieldset><legend>Observations</legend>
|
||||
<table style='border: 0px solid white;'>
|
||||
<tr>
|
||||
<td>.".$lesInfosPompier['pCommentaire']."</td>
|
||||
<td> <input name='ztObservation' type='text' class='infoPompier infoPompier-chef' value='" . $lesInfosPompier['pCommentaire'] . "' disabled></td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>");
|
||||
</form>
|
||||
<input type='image' class='btn-valid-modif' id='validModif' title='Modifier' src='images/valider.jpg' style='display:none; margin: 0 auto;'>
|
||||
|
||||
</div>
|
||||
");
|
||||
/*================================================================================================== Onglet X */
|
||||
echo ("
|
||||
<div style='display: none;' class='unOnglet' id='contenuOngletX'>
|
||||
@ -278,5 +338,5 @@ echo ("
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>");
|
||||
</div>");
|
||||
?>
|
@ -1,98 +1,25 @@
|
||||
|
||||
<!-- affichage d'une intervention / Derniere modification le 23 mai 2019 par Pascal Blain -->
|
||||
<?php
|
||||
$nbi=count($lesInterventions);
|
||||
<div class="lesInterventions" style="height: 200px;">
|
||||
<table>
|
||||
<th>
|
||||
<td>Date</td>
|
||||
<td>Caserne</td>
|
||||
<td>Motif</td>
|
||||
<td>Lieu</td>
|
||||
<td>Heure de début</td>
|
||||
<td>Heure de fin</td>
|
||||
</th>
|
||||
|
||||
$titre="Ajout";
|
||||
echo ('
|
||||
<div id="fiche">
|
||||
<ul class="lesOnglets">
|
||||
<li class="actif onglet" id="onglet1" onclick="javascript:Affiche(\'1\',3);">'.$titre.'</li>
|
||||
<li class="inactif onglet" id="onglet2" onclick="javascript:Affiche(\'2\',3);">onglet 2</li>
|
||||
<li class="inactif onglet" id="onglet3" onclick="javascript:Affiche(\'3\',3);">onglet 3</li>
|
||||
</ul>');
|
||||
|
||||
/*================================================================================================== nouvelle intervention (1) */
|
||||
echo("
|
||||
<div style='display: block;' class='unOnglet' id='contenuOnglet1'>
|
||||
<fieldset><legend>Nouvelle intervention</legend>
|
||||
<table>
|
||||
<tr><th style='width:180px;'>Description</th><th>Date</th><th>Lieu</th><th>Horaires</th></th></tr>
|
||||
<tr><td>".$infosIntervention['iDescription']."</td><td>".$infosIntervention['iDdate']."</td><td>".$infosIntervention['iLieu']."</td><td>de ".$infosIntervention['iHeureDebut']." à ".$infosIntervention['iHeureFin']."</td></tr>
|
||||
<tr><td colspan='4'>".$infosIntervention['programme1']."</td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<table style='border: 0px solid white;'>
|
||||
<tr>
|
||||
<td style='border :0px;'>
|
||||
<fieldset><legend><a href='index.php?uc=intervention&action=ajouterIntervenants&atelier=20132115&reunion=1' title='ajouter les participants'><img alt='ajouter des intervenants' src='images/group.png'>Intervenants</a></legend>
|
||||
<table>");
|
||||
$numPa = 0;
|
||||
<?php
|
||||
foreach ($variable as $key => $value) {
|
||||
# code...
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
foreach ($lesParticipants as $unParticipant) {
|
||||
if ( $unParticipant['rOrdre'] == 1 AND $numPa < 7) {
|
||||
$numPa = $numPa+1;
|
||||
$participant=$unParticipant['uNom'] . " " . $unParticipant['uPrenom'];
|
||||
echo("<tr> <th style='width:180px;'>" . $participant . "</th> <td>x</td> </tr>");
|
||||
}
|
||||
}
|
||||
echo(" </table>
|
||||
</fieldset></td>
|
||||
<td style='border :0px;'>
|
||||
<fieldset><legend>(suite)</legend>
|
||||
<table>");
|
||||
$numP = 0;
|
||||
foreach ($lesParticipants as $unParticipant) {
|
||||
if ($unParticipant['rOrdre'] == 1 ) {
|
||||
$numP = $numP+1;
|
||||
if ($numP > 7) {
|
||||
$participant = $unParticipant['uNom'] . " " . $unParticipant['uPrenom'];
|
||||
echo("<tr> <th style='width:180px;'>".$participant."</th> <td>x</td> </tr>");
|
||||
}
|
||||
}
|
||||
}
|
||||
while ($numP<14) {
|
||||
echo("<tr> <th>...</th>
|
||||
|
||||
<td> </td> </tr>");
|
||||
$numP = $numP+1;
|
||||
}
|
||||
echo(" </table>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<fieldset><legend>Observations</legend>
|
||||
<table style='border: 0px solid white;'>
|
||||
<tr>
|
||||
<td>".$infosIntervention['commentaire1']."</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>");
|
||||
/*================================================================================================== Onglet (2) */
|
||||
|
||||
echo ("
|
||||
<div style='display: none;' class='unOnglet' id='contenuOnglet2'>
|
||||
<fieldset><legend>XXXX</legend>
|
||||
<table>
|
||||
<tr><th style='width:130px;'>.....</th></tr>
|
||||
<tr><td>xxxx</td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>");
|
||||
|
||||
/*================================================================================================== Onglet 3 */
|
||||
echo ("
|
||||
<div style='display: none;' class='unOnglet' id='contenuOnglet3'>
|
||||
<fieldset><legend>XXXX</legend>
|
||||
<table>
|
||||
<tr><th style='width:130px;'>.....</th></tr>
|
||||
<tr><td>xxxx</td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<p>Lorem Elsass ipsum réchime amet non <span class="infobulle" aria-label="texte de l'infobulle">Choucroute</span>
|
||||
Picon bière Coopé knack tchao bissame hopla</p>
|
||||
|
||||
</div>
|
||||
</div>");
|
||||
?>
|
||||
</div>
|
74
vues/v_nouvelleIntervention.php
Normal file
74
vues/v_nouvelleIntervention.php
Normal file
@ -0,0 +1,74 @@
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
<div class="nouvelleInter">
|
||||
<h1>Nouvelle intervention</h1>
|
||||
<div class="formulaire" >
|
||||
<form action="" id="formulaireInter">
|
||||
|
||||
<label for="motif">Motif de l'intervention : </label>
|
||||
<select name="motif" id="motifInter">
|
||||
<?php
|
||||
foreach ($lesMotifs as $key => $type) {
|
||||
echo '<optgroup label="' . $key . '">';
|
||||
foreach ($type as $motif) {
|
||||
echo ' <option value="' . $motif['pIndice']
|
||||
. '" data-time="' . $motif['pPlancher']
|
||||
. '" data-effectif="' . $motif['pPlafond'] .'" >'
|
||||
. $motif['pLibelle'] . '</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<label for="adresse">Adresse de l'intervention : </label>
|
||||
<input type="text" id="adresse" name="adresse">
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<label for="caserne">Caserne la plus proche : </label>
|
||||
<select name="caserne" id="caserneInter">
|
||||
<?php
|
||||
foreach ($lesCasernes as $uneCaserne) {
|
||||
echo '<option value="' . $uneCaserne['cId'] . '">' . $uneCaserne['cNom'] . ' - ' . $uneCaserne['cAdresse'] . '</option>\n';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<label for="commentaire">Commentaire sur l'intervention : </label>
|
||||
<textarea name="commentaire" id="" cols="auto" rows="5"></textarea>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="selectionPompier">
|
||||
<div id="pompierDispo" class="pompierDispo" ondrop="dropHandler(event)" ondragover="dragoverHandler(event)">
|
||||
<!-- Liste des pompiers appelable -->
|
||||
<?php
|
||||
$pCis = isset($_GET['caserne']) ? $_GET['caserne'] : 2904;
|
||||
foreach ($lesPompiers as $key => $pompier):
|
||||
?>
|
||||
<div id="<?= $pompier['pId'] ?>" class="<?= $pompier['pLibelle'] ?>"
|
||||
style="background-color: <?= $pompier['pValeur'] ?>" draggable="true"
|
||||
data-intervention="<?= $pompier['enIntervention'] ?>" ondragstart="dragstartHandler(event)">
|
||||
<?= $pompier['pPrenom'] ?>
|
||||
<?= $pompier['pNom'] ?>
|
||||
(
|
||||
<?= $pompier['statut'] ?>)
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
|
||||
</div>
|
||||
<div id="target" ondrop="dropHandler(event)" ondragover="dragoverHandler(event)"
|
||||
ondragstart="dragstartHandler(event)" class="pompierIntervenant">
|
||||
<p id="nbPompierCons">Nombre de pompiers conseillé: 4</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<center><button type="submit" id="sendInter">Envoyer l'intervention</button></center>
|
||||
|
||||
<script src="include/gestionInterventions.js" type="text/javascript"></script>
|
@ -1,9 +1,16 @@
|
||||
<!-- Derniere modification le 18/09/2023 par Pascal Blain -->
|
||||
<!-- Division pour le pied de page -->
|
||||
<a href="index.php?choixTraitement=interventions&action=nouvelle">
|
||||
<button type="button" style="margin: 0 auto; display: block; width: auto; background-color: green;"> Nouvelle
|
||||
intervention</button>
|
||||
</a>
|
||||
<div>
|
||||
<hr /><p style="text-align:center;">
|
||||
<img src="images/castel.png" style="vertical-align: middle;">
|
||||
<?php echo "Lycée Le Castel à Dijon - BTS SIO - <img src='images/copyleft.png' style='text-align: center; vertical-align: middle;'> 2023 Pierre Renaudot";?></p>
|
||||
<hr />
|
||||
<p style="text-align:center;">
|
||||
<img src="images/castel.png" style="vertical-align: middle;">
|
||||
<?php echo "Lycée Le Castel à Dijon - BTS SIO - <img src='images/copyleft.png' style='text-align: center; vertical-align: middle;'> 2023 Pierre Renaudot"; ?>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -19,13 +19,23 @@
|
||||
<?php
|
||||
echo (" <table>
|
||||
<tr> <th>Indice</th> <td>");
|
||||
if ($action==="ajouter") {echo "<input class='controle' type='text' name='valeur' value='".$infosParam['pIndice']."'>";}
|
||||
else {echo $infosParam['pIndice'];}
|
||||
if ($action === "ajouter") {
|
||||
echo "<input class='controle' type='text' name='valeur' value='" . $infosParam['pIndice'] . "'>";
|
||||
} else {
|
||||
echo $infosParam['pIndice'];
|
||||
}
|
||||
echo (" </td> </tr>
|
||||
<tr> <th>Valeur</th> <td>");
|
||||
if ($action==="ajouter") {echo "<input class='controle' type='text' name='zLibelle'>";$actif=null;}
|
||||
if ($action==="modifier") {echo "<input class='controleLong' type='text' name='zLibelle' value='".$infosParam['pLibelle']."'>";$actif=null;}
|
||||
if ($action==="supprimer") {echo $infosParam['pLibelle'];$actif="disabled='disabled'";}
|
||||
if ($action === "ajouter") {
|
||||
echo "<input class='controle' type='text' name='zLibelle'>";
|
||||
$actif = null;
|
||||
} else if ($action === "modifier") {
|
||||
echo "<input class='controleLong' type='text' name='zLibelle' value='" . $infosParam['pLibelle'] . "'>";
|
||||
$actif = null;
|
||||
} else if ($action === "supprimer") {
|
||||
echo $infosParam['pLibelle'];
|
||||
$actif = "disabled='disabled'";
|
||||
}
|
||||
echo (" </td> </tr>");
|
||||
echo ("
|
||||
<tr> <th>Plancher</th> <td><input class='controle' type='text' name='zPlancher' value='".$infosParam['pPlancher']."'></td> </tr>
|
||||
@ -39,7 +49,7 @@ echo ("
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p align="right">
|
||||
<p style='margin: 0 auto;'>
|
||||
<input type="hidden" name="zOk" value="OK">
|
||||
<input type="image" name="btValider" alt="Valider" src="images/valider.jpg" onclick="this.form.submit();">
|
||||
<input type="image" name="btAnnuler" alt="Annuler" src="images/annuler.jpg" onclick="annuler('frmParam');">
|
||||
|
@ -1,87 +1,145 @@
|
||||
<!-- v_unPompier.php / Derniere modification le 18 septembre 2023 par Pascal Blain -->
|
||||
<div id="contenu">
|
||||
<?php
|
||||
/**
|
||||
* Boutons d'action a coté du nom
|
||||
* *lesInfosPompiers = pdo->getInfosPompier());
|
||||
*/
|
||||
if ($_REQUEST['action'] == "supprimer") {
|
||||
echo '<h2>SUPPRESSION DU POMPIER '.$lesInfosPompier['nom'].' '.$lesInfosPompier['prenom'].'</h2>';
|
||||
echo (
|
||||
<?php
|
||||
/**
|
||||
* Boutons d'action a coté du nom
|
||||
* *lesInfosPompiers = pdo->getInfosPompier());
|
||||
*/
|
||||
if ($_REQUEST['action'] == "supprimer") {
|
||||
echo '<h2>SUPPRESSION DU POMPIER ' . $lesInfosPompier['nom'] . ' ' . $lesInfosPompier['prenom'] . '</h2>';
|
||||
echo (
|
||||
'<form name="frmA" action="index.php?choixTraitement=pompiers&action=validerSupprimer&type='
|
||||
. $lesInfosPompier['pType']
|
||||
. $lesInfosPompier['pType']
|
||||
. '&agent=' . $lesInfosPompier['id']
|
||||
. '&caserne=' . $lesInfosPompier['pCis']
|
||||
. '" method="post">');
|
||||
}
|
||||
if ($_REQUEST['action'] == "modifier") {
|
||||
var_dump($lesInfosPompier);
|
||||
echo ('
|
||||
<h2>MODIFICATION DU POMPIER '
|
||||
. $lesInfosPompier['nom'] . ' '
|
||||
. $lesInfosPompier['prenom'] . '</h2>'
|
||||
);
|
||||
if ($_REQUEST['action'] == "modifier") {
|
||||
echo ('
|
||||
<form name="frmA" action="index.php?choixTraitement=pompiers&action=validerModifier&type='
|
||||
. $lesInfosPompier['pType'] . '&agent='
|
||||
<h2>MODIFICATION DU POMPIER '
|
||||
. $lesInfosPompier['nom'] . ' '
|
||||
. $lesInfosPompier['prenom'] . '</h2>'
|
||||
);
|
||||
echo ('
|
||||
<form name="frmA" action="index.php?choixTraitement=pompiers&action=validerModifier&type='
|
||||
. $lesInfosPompier['wType'] . '&agent='
|
||||
. $lesInfosPompier['id']
|
||||
. '&caserne=' . $lesInfosPompier['pCis']
|
||||
. '" method="post">'
|
||||
);
|
||||
}
|
||||
if ($_REQUEST['action'] == "ajouter") {
|
||||
if ($_REQUEST['action'] == "ajouter") {
|
||||
echo "<h2>AJOUT D'UN NOUVEAU POMPIER</h2>";
|
||||
echo '
|
||||
<form name="frmA" action="index.php?choixTraitement=pompiers&action=validerAjouter&type='
|
||||
. $lesInfosPompier['pType'].'" method="post" onsubmit="return valider(this)">';
|
||||
}
|
||||
echo ("
|
||||
|
||||
//action = index.php?choixTraitement=pompiers&action=validerAjouter&type=''
|
||||
//onsubmit="return valider(this)">
|
||||
echo('
|
||||
<form class="dataPompierAjout" name="frmA" action="index.php?choixTraitement=pompiers&action=validerAjouter&type="
|
||||
method="post"
|
||||
');
|
||||
echo ("
|
||||
<table style='border: 0px solid white;'>
|
||||
<tr>
|
||||
<td style='border :0px;'>
|
||||
<fieldset><legend>Coordonnées</legend>
|
||||
<table>
|
||||
");
|
||||
if ($_REQUEST['action'] == "supprimer"){ //-------------------------------------------------------- cas suppression
|
||||
echo ("
|
||||
");
|
||||
if ($_REQUEST['action'] == "supprimer") { //-------------------------------------------------------- cas suppression
|
||||
echo ("
|
||||
<div style='display: none;' class='unOnglet' id='contenuOnglet3'>
|
||||
<table style='border: 0px solid white;'>
|
||||
<tr>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
");
|
||||
}
|
||||
//------------------------------------------------------------------------------------ cas ajout ou modification
|
||||
");
|
||||
}
|
||||
//------------------------------------------------------------------------------------ cas ajout ou modification
|
||||
|
||||
if ($_REQUEST['action'] == "modifier") {
|
||||
echo (" <tr>
|
||||
if ($_REQUEST['action'] == "modifier") {
|
||||
echo (" <tr>
|
||||
</tr>
|
||||
</table>
|
||||
");
|
||||
}
|
||||
if ($_REQUEST['action'] == "ajouter") {
|
||||
echo (" <tr><th style='width:130px;'>Nom</th> <td style='width:130px;'><input id='ztNom' type='text' name='ztNom'></td> </tr>
|
||||
|
||||
<br />");
|
||||
}
|
||||
?>
|
||||
<table style='border: 0px solid white; '>
|
||||
<tr>
|
||||
<td style='border: 0px solid white;'>
|
||||
<fieldset><legend>Observations</legend>
|
||||
<textarea name='ztObs' cols='70' rows='1'></textarea>
|
||||
</fieldset>
|
||||
</td>
|
||||
<td>
|
||||
<input type="image" name="btValider" alt="Valider" src="images/valider.jpg" value="OK" >
|
||||
<input type="image" name="btAnnuler" alt="Annuler" src="images/annuler.jpg" value="nonOK" onclick="annuler('frmA');">
|
||||
</td>
|
||||
<td style='border: 0px solid white; witdh:130px; text-align:right;'>
|
||||
<input type="hidden" name="zTypeAdm" value="<?php// if ($type=="adm") {echo ("true");} else {echo ("false");} ?>">
|
||||
<input type="hidden" name="zOk" value="OK">
|
||||
}
|
||||
if ($_REQUEST['action'] == "ajouter") {
|
||||
// <input name='pId' class='infoPompier' value='" . $lesInfosPompier['id'] . "' >
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
echo ("
|
||||
<tr><th style='width:130px;'>Nom*</th> <td style='width:130px;'><input name='ztNom' id='newName' type='text' class='infoPompier' required></td> </tr>
|
||||
<tr><th>Prénom*</th> <td> <input name='ztPrenom' id='newUsername' type='text' class='infoPompier infoPompier-chef' required></td> </tr>
|
||||
<tr><th>Adresse</th> <td> <input name='ztAdresse' type='text' class='infoPompier infoPompier-chef' ></td> </tr>
|
||||
<tr><th>Code postal</th> <td> <input name='ztCodePostal' type='text' class='infoPompier infoPompier-chef' ></td> </tr>
|
||||
<tr><th>Ville</th> <td> <input name='ztVille' type='text' class='infoPompier infoPompier-chef' ></td> </tr>
|
||||
<tr><th>Téléphone*</th> <td> <input name='ztTel' type='text' class='infoPompier-chef' required></td> </tr>
|
||||
<tr><th>Adresse électronique*</th> <td> <input name='ztMail' type='text' class='infoPompier infoPompier-chef' required></td> </tr>
|
||||
<tr><th>Nom de compte*</th> <td><input name='ztLogin' id='newLogin' type='text' class='infoPompier infoPompier-chef' required></td></tr>
|
||||
<tr><th style='width:130px;'>Code</th> <td><input name='zCis' id='inputDisabled' type='text' class='infoPompier-chef' value='" . $lesInfosPompier['pCis'] . "' disabled></td> </tr>
|
||||
<tr><th>Nom</th> <td>" . $lesInfosPompier['cNom'] . "</td> </tr>
|
||||
<tr><th>Adresse</th> <td>" . $lesInfosPompier['cAdresse'] . "</td> </tr>
|
||||
<tr><th>Téléphone</th> <td>" . $lesInfosPompier['cTel'] . "</td> </tr>
|
||||
<tr><th>Groupement</th> <td>" . $lesInfosPompier['cGroupement'] . "</td> </tr>
|
||||
|
||||
<tr><th>Type</th> <td>
|
||||
<select name='lstType' class='infoPompier-chef'>");
|
||||
foreach ($pdo->getParametre('typePer') as $key => $value) {
|
||||
echo ("<option value=" . $value['pIndice'] . "> " . $value['pLibelle'] . "</option>");
|
||||
}
|
||||
echo ("</td> </tr>
|
||||
<tr><th>Grade</th> <td>
|
||||
<select name='lstGrade' class='infoPompier-chef'>");
|
||||
foreach ($pdo->getParametre('grade') as $key => $value) {
|
||||
echo ("<option value=" . $value['pIndice'] . "> " . $value['pLibelle'] . "</option>");
|
||||
}
|
||||
|
||||
|
||||
echo ("</td> </tr>
|
||||
|
||||
<tr><th>Statut</th> <td>
|
||||
<select name='lstStatut' class='infoPompier-chef'>");
|
||||
foreach ($pdo->getParametre('statAgt') as $key => $value) {
|
||||
echo ("<option value=" . $value['pIndice'] . "> " . $value['pLibelle'] . "</option>");
|
||||
}
|
||||
|
||||
|
||||
echo ("</td> </tr>
|
||||
<br />");
|
||||
|
||||
echo ("
|
||||
</td> </tr>
|
||||
</table>
|
||||
</fieldset></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<fieldset><legend>Observations</legend>
|
||||
<table style='border: 0px solid white;'>
|
||||
<tr>
|
||||
<td> <input name='ztObservation' type='text' class='infoPompier' value='" . $lesInfosPompier['pCommentaire'] . "' ></td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<div style='text-align:center; '>
|
||||
<p class='notif-ajout' style:'margin: 10px'></p>
|
||||
<input type= 'image' class='btAnnulerAjout' alt='Annuler' src= 'images/Annuler.jpg'>
|
||||
<input type= 'image' class='validerAjout' alt='Valider' src= 'images/Valider.jpg'>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<input type='image' class='btn-valid-modif' id='validModif' title='Modifier' src='images/valider.jpg' style='display:none; margin: 0 auto;'>
|
||||
");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<table style='border: 0px solid white; '>
|
||||
<tr>
|
||||
<td style='border: 0px solid white; witdh:130px; text-align:right;'>
|
||||
<input type="hidden" name="zTypeAdm"
|
||||
value="">
|
||||
<? // if ($type=="adm") {echo ("true");} else {echo ("false");} ?>
|
||||
<input type="hidden" name="zOk" value="OK">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
Loading…
x
Reference in New Issue
Block a user