|
1
|
|
|
<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
2
|
|
|
|
|
3
|
|
|
class IndexC extends User_Controller { |
|
4
|
1 |
|
public function __construct() { |
|
5
|
1 |
|
parent::__construct(); |
|
6
|
1 |
|
} |
|
7
|
|
|
|
|
8
|
1 |
|
public function index() : void { |
|
9
|
1 |
|
if(!$this->User->logged_in()) { |
|
10
|
1 |
|
$this->_frontpage(); |
|
11
|
|
|
} else { |
|
12
|
|
|
$this->_dashboard(); |
|
13
|
|
|
} |
|
14
|
1 |
|
} |
|
15
|
|
|
|
|
16
|
1 |
|
private function _frontpage() : void { |
|
17
|
1 |
|
$this->header_data['title'] = "Index"; |
|
18
|
1 |
|
$this->header_data['page'] = "index"; |
|
19
|
|
|
|
|
20
|
|
|
//redirect('user/login'); |
|
21
|
1 |
|
$this->_render_page('FrontPage'); |
|
22
|
1 |
|
} |
|
23
|
|
|
|
|
24
|
|
|
private function _dashboard() : void { |
|
25
|
|
|
$this->header_data['title'] = "Dashboard"; |
|
26
|
|
|
$this->header_data['page'] = "dashboard"; |
|
27
|
|
|
|
|
28
|
|
|
$trackerData = $this->Tracker->list->get(); |
|
29
|
|
|
$this->body_data['trackerData'] = $trackerData['series']; |
|
30
|
|
|
$this->body_data['has_inactive'] = $trackerData['has_inactive']; |
|
31
|
|
|
|
|
32
|
|
|
$this->body_data['category_custom_1'] = ($this->User_Options->get('category_custom_1') == 'enabled' ? TRUE : FALSE); |
|
33
|
|
|
$this->body_data['category_custom_1_text'] = $this->User_Options->get('category_custom_1_text'); |
|
34
|
|
|
|
|
35
|
|
|
$this->body_data['category_custom_2'] = ($this->User_Options->get('category_custom_2') == 'enabled' ? TRUE : FALSE); |
|
36
|
|
|
$this->body_data['category_custom_2_text'] = $this->User_Options->get('category_custom_2_text'); |
|
37
|
|
|
|
|
38
|
|
|
$this->body_data['category_custom_3'] = ($this->User_Options->get('category_custom_3') == 'enabled' ? TRUE : FALSE); |
|
39
|
|
|
$this->body_data['category_custom_3_text'] = $this->User_Options->get('category_custom_3_text'); |
|
40
|
|
|
|
|
41
|
|
|
$this->body_data['use_live_countdown_timer'] = ($this->User_Options->get('enable_live_countdown_timer') == 'enabled' ? 'true' : 'false'); |
|
42
|
|
|
$this->body_data['mal_sync'] = $this->User_Options->get('mal_sync'); |
|
43
|
|
|
|
|
44
|
|
|
$this->_render_page('User/Dashboard'); |
|
45
|
|
|
} |
|
46
|
|
|
} |
|
47
|
|
|
|