From 21e6709dec6fa176caa18ed124066ff53ae8304b Mon Sep 17 00:00:00 2001 From: Rogier Neeleman Date: Fri, 11 Mar 2016 21:37:59 +0100 Subject: [PATCH] User input enabled. --- application/controllers/Beoordelen.php | 17 +++-- application/controllers/Dashboard.php | 13 +++- application/models/Beoordelen_model.php | 1 + application/views/dashboard_user.php | 7 +- application/views/header.php | 23 +++++- application/views/login.php | 4 +- application/views/user_lijsten.php | 23 ++++-- application/views/user_ronde.php | 28 +++++--- application/views/user_score.php | 84 ++++++++++++---------- application/views/user_subgroep.php | 93 +++++++++++++++---------- 10 files changed, 189 insertions(+), 104 deletions(-) diff --git a/application/controllers/Beoordelen.php b/application/controllers/Beoordelen.php index a635a4b..dd606ce 100644 --- a/application/controllers/Beoordelen.php +++ b/application/controllers/Beoordelen.php @@ -13,6 +13,7 @@ class Beoordelen extends CI_Controller if(! $this->session->userdata('validated')){ redirect(base_url('/login')); } + $data['page'] = 'beoordelen'; } public function index() @@ -22,7 +23,7 @@ class Beoordelen extends CI_Controller public function lijst() { - $data['title'] = 'JOS'; + $data['page'] = 'beoordelen'; // Get data $this->load->model('Beoordelen_model'); @@ -35,7 +36,7 @@ class Beoordelen extends CI_Controller } // Header - $this->load->view('header'); + $this->load->view('header', $data); // login page $this->load->view('user_lijsten', $data); @@ -46,6 +47,8 @@ class Beoordelen extends CI_Controller public function ronde() { + $data['page'] = 'beoordelen'; + // Check input $lijstid = $this->security->xss_clean($this->input->post('lijstid')); if ($lijstid OR $this->session->userdata('lijstid')) { @@ -73,7 +76,7 @@ class Beoordelen extends CI_Controller // Make page // Header - $this->load->view('header'); + $this->load->view('header', $data); // login page $this->load->view('user_ronde', $data); @@ -85,6 +88,8 @@ class Beoordelen extends CI_Controller public function subgroep() { + $data['page'] = 'beoordelen'; + // Check input $ronde = $this->security->xss_clean($this->input->post('ronde')); if ($ronde OR $this->session->userdata('ronde')) { @@ -111,7 +116,7 @@ class Beoordelen extends CI_Controller } // Header - $this->load->view('header'); + $this->load->view('header', $data); // login page $this->load->view('user_subgroep', $data); @@ -122,6 +127,8 @@ class Beoordelen extends CI_Controller public function score() { + $data['page'] = 'beoordelen'; + // Check input $subgroepid = $this->security->xss_clean($this->input->post('subgroepid')); if (!$subgroepid) { @@ -135,7 +142,7 @@ class Beoordelen extends CI_Controller $data['vragen'] = $this->Beoordelen_model->get_vragen(); // Header - $this->load->view('header'); + $this->load->view('header', $data); // login page $this->load->view('user_score', $data); diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php index 635bb08..daeb39c 100644 --- a/application/controllers/Dashboard.php +++ b/application/controllers/Dashboard.php @@ -26,15 +26,24 @@ class Dashboard extends CI_Controller public function admin() { + $data['page'] = 'home'; + // Header + $this->load->view('header', $data); + + // login page + //$this->load->view('dashboard_user', $data); + + // Footer + $this->load->view('footer'); } public function user() { - $data['title'] = 'JOS'; + $data['page'] = 'home'; // Header - $this->load->view('header'); + $this->load->view('header', $data); // login page $this->load->view('dashboard_user', $data); diff --git a/application/models/Beoordelen_model.php b/application/models/Beoordelen_model.php index a350ddc..d43b233 100644 --- a/application/models/Beoordelen_model.php +++ b/application/models/Beoordelen_model.php @@ -96,6 +96,7 @@ class Beoordelen_model extends CI_Model 'vraagid' => $item['vraagid'], 'ronde' => $ronde, 'subgroepid' => $subgroepid, + 'timestamp' => date("Y-m-d H:i:s"), 'score' => $item['score'], 'userid' => $this->session->id, ); diff --git a/application/views/dashboard_user.php b/application/views/dashboard_user.php index e5ee7c6..e0feaaf 100644 --- a/application/views/dashboard_user.php +++ b/application/views/dashboard_user.php @@ -1,6 +1,5 @@
-

Invoeren scorelijsten

-

- -

+
+ Welkom bij het score systeem. Maak een keuze. +
\ No newline at end of file diff --git a/application/views/header.php b/application/views/header.php index 6863c33..832aed0 100644 --- a/application/views/header.php +++ b/application/views/header.php @@ -17,4 +17,25 @@ - \ No newline at end of file + + +session->userdata('validated')) { ?> +
+
+ +
+
+ \ No newline at end of file diff --git a/application/views/login.php b/application/views/login.php index e4b78cc..f3b8ee3 100644 --- a/application/views/login.php +++ b/application/views/login.php @@ -1,6 +1,6 @@
-
+
@@ -13,6 +13,8 @@ // Viewing error's if (isset($errormsg)) { ?> diff --git a/application/views/user_lijsten.php b/application/views/user_lijsten.php index dbb2f1a..81fec32 100644 --- a/application/views/user_lijsten.php +++ b/application/views/user_lijsten.php @@ -1,16 +1,25 @@
-

De volgende lijsten zijn beschikbaar:

+
+
+
+ Beoordeling + + + +
+
- -
-
- +

+

+
+ +
-
+

-
+
diff --git a/application/views/user_ronde.php b/application/views/user_ronde.php index 1738c6b..eebd84f 100644 --- a/application/views/user_ronde.php +++ b/application/views/user_ronde.php @@ -1,20 +1,28 @@
-

Kies de ronde

+
+
+
+ Beoordeling + Ronde + + +
+
- 'form-horizontal', 'role' => 'form');?> -
-
- -
-
- +

+

+
+ + +
-
+

-
+
+ Vorige
diff --git a/application/views/user_score.php b/application/views/user_score.php index 29c671b..9718874 100644 --- a/application/views/user_score.php +++ b/application/views/user_score.php @@ -1,41 +1,49 @@ -
- -
-

Geef de score aan

+
+
+
+
+ Beoordeling + Ronde + Ploeg + +
+
- - - - -
-
- -
-
- -
-
- - -

+ + + +

+ +

+
+ +
+
+ +
+
+ +

+ +

+

+
+ Vorige + +
+
+

+ + -
-
- -
-
- - - -
-
+
diff --git a/application/views/user_subgroep.php b/application/views/user_subgroep.php index ce1027c..9483e3f 100644 --- a/application/views/user_subgroep.php +++ b/application/views/user_subgroep.php @@ -1,39 +1,60 @@ -
- -
-

Kies de ploeg

- - - - +
+
+
+
+ Beoordeling + Ronde + + Ploeg + + + Ploeg + + +
+
-
-
- -
-
-

-

-
- -
-
- + + + + +

+

+
+ +
+
+

+

+

+
+ Vorige + +
+
+

+ + - -
-
- Er zijn geen groepen meer te beoordelen. -
-
-
-
- -
-
- + + +

+

+
+ Er zijn geen groepen meer te beoordelen. +
+
+

+

+

+
+ +
+
+

+ + -
-
\ No newline at end of file +
\ No newline at end of file