149 lines
4.9 KiB
PHP
149 lines
4.9 KiB
PHP
<?php
|
|
include('include/entete.php');
|
|
include('include/entete_adm.php');
|
|
include('config/config.inc.php');
|
|
include('config/lib.inc.php');
|
|
|
|
$maCleDeCryptage = getCleDeCryptage();
|
|
|
|
?>
|
|
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>FAFIH - DECIDAY</title>
|
|
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
|
|
<script type="text/javascript" src="js/bootstrap.min.js"></script>
|
|
<script type="text/javascript" src="js/fonctions.js"></script>
|
|
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
|
<link href="css/style.css" rel="stylesheet" type="text/css">
|
|
<script>
|
|
jQuery(document).ready(function(){
|
|
<?php
|
|
if(isset($_SESSION['msg']) && !empty($_SESSION['msg'])){
|
|
?>
|
|
alert('<?php print addslashes($_SESSION['msg']);?>');
|
|
<?php
|
|
$_SESSION['msg']="";
|
|
}
|
|
?>
|
|
|
|
$('.comLien').each(function (index){
|
|
$(this).click(function() {
|
|
$('#mCommentaire'+index).modal('show');
|
|
});
|
|
});
|
|
|
|
});
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<?php include('include/header.php');?>
|
|
|
|
<div class="container contentPage">
|
|
|
|
<?php include('include/admin-header.php');?>
|
|
|
|
<div class="col-lg-2 col-md-2 col-sm-1 hidden-xs bgTitrePage"></div>
|
|
<div class="col-lg-8 col-md-8 col-sm-10 col-xs-12 titreContenuPage">Suivi des sollicitations</div>
|
|
<div class="col-lg-2 col-md-2 col-sm-1 hidden-xs bgTitrePage"></div>
|
|
<div class="clearfix"></div>
|
|
|
|
|
|
<?php
|
|
$query="SELECT *
|
|
FROM `sollicitations`
|
|
INNER JOIN `eta` ON id_eta = chxNumEta
|
|
WHERE `traitement` <> 1";
|
|
$db = connect_base();
|
|
$queryRequest = $db->prepare( $query );
|
|
$queryRequest->execute();
|
|
if($queryRequest->rowCount()>0){
|
|
$data=$queryRequest->fetchAll();
|
|
$statut = null;
|
|
$coordonnees = null;
|
|
$n=0;
|
|
|
|
echo '<table cellpadding="0" cellspacing="0" class="tabAdm tabEtat">';
|
|
echo "<tr><th>CFA/LP</th><th>CFA/LP Ville<br/>Code postal</th><th>CFA/LP<br/>E-mail référent</th><th>Etablissement</th><th>Nom Prénom</th><th>Fonction</th><th>Téléphone</th><th>E-mail</th><th>Coordonnées</th><th>Classes/Elèves</th><th>Créneaux</th><th>Commentaires</th><th>Statut</th><th>Date</th></tr>";
|
|
foreach($data as $val){
|
|
// Définition du statut de la sollicitation
|
|
if(intval($val['idCapitaine']) > 0 ){
|
|
$statut = "en attente";
|
|
} else {
|
|
$statut = "<span class=\"refuse\">refusé</span>";
|
|
}
|
|
|
|
// Définition des coordonnées de l'établissement
|
|
$add1 = decrypter($maCleDeCryptage,$val['adresse1CoLy']);
|
|
$add2 = decrypter($maCleDeCryptage,$val['adresse2CoLy']);
|
|
$cp = decrypter($maCleDeCryptage,$val['cpCoLy']);
|
|
$ville = decrypter($maCleDeCryptage,$val['villeCoLy']);
|
|
$coordonnees = $add1;
|
|
if(!empty($add2)){
|
|
$coordonnees = $coordonnees . "<br/>" . $add2;
|
|
}
|
|
$coordonnees = $coordonnees . "<br/>" . $cp . " " . $ville;
|
|
$cpVilleEta = decrypter($maCleDeCryptage,$val['cp']). "<br/>" . decrypter($maCleDeCryptage,$val['ville']);
|
|
|
|
|
|
echo "<tr>";
|
|
echo "<td>".decrypter($maCleDeCryptage,$val['nom_eta'])."</td>";
|
|
echo "<td>".$cpVilleEta."</td>";
|
|
echo "<td>".decrypter($maCleDeCryptage,$val['email_ref'])."</td>";
|
|
echo "<td>".decrypter($maCleDeCryptage,$val['etaCoLy'])."</td>";
|
|
echo "<td>".decrypter($maCleDeCryptage,$val['nomCoLy'])."<br/>".decrypter($maCleDeCryptage,$val['prenomCoLy']). "</td>";
|
|
echo "<td>".decrypter($maCleDeCryptage,$val['fonctionCoLy'])."</td>";
|
|
echo "<td>".decrypter($maCleDeCryptage,$val['telCoLy'])."</td>";
|
|
echo "<td>".decrypter($maCleDeCryptage,$val['emlCoLy'])."</td>";
|
|
echo "<td>".$coordonnees."</td>";
|
|
echo "<td>".$val['nbClasses']."/".$val['nbEleves']."</td>";
|
|
echo "<td>".MysqlToDateFr($val['chxJour'])." ".$val['chxCreneau']."</td>";
|
|
echo "<td><a href=\"#\" data-toggle=\"modal\" data-target=\"mCommentaire$n\" class=\"comLien\">Détail</a></td>";
|
|
echo "<td>$statut</td>";
|
|
echo "<td>".MysqlToDateFr($val['dateCreate'])."</td>";
|
|
|
|
}
|
|
echo '</table>';
|
|
foreach($data as $val){
|
|
$coLy = decrypter($maCleDeCryptage,$val['etaCoLy']);
|
|
$commentaires = nl2br(htmlspecialchars(decrypter($maCleDeCryptage,$val['commentCoLy'])));
|
|
?>
|
|
|
|
|
|
<!-- Modal -->
|
|
<div class="modal fade" id="mCommentaire<?=$n?>" tabindex="-1" role="dialog" aria-labelledby="mCommentaire<?=$n?>" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="mCommentaire<?=$n?>Title">Commentaires de <?=$coLy ?> </h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<?=$commentaires ?>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
$n++;
|
|
}
|
|
|
|
|
|
}
|
|
?>
|
|
<br /><div class="btnDeci"><a href="index-adm.php">Retour</a></div>
|
|
|
|
</div>
|
|
|
|
<?php include('include/footer.php');?>
|
|
|
|
</body>
|
|
</html>
|