Files
newznab-tmux/public/pages/InstallPage.php
T
DariusIII 24fa162413 Apply fixes from StyleCI
[ci skip] [skip ci]
2017-08-31 09:31:28 +00:00

51 lines
1.0 KiB
PHP
Executable File

<?php
class InstallPage
{
public $title = '';
public $content = '';
public $head = '';
public $page_template = '';
/**
* @var Smarty
*/
public $smarty;
public $error = false;
public function __construct()
{
@session_start();
$this->smarty = new Smarty();
$this->smarty->setTemplateDir(realpath('../install/templates/'));
$this->smarty->setCompileDir(NN_RES.'smarty/templates_c/');
$this->smarty->setConfigDir(NN_RES.'smarty/configs/');
$this->smarty->setCacheDir(NN_RES.'smarty/cache/');
}
public function addToHead($headcontent)
{
$this->head = $this->head."\n".$headcontent;
}
public function render()
{
$this->page_template = 'installpage.tpl';
$this->smarty->display($this->page_template);
}
public function isPostBack()
{
return strtoupper($_SERVER['REQUEST_METHOD']) === 'POST';
}
public function isSuccess()
{
return isset($_GET['success']);
}
}