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

Add super-pouvoir fichier CSV des inscrits

parent 44ee3209
...@@ -226,8 +226,6 @@ class DB { ...@@ -226,8 +226,6 @@ class DB {
WHERE validation WHERE validation
ORDER BY code, surname, firstname'; ORDER BY code, surname, firstname';
$st = $this->conn->prepare($sql); $st = $this->conn->prepare($sql);
$st->bindValue(':api',$api,PDO::PARAM_STR);
$st->bindValue(':utclogin',$utclogin,PDO::PARAM_STR);
$st->execute(); $st->execute();
$res = $st->fetchAll(PDO::FETCH_ASSOC); $res = $st->fetchAll(PDO::FETCH_ASSOC);
return $res; return $res;
......
...@@ -230,13 +230,24 @@ class Views { ...@@ -230,13 +230,24 @@ class Views {
// Resp Emails // Resp Emails
echo '<h3>Mails aux reponsables d\'Api</h3>'; echo '<h3>Mails aux reponsables d\'Api</h3>';
echo '<div>';
$all = ''; $all = '';
foreach ($mailresp as $m) { foreach ($mailresp as $m) {
echo "<a href='mailto:$m[email]'>$m[email]</a> |"; echo "<a href='mailto:$m[email]'>$m[email]</a> |";
$all = "$all,$m[email]"; $all = "$all,$m[email]";
} }
echo "<b><a href='mailto:$all'>[all]</a></b>"; 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