garancia-pharmaciens/httpdocs/ecole-des-sorciers-historique.php
2017-05-30 17:55:38 +02:00

89 lines
3.2 KiB
PHP

<?php
/*-----------------------------------------------------*/
include_once("_inc/config.php");
/*-----------------------------------------------------*/
$_RUBRIQUE = "ecole-des-sorciers";
/*-----------------------------------------------------*/
include_once("_inc/assets/metas.php");
include_once("_inc/assets/top.php");
/*-----------------------------------------------------*/
if (isset($_SESSION['gar_front_code_client']) && !empty($_SESSION['gar_front_code_client'])) {
$code_client = $_SESSION['gar_front_code_client'];
// Connexion à la DB
if ($mysqli = new mysqli('localhost', 'garancia_prod', 'U1*6z4jn', 'garancia_prod')){
$mysqli->set_charset("utf8");
$res_date = $mysqli->query('SELECT value FROM gar_configuration WHERE name ="MAJ_FORMATION"');
$result = $res_date->fetch_assoc();
$date = $result['value'];
$res = $mysqli->query('SELECT * FROM gar_formations WHERE code_client = '.$code_client);
} else {
var_dump('echec');
}
}
?>
<div class="page">
<div id="arianne">
<a href="home.php">Accueil</a> |
<a href="nouveautes.php">Formez-vous</a> |
<span class="current">L'école des sorciers</span>
</div>
<div class="page_menu">
<a href="nouveautes.php"><span>Nouveautés</span></a>
<a href="fiches-produits.php"><span>Fiches produits</span></a>
<a href="ecole-des-sorciers.php" class="current"><span>L'école des <img src="_img/produits/sorciers2.png" alt="sorciers" /></span></a>
</div>
<div class="clear"></div>
<div id="hist-div">
<span id="hist-label"> Les modules validés au :</span>
<span id="hist-update"> <?php echo $date ?> </span>
</div>
<div class="produits_contents">
<table class="historique">
<thead>
<tr>
<td>Module</td>
<td>Catégorie</td>
<td>Code Client</td>
<td>Prenom</td>
<td>Nom</td>
<td>Date validation</td>
</tr>
</thead>
<tbody>
<?php
while( $line = $res->fetch_assoc() ) {
echo "<tr>";
echo "<td class='td-module'>".$line['module']."</td>";
echo "<td class='td-category'>".$line['category']."</td>";
echo "<td class='td-code-client'>";
echo (strlen($line['code_client']) == 6)? '0'.$line['code_client'] : $line['code_client'];
echo "</td>";
echo "<td class='td-prenom'>".$line['prenom']."</td>";
echo "<td class='td-nom'>".$line['nom']."</td>";
echo "<td class='td-date-validation'>".$line['date_validation']."</td>";
echo "</tr>";
}
?>
</tbody>
</table>
</div>
</div>
<?php
/*-----------------------------------------------------*/
include_once("_inc/assets/footer.php");
/*-----------------------------------------------------*/
?>