diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php
index 339642e73..c9c72c086 100644
--- a/application/controllers/Awards.php
+++ b/application/controllers/Awards.php
@@ -65,6 +65,7 @@ class Awards extends CI_Controller {
$postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
$postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
$postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
+ $postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
@@ -74,6 +75,7 @@ class Awards extends CI_Controller {
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
+ $postdata['clublog'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['band'] = 'All';
@@ -113,25 +115,25 @@ class Awards extends CI_Controller {
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
$bands = $data['worked_bands'];
- }
- else {
+ } else {
$bands[] = $this->security->xss_clean($this->input->post('band'));
}
- }
- else {
+ } else {
$bands = $data['worked_bands'];
}
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
if($this->input->method() === 'post') {
- $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
- $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
- $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
- $postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
- $postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
- $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
- $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
+ $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
+ $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
+ $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
+ $postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
+ $postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
+ $postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
+ $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
+ $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
+
$postdata['includedeleted'] = $this->security->xss_clean($this->input->post('includedeleted'));
$postdata['Africa'] = $this->security->xss_clean($this->input->post('Africa'));
$postdata['Asia'] = $this->security->xss_clean($this->input->post('Asia'));
@@ -144,8 +146,7 @@ class Awards extends CI_Controller {
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
$postdata['sat'] = $this->security->xss_clean($this->input->post('sats'));
$postdata['orbit'] = $this->security->xss_clean($this->input->post('orbits'));
- }
- else { // Setting default values at first load of page
+ } else { // Setting default values at first load of page
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
@@ -186,67 +187,69 @@ class Awards extends CI_Controller {
];
$this->load->model('waja');
- $this->load->model('modes');
- $this->load->model('bands');
+ $this->load->model('modes');
+ $this->load->model('bands');
- $data['worked_bands'] = $this->bands->get_worked_bands('waja');
- $data['modes'] = $this->modes->active();
+ $data['worked_bands'] = $this->bands->get_worked_bands('waja');
+ $data['modes'] = $this->modes->active();
- if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
- if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
- $bands = $data['worked_bands'];
- }
- else {
- $bands[] = $this->security->xss_clean($this->input->post('band'));
- }
- }
- else {
- $bands = $data['worked_bands'];
- }
+ if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
+ if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
+ $bands = $data['worked_bands'];
+ }
+ else {
+ $bands[] = $this->security->xss_clean($this->input->post('band'));
+ }
+ }
+ else {
+ $bands = $data['worked_bands'];
+ }
- $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
+ $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
- if($this->input->method() === 'post') {
- $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
- $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
- $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
- $postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
- $postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
- $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
- $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
- $postdata['includedeleted'] = $this->security->xss_clean($this->input->post('includedeleted'));
- $postdata['Africa'] = $this->security->xss_clean($this->input->post('Africa'));
- $postdata['Asia'] = $this->security->xss_clean($this->input->post('Asia'));
- $postdata['Europe'] = $this->security->xss_clean($this->input->post('Europe'));
- $postdata['NorthAmerica'] = $this->security->xss_clean($this->input->post('NorthAmerica'));
- $postdata['SouthAmerica'] = $this->security->xss_clean($this->input->post('SouthAmerica'));
- $postdata['Oceania'] = $this->security->xss_clean($this->input->post('Oceania'));
- $postdata['Antarctica'] = $this->security->xss_clean($this->input->post('Antarctica'));
- $postdata['band'] = $this->security->xss_clean($this->input->post('band'));
- $postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
- }
- else { // Setting default values at first load of page
- $postdata['qsl'] = 1;
- $postdata['lotw'] = 1;
- $postdata['eqsl'] = 0;
- $postdata['qrz'] = 0;
- $postdata['worked'] = 1;
- $postdata['confirmed'] = 1;
- $postdata['notworked'] = 1;
- $postdata['includedeleted'] = 0;
- $postdata['Africa'] = 1;
- $postdata['Asia'] = 1;
- $postdata['Europe'] = 1;
- $postdata['NorthAmerica'] = 1;
- $postdata['SouthAmerica'] = 1;
- $postdata['Oceania'] = 1;
- $postdata['Antarctica'] = 1;
- $postdata['band'] = 'All';
- $postdata['mode'] = 'All';
- }
+ if($this->input->method() === 'post') {
+ $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
+ $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
+ $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
+ $postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
+ $postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
+ $postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
+ $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
+ $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
+ $postdata['includedeleted'] = $this->security->xss_clean($this->input->post('includedeleted'));
+ $postdata['Africa'] = $this->security->xss_clean($this->input->post('Africa'));
+ $postdata['Asia'] = $this->security->xss_clean($this->input->post('Asia'));
+ $postdata['Europe'] = $this->security->xss_clean($this->input->post('Europe'));
+ $postdata['NorthAmerica'] = $this->security->xss_clean($this->input->post('NorthAmerica'));
+ $postdata['SouthAmerica'] = $this->security->xss_clean($this->input->post('SouthAmerica'));
+ $postdata['Oceania'] = $this->security->xss_clean($this->input->post('Oceania'));
+ $postdata['Antarctica'] = $this->security->xss_clean($this->input->post('Antarctica'));
+ $postdata['band'] = $this->security->xss_clean($this->input->post('band'));
+ $postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
+ }
+ else { // Setting default values at first load of page
+ $postdata['qsl'] = 1;
+ $postdata['lotw'] = 1;
+ $postdata['eqsl'] = 0;
+ $postdata['qrz'] = 0;
+ $postdata['clublog'] = 0;
+ $postdata['worked'] = 1;
+ $postdata['confirmed'] = 1;
+ $postdata['notworked'] = 1;
+ $postdata['includedeleted'] = 0;
+ $postdata['Africa'] = 1;
+ $postdata['Asia'] = 1;
+ $postdata['Europe'] = 1;
+ $postdata['NorthAmerica'] = 1;
+ $postdata['SouthAmerica'] = 1;
+ $postdata['Oceania'] = 1;
+ $postdata['Antarctica'] = 1;
+ $postdata['band'] = 'All';
+ $postdata['mode'] = 'All';
+ }
- $data['waja_array'] = $this->waja->get_waja_array($bands, $postdata);
- $data['waja_summary'] = $this->waja->get_waja_summary($bands, $postdata);
+ $data['waja_array'] = $this->waja->get_waja_array($bands, $postdata);
+ $data['waja_summary'] = $this->waja->get_waja_summary($bands, $postdata);
// Render Page
$data['page_title'] = "Awards - WAJA";
@@ -263,67 +266,66 @@ class Awards extends CI_Controller {
];
$this->load->model('jcc_model');
- $this->load->model('modes');
- $this->load->model('bands');
+ $this->load->model('modes');
+ $this->load->model('bands');
- $data['worked_bands'] = $this->bands->get_worked_bands('jcc');
- $data['modes'] = $this->modes->active();
+ $data['worked_bands'] = $this->bands->get_worked_bands('jcc');
+ $data['modes'] = $this->modes->active();
- if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
- if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
- $bands = $data['worked_bands'];
- }
- else {
- $bands[] = $this->security->xss_clean($this->input->post('band'));
- }
- }
- else {
- $bands = $data['worked_bands'];
- }
+ if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
+ if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
+ $bands = $data['worked_bands'];
+ } else {
+ $bands[] = $this->security->xss_clean($this->input->post('band'));
+ }
+ } else {
+ $bands = $data['worked_bands'];
+ }
- $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
+ $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
- if($this->input->method() === 'post') {
- $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
- $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
- $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
- $postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
- $postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
- $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
- $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
- $postdata['includedeleted'] = $this->security->xss_clean($this->input->post('includedeleted'));
- $postdata['Africa'] = $this->security->xss_clean($this->input->post('Africa'));
- $postdata['Asia'] = $this->security->xss_clean($this->input->post('Asia'));
- $postdata['Europe'] = $this->security->xss_clean($this->input->post('Europe'));
- $postdata['NorthAmerica'] = $this->security->xss_clean($this->input->post('NorthAmerica'));
- $postdata['SouthAmerica'] = $this->security->xss_clean($this->input->post('SouthAmerica'));
- $postdata['Oceania'] = $this->security->xss_clean($this->input->post('Oceania'));
- $postdata['Antarctica'] = $this->security->xss_clean($this->input->post('Antarctica'));
- $postdata['band'] = $this->security->xss_clean($this->input->post('band'));
- $postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
- }
- else { // Setting default values at first load of page
- $postdata['qsl'] = 1;
- $postdata['lotw'] = 1;
- $postdata['eqsl'] = 0;
- $postdata['qrz'] = 0;
- $postdata['worked'] = 1;
- $postdata['confirmed'] = 1;
- $postdata['notworked'] = 0;
- $postdata['includedeleted'] = 0;
- $postdata['Africa'] = 1;
- $postdata['Asia'] = 1;
- $postdata['Europe'] = 1;
- $postdata['NorthAmerica'] = 1;
- $postdata['SouthAmerica'] = 1;
- $postdata['Oceania'] = 1;
- $postdata['Antarctica'] = 1;
- $postdata['band'] = 'All';
- $postdata['mode'] = 'All';
- }
+ if($this->input->method() === 'post') {
+ $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
+ $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
+ $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
+ $postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
+ $postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
+ $postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
+ $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
+ $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
+ $postdata['includedeleted'] = $this->security->xss_clean($this->input->post('includedeleted'));
+ $postdata['Africa'] = $this->security->xss_clean($this->input->post('Africa'));
+ $postdata['Asia'] = $this->security->xss_clean($this->input->post('Asia'));
+ $postdata['Europe'] = $this->security->xss_clean($this->input->post('Europe'));
+ $postdata['NorthAmerica'] = $this->security->xss_clean($this->input->post('NorthAmerica'));
+ $postdata['SouthAmerica'] = $this->security->xss_clean($this->input->post('SouthAmerica'));
+ $postdata['Oceania'] = $this->security->xss_clean($this->input->post('Oceania'));
+ $postdata['Antarctica'] = $this->security->xss_clean($this->input->post('Antarctica'));
+ $postdata['band'] = $this->security->xss_clean($this->input->post('band'));
+ $postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
+ } else { // Setting default values at first load of page
+ $postdata['qsl'] = 1;
+ $postdata['lotw'] = 1;
+ $postdata['eqsl'] = 0;
+ $postdata['qrz'] = 0;
+ $postdata['clublog'] = 0;
+ $postdata['worked'] = 1;
+ $postdata['confirmed'] = 1;
+ $postdata['notworked'] = 0;
+ $postdata['includedeleted'] = 0;
+ $postdata['Africa'] = 1;
+ $postdata['Asia'] = 1;
+ $postdata['Europe'] = 1;
+ $postdata['NorthAmerica'] = 1;
+ $postdata['SouthAmerica'] = 1;
+ $postdata['Oceania'] = 1;
+ $postdata['Antarctica'] = 1;
+ $postdata['band'] = 'All';
+ $postdata['mode'] = 'All';
+ }
- $data['jcc_array'] = $this->jcc_model->get_jcc_array($bands, $postdata);
- $data['jcc_summary'] = $this->jcc_model->get_jcc_summary($bands, $postdata);
+ $data['jcc_array'] = $this->jcc_model->get_jcc_array($bands, $postdata);
+ $data['jcc_summary'] = $this->jcc_model->get_jcc_summary($bands, $postdata);
// Render Page
$data['page_title'] = "Awards - JCC";
@@ -332,86 +334,87 @@ class Awards extends CI_Controller {
$this->load->view('interface_assets/footer', $footerData);
}
- public function jcc_export() {
- $this->load->model('Jcc_model');
- $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
- $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
- $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
- $postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
- $postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
- $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
- $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
- $postdata['band'] = $this->security->xss_clean($this->input->post('band'));
- $postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
+ public function jcc_export() {
+ $this->load->model('Jcc_model');
+ $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
+ $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
+ $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
+ $postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
+ $postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
+ $postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
+ $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
+ $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
+ $postdata['band'] = $this->security->xss_clean($this->input->post('band'));
+ $postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
- $qsos = $this->Jcc_model->exportJcc($postdata);
+ $qsos = $this->Jcc_model->exportJcc($postdata);
- $fp = fopen( 'php://output', 'w' );
- $i=1;
- fputcsv($fp, array('No', 'Callsign', 'Date', 'Band', 'Mode', 'Remarks'), ';');
- foreach ($qsos as $qso) {
- fputcsv($fp, array($i, $qso['call'], $qso['date'], ($qso['prop_mode'] != null ? $qso['band'].' / '.$qso['prop_mode'] : $qso['band']), $qso['mode'], $qso['cnty'].' - '.$qso['jcc']), ';');
- $i++;
- }
- fclose($fp);
- return;
- }
+ $fp = fopen( 'php://output', 'w' );
+ $i=1;
+ fputcsv($fp, array('No', 'Callsign', 'Date', 'Band', 'Mode', 'Remarks'), ';');
+ foreach ($qsos as $qso) {
+ fputcsv($fp, array($i, $qso['call'], $qso['date'], ($qso['prop_mode'] != null ? $qso['band'].' / '.$qso['prop_mode'] : $qso['band']), $qso['mode'], $qso['cnty'].' - '.$qso['jcc']), ';');
+ $i++;
+ }
+ fclose($fp);
+ return;
+ }
- public function jcc_cities() {
- $this->load->model('Jcc_model');
- $data = $this->Jcc_model->jccCities();
- header('Content-Type: application/json');
- echo json_encode($data, JSON_PRETTY_PRINT);
- }
+ public function jcc_cities() {
+ $this->load->model('Jcc_model');
+ $data = $this->Jcc_model->jccCities();
+ header('Content-Type: application/json');
+ echo json_encode($data, JSON_PRETTY_PRINT);
+ }
- public function vucc() {
- $this->load->model('vucc');
- $this->load->model('bands');
- $data['worked_bands'] = $this->bands->get_worked_bands('vucc');
+ public function vucc() {
+ $this->load->model('vucc');
+ $this->load->model('bands');
+ $data['worked_bands'] = $this->bands->get_worked_bands('vucc');
- $data['vucc_array'] = $this->vucc->get_vucc_array($data);
+ $data['vucc_array'] = $this->vucc->get_vucc_array($data);
- // Render Page
- $data['page_title'] = "Awards - VUCC";
- $this->load->view('interface_assets/header', $data);
- $this->load->view('awards/vucc/index');
- $this->load->view('interface_assets/footer');
- }
+ // Render Page
+ $data['page_title'] = "Awards - VUCC";
+ $this->load->view('interface_assets/header', $data);
+ $this->load->view('awards/vucc/index');
+ $this->load->view('interface_assets/footer');
+ }
- public function vucc_band(){
- $this->load->model('vucc');
- $band = str_replace('"', "", $this->security->xss_clean($this->input->get("Band")));
- $type = str_replace('"', "", $this->security->xss_clean($this->input->get("Type")));
- $data['vucc_array'] = $this->vucc->vucc_details($band, $type);
- $data['type'] = $type;
+ public function vucc_band(){
+ $this->load->model('vucc');
+ $band = str_replace('"', "", $this->security->xss_clean($this->input->get("Band")));
+ $type = str_replace('"', "", $this->security->xss_clean($this->input->get("Type")));
+ $data['vucc_array'] = $this->vucc->vucc_details($band, $type);
+ $data['type'] = $type;
- // Render Page
- $data['page_title'] = "VUCC - " .$band . " Band";
- $data['filter'] = "band ".$band;
- $data['band'] = $band;
- $this->load->view('interface_assets/header', $data);
- $this->load->view('awards/vucc/band');
- $this->load->view('interface_assets/footer');
- }
+ // Render Page
+ $data['page_title'] = "VUCC - " .$band . " Band";
+ $data['filter'] = "band ".$band;
+ $data['band'] = $band;
+ $this->load->view('interface_assets/header', $data);
+ $this->load->view('awards/vucc/band');
+ $this->load->view('interface_assets/footer');
+ }
- public function vucc_details_ajax(){
- $this->load->model('logbook_model');
+ public function vucc_details_ajax(){
+ $this->load->model('logbook_model');
- $gridsquare = str_replace('"', "", $this->security->xss_clean($this->input->post("Gridsquare")));
- $band = str_replace('"', "", $this->security->xss_clean($this->input->post("Band")));
- $data['results'] = $this->logbook_model->vucc_qso_details($gridsquare, $band);
+ $gridsquare = str_replace('"', "", $this->security->xss_clean($this->input->post("Gridsquare")));
+ $band = str_replace('"', "", $this->security->xss_clean($this->input->post("Band")));
+ $data['results'] = $this->logbook_model->vucc_qso_details($gridsquare, $band);
- // Render Page
- $data['page_title'] = "Log View - VUCC";
- $data['filter'] = "vucc " . $gridsquare . " and band ".$band;
- $this->load->view('awards/details', $data);
- }
+ // Render Page
+ $data['page_title'] = "Log View - VUCC";
+ $data['filter'] = "vucc " . $gridsquare . " and band ".$band;
+ $this->load->view('awards/details', $data);
+ }
/*
* Used to fetch QSOs from the logbook in the awards
*/
- public function qso_details_ajax(){
+ public function qso_details_ajax() {
$this->load->model('logbook_model');
$searchphrase = str_replace('"', "", $this->security->xss_clean($this->input->post("Searchphrase")));
@@ -419,7 +422,7 @@ class Awards extends CI_Controller {
$mode = str_replace('"', "", $this->security->xss_clean($this->input->post("Mode")));
$sat = str_replace('"', "", $this->security->xss_clean($this->input->post("Sat")));
$orbit = str_replace('"', "", $this->security->xss_clean($this->input->post("Orbit")));
- $propagation = str_replace('"', "", $this->security->xss_clean($this->input->post("Propagation")) ?? '');
+ $propagation = str_replace('"', "", $this->security->xss_clean($this->input->post("Propagation")) ?? '');
$type = $this->security->xss_clean($this->input->post('Type'));
$qsl = $this->input->post('QSL') == null ? '' : $this->security->xss_clean($this->input->post('QSL'));
$searchmode = $this->input->post('searchmode') == null ? '' : $this->security->xss_clean($this->input->post('searchmode'));
@@ -446,6 +449,9 @@ class Awards extends CI_Controller {
if (strpos($qsl, "Z") !== false) {
$qsltype[] = "QRZ.com";
}
+ if (strpos($qsl, "C") !== false) {
+ $qsltype[] = "Clublog";
+ }
// Render Page
$data['page_title'] = "Log View - " . $type;
@@ -458,9 +464,9 @@ class Awards extends CI_Controller {
$data['filter'] .= " and orbit type ".$orbit;
}
}
- if ($propagation != '' && $propagation != null) {
- $data['filter'] .= " and propagation ".$propagation;
- }
+ if ($propagation != '' && $propagation != null) {
+ $data['filter'] .= " and propagation ".$propagation;
+ }
if ($mode != null && strtolower($mode) != 'all') {
$data['filter'] .= " and mode ".$mode;
}
@@ -777,7 +783,7 @@ class Awards extends CI_Controller {
$this->load->view('interface_assets/footer', $footerData);
}
- public function iota () {
+ public function iota () {
$this->load->model('iota');
$this->load->model('modes');
$this->load->model('bands');
@@ -798,6 +804,11 @@ class Awards extends CI_Controller {
$data['modes'] = $this->modes->active(); // Used in the view for mode select
if($this->input->method() === 'post') {
+ $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
+ $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
+ $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
+ $postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
+ $postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked')) ?? NULL;
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed')) ?? NULL;
$postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked')) ?? NULL;
@@ -812,6 +823,11 @@ class Awards extends CI_Controller {
$postdata['band'] = $this->security->xss_clean($this->input->post('band')) ?? NULL;
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode')) ?? NULL;
} else { // Setting default values at first load of page
+ $postdata['qsl'] = 1;
+ $postdata['lotw'] = 1;
+ $postdata['eqsl'] = 0;
+ $postdata['qrz'] = 0;
+ $postdata['clublog'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
@@ -1330,6 +1346,7 @@ class Awards extends CI_Controller {
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
+ $postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
@@ -1386,6 +1403,7 @@ class Awards extends CI_Controller {
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
+ $postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
@@ -1438,6 +1456,7 @@ class Awards extends CI_Controller {
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
+ $postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
@@ -1481,34 +1500,35 @@ class Awards extends CI_Controller {
This displays the DXCC map
*/
public function jcc_map() {
- $this->load->model('jcc_model');
- $this->load->model('bands');
+ $this->load->model('jcc_model');
+ $this->load->model('bands');
- $bands[] = $this->security->xss_clean($this->input->post('band'));
+ $bands[] = $this->security->xss_clean($this->input->post('band'));
- $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
- $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
- $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
- $postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
- $postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
- $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
- $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
- $postdata['band'] = $this->security->xss_clean($this->input->post('band'));
- $postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
+ $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
+ $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
+ $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
+ $postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
+ $postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
+ $postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
+ $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
+ $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
+ $postdata['band'] = $this->security->xss_clean($this->input->post('band'));
+ $postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
- $jcc_wkd = $this->jcc_model->fetch_jcc_wkd($postdata);
- $jcc_cnfm = $this->jcc_model->fetch_jcc_cnfm($postdata);
+ $jcc_wkd = $this->jcc_model->fetch_jcc_wkd($postdata);
+ $jcc_cnfm = $this->jcc_model->fetch_jcc_cnfm($postdata);
- $jccs = [];
- foreach ($jcc_wkd as $jcc) {
- $jccs[$jcc->COL_CNTY] = array(1, 0);
- }
- foreach ($jcc_cnfm as $jcc) {
- $jccs[$jcc->COL_CNTY][1] = 1;
- }
+ $jccs = [];
+ foreach ($jcc_wkd as $jcc) {
+ $jccs[$jcc->COL_CNTY] = array(1, 0);
+ }
+ foreach ($jcc_cnfm as $jcc) {
+ $jccs[$jcc->COL_CNTY][1] = 1;
+ }
- header('Content-Type: application/json');
- echo json_encode($jccs);
+ header('Content-Type: application/json');
+ echo json_encode($jccs);
}
/*
@@ -1527,7 +1547,7 @@ class Awards extends CI_Controller {
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
$postdata['band'] = $this->input->post('band');
- $postdata['mode'] = $this->input->post('mode');
+ $postdata['mode'] = $this->input->post('mode');
$postdata['includedeleted'] = $this->input->post('includedeleted') == 0 ? NULL: 1;
$postdata['Africa'] = $this->input->post('Africa') == 0 ? NULL: 1;
$postdata['Asia'] = $this->input->post('Asia') == 0 ? NULL: 1;
@@ -1577,89 +1597,97 @@ class Awards extends CI_Controller {
}
}
- public function wab() {
- $this->load->model('bands');
- $this->load->model('gridmap_model');
- $this->load->model('stations');
+ public function wab() {
+ $this->load->model('bands');
+ $this->load->model('gridmap_model');
+ $this->load->model('stations');
- $data['modes'] = $this->gridmap_model->get_worked_modes();
- $data['bands'] = $this->bands->get_worked_bands();
- $data['orbits'] = $this->bands->get_worked_orbits();
- $data['sats_available'] = $this->bands->get_worked_sats();
+ $data['modes'] = $this->gridmap_model->get_worked_modes();
+ $data['bands'] = $this->bands->get_worked_bands();
+ $data['orbits'] = $this->bands->get_worked_orbits();
+ $data['sats_available'] = $this->bands->get_worked_sats();
- $data['user_default_band'] = $this->session->userdata('user_default_band');
- $data['user_default_confirmation'] = $this->session->userdata('user_default_confirmation');
+ $data['user_default_band'] = $this->session->userdata('user_default_band');
+ $data['user_default_confirmation'] = $this->session->userdata('user_default_confirmation');
- $footerData = [];
- $footerData['scripts'] = [
- 'assets/js/sections/wab.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/wab.js"))
- ];
+ $footerData = [];
+ $footerData['scripts'] = [
+ 'assets/js/sections/wab.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/wab.js"))
+ ];
- // Render page
- $data['page_title'] = "Awards - Worked All Britain";
- $this->load->view('interface_assets/header', $data);
- $this->load->view('awards/wab/index');
- $this->load->view('interface_assets/footer', $footerData);
- }
+ // Render page
+ $data['page_title'] = "Awards - Worked All Britain";
+ $this->load->view('interface_assets/header', $data);
+ $this->load->view('awards/wab/index');
+ $this->load->view('interface_assets/footer', $footerData);
+ }
- public function wab_map() {
- $band = $this->security->xss_clean($this->input->post('band'));
- $mode = $this->security->xss_clean($this->input->post('mode'));
- $qsl = $this->security->xss_clean($this->input->post('qsl'));
- $lotw = $this->security->xss_clean($this->input->post('lotw'));
- $eqsl = $this->security->xss_clean($this->input->post('eqsl'));
- $qrz = $this->security->xss_clean($this->input->post('qrz'));
- $sat = $this->security->xss_clean($this->input->post('sat'));
- $orbit = $this->security->xss_clean($this->input->post('orbit'));
+ public function wab_map() {
+ $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
+ $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
+ $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
+ $postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
+ $postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
+ $postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
+ $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
+ $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
+ $postdata['band'] = $this->security->xss_clean($this->input->post('band'));
+ $postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
+ $postdata['sat'] = $this->security->xss_clean($this->input->post('sat'));
+ $postdata['orbit'] = $this->security->xss_clean($this->input->post('orbit'));
- $this->load->model('logbooks_model');
- $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
+ $this->load->model('logbooks_model');
+ $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
- $this->load->model('wab');
+ $this->load->model('wab');
- if ($logbooks_locations_array) {
- $location_list = "'".implode("','",$logbooks_locations_array)."'";
- $wab_array = $this->wab->get_wab_array($band, $location_list, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit);
- } else {
- $location_list = null;
- $wab_array = null;
- }
+ if ($logbooks_locations_array) {
+ $location_list = "'".implode("','",$logbooks_locations_array)."'";
+ $wab_array = $this->wab->get_wab_array($location_list, $postdata);
+ } else {
+ $location_list = null;
+ $wab_array = null;
+ }
- header('Content-Type: application/json');
- echo json_encode($wab_array);
- }
+ header('Content-Type: application/json');
+ echo json_encode($wab_array);
+ }
- public function wab_list() {
- $band = $this->security->xss_clean($this->input->post('band'));
- $mode = $this->security->xss_clean($this->input->post('mode'));
- $qsl = $this->security->xss_clean($this->input->post('qsl'));
- $lotw = $this->security->xss_clean($this->input->post('lotw'));
- $eqsl = $this->security->xss_clean($this->input->post('eqsl'));
- $qrz = $this->security->xss_clean($this->input->post('qrz'));
- $sat = $this->security->xss_clean($this->input->post('sat'));
- $orbit = $this->security->xss_clean($this->input->post('orbit'));
+ public function wab_list() {
+ $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
+ $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
+ $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
+ $postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
+ $postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
+ $postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
+ $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
+ $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
+ $postdata['band'] = $this->security->xss_clean($this->input->post('band'));
+ $postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
+ $postdata['sat'] = $this->security->xss_clean($this->input->post('sat'));
+ $postdata['orbit'] = $this->security->xss_clean($this->input->post('orbit'));
- $this->load->model('logbooks_model');
- $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
+ $this->load->model('logbooks_model');
+ $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
- $this->load->model('wab');
+ $this->load->model('wab');
- if ($logbooks_locations_array) {
- $location_list = "'".implode("','",$logbooks_locations_array)."'";
- $wab_array = $this->wab->get_wab_list($band, $location_list, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit);
- } else {
- $location_list = null;
- $wab_array = null;
- }
+ if ($logbooks_locations_array) {
+ $location_list = "'".implode("','",$logbooks_locations_array)."'";
+ $wab_array = $this->wab->get_wab_list($location_list, $postdata);
+ } else {
+ $location_list = null;
+ $wab_array = null;
+ }
- $data['wab_array'] = $wab_array;
- $data['postdata']['band'] = $band;
- $data['postdata']['mode'] = $mode;
- $data['postdata']['sat'] = $sat;
- $data['postdata']['orbit'] = $orbit;
+ $data['wab_array'] = $wab_array;
+ $data['postdata']['band'] = $postdata['band'];
+ $data['postdata']['mode'] = $postdata['mode'];
+ $data['postdata']['sat'] = $postdata['sat'];
+ $data['postdata']['orbit'] = $postdata['orbit'];
- $this->load->view('awards/wab/list', $data);
- }
+ $this->load->view('awards/wab/list', $data);
+ }
public function itu() {
$footerData = [];
@@ -1692,22 +1720,24 @@ class Awards extends CI_Controller {
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
- if($this->input->method() === 'post') {
- $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
- $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
- $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
- $postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
- $postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
- $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
- $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
- $postdata['band'] = $this->security->xss_clean($this->input->post('band'));
- $postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
- }
+ if($this->input->method() === 'post') {
+ $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
+ $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
+ $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
+ $postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
+ $postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
+ $postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
+ $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
+ $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
+ $postdata['band'] = $this->security->xss_clean($this->input->post('band'));
+ $postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
+ }
else { // Setting default values at first load of page
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
+ $postdata['clublog'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
@@ -1748,6 +1778,7 @@ class Awards extends CI_Controller {
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
+ $postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
diff --git a/application/models/Iota.php b/application/models/Iota.php
index a70e5e530..e2de71761 100644
--- a/application/models/Iota.php
+++ b/application/models/Iota.php
@@ -5,360 +5,325 @@ class IOTA extends CI_Model {
$this->load->library('Genfunctions');
}
- function get_iota_array($iotaArray, $bands, $postdata) {
- $CI =& get_instance();
- $CI->load->model('logbooks_model');
- $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
+ function get_iota_array($iotaArray, $bands, $postdata) {
+ $this->load->model('logbooks_model');
+ $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
- if (!$logbooks_locations_array) {
- return null;
- }
+ if (!$logbooks_locations_array) {
+ return null;
+ }
$location_list = "'".implode("','",$logbooks_locations_array)."'";
+ foreach ($bands as $band) { // Looping through bands and iota to generate the array needed for display
+ foreach ($iotaArray as $iota) {
+ $iotaMatrix[$iota->tag]['prefix'] = $iota->prefix;
+ $iotaMatrix[$iota->tag]['name'] = $iota->name;
+ if ($postdata['includedeleted'])
+ $iotaMatrix[$iota->tag]['Deleted'] = isset($iota->status) && $iota->status == 'D' ? "
Y
" : '';
+ $iotaMatrix[$iota->tag][$band] = '-';
+ }
- foreach ($bands as $band) { // Looping through bands and iota to generate the array needed for display
- foreach ($iotaArray as $iota) {
- $iotaMatrix[$iota->tag]['prefix'] = $iota->prefix;
- $iotaMatrix[$iota->tag]['name'] = $iota->name;
- if ($postdata['includedeleted'])
- $iotaMatrix[$iota->tag]['Deleted'] = isset($iota->status) && $iota->status == 'D' ? "Y
" : '';
- $iotaMatrix[$iota->tag][$band] = '-';
- }
+ // If worked is checked, we add worked iotas to the array
+ if ($postdata['worked'] != NULL) {
+ $workedIota = $this->getIotaBandWorked($location_list, $band, $postdata);
+ foreach ($workedIota as $wiota) {
+ $iotaMatrix[$wiota->tag][$band] = '';
+ }
+ }
- // If worked is checked, we add worked iotas to the array
- if ($postdata['worked'] != NULL) {
- $workedIota = $this->getIotaBandWorked($location_list, $band, $postdata);
- foreach ($workedIota as $wiota) {
- $iotaMatrix[$wiota->tag][$band] = '';
- }
- }
+ // If confirmed is checked, we add confirmed iotas to the array
+ if ($postdata['confirmed'] != NULL) {
+ $confirmedIota = $this->getIotaBandConfirmed($location_list, $band, $postdata);
+ foreach ($confirmedIota as $ciota) {
+ $iotaMatrix[$ciota->tag][$band] = '';
+ }
+ }
+ }
- // If confirmed is checked, we add confirmed iotas to the array
- if ($postdata['confirmed'] != NULL) {
- $confirmedIota = $this->getIotaBandConfirmed($location_list, $band, $postdata);
- foreach ($confirmedIota as $ciota) {
- $iotaMatrix[$ciota->tag][$band] = '';
- }
- }
- }
+ // We want to remove the worked iotas in the list, since we do not want to display them
+ if ($postdata['worked'] == NULL) {
+ $workedIota = $this->getIotaWorked($location_list, $postdata);
+ foreach ($workedIota as $wiota) {
+ if (array_key_exists($wiota->tag, $iotaMatrix)) {
+ unset($iotaMatrix[$wiota->tag]);
+ }
+ }
+ }
- // We want to remove the worked iotas in the list, since we do not want to display them
- if ($postdata['worked'] == NULL) {
- $workedIota = $this->getIotaWorked($location_list, $postdata);
- foreach ($workedIota as $wiota) {
- if (array_key_exists($wiota->tag, $iotaMatrix)) {
- unset($iotaMatrix[$wiota->tag]);
- }
- }
- }
+ // We want to remove the confirmed iotas in the list, since we do not want to display them
+ if ($postdata['confirmed'] == NULL) {
+ $confirmedIOTA = $this->getIotaConfirmed($location_list, $postdata);
+ foreach ($confirmedIOTA as $ciota) {
+ if (array_key_exists($ciota->tag, $iotaMatrix)) {
+ unset($iotaMatrix[$ciota->tag]);
+ }
+ }
+ }
- // We want to remove the confirmed iotas in the list, since we do not want to display them
- if ($postdata['confirmed'] == NULL) {
- $confirmedIOTA = $this->getIotaConfirmed($location_list, $postdata);
- foreach ($confirmedIOTA as $ciota) {
- if (array_key_exists($ciota->tag, $iotaMatrix)) {
- unset($iotaMatrix[$ciota->tag]);
- }
- }
- }
+ if (isset($iotaMatrix)) {
+ return $iotaMatrix;
+ } else {
+ return 0;
+ }
+ }
- if (isset($iotaMatrix)) {
- return $iotaMatrix;
- }
- else {
- return 0;
- }
- }
-
- function getIotaBandConfirmed($location_list, $band, $postdata) {
- $sql = "SELECT distinct UPPER(col_iota) as tag FROM " . $this->config->item('table_name') . " thcv
- join iota on thcv.col_iota = iota.tag
- where station_id in (" . $location_list .
- ") and thcv.col_iota is not null
- and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y')";
+ function getIotaBandConfirmed($location_list, $band, $postdata) {
+ $sql = "SELECT distinct UPPER(col_iota) as tag FROM " . $this->config->item('table_name') . " thcv
+ join iota on thcv.col_iota = iota.tag
+ where station_id in (" . $location_list . ") and thcv.col_iota is not null";
if ($postdata['mode'] != 'All') {
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
- $sql .= $this->genfunctions->addBandToQuery($band);
+ $sql .= $this->genfunctions->addBandToQuery($band);
- if ($postdata['includedeleted'] == NULL) {
- $sql .= " and coalesce(iota.status, '') <> 'D'";
- }
+ if ($postdata['includedeleted'] == NULL) {
+ $sql .= " and coalesce(iota.status, '') <> 'D'";
+ }
- $sql .= $this->addContinentsToQuery($postdata);
+ $sql .= $this->genfunctions->addQslToQuery($postdata);
+ $sql .= $this->addContinentsToQuery($postdata);
- $query = $this->db->query($sql);
+ $query = $this->db->query($sql);
- return $query->result();
- }
+ return $query->result();
+ }
- function getIotaBandWorked($location_list, $band, $postdata) {
- $sql = 'SELECT distinct UPPER(col_iota) as tag FROM ' . $this->config->item('table_name'). ' thcv
- join iota on thcv.col_iota = iota.tag
- where station_id in (' . $location_list .
- ') and thcv.col_iota is not null';
+ function getIotaBandWorked($location_list, $band, $postdata) {
+ $sql = 'SELECT distinct UPPER(col_iota) as tag FROM ' . $this->config->item('table_name'). ' thcv
+ join iota on thcv.col_iota = iota.tag
+ where station_id in (' . $location_list .
+ ') and thcv.col_iota is not null';
if ($postdata['mode'] != 'All') {
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
- $sql .= $this->genfunctions->addBandToQuery($band);
+ $sql .= $this->genfunctions->addBandToQuery($band);
- if ($postdata['includedeleted'] == NULL) {
- $sql .= " and coalesce(iota.status, '') <> 'D'";
- }
+ if ($postdata['includedeleted'] == NULL) {
+ $sql .= " and coalesce(iota.status, '') <> 'D'";
+ }
- $sql .= $this->addContinentsToQuery($postdata);
+ $sql .= $this->addContinentsToQuery($postdata);
- $query = $this->db->query($sql);
+ $query = $this->db->query($sql);
- return $query->result();
- }
+ return $query->result();
+ }
- function fetchIota($postdata) {
- $CI =& get_instance();
- $CI->load->model('logbooks_model');
- $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
+ function fetchIota($postdata) {
+ $this->load->model('logbooks_model');
+ $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
- if (!$logbooks_locations_array) {
- return null;
- }
+ if (!$logbooks_locations_array) {
+ return null;
+ }
$location_list = "'".implode("','",$logbooks_locations_array)."'";
- $sql = "select tag, name, prefix, dxccid, status, lat1, lat2, lon1, lon2 from iota where 1=1";
+ $sql = "select tag, name, prefix, dxccid, status, lat1, lat2, lon1, lon2 from iota where 1=1";
- if ($postdata['includedeleted'] == NULL) {
- $sql .= " and coalesce(iota.status, '') <> 'D'";
- }
+ if ($postdata['includedeleted'] == NULL) {
+ $sql .= " and coalesce(iota.status, '') <> 'D'";
+ }
- $sql .= $this->addContinentsToQuery($postdata);
+ $sql .= $this->addContinentsToQuery($postdata);
- if ($postdata['notworked'] == NULL) {
- $sql .= " and exists (select 1 from " . $this->config->item('table_name') . " where station_id in (". $location_list . ") and col_iota = iota.tag";
+ if ($postdata['notworked'] == NULL) {
+ $sql .= " and exists (select 1 from " . $this->config->item('table_name') . " where station_id in (". $location_list . ") and col_iota = iota.tag";
if ($postdata['mode'] != 'All') {
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
- if ($postdata['band'] != 'All') {
- if ($postdata['band'] == 'SAT') {
- $sql .= " and col_prop_mode ='" . $postdata['band'] . "'";
- }
- else {
- $sql .= " and col_prop_mode !='SAT'";
- $sql .= " and col_band ='" . $postdata['band'] . "'";
- }
- }
- $sql .= ")";
- }
+ if ($postdata['band'] != 'All') {
+ if ($postdata['band'] == 'SAT') {
+ $sql .= " and col_prop_mode ='" . $postdata['band'] . "'";
+ } else {
+ $sql .= " and col_prop_mode !='SAT'";
+ $sql .= " and col_band ='" . $postdata['band'] . "'";
+ }
+ }
+ $sql .= ")";
+ }
- $sql .= ' order by tag';
- $query = $this->db->query($sql);
+ $sql .= ' order by tag';
+ $query = $this->db->query($sql);
- return $query->result();
- }
+ return $query->result();
+ }
- function getIotaWorked($location_list, $postdata) {
- $sql = "SELECT distinct UPPER(col_iota) as tag FROM " . $this->config->item('table_name') . " thcv
- join iota on thcv.col_iota = iota.tag
- where station_id in (" . $location_list .
- ") and thcv.col_iota is not null
- and not exists (select 1 from ". $this->config->item('table_name') . " where station_id = ". $location_list .
- " and col_iota = thcv.col_iota";
+ function getIotaWorked($location_list, $postdata) {
+ $sql = "SELECT distinct UPPER(col_iota) as tag FROM " . $this->config->item('table_name') . " thcv
+ join iota on thcv.col_iota = iota.tag
+ where station_id in (" . $location_list . ") and thcv.col_iota is not null
+ and not exists (select 1 from ". $this->config->item('table_name') . " where station_id = ". $location_list . " and col_iota = thcv.col_iota)";
if ($postdata['mode'] != 'All') {
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
- $sql .= $this->genfunctions->addBandToQuery($postdata['band']);
+ $sql .= $this->genfunctions->addBandToQuery($postdata['band']);
- $sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y'))";
-
- $sql .= $this->genfunctions->addBandToQuery($postdata['band']);
-
- if ($postdata['includedeleted'] == NULL) {
- $sql .= " and coalesce(iota.status, '') <> 'D'";
- }
+ if ($postdata['includedeleted'] == NULL) {
+ $sql .= " and coalesce(iota.status, '') <> 'D'";
+ }
if ($postdata['mode'] != 'All') {
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
- $sql .= $this->addContinentsToQuery($postdata);
+ $sql .= $this->addContinentsToQuery($postdata);
- $query = $this->db->query($sql);
+ $query = $this->db->query($sql);
- return $query->result();
- }
+ return $query->result();
+ }
- function getIotaConfirmed($location_list, $postdata) {
- $sql = "SELECT distinct UPPER(col_iota) as tag FROM " . $this->config->item('table_name') . " thcv
- join iota on thcv.col_iota = iota.tag
- where station_id in (" . $location_list .
- ") and thcv.col_iota is not null
- and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y')";
+ function getIotaConfirmed($location_list, $postdata) {
+ $sql = "SELECT distinct UPPER(col_iota) as tag FROM " . $this->config->item('table_name') . " thcv
+ join iota on thcv.col_iota = iota.tag
+ where station_id in (" . $location_list . ") and thcv.col_iota is not null";
+ $sql .= $this->genfunctions->addQslToQuery($postdata);
if ($postdata['mode'] != 'All') {
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
- if ($postdata['includedeleted'] == NULL) {
- $sql .= " and coalesce(iota.status, '') <> 'D'";
- }
+ if ($postdata['includedeleted'] == NULL) {
+ $sql .= " and coalesce(iota.status, '') <> 'D'";
+ }
- $sql .= $this->addContinentsToQuery($postdata);
+ $sql .= $this->addContinentsToQuery($postdata);
- $sql .= $this->genfunctions->addBandToQuery($postdata['band']);
+ $sql .= $this->genfunctions->addBandToQuery($postdata['band']);
+ $sql .= $this->genfunctions->addQslToQuery($postdata);
- $query = $this->db->query($sql);
+ $query = $this->db->query($sql);
- return $query->result();
- }
+ return $query->result();
+ }
- // Made function instead of repeating this several times
- function addContinentsToQuery($postdata) {
- $sql = '';
- if ($postdata['Africa'] == NULL) {
- $sql .= " and left(tag, 2) <> 'AF'";
- }
+ // Made function instead of repeating this several times
+ function addContinentsToQuery($postdata) {
+ $sql = '';
+ if ($postdata['Africa'] == NULL) {
+ $sql .= " and left(tag, 2) <> 'AF'";
+ }
- if ($postdata['Europe'] == NULL) {
- $sql .= " and left(tag, 2) <> 'EU'";
- }
+ if ($postdata['Europe'] == NULL) {
+ $sql .= " and left(tag, 2) <> 'EU'";
+ }
- if ($postdata['Asia'] == NULL) {
- $sql .= " and left(tag, 2) <> 'AS'";
- }
+ if ($postdata['Asia'] == NULL) {
+ $sql .= " and left(tag, 2) <> 'AS'";
+ }
- if ($postdata['SouthAmerica'] == NULL) {
- $sql .= " and left(tag, 2) <> 'SA'";
- }
+ if ($postdata['SouthAmerica'] == NULL) {
+ $sql .= " and left(tag, 2) <> 'SA'";
+ }
- if ($postdata['NorthAmerica'] == NULL) {
- $sql .= " and left(tag, 2) <> 'NA'";
- }
+ if ($postdata['NorthAmerica'] == NULL) {
+ $sql .= " and left(tag, 2) <> 'NA'";
+ }
- if ($postdata['Oceania'] == NULL) {
- $sql .= " and left(tag, 2) <> 'OC'";
- }
+ if ($postdata['Oceania'] == NULL) {
+ $sql .= " and left(tag, 2) <> 'OC'";
+ }
- if ($postdata['Antarctica'] == NULL) {
- $sql .= " and left(tag, 2) <> 'AN'";
- }
- return $sql;
- }
+ if ($postdata['Antarctica'] == NULL) {
+ $sql .= " and left(tag, 2) <> 'AN'";
+ }
+ return $sql;
+ }
- /*
- * Function gets worked and confirmed summary on each band on the active stationprofile
- */
- function get_iota_summary($bands, $postdata)
- {
- $CI =& get_instance();
- $CI->load->model('logbooks_model');
- $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
+ /*
+ * Function gets worked and confirmed summary on each band on the active stationprofile
+ */
+ function get_iota_summary($bands, $postdata) {
+ $this->load->model('logbooks_model');
+ $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
- if (!$logbooks_locations_array) {
- return null;
- }
+ if (!$logbooks_locations_array) {
+ return null;
+ }
$location_list = "'".implode("','",$logbooks_locations_array)."'";
- foreach ($bands as $band) {
- $worked = $this->getSummaryByBand($band, $postdata, $location_list);
- $confirmed = $this->getSummaryByBandConfirmed($band, $postdata, $location_list);
- $iotaSummary['worked'][$band] = $worked[0]->count;
- $iotaSummary['confirmed'][$band] = $confirmed[0]->count;
- }
+ foreach ($bands as $band) {
+ $worked = $this->getSummaryByBand($band, $postdata, $location_list);
+ $confirmed = $this->getSummaryByBandConfirmed($band, $postdata, $location_list);
+ $iotaSummary['worked'][$band] = $worked[0]->count;
+ $iotaSummary['confirmed'][$band] = $confirmed[0]->count;
+ }
- $workedTotal = $this->getSummaryByBand($postdata['band'], $postdata, $location_list);
- $confirmedTotal = $this->getSummaryByBandConfirmed($postdata['band'], $postdata, $location_list);
+ $workedTotal = $this->getSummaryByBand($postdata['band'], $postdata, $location_list);
+ $confirmedTotal = $this->getSummaryByBandConfirmed($postdata['band'], $postdata, $location_list);
- $iotaSummary['worked']['Total'] = $workedTotal[0]->count;
- $iotaSummary['confirmed']['Total'] = $confirmedTotal[0]->count;
+ $iotaSummary['worked']['Total'] = $workedTotal[0]->count;
+ $iotaSummary['confirmed']['Total'] = $confirmedTotal[0]->count;
- return $iotaSummary;
- }
-
- function getSummaryByBand($band, $postdata, $location_list)
- {
- $sql = "SELECT count(distinct UPPER(thcv.col_iota)) as count FROM " . $this->config->item('table_name') . " thcv";
- $sql .= ' join iota on thcv.col_iota = iota.tag';
-
- $sql .= " where station_id in (" . $location_list . ")";
-
- if ($band == 'SAT') {
- $sql .= " and thcv.col_prop_mode ='" . $band . "'";
- } else if ($band == 'All') {
- $this->load->model('bands');
+ return $iotaSummary;
+ }
+ function getSummaryByBand($band, $postdata, $location_list) {
+ $sql = "SELECT count(distinct UPPER(thcv.col_iota)) as count FROM " . $this->config->item('table_name') . " thcv";
+ $sql .= ' join iota on thcv.col_iota = iota.tag';
+ $sql .= " where station_id in (" . $location_list . ")";
+ if ($band == 'SAT') {
+ $sql .= " and thcv.col_prop_mode ='" . $band . "'";
+ } else if ($band == 'All') {
+ $this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('iota');
-
$bandslots_list = "'".implode("','",$bandslots)."'";
-
- $sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
- " and thcv.col_prop_mode !='SAT'";
- } else {
- $sql .= " and thcv.col_prop_mode !='SAT'";
- $sql .= " and thcv.col_band ='" . $band . "'";
- }
-
- if ($postdata['includedeleted'] == NULL) {
- $sql .= " and coalesce(iota.status, '') <> 'D'";
- }
-
+ $sql .= " and thcv.col_band in (" . $bandslots_list . ")";
+ $sql .= " and thcv.col_prop_mode !='SAT'";
+ } else {
+ $sql .= " and thcv.col_prop_mode !='SAT'";
+ $sql .= " and thcv.col_band ='" . $band . "'";
+ }
+ if ($postdata['includedeleted'] == NULL) {
+ $sql .= " and coalesce(iota.status, '') <> 'D'";
+ }
if ($postdata['mode'] != 'All') {
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
+ $sql .= $this->addContinentsToQuery($postdata);
+ $query = $this->db->query($sql);
+ return $query->result();
+ }
- $sql .= $this->addContinentsToQuery($postdata);
-
- $query = $this->db->query($sql);
-
- return $query->result();
- }
-
- function getSummaryByBandConfirmed($band, $postdata, $location_list)
- {
- $sql = "SELECT count(distinct thcv.col_iota) as count FROM " . $this->config->item('table_name') . " thcv";
- $sql .= ' join iota on thcv.col_iota = iota.tag';
-
- $sql .= " where station_id in (" . $location_list . ")";
-
- if ($band == 'SAT') {
- $sql .= " and thcv.col_prop_mode ='" . $band . "'";
- } else if ($band == 'All') {
- $this->load->model('bands');
-
+ function getSummaryByBandConfirmed($band, $postdata, $location_list) {
+ $sql = "SELECT count(distinct thcv.col_iota) as count FROM " . $this->config->item('table_name') . " thcv";
+ $sql .= ' join iota on thcv.col_iota = iota.tag';
+ $sql .= " where station_id in (" . $location_list . ")";
+ if ($band == 'SAT') {
+ $sql .= " and thcv.col_prop_mode ='" . $band . "'";
+ } else if ($band == 'All') {
+ $this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('iota');
-
$bandslots_list = "'".implode("','",$bandslots)."'";
-
- $sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
- " and thcv.col_prop_mode !='SAT'";
- } else {
- $sql .= " and thcv.col_prop_mode !='SAT'";
- $sql .= " and thcv.col_band ='" . $band . "'";
- }
-
- if ($postdata['includedeleted'] == NULL) {
- $sql .= " and coalesce(iota.status, '') <> 'D'";
- }
-
+ $sql .= " and thcv.col_band in (" . $bandslots_list . ")";
+ $sql .= " and thcv.col_prop_mode !='SAT'";
+ } else {
+ $sql .= " and thcv.col_prop_mode !='SAT'";
+ $sql .= " and thcv.col_band ='" . $band . "'";
+ }
+ if ($postdata['includedeleted'] == NULL) {
+ $sql .= " and coalesce(iota.status, '') <> 'D'";
+ }
if ($postdata['mode'] != 'All') {
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
+ $sql .= $this->addContinentsToQuery($postdata);
+ $sql .= $this->genfunctions->addQslToQuery($postdata);
+ log_message("Error",$sql);
+ $query = $this->db->query($sql);
- $sql .= $this->addContinentsToQuery($postdata);
-
- $sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y')";
-
- $query = $this->db->query($sql);
-
- return $query->result();
- }
+ return $query->result();
+ }
}
?>
diff --git a/application/models/Jcc_model.php b/application/models/Jcc_model.php
index 7d99f4868..788a5fe90 100644
--- a/application/models/Jcc_model.php
+++ b/application/models/Jcc_model.php
@@ -2,8 +2,13 @@
class Jcc_model extends CI_Model {
+
+ private $location_list=null;
function __construct() {
$this->load->library('Genfunctions');
+ $this->load->model('logbooks_model');
+ $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
+ $this->location_list = "'".implode("','",$logbooks_locations_array)."'";
}
public $jaCities = array(
@@ -924,14 +929,6 @@ class Jcc_model extends CI_Model {
);
function get_jcc_array($bands, $postdata) {
- $this->load->model('logbooks_model');
- $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
-
- if (!$logbooks_locations_array) {
- return null;
- }
-
- $location_list = "'".implode("','",$logbooks_locations_array)."'";
$jccArray = array_keys($this->jaCities);
@@ -951,14 +948,14 @@ class Jcc_model extends CI_Model {
}
if ($postdata['worked'] != NULL) {
- $jccBand = $this->getJccWorked($location_list, $band, $postdata);
+ $jccBand = $this->getJccWorked($this->location_list, $band, $postdata);
foreach ($jccBand as $line) {
$bandJcc[$line->col_cnty][$band] = '';
$cities[$line->col_cnty]['count']++;
}
}
if ($postdata['confirmed'] != NULL) {
- $jccBand = $this->getJccConfirmed($location_list, $band, $postdata);
+ $jccBand = $this->getJccConfirmed($this->location_list, $band, $postdata);
foreach ($jccBand as $line) {
$bandJcc[$line->col_cnty][$band] = '';
$cities[$line->col_cnty]['count']++;
@@ -968,7 +965,7 @@ class Jcc_model extends CI_Model {
// We want to remove the worked cities in the list, since we do not want to display them
if ($postdata['worked'] == NULL) {
- $jccBand = $this->getJccWorked($location_list, $postdata['band'], $postdata);
+ $jccBand = $this->getJccWorked($this->location_list, $postdata['band'], $postdata);
foreach ($jccBand as $line) {
unset($bandJcc[$line->col_cnty]);
}
@@ -976,7 +973,7 @@ class Jcc_model extends CI_Model {
// We want to remove the confirmed cities in the list, since we do not want to display them
if ($postdata['confirmed'] == NULL) {
- $wasBand = $this->getJccConfirmed($location_list, $postdata['band'], $postdata);
+ $wasBand = $this->getJccConfirmed($this->location_list, $postdata['band'], $postdata);
foreach ($wasBand as $line) {
unset($bandJcc[$line->col_cnty]);
}
@@ -994,8 +991,7 @@ class Jcc_model extends CI_Model {
if (isset($bandJcc)) {
return $bandJcc;
- }
- else {
+ } else {
return 0;
}
}
@@ -1006,7 +1002,6 @@ class Jcc_model extends CI_Model {
select col_dxcc from ".$this->config->item('table_name')." thcv
where station_id in (" . $location_list .
") and col_dxcc > 0";
-
$sql .= $this->genfunctions->addBandToQuery($band);
if ($postdata['mode'] != 'All') {
@@ -1014,7 +1009,6 @@ class Jcc_model extends CI_Model {
}
$sql .= $this->genfunctions->addQslToQuery($postdata);
-
$sql .= " group by col_dxcc
) x on dxcc_entities.adif = x.col_dxcc";
@@ -1065,9 +1059,7 @@ class Jcc_model extends CI_Model {
}
$sql .= $this->addStateToQuery();
-
$sql .= $this->genfunctions->addBandToQuery($band);
-
$sql .= " and not exists (select 1 from ". $this->config->item('table_name') .
" where station_id in (". $location_list . ")" .
" and col_cnty = thcv.col_cnty";
@@ -1077,11 +1069,8 @@ class Jcc_model extends CI_Model {
}
$sql .= $this->genfunctions->addBandToQuery($band);
-
$sql .= $this->genfunctions->addQslToQuery($postdata);
-
$sql .= $this->addStateToQuery();
-
$sql .= ")";
$query = $this->db->query($sql);
@@ -1116,35 +1105,25 @@ class Jcc_model extends CI_Model {
/*
* Function gets worked and confirmed summary on each band on the active stationprofile
*/
- function get_jcc_summary($bands, $postdata)
- {
- $this->load->model('logbooks_model');
- $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
-
- if (!$logbooks_locations_array) {
- return null;
- }
-
- $location_list = "'".implode("','",$logbooks_locations_array)."'";
-
+ function get_jcc_summary($bands, $postdata) {
foreach ($bands as $band) {
if ($band != 'SAT') {
- $worked = $this->getSummaryByBand($band, $postdata, $location_list);
- $confirmed = $this->getSummaryByBandConfirmed($band, $postdata, $location_list);
+ $worked = $this->getSummaryByBand($band, $postdata, $this->location_list);
+ $confirmed = $this->getSummaryByBandConfirmed($band, $postdata, $this->location_list);
$jccSummary['worked'][$band] = $worked[0]->count;
$jccSummary['confirmed'][$band] = $confirmed[0]->count;
}
}
- $workedTotal = $this->getSummaryByBand($postdata['band'], $postdata, $location_list);
- $confirmedTotal = $this->getSummaryByBandConfirmed($postdata['band'], $postdata, $location_list);
+ $workedTotal = $this->getSummaryByBand($postdata['band'], $postdata, $this->location_list);
+ $confirmedTotal = $this->getSummaryByBandConfirmed($postdata['band'], $postdata, $this->location_list);
$jccSummary['worked']['Total'] = $workedTotal[0]->count;
$jccSummary['confirmed']['Total'] = $confirmedTotal[0]->count;
if (in_array('SAT', $bands)) {
- $worked = $this->getSummaryByBand('SAT', $postdata, $location_list);
- $confirmed = $this->getSummaryByBandConfirmed('SAT', $postdata, $location_list);
+ $worked = $this->getSummaryByBand('SAT', $postdata, $this->location_list);
+ $confirmed = $this->getSummaryByBandConfirmed('SAT', $postdata, $this->location_list);
$jccSummary['worked']['SAT'] = $worked[0]->count;
$jccSummary['confirmed']['SAT'] = $confirmed[0]->count;
}
@@ -1152,19 +1131,15 @@ class Jcc_model extends CI_Model {
return $jccSummary;
}
- function getSummaryByBand($band, $postdata, $location_list)
- {
+ function getSummaryByBand($band, $postdata, $location_list) {
$sql = "SELECT count(distinct thcv.col_cnty) as count FROM " . $this->config->item('table_name') . " thcv";
-
$sql .= " where station_id in (" . $location_list . ")";
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
} else if ($band == 'All') {
$this->load->model('bands');
-
$bandslots = $this->bands->get_worked_bands('was');
-
$bandslots_list = "'".implode("','",$bandslots)."'";
$sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
@@ -1185,19 +1160,15 @@ class Jcc_model extends CI_Model {
return $query->result();
}
- function getSummaryByBandConfirmed($band, $postdata, $location_list)
- {
+ function getSummaryByBandConfirmed($band, $postdata, $location_list) {
$sql = "SELECT count(distinct thcv.col_cnty) as count FROM " . $this->config->item('table_name') . " thcv";
-
$sql .= " where station_id in (" . $location_list . ")";
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
} else if ($band == 'All') {
$this->load->model('bands');
-
$bandslots = $this->bands->get_worked_bands('was');
-
$bandslots_list = "'".implode("','",$bandslots)."'";
$sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
@@ -1212,11 +1183,8 @@ class Jcc_model extends CI_Model {
}
$sql .= $this->genfunctions->addQslToQuery($postdata);
-
$sql .= $this->addStateToQuery();
-
$query = $this->db->query($sql);
-
return $query->result();
}
@@ -1230,17 +1198,8 @@ class Jcc_model extends CI_Model {
}
function exportJcc($postdata) {
- $this->load->model('logbooks_model');
- $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
-
- if (!$logbooks_locations_array) {
- return null;
- }
-
- $location_list = "'".implode("','",$logbooks_locations_array)."'";
-
$sql = "SELECT distinct col_cnty FROM " . $this->config->item('table_name') . " thcv
- where station_id in (" . $location_list . ")";
+ where station_id in (" . $this->location_list . ")";
if ($postdata['mode'] != 'All') {
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
@@ -1259,7 +1218,7 @@ class Jcc_model extends CI_Model {
}
$qsos = array();
foreach($jccs as $jcc) {
- $qso = $this->getFirstQso($location_list, $jcc, $postdata);
+ $qso = $this->getFirstQso($this->location_list, $jcc, $postdata);
$qsos[] = array('call' => $qso[0]->COL_CALL, 'date' => $qso[0]->COL_TIME_ON, 'band' => $qso[0]->COL_BAND, 'mode' => $qso[0]->COL_MODE, 'prop_mode' => $qso[0]->COL_PROP_MODE, 'cnty' => $qso[0]->COL_CNTY, 'jcc' => $this->jaCities[$qso[0]->COL_CNTY]['name']);
}
@@ -1282,7 +1241,8 @@ class Jcc_model extends CI_Model {
}
function fetch_jcc_wkd($postdata) {
- $sql = 'SELECT DISTINCT `COL_CNTY` FROM '.$this->config->item('table_name').' WHERE 1';
+ $sql = 'SELECT DISTINCT `COL_CNTY` FROM '.$this->config->item('table_name').' WHERE 1
+ and station_id in ('.$this->location_list.')';
$sql .= $this->addStateToQuery();
$sql .= $this->genfunctions->addBandToQuery($postdata['band']);
if ($postdata['mode'] != 'All') {
@@ -1294,7 +1254,8 @@ class Jcc_model extends CI_Model {
}
function fetch_jcc_cnfm($postdata) {
- $sql = 'SELECT DISTINCT `COL_CNTY` FROM '.$this->config->item('table_name').' WHERE 1';
+ $sql = 'SELECT DISTINCT `COL_CNTY` FROM '.$this->config->item('table_name').' WHERE 1
+ and station_id in ('.$this->location_list.')';
$sql .= $this->addStateToQuery();
$sql .= $this->genfunctions->addBandToQuery($postdata['band']);
if ($postdata['mode'] != 'All') {
diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php
index 4d5fe2891..6dae2afe1 100755
--- a/application/models/Logbook_model.php
+++ b/application/models/Logbook_model.php
@@ -561,6 +561,9 @@ class Logbook_model extends CI_Model {
if (strpos($qsl, "Z") !== false) {
$qslfilter[] = 'COL_QRZCOM_QSO_DOWNLOAD_STATUS = "Y"';
}
+ if (strpos($qsl, "C") !== false) {
+ $qslfilter[] = 'COL_CLUBLOG_QSO_DOWNLOAD_STATUS = "Y"';
+ }
$sql = "(".implode(' OR ', $qslfilter).")";
$this->db->where($sql);
}
diff --git a/application/models/Pota.php b/application/models/Pota.php
index 1c5c8a40f..2a3329392 100644
--- a/application/models/Pota.php
+++ b/application/models/Pota.php
@@ -3,13 +3,12 @@
class Pota extends CI_Model {
function get_all() {
- $CI =& get_instance();
- $CI->load->model('logbooks_model');
- $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
+ $this->load->model('logbooks_model');
+ $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
- return null;
- }
+ return null;
+ }
$this->load->model('bands');
diff --git a/application/models/Sota.php b/application/models/Sota.php
index 46d7e5f56..dbd4fc9b0 100644
--- a/application/models/Sota.php
+++ b/application/models/Sota.php
@@ -3,13 +3,12 @@
class Sota extends CI_Model {
function get_all() {
- $CI =& get_instance();
- $CI->load->model('logbooks_model');
- $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
+ $this->load->model('logbooks_model');
+ $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
- return null;
- }
+ return null;
+ }
$this->load->model('bands');
diff --git a/application/models/Wab.php b/application/models/Wab.php
index e97980da3..ae8f355c0 100644
--- a/application/models/Wab.php
+++ b/application/models/Wab.php
@@ -6,13 +6,13 @@ class Wab extends CI_Model {
$this->load->library('Genfunctions');
}
- function get_wab_array($band, $location_list, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit) {
+ function get_wab_array($location_list, $postdata) { // $mode, $qsl, $lotw, $eqsl, $qrz, $clublog, $sat, $orbit) {
$worked = array();
$confirmed = array();
- $worked = $this->getWabWorked($location_list, $band, $mode, $sat, $orbit);
+ $worked = $this->getWabWorked($location_list, $postdata);
- $confirmed = $this->getWabConfirmed($location_list, $band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit);
+ $confirmed = $this->getWabConfirmed($location_list, $postdata);
$wabarray = array();
@@ -38,15 +38,15 @@ class Wab extends CI_Model {
}
return $wabarray;
- }
+ }
- function get_wab_list($band, $location_list, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit) {
+ function get_wab_list($location_list, $postdata) {
$worked = array();
$confirmed = array();
- $worked = $this->getWabWorked($location_list, $band, $mode, $sat, $orbit);
+ $worked = $this->getWabWorked($location_list, $postdata);
- $confirmed = $this->getWabConfirmed($location_list, $band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit);
+ $confirmed = $this->getWabConfirmed($location_list, $postdata);
$wabarray = array();
@@ -74,91 +74,62 @@ class Wab extends CI_Model {
ksort($wabarray);
return $wabarray;
- }
+ }
- /*
- * Function returns all worked, but not confirmed states
- * $postdata contains data from the form, in this case Lotw or QSL are used
- */
- function getWabWorked($location_list, $band, $mode, $sat, $orbit) {
- $sql = "SELECT distinct col_sig_info FROM " . $this->config->item('table_name') . " thcv
- where station_id in (" . $location_list . ") and col_sig = 'WAB' and coalesce(col_sig_info, '') <> ''";
+ /*
+ * Function returns all worked, but not confirmed states
+ * $postdata contains data from the form, in this case Lotw or QSL are used
+ */
+ function getWabWorked($location_list, $postdata) { // $mode, $sat, $orbit) {
+ $sql = "SELECT distinct col_sig_info FROM " . $this->config->item('table_name') . " thcv
+ where station_id in (" . $location_list . ") and col_sig = 'WAB' and coalesce(col_sig_info, '') <> ''";
- $sql .= $this->genfunctions->addBandToQuery($band);
+ $sql .= $this->genfunctions->addBandToQuery($postdata['band']);
- if ($band == 'SAT') {
- if ($sat != 'All') {
- $sql .= " and col_sat_name ='" . $sat . "'";
+ if ($postdata['band'] == 'SAT') {
+ if ($postdata['sat'] != 'All') {
+ $sql .= " and col_sat_name ='" . $postdata['sat'] . "'";
}
}
- if ($mode != 'All') {
- $sql .= " and (col_mode = '" . $mode . "' or col_submode = '" . $mode . "')";
+ if ($postdata['mode'] != 'All') {
+ $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
- $sql .= $this->addOrbitToQuery($orbit);
+ $sql .= $this->addOrbitToQuery($postdata['orbit']);
- $query = $this->db->query($sql);
+ $query = $this->db->query($sql);
- return $query->result();
- }
+ return $query->result();
+ }
- /*
- * Function returns all confirmed states on given band and on LoTW or QSL
- * $postdata contains data from the form, in this case Lotw or QSL are used
- */
- function getWabConfirmed($location_list, $band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit) {
- $sql = "SELECT distinct col_sig_info FROM " . $this->config->item('table_name') . " thcv
- where station_id in (" . $location_list . ") and col_sig = 'WAB' and coalesce(col_sig_info, '') <> ''";
+ /*
+ * Function returns all confirmed states on given band and on LoTW or QSL
+ * $postdata contains data from the form, in this case Lotw or QSL are used
+ */
+ function getWabConfirmed($location_list, $postdata) { // $mode, $qsl, $lotw, $eqsl, $qrz, $clublog, $sat, $orbit) {
+ $sql = "SELECT distinct col_sig_info FROM " . $this->config->item('table_name') . " thcv
+ where station_id in (" . $location_list . ") and col_sig = 'WAB' and coalesce(col_sig_info, '') <> ''";
- $sql .= $this->genfunctions->addBandToQuery($band);
+ $sql .= $this->genfunctions->addBandToQuery($postdata['band']);
- if ($band == 'SAT') {
- if ($sat != 'All') {
- $sql .= " and col_sat_name ='" . $sat . "'";
+ if ($postdata['band'] == 'SAT') {
+ if ($postdata['sat'] != 'All') {
+ $sql .= " and col_sat_name ='" . $postdata['sat'] . "'";
}
}
- if ($mode != 'All') {
- $sql .= " and (col_mode = '" . $mode . "' or col_submode = '" . $mode . "')";
+ if ($postdata['mode'] != 'All') {
+ $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
- $sql .= $this->addOrbitToQuery($orbit);
+ $sql .= $this->addOrbitToQuery($postdata['orbit']);
- $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $qrz);
+ $sql .= $this->genfunctions->addQslToQuery($postdata);
- $query = $this->db->query($sql);
+ $query = $this->db->query($sql);
- return $query->result();
- }
-
- function addQslToQuery($qsl, $lotw, $eqsl, $qrz) {
- $sql = '';
- $qslarray = array();
- if ($qrz != NULL || $lotw != NULL || $qsl != NULL || $eqsl != NULL) {
- $sql .= ' and (';
- if ($qsl != NULL) {
- array_push($qslarray, "col_qsl_rcvd = 'Y'");
- }
- if ($lotw != NULL) {
- array_push($qslarray, "col_lotw_qsl_rcvd = 'Y'");
- }
- if ($eqsl != NULL) {
- array_push($qslarray, "col_eqsl_qsl_rcvd = 'Y'");
- }
- if ($qrz != NULL) {
- array_push($qslarray, "COL_QRZCOM_QSO_DOWNLOAD_STATUS = 'Y'");
- }
- if (count($qslarray) > 0) {
- $sql .= implode(' or ', $qslarray);
- } else {
- $sql .= '1=0';
- }
- $sql .= ')';
- } else {
- $sql.=' and 1=0';
- }
- return $sql;
+ return $query->result();
}
// Adds orbit type to query
diff --git a/application/models/Waja.php b/application/models/Waja.php
index 6c48fbd3a..4f31bed8d 100644
--- a/application/models/Waja.php
+++ b/application/models/Waja.php
@@ -2,8 +2,12 @@
class WAJA extends CI_Model {
+ private $location_list=null;
function __construct() {
$this->load->library('Genfunctions');
+ $this->load->model('logbooks_model');
+ $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
+ $this->location_list = "'".implode("','",$logbooks_locations_array)."'";
}
public $jaPrefectures = array(
@@ -56,15 +60,6 @@ class WAJA extends CI_Model {
'47' => 'Okinawa');
function get_waja_array($bands, $postdata) {
- $CI =& get_instance();
- $CI->load->model('logbooks_model');
- $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
-
- if (!$logbooks_locations_array) {
- return null;
- }
-
- $location_list = "'".implode("','",$logbooks_locations_array)."'";
$wajaArray = array_keys($this->jaPrefectures);
@@ -84,14 +79,14 @@ class WAJA extends CI_Model {
}
if ($postdata['worked'] != NULL) {
- $wajaBand = $this->getWajaWorked($location_list, $band, $postdata);
+ $wajaBand = $this->getWajaWorked($this->location_list, $band, $postdata);
foreach ($wajaBand as $line) {
$bandWaja[$line->col_state][$band] = '';
$prefectures[$line->col_state]['count']++;
}
}
if ($postdata['confirmed'] != NULL) {
- $wajaBand = $this->getWajaConfirmed($location_list, $band, $postdata);
+ $wajaBand = $this->getWajaConfirmed($this->location_list, $band, $postdata);
foreach ($wajaBand as $line) {
$bandWaja[$line->col_state][$band] = '';
$prefectures[$line->col_state]['count']++;
@@ -101,7 +96,7 @@ class WAJA extends CI_Model {
// We want to remove the worked states in the list, since we do not want to display them
if ($postdata['worked'] == NULL) {
- $wajaBand = $this->getWajaWorked($location_list, $postdata['band'], $postdata);
+ $wajaBand = $this->getWajaWorked($this->location_list, $postdata['band'], $postdata);
foreach ($wajaBand as $line) {
unset($bandWaja[$line->col_state]);
}
@@ -109,8 +104,8 @@ class WAJA extends CI_Model {
// We want to remove the confirmed states in the list, since we do not want to display them
if ($postdata['confirmed'] == NULL) {
- $wasBand = $this->getWajaConfirmed($location_list, $postdata['band'], $postdata);
- foreach ($wasBand as $line) {
+ $wajaBand = $this->getWajaConfirmed($this->location_list, $postdata['band'], $postdata);
+ foreach ($wajaBand as $line) {
unset($bandWaja[$line->col_state]);
}
}
@@ -125,8 +120,7 @@ class WAJA extends CI_Model {
if (isset($bandWaja)) {
return $bandWaja;
- }
- else {
+ } else {
return 0;
}
}
@@ -196,7 +190,6 @@ class WAJA extends CI_Model {
}
$sql .= $this->addStateToQuery();
-
$sql .= $this->genfunctions->addBandToQuery($band);
$sql .= " and not exists (select 1 from ". $this->config->item('table_name') .
@@ -208,13 +201,9 @@ class WAJA extends CI_Model {
}
$sql .= $this->genfunctions->addBandToQuery($band);
-
$sql .= $this->genfunctions->addQslToQuery($postdata);
-
$sql .= $this->addStateToQuery();
-
$sql .= ")";
-
$query = $this->db->query($sql);
return $query->result();
@@ -233,41 +222,26 @@ class WAJA extends CI_Model {
}
$sql .= $this->addStateToQuery();
-
$sql .= $this->genfunctions->addBandToQuery($band);
-
$sql .= $this->genfunctions->addQslToQuery($postdata);
-
$query = $this->db->query($sql);
return $query->result();
}
-
/*
* Function gets worked and confirmed summary on each band on the active stationprofile
*/
- function get_waja_summary($bands, $postdata)
- {
- $CI =& get_instance();
- $CI->load->model('logbooks_model');
- $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
-
- if (!$logbooks_locations_array) {
- return null;
- }
-
- $location_list = "'".implode("','",$logbooks_locations_array)."'";
-
+ function get_waja_summary($bands, $postdata) {
foreach ($bands as $band) {
- $worked = $this->getSummaryByBand($band, $postdata, $location_list);
- $confirmed = $this->getSummaryByBandConfirmed($band, $postdata, $location_list);
+ $worked = $this->getSummaryByBand($band, $postdata, $this->location_list);
+ $confirmed = $this->getSummaryByBandConfirmed($band, $postdata, $this->location_list);
$wajaSummary['worked'][$band] = $worked[0]->count;
$wajaSummary['confirmed'][$band] = $confirmed[0]->count;
}
- $workedTotal = $this->getSummaryByBand($postdata['band'], $postdata, $location_list);
- $confirmedTotal = $this->getSummaryByBandConfirmed($postdata['band'], $postdata, $location_list);
+ $workedTotal = $this->getSummaryByBand($postdata['band'], $postdata, $this->location_list);
+ $confirmedTotal = $this->getSummaryByBandConfirmed($postdata['band'], $postdata, $this->location_list);
$wajaSummary['worked']['Total'] = $workedTotal[0]->count;
$wajaSummary['confirmed']['Total'] = $confirmedTotal[0]->count;
@@ -275,10 +249,8 @@ class WAJA extends CI_Model {
return $wajaSummary;
}
- function getSummaryByBand($band, $postdata, $location_list)
- {
+ function getSummaryByBand($band, $postdata, $location_list) {
$sql = "SELECT count(distinct thcv.col_state) as count FROM " . $this->config->item('table_name') . " thcv";
-
$sql .= " where station_id in (" . $location_list . ")";
if ($band == 'SAT') {
@@ -286,12 +258,12 @@ class WAJA extends CI_Model {
} else if ($band == 'All') {
$this->load->model('bands');
- $bandslots = $this->bands->get_worked_bands('was');
+ $bandslots = $this->bands->get_worked_bands('waja');
$bandslots_list = "'".implode("','",$bandslots)."'";
- $sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
- " and thcv.col_prop_mode !='SAT'";
+ $sql .= " and thcv.col_band in (" . $bandslots_list . ")";
+ $sql .= " and thcv.col_prop_mode !='SAT'";
} else {
$sql .= " and thcv.col_prop_mode !='SAT'";
$sql .= " and thcv.col_band ='" . $band . "'";
@@ -308,23 +280,18 @@ class WAJA extends CI_Model {
return $query->result();
}
- function getSummaryByBandConfirmed($band, $postdata, $location_list)
- {
+ function getSummaryByBandConfirmed($band, $postdata, $location_list) {
$sql = "SELECT count(distinct thcv.col_state) as count FROM " . $this->config->item('table_name') . " thcv";
-
$sql .= " where station_id in (" . $location_list . ")";
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
} else if ($band == 'All') {
$this->load->model('bands');
-
- $bandslots = $this->bands->get_worked_bands('was');
-
+ $bandslots = $this->bands->get_worked_bands('waja');
$bandslots_list = "'".implode("','",$bandslots)."'";
-
- $sql .= " and thcv.col_band in (" . $bandslots_list . ")" .
- " and thcv.col_prop_mode !='SAT'";
+ $sql .= " and thcv.col_band in (" . $bandslots_list . ")";
+ $sql .= " and thcv.col_prop_mode !='SAT'";
} else {
$sql .= " and thcv.col_prop_mode !='SAT'";
$sql .= " and thcv.col_band ='" . $band . "'";
@@ -335,9 +302,7 @@ class WAJA extends CI_Model {
}
$sql .= $this->genfunctions->addQslToQuery($postdata);
-
$sql .= $this->addStateToQuery();
-
$query = $this->db->query($sql);
return $query->result();
diff --git a/application/models/Wwff.php b/application/models/Wwff.php
index e15584c3b..a17b70a48 100644
--- a/application/models/Wwff.php
+++ b/application/models/Wwff.php
@@ -3,13 +3,12 @@
class Wwff extends CI_Model {
function get_all() {
- $CI =& get_instance();
- $CI->load->model('logbooks_model');
- $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
+ $this->load->model('logbooks_model');
+ $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
- return null;
- }
+ return null;
+ }
$this->load->model('bands');
diff --git a/application/views/awards/dok/index.php b/application/views/awards/dok/index.php
index 4b3908103..27951347d 100644
--- a/application/views/awards/dok/index.php
+++ b/application/views/awards/dok/index.php
@@ -66,6 +66,10 @@
input->post('qrz')) echo ' checked="checked"'; ?> >
QRZ.com
+
+ input->post('clublog')) echo ' checked="checked"'; ?> >
+ Clublog
+
diff --git a/application/views/awards/dxcc/index.php b/application/views/awards/dxcc/index.php
index ba552d188..73f087a9c 100644
--- a/application/views/awards/dxcc/index.php
+++ b/application/views/awards/dxcc/index.php
@@ -72,6 +72,10 @@
input->post('qrz')) echo ' checked="checked"'; ?> >
QRZ.com
+
+ input->post('clublog')) echo ' checked="checked"'; ?> >
+ Clublog
+
diff --git a/application/views/awards/iota/index.php b/application/views/awards/iota/index.php
index 54f53a851..8654d8467 100644
--- a/application/views/awards/iota/index.php
+++ b/application/views/awards/iota/index.php
@@ -53,6 +53,33 @@
+
+
+
diff --git a/application/views/awards/wab/index.php b/application/views/awards/wab/index.php
index 858d69c89..b0a2f6961 100644
--- a/application/views/awards/wab/index.php
+++ b/application/views/awards/wab/index.php
@@ -64,7 +64,7 @@
- QSL
- LoTW
- eQSL
- '; ?>
QRZ.com
+
+ '; ?>
+ Clublog
+
Map
diff --git a/application/views/awards/waja/index.php b/application/views/awards/waja/index.php
index 565db062c..6fdb60ea5 100644
--- a/application/views/awards/waja/index.php
+++ b/application/views/awards/waja/index.php
@@ -64,6 +64,10 @@
input->post('qrz')) echo ' checked="checked"'; ?> >
QRZ.com
+
+ input->post('clublog')) echo ' checked="checked"'; ?> >
+ Clublog
+
diff --git a/assets/js/sections/iotamap.js b/assets/js/sections/iotamap.js
index 683d71d03..7968f2412 100644
--- a/assets/js/sections/iotamap.js
+++ b/assets/js/sections/iotamap.js
@@ -13,6 +13,9 @@ function load_iota_map() {
notworked: +$('#notworked').prop('checked'),
qsl: +$('#qsl').prop('checked'),
lotw: +$('#lotw').prop('checked'),
+ eqsl: +$('#eqsl').prop('checked'),
+ qrz: +$('#qrz').prop('checked'),
+ clublog: +$('#clublog').prop('checked'),
includedeleted: +$('#includedeleted').prop('checked'),
Africa: +$('#Africa').prop('checked'),
Asia: +$('#Asia').prop('checked'),
diff --git a/assets/js/sections/jcc.js b/assets/js/sections/jcc.js
index 89bec3c2c..07931f2a7 100644
--- a/assets/js/sections/jcc.js
+++ b/assets/js/sections/jcc.js
@@ -34,6 +34,7 @@ function export_qsos() {
lotw: +$('#lotw').prop('checked'),
qrz: +$('#qrz').prop('checked'),
eqsl: +$('#eqsl').prop('checked'),
+ clublog: +$('#clublog').prop('checked'),
includedeleted: +$('#includedeleted').prop('checked'),
Africa: +$('#Africa').prop('checked'),
Asia: +$('#Asia').prop('checked'),
diff --git a/assets/js/sections/jccmap.js b/assets/js/sections/jccmap.js
index 39bdfdb31..0d314e833 100644
--- a/assets/js/sections/jccmap.js
+++ b/assets/js/sections/jccmap.js
@@ -14,6 +14,7 @@ function load_jcc_map() {
qsl: +$('#qsl').prop('checked'),
lotw: +$('#lotw').prop('checked'),
qrz: +$('#qrz').prop('checked'),
+ clublog: +$('#clublog').prop('checked'),
eqsl: +$('#eqsl').prop('checked'),
},
success: function(data) {
diff --git a/assets/js/sections/wajamap.js b/assets/js/sections/wajamap.js
index 18ca4d51b..e12df68d8 100644
--- a/assets/js/sections/wajamap.js
+++ b/assets/js/sections/wajamap.js
@@ -74,6 +74,7 @@ function load_waja_map() {
lotw: +$('#lotw').prop('checked'),
eqsl: +$('#eqsl').prop('checked'),
qrz: +$('#qrz').prop('checked'),
+ clublog: +$('#clublog').prop('checked'),
},
success: function(data) {
prefectures = data;