From 0d91cc5f111fac882f1bb375c2bf426195c9cae2 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sun, 8 Nov 2015 16:31:29 +0100 Subject: finish overview-page --- index.php | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index cdd58a7..a26f391 100644 --- a/index.php +++ b/index.php @@ -34,22 +34,23 @@ if($route == 'gen/main.css') exit; } +// generic template +$tpl = new PhpTemplate('template/page.phtml'); +$tpl->set(array( + 'baseurl' => forceslash(baseurl()), + 'route' => $route, + 'canonicalurl' => forceslash(baseurl()).forceslash($route), + 'assemblies' => './template/assemblies/', + 'assets' => 'assets/', + + 'conference' => new GenericConference(), +)); + @list($mandator, $route) = explode('/', $route, 2); if(!$mandator) { // root requested - $tpl = new PhpTemplate('template/page.phtml'); - $tpl->set(array( - 'baseurl' => forceslash(baseurl()), - 'route' => $route, - 'canonicalurl' => forceslash(baseurl()).forceslash($route), - 'assemblies' => './template/assemblies/', - 'assets' => 'assets/', - - 'conference' => new GenericConference(), - )); - if(Conferences::getActiveConferencesCount() == 0) { // no clients @@ -72,10 +73,7 @@ if(!$mandator) // multiple clients // show overview - // TODO Template - $clients = Conferences::getActiveConferences(); - var_dump('multiple clients'); - var_dump($clients); + require('view/allconferences.php'); exit; } } @@ -83,7 +81,8 @@ else if(!Conferences::exists($mandator)) { // old url OR wrong client OR // -> error - die('unknown conference '.$mandator); + require('view/404.php'); + exit; } Conferences::load($mandator); -- cgit v1.2.3