diff --git a/css/main.css b/css/main.css new file mode 100644 index 0000000000000000000000000000000000000000..40d913901d6a840ce613e7548f7df2fc2c2035dd --- /dev/null +++ b/css/main.css @@ -0,0 +1,38 @@ +.user .name { + font-weight:bold; +} +.user .login { + font-style:italic; +} +.menu { + margin-top:5pt; +} +.menu a { + text-decoration:none; + color:#1d007a; + font-weight:bold; +} +a { + text-decoration:none; + color:#393939; +} + +hr { + border-top: 1.5px solid black; +} + +.sub { + text-decoration:none; + font-weight:bold; + color:#00612b; +} +.unsub { + text-decoration:none; + font-weight:bold; + color:#8e3c00; +} +.valid { + text-decoration:none; + font-weight:bold; + color:#790600; +} diff --git a/index.php b/index.php index d66a4ec3216c5b4f529d750f7b42c256c61b3f86..f44bee286d5d70a7ab44302deddb49e720df4291 100644 --- a/index.php +++ b/index.php @@ -36,7 +36,7 @@ $db = new DB(); $admin = new Admin($db); $view = new Views($admin, $_SESSION['utclogin'], $_SESSION['surname'], $_SESSION['firstname']); -$view->printHtmlBegin(); +$view->printHtmlBegin($admin); $view->printUser($db->isResp($_SESSION['utclogin']), $db->isAdmin($_SESSION['utclogin'])); if (isset($_GET['mode'])) { diff --git a/lib/views.php b/lib/views.php index 4d12d850c66a270e7e71788d784443892204db93..51f5efd2439d6cc1ea51c1b70a75746f7c6f1acf 100644 --- a/lib/views.php +++ b/lib/views.php @@ -18,7 +18,7 @@ class Views { return $this->admin->isActive(); } - public function printHtmlBegin() { + public function printHtmlBegin($admin) { echo ''; echo ''; echo ''; @@ -26,23 +26,25 @@ class Views { echo ''; echo ''; echo ''; - echo '

Foire aux Api

'; + echo '

Foire aux Api '.$admin->activeSemester().$admin->activeYear().'

'; } public function printInstructions($row) { + echo '
'; echo '

Catalogue

'; echo '

Les Api sont décrites ici : https://apint.utc.fr/cat. Veillez à avoir bien lu la fiche avant de vous inscrire (pré-requis, dates...).

'; echo '

Instructions

'; echo ''; } public function printUser($isResp, $isAdmin) { - echo "

$this->firstname $this->surname ($this->utclogin)

"; + echo "
$this->firstname $this->surname ($this->utclogin)
"; + echo ""; } private function printApi($row) { @@ -74,6 +77,7 @@ class Views { public function printSubList($list) { #KNOWN_BUB #TODO Il est possible de ses déinscrire en utilisant directement l'URL if ($list) { + echo '
'; echo '

Vos inscriptions

'; $week = ''; foreach ($list as $row) { @@ -87,11 +91,10 @@ class Views { echo "[validé] "; } else { - echo "[désinscription] "; + echo "[désinscription] "; } } echo $this->printApi($row); - echo ' ['.$row['semester'].$row['year'].', inscrit le '.$row['subdate'].']'; echo '

'; } } @@ -102,6 +105,7 @@ class Views { public function printApiList($list) { if ($list) { + echo '
'; echo '

Liste des Api

'; $week = ''; foreach ($list as $row) { @@ -112,7 +116,7 @@ class Views { echo '

'; if ($this->isActive()) { if ($row['open'] && $row['is_available']) { - echo "[inscription] "; + echo "[inscription] "; } elseif (! $row['is_available']) { echo "[indisponible] "; @@ -132,14 +136,21 @@ class Views { public function respValidation ($listsub) { // #KNOWN_BUG Si un resp a plusieurs Api, il peut changer un inscrit entre ses deux Api en modifiant l'URL (pas via l'interface) - echo '

Interface Responsable d\'Api

'; + + echo '

Interface Responsable d\'Api

'; + echo '
'; + echo '

Rappel

'; + echo ''; if ($listsub) { $api = ''; foreach ($listsub as $sub) { if ($api != $sub['id']) { $api = $sub['id']; - echo '

'.$this->printWeek($sub).'

'; - echo '

'.$this->printApi($sub).'

'; + echo '
'; + echo '

'.$this->printApi($sub).'

'; } if ($sub['utclogin']) { if ($sub['validation']) { @@ -148,7 +159,7 @@ class Views { } else if (is_null($sub['validation'])) { // At least one waiting subscription - echo "

[valider] ".$this->printStudent($sub)." Exclusivité : $sub[indicator]%

"; + echo "

[valider] ".$this->printStudent($sub)." Exclusivité : $sub[indicator]%

"; } else { // validation = FALSE lignes ignored