forked from Public/pics
Initial commit.
This is to be the new HashRU website based on the Aaronweb.net/Kabuki CMS.
This commit is contained in:
34
controllers/HTMLController.php
Normal file
34
controllers/HTMLController.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
* HTMLController.php
|
||||
* Contains the key HTML controller
|
||||
*
|
||||
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
|
||||
*****************************************************************************/
|
||||
|
||||
/**
|
||||
* The abstract class that allows easy creation of html pages.
|
||||
*/
|
||||
abstract class HTMLController
|
||||
{
|
||||
protected $page;
|
||||
protected $admin_bar;
|
||||
|
||||
public function __construct($title)
|
||||
{
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
$this->page = new MainTemplate($title);
|
||||
|
||||
if (Registry::get('user')->isAdmin())
|
||||
{
|
||||
$this->page->appendStylesheet(BASEURL . '/css/admin.css');
|
||||
$this->admin_bar = new AdminBar();
|
||||
$this->page->adopt($this->admin_bar);
|
||||
}
|
||||
}
|
||||
|
||||
public function showContent()
|
||||
{
|
||||
$this->page->html_main();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user