Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephane Crozat
apisub
Commits
5b7efec4
Commit
5b7efec4
authored
Jun 04, 2019
by
Stephane Crozat
Browse files
Add super-pouvoir fichier CSV des inscrits
parent
44ee3209
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/db.php
View file @
5b7efec4
...
...
@@ -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
;
...
...
lib/views.php
View file @
5b7efec4
...
...
@@ -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>"
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment