Added a general secure view for pages in the secure
section of the website.
This commit is contained in:
parent
2628cc8b80
commit
67030dc870
28
lib/MilestonesView.php
Normal file
28
lib/MilestonesView.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
require_once "SecureView.php";
|
||||
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: sean
|
||||
* Date: 10/30/17
|
||||
* Time: 10:37 AM
|
||||
*/
|
||||
class MilestonesView extends SecureView
|
||||
{
|
||||
|
||||
public function page(){
|
||||
$body = <<<HTML
|
||||
|
||||
<div class="card">
|
||||
<p>
|
||||
Baby's first words.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
HTML;
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
require_once "View.php";
|
||||
require_once "SecureView.php";
|
||||
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
@ -8,12 +8,16 @@ require_once "View.php";
|
||||
* Date: 10/30/17
|
||||
* Time: 10:37 AM
|
||||
*/
|
||||
class MinutesView extends View
|
||||
class MinutesView extends SecureView
|
||||
{
|
||||
|
||||
public function page(){
|
||||
$body = <<<HTML
|
||||
|
||||
<div class="card">
|
||||
<p>
|
||||
Meeting for stuff and things.
|
||||
</p>
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
return $body;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
require_once "View.php";
|
||||
require_once "SecureView.php";
|
||||
|
||||
class SecureLoginView extends View
|
||||
class SecureLoginView extends SecureView
|
||||
{
|
||||
|
||||
|
||||
|
21
lib/SecureView.php
Normal file
21
lib/SecureView.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
require_once "View.php";
|
||||
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: sean
|
||||
* Date: 10/30/17
|
||||
* Time: 11:07 AM
|
||||
*/
|
||||
class SecureView extends View
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->addNav("Home", ROOT);
|
||||
$this->addNav("Minutes", ROOT . "secure/minutes.php");
|
||||
$this->addNav("Milestones", ROOT . "secure/milestones.php");
|
||||
$this->addNav("Logoff", ROOT . "secure/");
|
||||
}
|
||||
|
||||
}
|
22
secure/milestones.php
Normal file
22
secure/milestones.php
Normal file
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<?php
|
||||
require_once "../lib/prelude.inc.php";
|
||||
require_once "../lib/protected.inc.php";
|
||||
require_once "../lib/MilestonesView.php";
|
||||
$view = new MilestonesView();
|
||||
$view->setTitle("Milestones and Deadlines");
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
echo $view->head();
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
echo $view->header();
|
||||
echo $view->page();
|
||||
echo $view->footer();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user