74 lines
3.0 KiB
PHP
74 lines
3.0 KiB
PHP
<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>
|