Commit c4df0a8d authored by stph's avatar stph

Add subscription dates to home page

parent db7b5d2e
......@@ -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']));
}
......
......@@ -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'];;
}
}
......@@ -19,18 +19,20 @@ class Views {
}
public function printHtmlBegin($admin) {
echo '<html>';
echo '<head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>';
echo '<title>Api Sub</title>';
echo '<link href="css/main.css" type="text/css" rel="stylesheet"/>';
echo '</head>';
echo '<body>';
echo '<h1>Foire aux Api '.$admin->activeSemester().$admin->activeYear().'</h1>';
echo '<html>';
echo '<head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>';
echo '<title>Api Sub</title>';
echo '<link href="css/main.css" type="text/css" rel="stylesheet"/>';
echo '</head>';
echo '<body>';
echo '<h1>Foire aux Api '.$admin->activeSemester().$admin->activeYear().'</h1>';
}
public function printInstructions($row) {
public function printInstructions($admin) {
echo '<hr/>';
echo '<h2>Planning</h2>';
echo '<p>Inscriptions ouvertes du '.$admin->openbegin().' au '.$admin->openend().'.</p>';
echo '<h2>Catalogue</h2>';
echo '<p>Les Api sont décrites ici : <b><a href="https://apint.utc.fr/cat">https://apint.utc.fr/cat</a></b>. Veillez à avoir bien lu la fiche avant de vous inscrire (pré-requis, dates...).</p>';
echo '<h2>Instructions</h2>';
......@@ -75,8 +77,8 @@ class Views {
}
public function printSubList($list) {
echo '<hr/>';
if ($list) {
echo '<hr/>';
echo '<h2>Vos inscriptions</h2>';
$week = '';
foreach ($list as $row) {
......
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