Commit af498999 authored by Stephane Crozat's avatar Stephane Crozat

Conflict resolution, Trombinoscope OK

parent 0923c316
......@@ -16,10 +16,6 @@ else {
$view->printHtmlBegin($admin);
$view->printUser($db->isResp($_SESSION['utclogin']), $db->isAdmin($_SESSION['utclogin']));
<<<<<<< HEAD
=======
>>>>>>> 10d1bbf37f4ad6b12420efdfcb6831c4670fe24b
$view->apiStudents($db->apiStudents($_SESSION['utclogin'],$_GET['api']));
}
......
......@@ -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
>>>>>>> 10d1bbf37f4ad6b12420efdfcb6831c4670fe24b
}
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);
......
......@@ -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>";
>>>>>>> 10d1bbf37f4ad6b12420efdfcb6831c4670fe24b
}
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>';
}
=======
>>>>>>> 10d1bbf37f4ad6b12420efdfcb6831c4670fe24b
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>";
}
......
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