diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php index e6df2b75..ef1f4015 100644 --- a/application/controllers/Dashboard.php +++ b/application/controllers/Dashboard.php @@ -89,6 +89,64 @@ class Dashboard extends CI_Controller $data['total_countries_confirmed_eqsl'] = $CountriesBreakdown['Countries_Worked_EQSL']; $data['total_countries_confirmed_lotw'] = $CountriesBreakdown['Countries_Worked_LOTW']; + $data['dashboard_upcoming_dx_card'] = false; + $data['dashboard_qslcard_card'] = false; + $data['dashboard_eqslcard_card'] = false; + $data['dashboard_lotw_card'] = false; + $data['dashboard_vuccgrids_card'] = false; + + $dashboard_options = $this->user_options_model->get_options('dashboard')->result(); + + foreach ($dashboard_options as $item) { + $option_name = $item->option_name; + $option_key = $item->option_key; + $option_value = $item->option_value; + + if ($option_name == 'dashboard_upcoming_dx_card' && $option_key == 'enabled') { + if($option_value == 'true') { + $data['dashboard_upcoming_dx_card'] = true; + } else { + $data['dashboard_upcoming_dx_card'] = false; + } + } + + if ($option_name == 'dashboard_qslcards_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_qslcard_card'] = true; + } else { + $data['dashboard_qslcard_card'] = false; + } + } + + if ($option_name == 'dashboard_eqslcards_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_eqslcard_card'] = true; + } else { + $data['dashboard_eqslcard_card'] = false; + } + } + + if ($option_name == 'dashboard_lotw_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_lotw_card'] = true; + } else { + $data['dashboard_lotw_card'] = false; + } + } + + if ($option_name == 'dashboard_vuccgrids_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_vuccgrids_card'] = true; + + $data['vucc'] = $this->vucc->fetchVuccSummary(); + $data['vuccSAT'] = $this->vucc->fetchVuccSummary('SAT'); + } else { + $data['dashboard_vuccgrids_card'] = false; + } + } + } + + $QSLStatsBreakdownArray = $this->logbook_model->get_QSLStats($logbooks_locations_array); $data['total_qsl_sent'] = $QSLStatsBreakdownArray['QSL_Sent']; @@ -115,9 +173,6 @@ class Dashboard extends CI_Controller $data['last_five_qsos'] = $this->logbook_model->get_last_qsos('18', $logbooks_locations_array); - $data['vucc'] = $this->vucc->fetchVuccSummary(); - $data['vuccSAT'] = $this->vucc->fetchVuccSummary('SAT'); - $data['page_title'] = "Dashboard"; $this->load->model('dxcc'); diff --git a/application/controllers/User.php b/application/controllers/User.php index 3445c80a..2c63e423 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -519,6 +519,63 @@ class User extends CI_Controller { } } + // Get Settings for Dashboard + + // Set defaults + $data['dashboard_upcoming_dx_card'] = false; + $data['dashboard_qslcard_card'] = false; + $data['dashboard_eqslcard_card'] = false; + $data['dashboard_lotw_card'] = false; + $data['dashboard_vuccgrids_card'] = false; + + $dashboard_options = $this->user_options_model->get_options('dashboard')->result(); + + foreach ($dashboard_options as $item) { + $option_name = $item->option_name; + $option_key = $item->option_key; + $option_value = $item->option_value; + + if ($option_name == 'dashboard_upcoming_dx_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_upcoming_dx_card'] = true; + } else { + $data['dashboard_upcoming_dx_card'] = false; + } + } + + if ($option_name == 'dashboard_qslcards_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_qslcard_card'] = true; + } else { + $data['dashboard_qslcard_card'] = false; + } + } + + if ($option_name == 'dashboard_eqslcards_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_eqslcard_card'] = true; + } else { + $data['dashboard_eqslcard_card'] = false; + } + } + + if ($option_name == 'dashboard_lotw_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_lotw_card'] = true; + } else { + $data['dashboard_lotw_card'] = false; + } + } + + if ($option_name == 'dashboard_vuccgrids_card' && $option_key == 'enabled') { + if($item->option_value == 'true') { + $data['dashboard_vuccgrids_card'] = true; + } else { + $data['dashboard_vuccgrids_card'] = false; + } + } + } + // [MAP Custom] GET user options // $this->load->model('user_options_model'); $options_object = $this->user_options_model->get_options('map_custom')->result(); @@ -581,6 +638,36 @@ class User extends CI_Controller { $this->input->set_cookie($cookie); } if($this->session->userdata('user_id') == $this->input->post('id', true)) { + if (isset($_POST['user_dashboard_enable_dxpedition_card'])) { + $this->user_options_model->set_option('dashboard', 'dashboard_upcoming_dx_card', array('enabled' => 'true')); + } else { + $this->user_options_model->set_option('dashboard', 'dashboard_upcoming_dx_card', array('enabled' => 'false')); + } + + if (isset($_POST['user_dashboard_enable_qslcards_card'])) { + $this->user_options_model->set_option('dashboard', 'dashboard_qslcards_card', array('enabled' => 'true')); + } else { + $this->user_options_model->set_option('dashboard', 'dashboard_qslcards_card', array('enabled' => 'false')); + } + + if (isset($_POST['user_dashboard_enable_eqslcards_card'])) { + $this->user_options_model->set_option('dashboard', 'dashboard_eqslcards_card', array('enabled' => 'true')); + } else { + $this->user_options_model->set_option('dashboard', 'dashboard_eqslcards_card', array('enabled' => 'false')); + } + + if (isset($_POST['user_dashboard_enable_lotw_card'])) { + $this->user_options_model->set_option('dashboard', 'dashboard_lotw_card', array('enabled' => 'true')); + } else { + $this->user_options_model->set_option('dashboard', 'dashboard_lotw_card', array('enabled' => 'false')); + } + + if (isset($_POST['user_dashboard_enable_vuccgrids_card'])) { + $this->user_options_model->set_option('dashboard', 'dashboard_vuccgrids_card', array('enabled' => 'true')); + } else { + $this->user_options_model->set_option('dashboard', 'dashboard_vuccgrids_card', array('enabled' => 'false')); + } + // [MAP Custom] ADD to user options // $array_icon = array('station','qso','qsoconfirm'); foreach ($array_icon as $icon) { @@ -608,7 +695,6 @@ class User extends CI_Controller { return; } $data['page_title'] = "Edit User"; - $this->load->view('interface_assets/header', $data); $data['user_name'] = $this->input->post('user_name', true); $data['user_email'] = $this->input->post('user_email', true); @@ -644,6 +730,9 @@ class User extends CI_Controller { $data['user_winkey'] = $this->input->post('user_winkey'); $data['user_hamsat_key'] = $this->input->post('user_hamsat_key'); $data['user_hamsat_workable_only'] = $this->input->post('user_hamsat_workable_only'); + + + $this->load->view('user/edit'); $this->load->view('interface_assets/footer'); } diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php index 63b0822a..99b49f88 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -296,8 +296,10 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
-
- + +
+ +
@@ -345,7 +347,8 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
- + + config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) && ($total_qsl_sent != 0 || $total_qsl_rcvd != 0 || $total_qsl_requested != 0)) { ?> @@ -372,7 +375,9 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
+ + config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) && ($total_eqsl_sent != 0 || $total_eqsl_rcvd != 0)) { ?> @@ -393,7 +398,9 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
+ + config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === false) && ($total_lotw_sent != 0 || $total_lotw_rcvd != 0)) { ?> @@ -414,6 +421,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
+ config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === false) && ($total_qrz_sent != 0 || $total_qrz_rcvd != 0)) { ?> @@ -436,6 +444,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
+ config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE)) { ?> @@ -457,6 +466,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
+ diff --git a/application/views/user/edit.php b/application/views/user/edit.php index c84de5d1..eddb75ba 100644 --- a/application/views/user/edit.php +++ b/application/views/user/edit.php @@ -1,614 +1,876 @@

- ".$user_name.""; - } - ?> - + " . $user_name . ""; + } + ?> +

- session->flashdata('success')) { ?> + session->flashdata('success')) { ?>
- session->flashdata('success'); ?> + session->flashdata('success'); ?>
- session->flashdata('message')) { ?> + session->flashdata('message')) { ?>
- session->flashdata('message'); ?> + session->flashdata('message'); ?>
- -
- x - -
+ +
+ x + +
load->helper('form'); ?>
-
- -
-

- -

-
-
-
- -
-
-
-
-
- - - ".$username_error.""; } ?> -
- -
- - - ".$email_error.""; } ?> -
- -
- -
- - -
- ".$password_error.""; } else { ?> - - -
- -
-
- - session->userdata('user_type') == 99) { ?> - - config->item('auth_level'); - echo $l[$user_type]; - }?> -
-
-
-
- - -
-
-
-
-
- - - ".$firstname_error.""; } else { ?> - -
- -
- - - ".$lastname_error.""; } else { ?> - -
-
-
-
- -
-
-
-
-
- - - ".$callsign_error.""; } else { ?> - -
- -
- - - ".$locator_error.""; } else { ?> - -
-
-
-
-
-
-
-
- -
-

- -

-
-
-
- -
-
-
-
-
- - - -
-
- config->item('cl_multilanguage')) { ?> +
+ +
+

+ +

+
+
+
+ +
+
+
+
- - - + + + " . $username_error . ""; + } ?>
- -
- - -
+
+ + + " . $email_error . ""; + } ?> +
-
- - - - -
+
+ +
+ + +
+ " . $password_error . ""; + } else { ?> + + +
-
- - - - +
+
+ + session->userdata('user_type') == 99) { ?> + + config->item('auth_level'); + echo $l[$user_type]; + } ?> +
-
- -
-
-
-
-
- - - -
+ +
+
+
+
+
+ + + " . $firstname_error . ""; + } else { ?> + +
-
- - - -
- -
- - - -
- -
- - - -
- -
- - - +
+ + + " . $lastname_error . ""; + } else { ?> + +
-
+ +
+
+
+
+
+ + + " . $callsign_error . ""; + } else { ?> + +
- -
-
-
-
-
- - - - -
- -
-
- - - - -
- -
-
- - - - -
- -
- - - - -
- -
- - - - -
- -
- - - - +
+ + + " . $locator_error . ""; + } else { ?> + +
- -
- -
-
-
-
-
- - - -
- -
-
- - - - -
- -
- - - - -
-
-
-
- - - session->userdata('user_id') == $this->uri->segment(3)) { ?> -
-
-
lang->line('account_map_params'); ?>
-
-
-
-
-
-
-
-
- -
lang->line('general_word_not_display'),0,10).'.':("")); ?>
-
-
- ".(($val=="0")?$this->lang->line('general_word_not_display'):("")).""; - } ?> -
-
-
-
" data-icon="station" />
-
-
-
- -
-
-
- -
"; ?>
-
-
- "; - } ?> -
-
-
- -
-
-
-
- - -
-
-
- -
lang->line('general_word_no'):("")); ?>
-
-
- ".(($val=="0")?$this->lang->line('general_word_no'):("")).""; - } ?> -
-
-
- " data-icon="qsoconfirm" /> -
-
-
-
- -
-
- + foldername . '" ' . (($user_stylesheet == $theme->foldername) ? 'selected="selected"' : "") . '>' . $theme->name . ''; + } + ?>
-
-
-
-
- -
+
+ config->item('cl_multilanguage')) { ?> +
+ + + +
+ -
- -
-
-
-
-
- - - -
+
+ + +
-
-
-
-
-
-
-
- -
-

- -

-
-
-
- -
-
- -
-
- - - + + +
+ +
+ + + + +
-
- -
- '; ?> - +
+
+ +
+
+
Dashboard Options
+
+
+
+ > + +
+ +
+ > + +
+ +
+ > + +
+ +
+ > + +
+ +
+ > + +
-
- '; ?> - +
+
+
+ +
+ +
+
+
+
+
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
-
- '; ?> - +
+
+ + +
+
+
+
+
+ + + + +
+ +
+
+ + + + +
+ +
+
+ + + + +
+ +
+ + + + +
+ +
+ + + + +
+ +
+ + + + +
-
- '; ?> - +
+
+
+ +
+ +
+
+
+
+
+ + + +
+ +
+
+ + + + +
+ +
+ + + + +
+
+
+
+ + + session->userdata('user_id') == $this->uri->segment(3)) { ?> +
+
+
lang->line('account_map_params'); ?>
+
+
+
+
+
+
+
+
+ +
lang->line('general_word_not_display'), 0, 10) . '.' : ("")); ?>
+
+
+ " . (($val == "0") ? $this->lang->line('general_word_not_display') : ("")) . ""; + } ?> +
+
+
+
" data-icon="station" /> +
+
+
+
+ +
+
+
+ +
"; ?>
+
+
+ "; + } ?> +
+
+
+ +
+
+
+
+ + +
+
+
+ +
lang->line('general_word_no') : ("")); ?>
+
+
+ " . (($val == "0") ? $this->lang->line('general_word_no') : ("")) . ""; + } ?> +
+
+
+ " data-icon="qsoconfirm" /> +
+
+
+
+ +
+
+ +
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+ + + +
+
@@ -616,185 +878,291 @@
-
-
- -
-

