From 2628cc8b808a61e023bac825b0cfee1519838a84 Mon Sep 17 00:00:00 2001 From: Sean Joseph Date: Mon, 30 Oct 2017 11:01:59 -0400 Subject: [PATCH] Refactored a div class tag to be more general. Added site style to the secure pages. Renamed LoginController to SecureLoginController. --- lib/AboutView.php | 3 +- lib/MinutesView.php | 22 +++++++++++++ ...ntroller.php => SecureLoginController.php} | 2 +- lib/SecureLoginView.php | 33 +++++++++++++++++++ lib/View.php | 16 ++++----- lib/protected.inc.php | 3 +- post/login.php | 4 +-- secure/index.php | 29 +++++++--------- secure/minutes.php | 15 ++++++--- style/default.css | 19 +++++++++-- 10 files changed, 107 insertions(+), 39 deletions(-) create mode 100644 lib/MinutesView.php rename lib/{LoginController.php => SecureLoginController.php} (98%) create mode 100644 lib/SecureLoginView.php diff --git a/lib/AboutView.php b/lib/AboutView.php index edfec5e..26cdff5 100644 --- a/lib/AboutView.php +++ b/lib/AboutView.php @@ -13,8 +13,7 @@ class AboutView extends View public function page() { $body = << -

Roster:

+

James Murray - Project Manager

James Murray diff --git a/lib/MinutesView.php b/lib/MinutesView.php new file mode 100644 index 0000000..a48d098 --- /dev/null +++ b/lib/MinutesView.php @@ -0,0 +1,22 @@ + +
+
+
+

+ + +

+

+ + +

+

+
+
+
+
+HTML; + + return $body; + } + +} \ No newline at end of file diff --git a/lib/View.php b/lib/View.php index 62eee0e..abc6d0c 100644 --- a/lib/View.php +++ b/lib/View.php @@ -1,4 +1,5 @@ addNav("Home", "./"); - $this->addNav("Progress", "./"); - $this->addNav("Meet The Team", "./about.php"); + $this->addNav("Home", ROOT); + $this->addNav("Meet The Team", ROOT . "about.php"); + $this->addNav("Secure", ROOT ."secure"); $this->addNav("Course Site", "https://cse.msu.edu/~cse435/"); - $this->addNav("Secure", "./secure"); } public function head(){ - + $root = ROOT; $html = << + $this->title - + HTML; return $html; @@ -80,6 +80,6 @@ HTML; } private $links = array(); - private $title = "Not Set!"; + protected $title = "Not Set!"; } diff --git a/lib/protected.inc.php b/lib/protected.inc.php index 4c40a0a..5248238 100644 --- a/lib/protected.inc.php +++ b/lib/protected.inc.php @@ -7,9 +7,10 @@ */ require_once "prelude.inc.php"; + if(!$open){ if(!isset($_SESSION[LOGIN])){ - header("Location: ../secure/index.php"); + header("Location: " . ROOT . "secure/index.php"); } } diff --git a/post/login.php b/post/login.php index 12b1c8d..dc37f44 100644 --- a/post/login.php +++ b/post/login.php @@ -7,9 +7,9 @@ */ require_once "../lib/prelude.inc.php"; require_once "../lib/logins.inc.php"; -require_once "../lib/LoginController.php"; +require_once "../lib/SecureLoginController.php"; -$controller = new LoginController($_GET,$_POST,$logins); +$controller = new SecureLoginController($_GET,$_POST,$logins); if($controller->validLogin()){ diff --git a/secure/index.php b/secure/index.php index d847efb..8901d2c 100644 --- a/secure/index.php +++ b/secure/index.php @@ -1,28 +1,21 @@ setTitle("Secure Pages Login"); ?> - - Secure Pages Login - + head(); + ?> -

Secure Pages Login

-
-
- Login -

- - -

-

- - -

- -
-
+ header(); + echo $view->page(); + echo $view->footer(); + ?> diff --git a/secure/minutes.php b/secure/minutes.php index 437dfa3..bb54b03 100644 --- a/secure/minutes.php +++ b/secure/minutes.php @@ -2,14 +2,21 @@ setTitle("Meeting Minutes"); ?> - - - Meeting Minutes + head(); + ?> -

Meeting Minutes

+header(); +echo $view->page(); +echo $view->footer(); +?> diff --git a/style/default.css b/style/default.css index f9b5cec..3721c8e 100644 --- a/style/default.css +++ b/style/default.css @@ -30,6 +30,7 @@ body { */ body{ background: darkgreen; + font-family: Serif; } header { @@ -37,6 +38,7 @@ header { background : rgba(255,255,255,1); text-align: center; line-height: 3em; + border-bottom: 20px solid gray; } header h1 { @@ -74,6 +76,7 @@ div.card img{ height:400px; width:300px; border:thick solid black; + border-radius: 10px; display:block; padding: 5px; margin: auto; @@ -81,8 +84,8 @@ div.card img{ } div.card p{ - padding: 0 4em; - margin: 0.75em 0; + width: 400px; + margin: 0.75em auto; } div.card ul{ @@ -91,9 +94,19 @@ div.card ul{ display: block; } -div.team h1{ +div.content h1{ font-size: 3em; text-align: center; margin: 0.75em 0; color: white; } + +div.card form{ + padding: 25px; + +} + +div.card form fieldset{ + border: thin solid black; + text-align: center; +}