1 | <?php defined('BASEPATH') OR exit('No direct script access allowed'); |
||
3 | class Dashboard extends User_Controller { |
||
4 | public function __construct() { |
||
5 | parent::__construct(); |
||
6 | } |
||
7 | |||
8 | public function index() : void { |
||
9 | $this->load->helper('form'); |
||
10 | |||
11 | $this->header_data['title'] = 'Dashboard'; |
||
12 | $this->header_data['page'] = 'dashboard'; |
||
13 | |||
14 | $trackerData = $this->Tracker->list->get(); |
||
15 | $this->body_data['trackerData'] = $trackerData['series']; |
||
16 | $this->body_data['inactive_titles'] = $trackerData['extra_data']['inactive_titles']; |
||
17 | |||
18 | $this->body_data['category_custom_1'] = ($this->User_Options->get('category_custom_1') == 'enabled' ? TRUE : FALSE); |
||
19 | $this->body_data['category_custom_1_text'] = $this->User_Options->get('category_custom_1_text'); |
||
20 | |||
21 | $this->body_data['category_custom_2'] = ($this->User_Options->get('category_custom_2') == 'enabled' ? TRUE : FALSE); |
||
22 | $this->body_data['category_custom_2_text'] = $this->User_Options->get('category_custom_2_text'); |
||
23 | |||
24 | $this->body_data['category_custom_3'] = ($this->User_Options->get('category_custom_3') == 'enabled' ? TRUE : FALSE); |
||
25 | $this->body_data['category_custom_3_text'] = $this->User_Options->get('category_custom_3_text'); |
||
26 | |||
27 | $this->body_data['use_live_countdown_timer'] = ($this->User_Options->get('enable_live_countdown_timer') == 'enabled' ? 'true' : 'false'); |
||
28 | $this->body_data['mal_sync'] = $this->User_Options->get('mal_sync'); |
||
29 | |||
30 | $this->body_data['list_sort_type'] = array_intersect_key( |
||
31 | array( |
||
32 | 'unread' => 'Unread (Alphabetical)', |
||
33 | 'unread_latest' => 'Unread (Latest Release)', |
||
34 | 'alphabetical' => 'Alphabetical', |
||
35 | 'my_status' => 'My Status', |
||
36 | 'latest' => 'Latest Release' |
||
37 | ), |
||
38 | array_flip(array_values($this->User_Options->options['list_sort_type']['valid_options'])) |
||
39 | ); |
||
40 | $this->body_data['list_sort_type_selected'] = $this->User_Options->get('list_sort_type'); |
||
41 | |||
42 | $this->body_data['list_sort_order'] = array_intersect_key( |
||
43 | array( |
||
44 | 'asc' => 'ASC', |
||
45 | 'desc' => 'DESC' |
||
46 | ), |
||
47 | array_flip(array_values($this->User_Options->options['list_sort_order']['valid_options'])) |
||
48 | ); |
||
49 | $this->body_data['list_sort_order_selected'] = $this->User_Options->get('list_sort_order'); |
||
50 | |||
51 | $this->_render_page('User/Dashboard'); |
||
52 | } |
||
53 | } |
||
54 |