Commit 5b7efec4 authored by Stephane Crozat's avatar Stephane Crozat

Add super-pouvoir fichier CSV des inscrits

parent 44ee3209
......@@ -226,8 +226,6 @@ class DB {
WHERE validation
ORDER BY code, surname, firstname';
$st = $this->conn->prepare($sql);
$st->bindValue(':api',$api,PDO::PARAM_STR);
$st->bindValue(':utclogin',$utclogin,PDO::PARAM_STR);
$st->execute();
$res = $st->fetchAll(PDO::FETCH_ASSOC);
return $res;
......
......@@ -230,13 +230,24 @@ class Views {
// Resp Emails
echo '<h3>Mails aux reponsables d\'Api</h3>';
echo '<div>';
$all = '';
foreach ($mailresp as $m) {
echo "<a href='mailto:$m[email]'>$m[email]</a> |";
$all = "$all,$m[email]";
}
echo "<b><a href='mailto:$all'>[all]</a></b>";
echo '</div>';
//
// Student list
echo '<h3>Liste des inscrits</h3>';
echo '<script src="js/main.js"></script>';
echo "<script>var csvstudents = [['Api','Nom','Prénom','Niveau','Mail','Login'],";
foreach ($students as $s) {
echo "['$s[code]','$s[surname]','$s[firstname]','$s[level]','$s[email]','$s[utclogin]'],";
}
echo "];</script>";
// Api Menu
echo "<div><a id='csvlink' onclick='download_csv(csvstudents)' href=''>[Fichier CSV]</a></div>";
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment