diff --git a/index.php b/index.php index 39e232a03ca81f2710f871daf665264973222c57..08e6ab1ee87353353a14794b3fa356cd6fdb58aa 100644 --- a/index.php +++ b/index.php @@ -43,7 +43,7 @@ else { } } } - $view->printInstructions($db->config()); + $view->printInstructions($admin); $view->printSubList($db->subList($_SESSION['utclogin'])); $view->printApiList($db->apiList($admin, $_SESSION['utclogin'])); } diff --git a/lib/admin.php b/lib/admin.php index 6ea00ecc4694dfd48cbf59abb0872461f7472fff..fc2f0ffd667f7a0a4302b7dfae05355daff79727 100644 --- a/lib/admin.php +++ b/lib/admin.php @@ -20,4 +20,12 @@ class Admin { return $this->db->config()['year'];; } + public function openBegin() { + return $this->db->config()['openbegin'];; + } + + public function openEnd() { + return $this->db->config()['openend'];; + } + } diff --git a/lib/views.php b/lib/views.php index d06860839245e9e6db382157d1b1569952f6dd28..f0a87999ae6cd23e10451a8958352b2a718d71be 100644 --- a/lib/views.php +++ b/lib/views.php @@ -19,18 +19,20 @@ class Views { } public function printHtmlBegin($admin) { - echo ''; - echo ''; - echo ''; - echo 'Api Sub'; - echo ''; - echo ''; - echo ''; - echo '

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

'; + echo ''; + echo ''; + echo ''; + echo 'Api Sub'; + echo ''; + echo ''; + echo ''; + echo '

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

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

Planning

'; + echo '

Inscriptions ouvertes du '.$admin->openbegin().' au '.$admin->openend().'.

'; 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

'; @@ -75,8 +77,8 @@ class Views { } public function printSubList($list) { + echo '
'; if ($list) { - echo '
'; echo '

Vos inscriptions

'; $week = ''; foreach ($list as $row) {