Skip to content

Commit

Permalink
#37 Initial installer page
Browse files Browse the repository at this point in the history
  • Loading branch information
tgouverneur committed Jan 10, 2019
1 parent 01f01fd commit 4e20f41
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions app/installer/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* Installer Page
*
* @author Gouverneur Thomas <[email protected]>
* @copyright Copyright (c) 2019, Gouverneur Thomas
* @version 1.0
* @package installer
* @category www
* @subpackage installer
* @filesource
* @license https://raw.githubusercontent.com/tgouverneur/SPXOps/master/LICENSE.md Revised BSD License
*/
require_once("../libs/utils.obj.php");

try {

$index = new Template("../tpl/index.tpl");
$head = new Template("../tpl/head.tpl");
$foot = new Template("../tpl/foot.tpl");
$content = new Template("../tpl/home.tpl");

$index->set('head', $head);
$index->set('content', $content);
$index->set('foot', $foot);

echo $index->fetch();


} catch (ExitException $e) {

if ($e->type == 2) {
echo Utils::getJSONError($e->getMessage());
} else {
$h = Utils::getHTTPError($e->getMessage());
echo $h->fetch();
}

} catch (Exception $e) {
$h = Utils::getHTTPError('Unexpected Exception');
echo $h->fetch();
}
?>

0 comments on commit 4e20f41

Please sign in to comment.