mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 17:28:55 +00:00
24fa162413
[ci skip] [skip ci]
51 lines
1.0 KiB
PHP
Executable File
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']);
|
|
}
|
|
}
|