diff --git a/dev_mvc/controller/ActionHandler.php b/dev_mvc/controller/ActionHandler.php new file mode 100644 index 0000000..d6e830a --- /dev/null +++ b/dev_mvc/controller/ActionHandler.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/dev_mvc/controller/HUtils.php b/dev_mvc/controller/HUtils.php index e44ae28..46d4e43 100644 --- a/dev_mvc/controller/HUtils.php +++ b/dev_mvc/controller/HUtils.php @@ -1,5 +1,7 @@ id = $id; + $this->user = $user; + $this->thread = $thread; + $this->text = $text; + } + public function getId(){ + return $this->id; + } + public function setId($id){ + $this->id = $id; + } + public function getUser(){ + return $this->user; + } + public function setUser($user){ + $this->user = $user; + } + public function getThread(){ + return $this->thread; + } + public function setThread($thread){ + $this->thread = $thread; + } + public function getText(){ + return $this->text; + } + public function setText($text){ + $this->text = $text; + } +} +?> \ No newline at end of file diff --git a/dev_mvc/controller/data/Thread.php b/dev_mvc/controller/data/Thread.php new file mode 100644 index 0000000..1a0d4ef --- /dev/null +++ b/dev_mvc/controller/data/Thread.php @@ -0,0 +1,18 @@ +id = $id; + $this->titel = $titel; + $this->text = $text; + $this->user = $user; + array_push(Thread::$threadArray, $this); + } +} + +?> \ No newline at end of file diff --git a/dev_mvc/controller/data/User.php b/dev_mvc/controller/data/User.php new file mode 100644 index 0000000..69b8e60 --- /dev/null +++ b/dev_mvc/controller/data/User.php @@ -0,0 +1,33 @@ +id = $id; + $this->username = $username; + $this->email = $email; + $this->password = $password; + array_push(User::$userArray, $this); + } + public function getId(){ + return $this->id; + } + public function setId($id){ + $this->id = $id; + } + public function getUsername(){ + return $this->username; + } + public function setUsername($username){ + $this->username = $username; + } + public function getEmail(){ + return $this->email; + } + public function setEmail($email){ + $this->email = $email; + } +} +?> \ No newline at end of file diff --git a/dev_mvc/index.php b/dev_mvc/index.php index f439505..1b2c757 100644 --- a/dev_mvc/index.php +++ b/dev_mvc/index.php @@ -14,7 +14,7 @@ include_once("./controller/UserSession.php"); include_once("./controller/HUtils.php"); session_start(); //Store de geselecteerde pagina in variabele $page -$page=HUtils::getPage(); +$page=HUtils::getPage(HUtils::FETCHPOST); //Model side operaties die afgerond moeten worden voor de paginacontent in wordt geladen $path = "./model/model_".$page.".php"; if($page != ""){ diff --git a/dev_mvc/model/model_attempt_logout.php b/dev_mvc/model/model_attempt_logout.php index 27dac87..be94567 100644 --- a/dev_mvc/model/model_attempt_logout.php +++ b/dev_mvc/model/model_attempt_logout.php @@ -4,9 +4,4 @@ if(UserSession::isSessionValid()){ Database::invalidateSession(UserSession::getSession()->token); session_destroy(); } - - - - - ?> \ No newline at end of file diff --git a/dev_mvc/model/model_attempt_login.php b/dev_mvc/model/model_do_login.php similarity index 100% rename from dev_mvc/model/model_attempt_login.php rename to dev_mvc/model/model_do_login.php diff --git a/dev_mvc/model/model_attempt_register.php b/dev_mvc/model/model_do_register.php similarity index 90% rename from dev_mvc/model/model_attempt_register.php rename to dev_mvc/model/model_do_register.php index dceb18a..e6dc73b 100644 --- a/dev_mvc/model/model_attempt_register.php +++ b/dev_mvc/model/model_do_register.php @@ -2,7 +2,7 @@ //Include classes include_once("./controller/Database.php"); include_once("./controller/HUtils.php"); -if(HUtils::issetPost(['email', 'pass', 'name'])){ +if(HUtils::issetPost(['email', 'pass', 'pass2', 'name'])){ if($_POST['pass'] == $_POST['pass2']){ //Check of email aanwezig is in de database if(!Database::checkUsedEmail($_POST['email']) && !Database::checkUsedUsername($_POST['name'])){ diff --git a/dev_mvc/view/css/main.css b/dev_mvc/view/css/main.css index 2973018..03d944d 100644 --- a/dev_mvc/view/css/main.css +++ b/dev_mvc/view/css/main.css @@ -1,10 +1,4 @@ *{ font-family: Arial, Helvetica, sans-serif; + } -header{ - background-color: bisque; -} -a{ - margin-right: 10px; - text-decoration: none; -} \ No newline at end of file diff --git a/dev_mvc/view/pagecontent/content_login.php b/dev_mvc/view/pagecontent/content_login.php index dd07475..36bc093 100644 --- a/dev_mvc/view/pagecontent/content_login.php +++ b/dev_mvc/view/pagecontent/content_login.php @@ -1,7 +1,8 @@
-
+ E-mail:
Password:
+
diff --git a/dev_mvc/view/pagecontent/content_page.php b/dev_mvc/view/pagecontent/content_page.php index 6482fbb..2b88bba 100644 --- a/dev_mvc/view/pagecontent/content_page.php +++ b/dev_mvc/view/pagecontent/content_page.php @@ -18,10 +18,9 @@

Password:
Verify Password:
+
diff --git a/dev_mvc/view/pagecontent/content_showboards.php b/dev_mvc/view/pagecontent/content_showboards.php new file mode 100644 index 0000000..4cf8332 --- /dev/null +++ b/dev_mvc/view/pagecontent/content_showboards.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/dev_mvc/view/pagecontent/modules/topbar_login.php b/dev_mvc/view/pagecontent/modules/topbar_login.php new file mode 100644 index 0000000..653b5ba --- /dev/null +++ b/dev_mvc/view/pagecontent/modules/topbar_login.php @@ -0,0 +1,8 @@ +
+
+ E-mail: + Password: + + +
+
\ No newline at end of file