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
af498999
Commit
af498999
authored
Feb 08, 2019
by
Stephane Crozat
Browse files
Conflict resolution, Trombinoscope OK
parent
0923c316
Changes
3
Hide whitespace changes
Inline
Side-by-side
api.php
View file @
af498999
...
...
@@ -16,10 +16,6 @@ else {
$view
->
printHtmlBegin
(
$admin
);
$view
->
printUser
(
$db
->
isResp
(
$_SESSION
[
'utclogin'
]),
$db
->
isAdmin
(
$_SESSION
[
'utclogin'
]));
<<<<<<<
HEAD
=======
>>>>>>>
10
d1bbf37f4ad6b12420efdfcb6831c4670fe24b
$view
->
apiStudents
(
$db
->
apiStudents
(
$_SESSION
[
'utclogin'
],
$_GET
[
'api'
]));
}
...
...
lib/db.php
View file @
af498999
...
...
@@ -203,30 +203,17 @@ class DB {
}
}
<<<<<<<
HEAD
public
function
apiStudents
(
$utclogin
,
$api
)
{
public
function
apiStudents
(
$utclogin
,
$api
)
{
if
(
$this
->
isAdmin
(
$utclogin
))
{
$sql
=
'SELECT *
FROM vsubscription
WHERE id=:api AND resplogin=:utclogin AND validation
ORDER BY surname, firstname'
;
//TODO donner accès aux admins même si ne sont pas les resp
=======
public
function
apiStudents
(
$utclogin
,
$api
)
{
if
(
$this
->
isAdmin
(
$utclogin
))
{
$sql
=
'SELECT *
FROM vsubscription
WHERE id=:api AND resplogin=:utclogin
ORDER BY surname, firstname'
;
//TODO
>>>>>>>
10
d1bbf37f4ad6b12420efdfcb6831c4670fe24b
}
else
{
$sql
=
'SELECT *
FROM vsubscription
<<<<<<< HEAD
WHERE id=:api AND resplogin=:utclogin AND validation
=======
WHERE id=:api AND resplogin=:utclogin
>>>>>>> 10d1bbf37f4ad6b12420efdfcb6831c4670fe24b
ORDER BY surname, firstname'
;
}
$st
=
$this
->
conn
->
prepare
(
$sql
);
...
...
lib/views.php
View file @
af498999
...
...
@@ -150,12 +150,8 @@ class Views {
if
(
$api
!=
$sub
[
'id'
])
{
$api
=
$sub
[
'id'
];
echo
'<hr/>'
;
<<<<<<<
HEAD
echo
'<h2>'
.
$this
->
printApi
(
$sub
)
.
'</h2>'
;
echo
"<div><a href='api.php?api=
$api
'>> Trombinoscope</a></div>"
;
=======
echo
'<h2>'
.
$this
->
printApi
(
$sub
)
.
" <a href='api.php?api=
$api
'>*</a></h2>"
;
>>>>>>>
10
d1bbf37f4ad6b12420efdfcb6831c4670fe24b
}
if
(
$sub
[
'utclogin'
])
{
if
(
$sub
[
'validation'
])
{
...
...
@@ -183,25 +179,18 @@ class Views {
public
function
apiStudents
(
$students
)
{
echo
"<hr/>"
;
<<<<<<<
HEAD
if
(
isset
(
$students
[
0
]))
{
echo
'<h2>'
.
$this
->
printApi
(
$students
[
0
])
.
'</h2>'
;
}
else
{
echo
'<h2>Aucun inscrit</h2>'
;
}
=======
>>>>>>>
10
d1bbf37f4ad6b12420efdfcb6831c4670fe24b
foreach
(
$students
as
$s
)
{
echo
"<div class='student'>
<img src='https://demeter.utc.fr/portal/pls/portal30/portal30.get_photo_utilisateur?username=
$s[utclogin]
'
height='100px'
width='100px'/>
<<<<<<< HEAD
<span class='name'>
$s[surname]
$s[firstname]
|
$s[level]
| <a href='mailto:
$s[email]'>$s[email]
</a> (
$s[utclogin]
)</span>
=======
<span class='name'>
$s[surname]
$s[firstname]
|
$s[level]
<a href='mailto:
$s[email]'>[mail]
</a> (
$s[utclogin]
)</span>
>>>>>>> 10d1bbf37f4ad6b12420efdfcb6831c4670fe24b
</div>"
;
}
}
...
...
@@ -213,7 +202,6 @@ class Views {
}
}
public
function
adminFunction
(
$utclogin
)
{
echo
"<p>Je dois vérifier que
$utclogin
a vraiment des super-pouvoirs...</p>"
;
}
...
...
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