159 lines
5.8 KiB
PHP
159 lines
5.8 KiB
PHP
<?php
|
|
|
|
include('include/entete.php');
|
|
include('include/entete_cap.php');
|
|
include('config/config.inc.php');
|
|
include('config/lib.inc.php');
|
|
|
|
$maCleDeCryptage = getCleDeCryptage();
|
|
|
|
$query="select * from eta,capitaines where id_eta=num_eta and id_cap=:id_cap";
|
|
$db = connect_base();
|
|
$queryRequest = $db->prepare( $query );
|
|
$queryRequest->bindParam( ':id_cap', $_SESSION['cap_num'], PDO::PARAM_INT );
|
|
$queryRequest->execute();
|
|
$data=$queryRequest->fetchAll();
|
|
$capitaine=decrypter($maCleDeCryptage,$data[0]['prenom_cap'])." ".decrypter($maCleDeCryptage,$data[0]['nom_cap']);
|
|
|
|
//Ajout ou Modification
|
|
if(empty($_GET['idSol'])){
|
|
$_SESSION['msg']='Une erreur a été rencontrée pour consulter la sollicitation.';
|
|
header('location:agenda-cap.php#sollicitation');
|
|
exit();
|
|
}else $idCoLy = $_GET['idSol'];
|
|
|
|
|
|
$query="select * from sollicitations where idCoLy=:idCoLy AND idCapitaine=:idCapitaine";
|
|
$queryRequest = $db->prepare( $query );
|
|
$queryRequest->bindParam( ':idCoLy', $idCoLy, PDO::PARAM_INT );
|
|
$queryRequest->bindParam( ':idCapitaine', $_SESSION['cap_num'], PDO::PARAM_INT );
|
|
$queryRequest->execute();
|
|
$countCoLy = $queryRequest->rowCount();
|
|
|
|
|
|
if($countCoLy!=1){
|
|
$_SESSION['msg']='Une erreur a été rencontrée pour consulter la sollicitation.';
|
|
header('location:agenda-cap.php#sollicitation');
|
|
exit();
|
|
}
|
|
|
|
$dataCoLy=$queryRequest->fetchAll();
|
|
$etaCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['etaCoLy']);
|
|
$nomCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['nomCoLy']);
|
|
$prenomCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['prenomCoLy']);
|
|
$fonctionCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['fonctionCoLy']);
|
|
$telCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['telCoLy']);
|
|
$emlCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['emlCoLy']);
|
|
$adresse1CoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['adresse1CoLy']);
|
|
$adresse2CoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['adresse2CoLy']);
|
|
$cpCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['cpCoLy']);
|
|
$villeCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['villeCoLy']);
|
|
$nbClasses = $dataCoLy[0]['nbClasses'];
|
|
$nbEleves = $dataCoLy[0]['nbEleves'];
|
|
$commentCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['commentCoLy']);
|
|
$jour = MysqlToDateFr($dataCoLy[0]['chxJour']);
|
|
$creneau = getCreneauSol($dataCoLy[0]['chxCreneau']);
|
|
|
|
?>
|
|
<!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']="";
|
|
}
|
|
?>
|
|
});
|
|
|
|
</script>
|
|
<style type="text/css">
|
|
.frmVoir th{ font-weight: normal; }
|
|
.frmVoir th, .frmVoir td{ padding: 5px 10px; }
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<?php include('include/header.php');?>
|
|
|
|
<div class="container contentPage">
|
|
<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">Votre espace Capitaine</div>
|
|
<div class="col-lg-2 col-md-2 col-sm-1 hidden-xs bgTitrePage"></div>
|
|
<div class="clearfix"></div>
|
|
|
|
<div class="headerCap" style="text-align: center; margin:18px 0 12px;">
|
|
<span class="ssTitreViolet"><?php echo decrypter($maCleDeCryptage,$data[0]['nom_eta']);?></span><br />
|
|
<b>Capitaine : </b><?php echo $capitaine;?> <a href="modifier-cap.php">modifier</a><br />
|
|
<a href="deco.php">Déconnexion</a>
|
|
</div>
|
|
|
|
<div class="menuPage">
|
|
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
|
|
<a href="index-cap.php">Votre trinôme</a>
|
|
</div>
|
|
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
|
|
<a href="agenda-cap.php">Votre agenda</a>
|
|
</div>
|
|
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
|
|
<a href="bao-cap.php">Boite à outils</a>
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
|
|
<div class="col-lg-2 col-md-2 col-sm-1 hidden-xs"></div>
|
|
<div class="col-lg-8 col-md-8 col-sm-10 col-xs-12 titreContenuPage">Détail de la sollicitation</div>
|
|
<div class="col-lg-2 col-md-2 col-sm-1 hidden-xs"></div>
|
|
<div class="clearfix"></div>
|
|
|
|
<div class="textIntro"><br/>
|
|
<div class="clearfix"></div>
|
|
<ul>
|
|
<li>Jour souhaité : <b><?php echo $jour; ?></b></li>
|
|
<li>Créneau souhaité : <b><?php echo $creneau; ?></b></li>
|
|
</ul>
|
|
<br />
|
|
|
|
<table class="frmVoir">
|
|
|
|
<tr><th>Etablissement : </th><td><?php echo $etaCoLy; ?></td></tr>
|
|
<tr><th>Nom : </th><td><?php echo $nomCoLy; ?></td></tr>
|
|
<tr><th>Prénom : </th><td><?php echo $prenomCoLy; ?></td></tr>
|
|
<tr><th>Fonction : </th><td><?php echo $fonctionCoLy; ?></td></tr>
|
|
<tr><th>Ligne Directe : </th><td><?php echo $telCoLy; ?></td></tr>
|
|
<tr><th>E-mail : </th><td><?php echo $emlCoLy; ?></td></tr>
|
|
<tr><th>Adresse 1 : </th><td><?php echo $adresse1CoLy; ?></td></tr>
|
|
<tr><th>Adresse 2 : </th><td><?php echo $adresse2CoLy; ?></td></tr>
|
|
<tr><th>Code Postal : </th><td><?php echo $cpCoLy; ?></td></tr>
|
|
<tr><th>Ville : </th><td><?php echo $villeCoLy; ?></td></tr>
|
|
<tr><th>Nombre de classes : </th><td><?php echo $nbClasses; ?></td></tr>
|
|
<tr><th>Nombre total d'élèves concernés : </th><td><?php echo $nbEleves; ?></td></tr>
|
|
<tr><th>Commentaires : </th><td><?php echo nl2br($commentCoLy); ?></td></tr>
|
|
|
|
</table>
|
|
<div style="height: 20px;"></div>
|
|
<div class="btnDeci"><a href="agenda-cap.php#sollicitation">Retour</a></div>
|
|
</form>
|
|
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
|
|
</div>
|
|
|
|
<?php include('include/footer.php');?>
|
|
|
|
</body>
|
|
</html>
|