- -

-
-
-
- -
-
-
-
-
- - - ".$userlotwname_error.""; } ?> -
- -
- -
- - + +
+

+ +

+
+
+
+ +
+
+ +
+
+ + + +
+
+ +
+ '; ?> + +
+
+ '; ?> + +
+
+ '; ?> + +
+
+ '; ?> + +
+
- ".$lotwpassword_error.""; } else { ?> - - -
-
-
-
- - -
-
-
-
-
- - - ".$eqslusername_error.""; } ?> -
- -
- -
- - -
- ".$eqslpassword_error.""; } else { ?> - - -
-
-
-
- - -
-
-
-
-
- - - - ".$userclublogname_error.""; } ?> -
- -
- -
- - -
- ".$clublogpassword_error.""; } else { ?> - -
-
-
- -
-

- -

-
-
-
- -
-
-
-
-
- - - + +
+

+ +

+
+
+
+ +
+
+
+
+
+ + + " . $userlotwname_error . ""; + } ?> +
+ +
+ +
+ + +
+ " . $lotwpassword_error . ""; + } else { ?> + + +
+
-
-
- -
-
-
-
-
- - - + +
+
+
+
+
+ + + " . $eqslusername_error . ""; + } ?> +
+ +
+ +
+ + +
+ " . $eqslpassword_error . ""; + } else { ?> + + +
+
-
-
- -
-
-
-
-
- - - - + +
+
+
+
+
+ + + + " . $userclublogname_error . ""; + } ?> +
+ +
+ +
+ + +
+ " . $clublogpassword_error . ""; + } else { ?> + + +
+
- -
- -
-
-
-
-
- - - +
+ +
+

+ +

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