Remove $tpl from index.php.
This commit is contained in:
parent
0d57aace4b
commit
dce1783dfe
16
index.php
16
index.php
@ -46,7 +46,7 @@ $tpl_done = false;
|
|||||||
if (isset($_GET['action'])) {
|
if (isset($_GET['action'])) {
|
||||||
switch ($_GET['action']) {
|
switch ($_GET['action']) {
|
||||||
case 'faq':
|
case 'faq':
|
||||||
$tpl = $ho->setTemplate('faq_html');
|
$ho->setTemplate('faq_html');
|
||||||
$tpl_done = true;
|
$tpl_done = true;
|
||||||
break;
|
break;
|
||||||
case 'send':
|
case 'send':
|
||||||
@ -92,7 +92,7 @@ if (!$tpl_done && isset($_SESSION['access_token']) && $_SESSION['access_token'])
|
|||||||
|
|
||||||
// Check $userdata->verifiedEmail and deny if not verified.
|
// Check $userdata->verifiedEmail and deny if not verified.
|
||||||
if (!$userdata->verifiedEmail) {
|
if (!$userdata->verifiedEmail) {
|
||||||
$tpl = $ho->setTemplate('notverified_html');
|
$ho->setTemplate('notverified_html');
|
||||||
$tpl_done = true;
|
$tpl_done = true;
|
||||||
} else {
|
} else {
|
||||||
switch ($_GET['action']) {
|
switch ($_GET['action']) {
|
||||||
@ -141,30 +141,30 @@ if (!$tpl_done && isset($_SESSION['access_token']) && $_SESSION['access_token'])
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'event':
|
case 'event':
|
||||||
$tpl = $ho->setTemplate('event_html');
|
$ho->setTemplate('event_html');
|
||||||
$tpl_done = true;
|
$tpl_done = true;
|
||||||
break;
|
break;
|
||||||
case 'hotel':
|
case 'hotel':
|
||||||
$tpl = $ho->setTemplate('hotel_html');
|
$ho->setTemplate('hotel_html');
|
||||||
$tpl_done = true;
|
$tpl_done = true;
|
||||||
$action = 'hotel';
|
$action = 'hotel';
|
||||||
require 'prep_form.php';
|
require 'prep_form.php';
|
||||||
break;
|
break;
|
||||||
case 'restaurant':
|
case 'restaurant':
|
||||||
$tpl = $ho->setTemplate('restaurant_html');
|
$ho->setTemplate('restaurant_html');
|
||||||
$tpl_done = true;
|
$tpl_done = true;
|
||||||
$action = 'restaurant';
|
$action = 'restaurant';
|
||||||
require 'prep_form.php';
|
require 'prep_form.php';
|
||||||
break;
|
break;
|
||||||
case 'rentalcar':
|
case 'rentalcar':
|
||||||
$tpl = $ho->setTemplate('rentalcar_html');
|
$ho->setTemplate('rentalcar_html');
|
||||||
$tpl_done = true;
|
$tpl_done = true;
|
||||||
$action = 'rentalcar';
|
$action = 'rentalcar';
|
||||||
require 'prep_form.php';
|
require 'prep_form.php';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (!$tpl_done) {
|
if (!$tpl_done) {
|
||||||
$tpl = $ho->setTemplate('loggedin_html');
|
$ho->setTemplate('loggedin_html');
|
||||||
$tpl_done = true;
|
$tpl_done = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -173,7 +173,7 @@ if (!$tpl_done && isset($_SESSION['access_token']) && $_SESSION['access_token'])
|
|||||||
} elseif (!$tpl_done) {
|
} elseif (!$tpl_done) {
|
||||||
// Not authenticated
|
// Not authenticated
|
||||||
$data['auth_url'] = $client->createAuthUrl();
|
$data['auth_url'] = $client->createAuthUrl();
|
||||||
$tpl = $ho->setTemplate('index_html');
|
$ho->setTemplate('index_html');
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['action'] = $_GET['action'];
|
$data['action'] = $_GET['action'];
|
||||||
|
Reference in New Issue
Block a user