mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
@@ -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;
|
||||
|
||||
@@ -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' ? "<div class='alert-danger'>Y</div>" : '';
|
||||
$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' ? "<div class='alert-danger'>Y</div>" : '';
|
||||
$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] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("'.$wiota->tag.'","'. $band . '","All","All","'. $postdata['mode'] . '","IOTA")\'>W</a></div>';
|
||||
}
|
||||
}
|
||||
|
||||
// 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] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("'.$wiota->tag.'","'. $band . '","All","All","'. $postdata['mode'] . '","IOTA")\'>W</a></div>';
|
||||
}
|
||||
}
|
||||
// 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] = '<div class="bg-success awardsBgSuccess"><a href=\'javascript:displayContacts("'.$ciota->tag.'","'. $band . '","All","All","'. $postdata['mode'] . '","IOTA")\'>C</a></div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 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] = '<div class="bg-success awardsBgSuccess"><a href=\'javascript:displayContacts("'.$ciota->tag.'","'. $band . '","All","All","'. $postdata['mode'] . '","IOTA")\'>C</a></div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
// 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();
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -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] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . $line->col_cnty . '","' . $band . '","All","All","'. $postdata['mode'] . '","JCC", "")\'>W</a></div>';
|
||||
$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] = '<div class="bg-success awardsBgSuccess"><a href=\'javascript:displayContacts("' . $line->col_cnty . '","' . $band . '","All","All","'. $postdata['mode'] . '","JCC", "'.$qsl.'")\'>C</a></div>';
|
||||
$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') {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","WAJA", "")\'>W</a></div>';
|
||||
$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] = '<div class="bg-success awardsBgSuccess"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","All","'. $postdata['mode'] . '","WAJA", "'.$qsl.'")\'>C</a></div>';
|
||||
$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();
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
@@ -66,6 +66,10 @@
|
||||
<input class="form-check-input" type="checkbox" name="qrz" value="1" id="qrz" <?php if ($this->input->post('qrz')) echo ' checked="checked"'; ?> >
|
||||
<label class="form-check-label" for="qrz">QRZ.com</label>
|
||||
</div>
|
||||
<div class="form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" name="clublog" value="1" id="clublog" <?php if ($this->input->post('clublog')) echo ' checked="checked"'; ?> >
|
||||
<label class="form-check-label" for="clublog">Clublog</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -72,6 +72,10 @@
|
||||
<input class="form-check-input" type="checkbox" name="qrz" value="1" id="qrz" <?php if ($this->input->post('qrz')) echo ' checked="checked"'; ?> >
|
||||
<label class="form-check-label" for="qrz">QRZ.com</label>
|
||||
</div>
|
||||
<div class="form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" name="clublog" value="1" id="clublog" <?php if ($this->input->post('clublog')) echo ' checked="checked"'; ?> >
|
||||
<label class="form-check-label" for="clublog">Clublog</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -53,6 +53,33 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 row">
|
||||
<div class="col-md-2"><?php echo lang('awards_qsl_type'); ?></div>
|
||||
<div class="col-md-10">
|
||||
<div class="form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
|
||||
<label class="form-check-label" for="qsl">QSL</label>
|
||||
</div>
|
||||
<div class="form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" name="lotw" value="1" id="lotw" <?php if ($this->input->post('lotw') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
|
||||
<label class="form-check-label" for="lotw">LoTW</label>
|
||||
</div>
|
||||
<div class="form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" name="eqsl" value="1" id="eqsl" <?php if ($this->input->post('eqsl')) echo ' checked="checked"'; ?> >
|
||||
<label class="form-check-label" for="eqsl">eQSL</label>
|
||||
</div>
|
||||
<div class="form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" name="qrz" value="1" id="qrz" <?php if ($this->input->post('qrz')) echo ' checked="checked"'; ?> >
|
||||
<label class="form-check-label" for="qrz">QRZ.com</label>
|
||||
</div>
|
||||
<div class="form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" name="clublog" value="1" id="clublog" <?php if ($this->input->post('clublog')) echo ' checked="checked"'; ?> >
|
||||
<label class="form-check-label" for="clublog">Clublog</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-3 row">
|
||||
<div class="col-md-2">Continents</div>
|
||||
<div class="col-md-10">
|
||||
|
||||
@@ -63,6 +63,10 @@
|
||||
<input class="form-check-input" type="checkbox" name="qrz" value="1" id="qrz" <?php if ($this->input->post('qrz')) echo ' checked="checked"'; ?> >
|
||||
<label class="form-check-label" for="qrz">QRZ.com</label>
|
||||
</div>
|
||||
<div class="form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" name="clublog" value="1" id="clublog" <?php if ($this->input->post('clublog')) echo ' checked="checked"'; ?> >
|
||||
<label class="form-check-label" for="clublog">Clublog</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<label class="my-1 me-2"><?php echo lang('gridsquares_confirmation'); ?></label>
|
||||
<div>
|
||||
<div class="form-check-inline">
|
||||
<?php echo '<input class="form-check-input" type="checkbox" name="qsl" id="qsl"';
|
||||
<?php echo '<input class="form-check-input" value="1" type="checkbox" name="qsl" id="qsl"';
|
||||
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'Q') !== false) {
|
||||
echo ' checked' ;
|
||||
}
|
||||
@@ -72,7 +72,7 @@
|
||||
<label class="form-check-label" for="qsl">QSL</label>
|
||||
</div>
|
||||
<div class="form-check-inline">
|
||||
<?php echo '<input class="form-check-input" type="checkbox" name="lotw" id="lotw"';
|
||||
<?php echo '<input class="form-check-input" value="1" type="checkbox" name="lotw" id="lotw"';
|
||||
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'L') !== false) {
|
||||
echo ' checked' ;
|
||||
}
|
||||
@@ -80,7 +80,7 @@
|
||||
<label class="form-check-label" for="lotw">LoTW</label>
|
||||
</div>
|
||||
<div class="form-check-inline">
|
||||
<?php echo '<input class="form-check-input" type="checkbox" name="eqsl" id="eqsl"';
|
||||
<?php echo '<input class="form-check-input" value="1" type="checkbox" name="eqsl" id="eqsl"';
|
||||
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'E') !== false) {
|
||||
echo ' checked' ;
|
||||
}
|
||||
@@ -88,13 +88,21 @@
|
||||
<label class="form-check-label" for="eqsl">eQSL</label>
|
||||
</div>
|
||||
<div class="form-check-inline">
|
||||
<?php echo '<input class="form-check-input" type="checkbox" name="qrz" id="qrz"';
|
||||
<?php echo '<input class="form-check-input" value="1" type="checkbox" name="qrz" id="qrz"';
|
||||
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'Z') !== false) {
|
||||
echo ' checked' ;
|
||||
}
|
||||
echo '>'; ?>
|
||||
<label class="form-check-label" for="qrz">QRZ.com</label>
|
||||
</div>
|
||||
<div>
|
||||
<?php echo '<input class="form-check-input" value="1" type="checkbox" name="clublog" id="clublog"';
|
||||
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'C') !== false) {
|
||||
echo ' checked' ;
|
||||
}
|
||||
echo '>'; ?>
|
||||
<label class="form-check-label" for="clublog">Clublog</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="plot" type="button" name="plot" class="btn btn-primary me-1 ld-ext-right ld-ext-right-plot" onclick="plotmap()">Map<div class="ld ld-ring ld-spin"></div></button>
|
||||
|
||||
@@ -64,6 +64,10 @@
|
||||
<input class="form-check-input" type="checkbox" name="qrz" value="1" id="qrz" <?php if ($this->input->post('qrz')) echo ' checked="checked"'; ?> >
|
||||
<label class="form-check-label" for="qrz">QRZ.com</label>
|
||||
</div>
|
||||
<div class="form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" name="clublog" value="1" id="clublog" <?php if ($this->input->post('clublog')) echo ' checked="checked"'; ?> >
|
||||
<label class="form-check-label" for="clublog">Clublog</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user