From c22b5585c92dbd5d3436e1671852daf30414a6e1 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 4 Apr 2012 22:43:20 +0100 Subject: [PATCH] Started custom stats (Issue #94) UI only --- application/controllers/statistics.php | 31 +++++++ application/views/statistics/custom.php | 111 ++++++++++++++++++++++++ application/views/statistics/index.php | 1 + css/global.css | 2 +- css/main.css | 11 ++- 5 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 application/views/statistics/custom.php diff --git a/application/controllers/statistics.php b/application/controllers/statistics.php index 29c4a124..f58a0386 100644 --- a/application/controllers/statistics.php +++ b/application/controllers/statistics.php @@ -43,4 +43,35 @@ class Statistics extends CI_Controller { $this->load->view('statistics/index'); $this->load->view('layout/footer'); } + + function custom() { + + $this->load->model('user_model'); + if(!$this->user_model->authorize($this->config->item('auth_mode'))) { + if($this->user_model->validate_session()) { + $this->user_model->clear_session(); + show_error('Access denied

Click here to log in as another user', 403); + } else { + redirect('user/login'); + } + } + + $data['page_title'] = "Custom Statistics"; + + $this->load->helper(array('form', 'url')); + + $this->load->library('form_validation'); + + if ($this->form_validation->run() == FALSE) + { + $this->load->view('layout/header', $data); + $this->load->view('statistics/custom'); + $this->load->view('layout/footer'); + } + else + { + $this->load->view('formsuccess'); + } + + } } diff --git a/application/views/statistics/custom.php b/application/views/statistics/custom.php new file mode 100644 index 00000000..f0eaffe9 --- /dev/null +++ b/application/views/statistics/custom.php @@ -0,0 +1,111 @@ + + +

+ +

+ + + +

This is a work in-progress

+ +
+ +

Options

+ + + + + +
+ +
+ +
+

Date

+ + + + + + + + + + +
Start
End
+
+ +
+

Band

+ + +

Mode

+ +
+ +
+

Finished your selection? time to search!

+ +
+ +
+ + + + + +
+

Results go here

+
+ +
diff --git a/application/views/statistics/index.php b/application/views/statistics/index.php index 6fd1343b..558521f3 100644 --- a/application/views/statistics/index.php +++ b/application/views/statistics/index.php @@ -81,6 +81,7 @@
diff --git a/css/global.css b/css/global.css index 4dc4aa92..758724e2 100644 --- a/css/global.css +++ b/css/global.css @@ -104,4 +104,4 @@ ul#user li { float: left; margin: 2px 2px 0 3px; height:43px; border-bottom: non .pager a:hover { background-color: azure; } /* Footer */ -#footer { margin: 0 auto; width: 780px; text-align: center; padding-top: 5px; padding-bottom: 5px; font-size: 12px; } +#footer { margin: 0 auto; width: 780px; text-align: center; padding-top: 5px; padding-bottom: 5px; font-size: 12px; } \ No newline at end of file diff --git a/css/main.css b/css/main.css index cd28999c..507743fc 100644 --- a/css/main.css +++ b/css/main.css @@ -21,4 +21,13 @@ input[type="text"] { color: #000000 !important; } -.pull-right { color: #fff; } \ No newline at end of file +.pull-right { color: #fff; } + +/* Stats CSS */ +.type { + float: left; + width: 30%; + margin: 10px; +} + +.clear {clear:both;} \ No newline at end of file