aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorMaZderMind2015-11-14 12:18:49 +0100
committerMaZderMind2015-11-14 12:29:50 +0100
commit6fcf7ab52b7465400ce4cac8b5775093b0f6dd66 (patch)
tree5a0644abe21a6d399da09e13ef55c7095c18f3b8 /index.php
parent4e855e28dd6f6e87854a2836c41403a6ee4c7255 (diff)
move base-url & timezone out of per-conference config
support ssl on conference selection page
Diffstat (limited to '')
-rw-r--r--index.php46
1 files changed, 23 insertions, 23 deletions
diff --git a/index.php b/index.php
index f9e416f..69feeae 100644
--- a/index.php
+++ b/index.php
@@ -3,6 +3,7 @@
if(!ini_get('short_open_tag'))
die('`short_open_tag = On` is required');
+require_once('config.php');
require_once('lib/helper.php');
require_once('lib/PhpTemplate.php');
@@ -29,6 +30,27 @@ try {
$route = @$_GET['route'];
$route = rtrim($route, '/');
+ // 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(),
+ ));
+
+ if(startswith('//', @$GLOBALS['CONFIG']['BASEURL']))
+ {
+ $tpl->set(array(
+ 'httpsurl' => forceslash(forceslash('https:'.$GLOBALS['CONFIG']['BASEURL']).@$GLOBALS['MANDATOR']).forceslash($route),
+ 'httpurl' => forceslash(forceslash('http:'. $GLOBALS['CONFIG']['BASEURL']).@$GLOBALS['MANDATOR']).forceslash($route),
+ ));
+ }
+
+
// GLOBAL ROUTES
if($route == 'gen/main.css')
{
@@ -43,19 +65,6 @@ try {
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)
{
@@ -109,12 +118,11 @@ catch(Exception $e)
$GLOBALS['MANDATOR'] = $mandator;
$conference = new Conference();
-$tpl = new PhpTemplate('template/page.phtml');
+// update template information
$tpl->set(array(
'baseurl' => forceslash(baseurl()),
'route' => $route,
'canonicalurl' => forceslash(baseurl()).forceslash($route),
- 'assemblies' => './template/assemblies/',
'assets' => '../assets/',
'conference' => $conference,
@@ -122,14 +130,6 @@ $tpl->set(array(
'schedule' => new Schedule(),
));
-if(startswith('//', @$GLOBALS['CONFIG']['BASEURL']))
-{
- $tpl->set(array(
- 'httpsurl' => forceslash(forceslash('https:'.$GLOBALS['CONFIG']['BASEURL']).@$GLOBALS['MANDATOR']).forceslash($route),
- 'httpurl' => forceslash(forceslash('http:'. $GLOBALS['CONFIG']['BASEURL']).@$GLOBALS['MANDATOR']).forceslash($route),
- ));
-}
-
ob_start();
try {