这个提交包含在:
root 2023-04-19 04:30:23 +00:00
当前提交 35055ee3f5
共有 19 个文件被更改,包括 1058 次插入177 次删除

查看文件

@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 116;
$config['migration_version'] = 117;
/*
|--------------------------------------------------------------------------

查看文件

@ -0,0 +1,124 @@
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
This controller contains features for Cabrillo
*/
class Cabrillo extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->model('user_model');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
}
public function index() {
$data['page_title'] = "Export Cabrillo";
$this->load->model('Contesting_model');
$this->load->model('stations');
$data['station_profile'] = $this->stations->all_of_user();
$active_station_id = $this->stations->find_active();
$station_profile = $this->stations->profile($active_station_id);
$data['active_station_info'] = $station_profile->row();
$footerData = [];
$footerData['scripts'] = [
'assets/js/sections/cabrillo.js'
];
$this->load->view('interface_assets/header', $data);
$this->load->view('cabrillo/index');
$this->load->view('interface_assets/footer', $footerData);
}
public function getContests() {
$this->load->model('Contesting_model');
$station_id = $this->security->xss_clean($this->input->post('station_id'));
$year = $this->security->xss_clean($this->input->post('year'));
$result = $this->Contesting_model->get_logged_contests($station_id, $year);
header('Content-Type: application/json');
echo json_encode($result);
}
public function getYears() {
$this->load->model('Contesting_model');
$station_id = $this->security->xss_clean($this->input->post('station_id'));
$result = $this->Contesting_model->get_logged_years($station_id);
header('Content-Type: application/json');
echo json_encode($result);
}
public function getContestDates() {
$this->load->model('Contesting_model');
$station_id = $this->security->xss_clean($this->input->post('station_id'));
$year = $this->security->xss_clean($this->input->post('year'));
$contestid = $this->security->xss_clean($this->input->post('contestid'));
$result = $this->Contesting_model->get_contest_dates($station_id, $year, $contestid);
header('Content-Type: application/json');
echo json_encode($result);
}
public function export() {
// Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1');
$this->load->model('Contesting_model');
$this->load->model('stations');
$this->load->model('user_model');
$station_id = $this->security->xss_clean($this->input->post('station_id'));
$contest_id = $this->security->xss_clean($this->input->post('contestid'));
$from = $this->security->xss_clean($this->input->post('contestdatesfrom'));
$to = $this->security->xss_clean($this->input->post('contestdatesto'));
$station = $this->stations->profile($station_id);
$station = $station->row();
$userinfo = $this->user_model->get_by_id($this->session->userdata('user_id'));
$userinfo = $userinfo->row();
$data['qsos'] = $this->Contesting_model->export_custom($from, $to, $contest_id, $station_id);
$data['contest_id'] = $contest_id;
$data['callsign'] = $station->station_callsign;
$data['claimed_score'] = '';
$data['categoryoperator'] = $this->security->xss_clean($this->input->post('categoryoperator'));
$data['categoryassisted'] = $this->security->xss_clean($this->input->post('categoryassisted'));
$data['categoryband'] = $this->security->xss_clean($this->input->post('categoryband'));
$data['categorymode'] = $this->security->xss_clean($this->input->post('categorymode'));
$data['categorypower'] = $this->security->xss_clean($this->input->post('categorypower'));
$data['categorystation'] = $this->security->xss_clean($this->input->post('categorystation'));
$data['categorytransmitter'] = $this->security->xss_clean($this->input->post('categorytransmitter'));
$data['categoryoverlay'] = $this->security->xss_clean($this->input->post('categoryoverlay'));
$data['operators'] = $this->security->xss_clean($this->input->post('operators'));
$data['club'] = $this->security->xss_clean($this->input->post('club'));
$data['name'] = $userinfo->user_firstname . ' ' . $userinfo->user_lastname;
$data['email'] = $userinfo->user_email;
$data['address'] = $this->security->xss_clean($this->input->post('address'));
$data['addresscity'] = $this->security->xss_clean($this->input->post('addresscity'));
$data['addressstateprovince'] = $this->security->xss_clean($this->input->post('addressstateprovince'));
$data['addresspostalcode'] = $this->security->xss_clean($this->input->post('addresspostalcode'));
$data['addresscountry'] = $this->security->xss_clean($this->input->post('addresscountry'));
$data['soapbox'] = $this->security->xss_clean($this->input->post('soapbox'));
$data['gridlocator'] = $station->station_gridsquare;
$this->load->view('cabrillo/export', $data);
}
}

查看文件

@ -42,17 +42,39 @@ class Contesting extends CI_Controller {
}
public function getSessionQsos() {
//load model
$this->load->model('Contesting_model');
$qso = $this->input->post('qso');
// get QSOs to fill the table
$data = $this->Contesting_model->getSessionQsos($qso);
header('Content-Type: application/json');
echo json_encode($this->Contesting_model->getSessionQsos($qso));
}
public function getSession() {
$this->load->model('Contesting_model');
header('Content-Type: application/json');
echo json_encode($this->Contesting_model->getSession());
}
public function deleteSession() {
$this->load->model('Contesting_model');
$qso = $this->input->post('qso');
$data = $this->Contesting_model->deleteSession($qso);
return json_encode($data);
}
public function setSession() {
$this->load->model('Contesting_model');
$this->Contesting_model->setSession();
return json_encode("ok");
}
public function create() {
$this->load->model('Contesting_model');
$this->load->library('form_validation');
@ -161,10 +183,10 @@ class Contesting extends CI_Controller {
$band = $this->input->post('band');
$mode = $this->input->post('mode');
$contest = $this->input->post('contest');
$qso = $this->input->post('qso');
$this->load->model('Contesting_model');
$result = $this->Contesting_model->checkIfWorkedBefore($call, $band, $mode, $contest, $qso);
$result = $this->Contesting_model->checkIfWorkedBefore($call, $band, $mode, $contest);
header('Content-Type: application/json');
if ($result->num_rows()) {

查看文件

@ -7,7 +7,7 @@
*/
class Kml extends CI_Controller {
class Kmlexport extends CI_Controller {
public function index() {
$this->load->model('user_model');

查看文件

@ -359,7 +359,6 @@ class Lotw extends CI_Controller {
| Download QSO Matches from LoTW
*/
echo "<br><br>";
echo "LoTW Matches<br>";
echo $this->lotw_download();
}
@ -580,6 +579,7 @@ class Lotw extends CI_Controller {
unlink($filepath);
if(isset($data['lotw_table_headers'])) {
echo "LoTW Matches<br>";
if($display_view == TRUE) {
$data['page_title'] = "LoTW ADIF Information";
$this->load->view('interface_assets/header', $data);
@ -589,7 +589,7 @@ class Lotw extends CI_Controller {
return $tableheaders.$table;
}
} else {
echo "LoTW Downloading failed either due to it being down or incorrect logins.";
echo "Downloaded LotW report contains no matches.";
}
}
@ -615,6 +615,9 @@ class Lotw extends CI_Controller {
$config['upload_path'] = './uploads/';
$file = $config['upload_path'] . 'lotwreport_download.adi';
if (file_exists($file) && ! is_writable($file)) {
return "Temporary download file ".$file." is not writable. Aborting!";
}
// Get credentials for LoTW
$data['user_lotw_name'] = urlencode($user->user_lotw_name);
@ -643,7 +646,13 @@ class Lotw extends CI_Controller {
$lotw_url .= "&qso_qslsince=";
$lotw_url .= "$lotw_last_qsl_date";
if (! is_writable(dirname($file))) {
return "Temporary download directory ".dirname($file)." is not writable. Aborting!";
}
file_put_contents($file, file_get_contents($lotw_url));
if (file_get_contents($file, false, null, 0, 39) != "ARRL Logbook of the World Status Report") {
return "LotW downloading failed either due to it being down or incorrect logins.";
}
ini_set('memory_limit', '-1');
$results = $this->loadFromFile($file, false);

查看文件

@ -252,4 +252,32 @@ class Options extends CI_Controller {
}
}
function oqrs() {
$data['page_title'] = "Cloudlog Options";
$data['sub_heading'] = "OQRS Global text";
$this->load->view('interface_assets/header', $data);
$this->load->view('options/oqrs');
$this->load->view('interface_assets/footer');
}
function oqrs_save() {
$data['page_title'] = "Cloudlog Options";
$data['sub_heading'] = "OQRS Global text";
$this->load->helper(array('form', 'url'));
$this->load->library('form_validation');
$global_oqrs_text = $this->optionslib->update('global_oqrs_text', $this->input->post('global_oqrs_text'), null);
if($global_oqrs_text == TRUE) {
$this->session->set_flashdata('success', 'OQRS Global text has been saved.');
}
redirect('/options/oqrs');
}
}

查看文件

@ -21,6 +21,8 @@ class Oqrs extends CI_Controller {
$data['stations'] = $this->oqrs_model->get_oqrs_stations();
$data['page_title'] = "Log Search & OQRS";
$data['global_oqrs_text'] = $this->optionslib->get_option('global_oqrs_text');
$this->load->view('visitor/layout/header', $data);
$this->load->view('oqrs/index');

查看文件

@ -0,0 +1,142 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// Format according to https://wwrof.org/cabrillo/cabrillo-qso-data/
class Cabrilloformat {
public function header($contest_id, $callsign, $claimed_score,
$operators, $club, $name, $address, $addresscity, $addressstateprovince, $addresspostalcode, $addresscountry, $soapbox, $gridlocator,
$categoryoverlay, $categorytransmitter, $categorystation, $categorypower, $categorymode, $categoryband, $categoryassisted, $categoryoperator, $email) {
$cab_header = "";
$cab_header .= "START-OF-LOG: 3.0"."\r\n";
$cab_header .= "CONTEST: ".$contest_id."\r\n";
$cab_header .= "CALLSIGN: ".$callsign."\r\n";
if($claimed_score != null) {
$cab_header .= "CLAIMED-SCORE: ".$claimed_score."\r\n";
}
$cab_header .= "OPERATORS: ".$operators."\r\n";
if($club != null) {
$cab_header .= "CLUB: ".$club."\r\n";
}
$cab_header .= "CATEGORY-OPERATOR: ".$categoryoperator."\r\n";
$cab_header .= "CATEGORY-BAND: ".$categoryband."\r\n";
$cab_header .= "CATEGORY-ASSISTED: ".$categoryassisted."\r\n";
$cab_header .= "CATEGORY-MODE: ".$categorymode."\r\n";
$cab_header .= "CATEGORY-POWER: ".$categorypower."\r\n";
$cab_header .= "CATEGORY-STATION: ".$categorystation."\r\n";
$cab_header .= "CATEGORY-TRANSMITTER: ".$categorytransmitter."\r\n";
$cab_header .= "CATEGORY-OVERLAY: ".$categoryoverlay."\r\n";
$cab_header .= "NAME: ".$name."\r\n";
$cab_header .= "ADDRESS: ".$address."\r\n";
$cab_header .= "ADDRESS-CITY: ".$addresscity."\r\n";
$cab_header .= "ADDRESS-STATE-PROVINCE: ".$addressstateprovince."\r\n";
$cab_header .= "ADDRESS-POSTALCODE: ".$addresspostalcode."\r\n";
$cab_header .= "ADDRESS-COUNTRY: ".$addresscountry."\r\n";
$cab_header .= "EMAIL: ".$email."\r\n";
$cab_header .= "SOAPBOX: ".$soapbox."\r\n";
if($gridlocator != null) {
$cab_header .= "GRID-LOCATOR: ".$gridlocator."\r\n";
}
$cab_header .= "CREATED-BY: Cloudlog"."\r\n";
return $cab_header;
}
public function footer() {
return "END-OF-LOG:";
}
public function qso($qso) {
$freq = substr($qso->COL_FREQ, 0, -3);
if ($freq > 30000) {
if ($freq > 250000000) {
$freq = "LIGHT";
}
if ($freq >= 241000000 && $freq <= 250000000 ) {
$freq = "241G";
}
if ($freq >= 134000000 && $freq <= 141000000 ) {
$freq = "134G";
}
if ($freq >= 122250000 && $freq <= 123000000 ) {
$freq = "122G";
}
if ($freq >= 75500000 && $freq <= 81500000 ) {
$freq = "75G";
}
if ($freq >= 47000000 && $freq <= 47200000 ) {
$freq = "47G";
}
if ($freq >= 24000000 && $freq <= 24250000 ) {
$freq = "24G";
}
if ($freq >= 10000000 && $freq <= 10500000 ) {
$freq = "10G";
}
if ($freq >= 5650000 && $freq <= 5850000 ) {
$freq = "5.7G";
}
if ($freq >= 3400000 && $freq <= 3475000 ) {
$freq = "3.4G";
}
if ($freq >= 2320000 && $freq <= 2450000 ) {
$freq = "2.4G";
}
if ($freq >= 1240000 && $freq <= 1300000 ) {
$freq = "1.2G";
}
if ($freq >= 902000 && $freq <= 928000 ) {
$freq = "902";
}
if ($freq >= 430000 && $freq <= 440000 ) {
$freq = "432";
}
if ($freq >= 222000 && $freq <= 225000 ) {
$freq = "222";
}
if ($freq >= 144000 && $freq <= 146000 ) {
$freq = "144";
}
if ($freq >= 70150 && $freq <= 70210 ) {
$freq = "70";
}
if ($freq >= 50000 && $freq <= 52000 ) {
$freq = "50";
}
}
if($qso->COL_MODE == "SSB") {
$mode = "PH";
} elseif($qso->COL_MODE == "RTTY") {
$mode = "RY";
} else {
$mode = $qso->COL_MODE;
}
$time = substr($qso->COL_TIME_ON, 0, -3);
$time = str_replace(":","",$time);
if ($qso->COL_STX_STRING != "") {
if($qso->COL_SRX_STRING != "") {
$rx_string = $qso->COL_SRX_STRING;
} else {
$rx_string = "--";
}
return "QSO: ".sprintf("%6s", $freq)." ".$mode." ".$time." ".sprintf("%-13s", $qso->station_callsign)." ".sprintf("%3s", $qso->COL_RST_SENT)." ".sprintf("%-6s", sprintf("%03d", $qso->COL_STX))." ".$qso->COL_STX_STRING . " " .sprintf("%-13s", $qso->COL_CALL)." ".sprintf("%3s", $qso->COL_RST_RCVD)." ".sprintf("%-6s", sprintf("%03d", $qso->COL_SRX))." " . $rx_string . " 0\n";
} else {
return "QSO: ".sprintf("%6s", $freq)." ".$mode." ".$time." ".sprintf("%-13s", $qso->station_callsign)." ".sprintf("%3s", $qso->COL_RST_SENT)." ".sprintf("%-6s", sprintf("%03d", $qso->COL_STX))." ".sprintf("%-13s", $qso->COL_CALL)." ".sprintf("%3s", $qso->COL_RST_RCVD)." ".sprintf("%-6s", sprintf("%03d", $qso->COL_SRX))." 0\n";
}
}
}

查看文件

@ -0,0 +1,69 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Migration_add_contest_session_table extends CI_Migration
{
public function up()
{
if (!$this->db->table_exists('contest_session')) {
$this->dbforge->add_field(array(
'id' => array(
'type' => 'INT',
'constraint' => 20,
'unsigned' => TRUE,
'auto_increment' => TRUE,
'unique' => TRUE
),
'contestid' => array(
'type' => 'VARCHAR',
'constraint' => 100,
'unsigned' => TRUE,
'auto_increment' => FALSE
),
'exchangetype' => array(
'type' => 'VARCHAR',
'constraint' => 20,
'unsigned' => TRUE,
'auto_increment' => FALSE
),
'exchangesent' => array(
'type' => 'VARCHAR',
'constraint' => 20,
'unsigned' => TRUE,
'auto_increment' => FALSE
),
'serialsent' => array(
'type' => 'VARCHAR',
'constraint' => 20,
'unsigned' => TRUE,
'auto_increment' => FALSE
),
'copytodok' => array(
'type' => 'bigint',
'unsigned' => TRUE,
'auto_increment' => FALSE
),
'qso' => array(
'type' => 'VARCHAR',
'constraint' => 100,
'unsigned' => TRUE,
'auto_increment' => FALSE
),
'station_id' => array(
'type' => 'bigint',
'unsigned' => TRUE,
'auto_increment' => FALSE
),
));
$this->dbforge->add_key('id', TRUE);
$this->dbforge->create_table('contest_session');
}
}
public function down()
{
$this->dbforge->drop_table('contest_session');
}
}

查看文件

@ -26,8 +26,78 @@ class Contesting_model extends CI_Model {
" ORDER BY COL_PRIMARY_KEY ASC";
$data = $this->db->query($sql);
header('Content-Type: application/json');
echo json_encode($data->result());
return $data->result();
}
function getSession() {
$CI =& get_instance();
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
$sql = "SELECT * from contest_session where station_id = " . $station_id;
$data = $this->db->query($sql);
return $data->row();
}
function deleteSession() {
$CI =& get_instance();
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
$sql = "delete from contest_session where station_id = " . $station_id;
$this->db->query($sql);
return;
}
function setSession() {
$CI =& get_instance();
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
$qso = "";
if ($this->input->post('callsign')) {
$qso = xss_clean($this->input->post('start_date', true)) . ' ' . xss_clean($this->input->post('start_time', true)) . ',' . xss_clean($this->input->post('callsign', true)) . ',' . xss_clean($this->input->post('contestname', true));
}
$data = array(
'contestid' => xss_clean($this->input->post('contestname', true)),
'exchangetype' => xss_clean($this->input->post('exchangetype', true)),
'exchangesent' => xss_clean($this->input->post('exch_sent', true)),
'serialsent' => xss_clean($this->input->post('exch_serial_s', true)),
'copytodok' => $this->input->post('copyexchangetodok', true) == "" ? 0 : xss_clean($this->input->post('copyexchangetodok', true)),
'qso' => $qso,
'station_id' => $station_id,
);
$sql = "SELECT * from contest_session where station_id = " . $station_id;
$querydata = $this->db->query($sql);
if ($querydata->num_rows() == 0) {
$this->db->insert('contest_session', $data);
return;
}
$result = $querydata->row();
if ($result->qso != "") {
$data['qso'] = $result->qso;
}
$this->updateSession($data, $station_id);
return;
}
function updateSession($data, $station_id) {
$this->db->where('station_id', $station_id);
$this->db->update('contest_session', $data);
}
function getActivecontests() {
@ -137,27 +207,115 @@ class Contesting_model extends CI_Model {
return true;
}
function checkIfWorkedBefore($call, $band, $mode, $contest, $qso) {
function checkIfWorkedBefore($call, $band, $mode, $contest) {
$CI =& get_instance();
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
$qsoarray = explode(',', $qso);
$contest_session = $this->getSession();
if ($contest_session) {
$qsoarray = explode(',', $contest_session->qso);
$date = DateTime::createFromFormat('d-m-Y H:i:s', $qsoarray[0]);
$date = $date->format('Y-m-d H:i:s');
$this->db->where('STATION_ID', $station_id);
$this->db->where('COL_CALL', xss_clean($call));
$this->db->where("COL_BAND", xss_clean($band));
$this->db->where("COL_CONTEST_ID", xss_clean($contest));
$this->db->where("COL_TIME_ON >=", $date);
$this->db->group_start();
$this->db->where("COL_MODE", xss_clean($mode));
$this->db->or_where("COL_SUBMODE", xss_clean($mode));
$this->db->group_end();
$query = $this->db->get($this->config->item('table_name'));
return $query;
}
return;
}
$date = DateTime::createFromFormat('d-m-Y H:i:s', $qsoarray[0]);
$date = $date->format('Y-m-d H:i:s');
function export_custom($from, $to, $contest_id, $station_id) {
$this->db->select(''.$this->config->item('table_name').'.*, station_profile.*');
$this->db->from($this->config->item('table_name'));
$this->db->where($this->config->item('table_name').'.station_id', $station_id);
$this->db->where('STATION_ID', $station_id);
$this->db->where('COL_CALL', xss_clean($call));
$this->db->where("COL_BAND", xss_clean($band));
$this->db->where("COL_CONTEST_ID", xss_clean($contest));
$this->db->where("COL_TIME_ON >=", $date);
$this->db->group_start();
$this->db->where("COL_MODE", xss_clean($mode));
$this->db->or_where("COL_SUBMODE", xss_clean($mode));
$this->db->group_end();
$query = $this->db->get($this->config->item('table_name'));
// If date is set, we format the date and add it to the where-statement
if ($from != 0) {
$from = DateTime::createFromFormat('Y-m-d', $from);
$from = $from->format('Y-m-d');
$this->db->where("date(".$this->config->item('table_name').".COL_TIME_ON) >= '".$from."'");
}
if ($to != 0) {
$to = DateTime::createFromFormat('Y-m-d', $to);
$to = $to->format('Y-m-d');
$this->db->where("date(".$this->config->item('table_name').".COL_TIME_ON) <= '".$to."'");
}
return $query;
$this->db->where($this->config->item('table_name').'.COL_CONTEST_ID', $contest_id);
$this->db->order_by($this->config->item('table_name').".COL_TIME_ON", "ASC");
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
return $this->db->get();
}
function get_logged_contests2() {
$CI =& get_instance();
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
$sql = "select col_contest_id, min(date(col_time_on)) mindate, max(date(col_time_on)) maxdate, year(col_time_on) year, month(col_time_on) month
from " . $this->config->item('table_name') . "
where coalesce(COL_CONTEST_ID, '') <> ''
and station_id =" . $station_id;
$sql .= " group by COL_CONTEST_ID , year(col_time_on), month(col_time_on) order by year(col_time_on) desc";
$data = $this->db->query($sql);
return ($data->result());
}
function get_logged_years($station_id) {
$sql = "select distinct year(col_time_on) year
from " . $this->config->item('table_name') . "
where coalesce(COL_CONTEST_ID, '') <> ''
and station_id =" . $station_id;
$sql .= " order by year(col_time_on) desc";
$data = $this->db->query($sql);
return $data->result();
}
function get_logged_contests($station_id, $year) {
$sql = "select distinct col_contest_id
from " . $this->config->item('table_name') . "
where coalesce(COL_CONTEST_ID, '') <> ''
and station_id =" . $station_id .
" and year(col_time_on) ='" . $year . "'";
$sql .= " order by COL_CONTEST_ID asc";
$data = $this->db->query($sql);
return $data->result();
}
function get_contest_dates($station_id, $year, $contestid) {
$sql = "select distinct (date(col_time_on)) date
from " . $this->config->item('table_name') . "
where coalesce(COL_CONTEST_ID, '') <> ''
and station_id =" . $station_id .
" and year(col_time_on) ='" . $year . "' and col_contest_id ='" . $contestid . "'";
$data = $this->db->query($sql);
return $data->result();
}
}

查看文件

@ -0,0 +1,14 @@
<?php
header('Content-Type: text/plain; charset=utf-8');
header('Content-Disposition: attachment; filename="'.$callsign.'-'.$contest_id.'-'.date('dmY-Hi').'.cbr"');
$CI =& get_instance();
$CI->load->library('Cabrilloformat');
echo $CI->cabrilloformat->header($contest_id, $callsign, $claimed_score,
$operators, $club, $name, $address, $addresscity, $addressstateprovince, $addresspostalcode, $addresscountry, $soapbox, $gridlocator,
$categoryoverlay, $categorytransmitter, $categorystation, $categorypower, $categorymode, $categoryband, $categoryassisted, $categoryoperator, $email);
foreach ($qsos->result() as $row) {
echo $CI->cabrilloformat->qso($row);
}
echo $CI->cabrilloformat->footer();

查看文件

@ -0,0 +1,185 @@
<div class="container">
<br>
<h2><?php echo $page_title; ?></h2>
<div class="card">
<div class="card-header">
Export a contest to a Cabrillo log
</div>
<div class="card-body">
<?php
echo '<div class="contests">';
if ($station_profile) { ?>
<form class="form" action="<?php echo site_url('cabrillo/export'); ?>" method="post" enctype="multipart/form-data">
<div class="form-group form-inline row">
<div class="col-md-3 control-label" for="station_id">Select Station Location: </div>
<select id="station_id" name="station_id" class="custom-select my-1 mr-sm-2 col-md-4">
<?php foreach ($station_profile->result() as $station) { ?>
<option value="<?php echo $station->station_id; ?>" <?php if ($station->station_id == $this->stations->find_active()) { echo " selected =\"selected\""; } ?>>Callsign: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)</option>
<?php } ?>
</select>
<button id="button1id" type="button" onclick="loadYears();" name="button1id" class="btn btn-sm btn-primary"> Proceed</button>
</div>
<div class="form-group form-inline row contestyear">
</div>
<div class="form-group form-inline row contestname">
</div>
<div class="form-group form-inline row contestdates">
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="soapbox">Club: </div>
<input class="form-control my-1 mr-sm-2 col-md-4" id="soapbox" type="soapbox" name="soapbox" aria-label="soapbox">
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="categoryoperator">Category-operator: </div>
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categoryoperator" name="categoryoperator">
<option value="SINGLE-OP">Single-OP</option>
<option value="MULTI-OP">Mulit-OP</option>
<option value="CHECKLOG">Checklog</option>
</select>
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="categoryassisted">Category-assisted: </div>
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categoryassisted" name="categoryassisted">
<option value="NON-ASSISTED">Non-assisted</option>
<option value="ASSISTED">Assisted</option>
</select>
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="categoryband">Category-band: </div>
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categoryband" name="categoryband">
<option value="ALL">ALL</option>
<option value="160M">160M</option>
<option value="80M">80M</option>
<option value="40M">40M</option>
<option value="20M">20M</option>
<option value="15M">15M</option>
<option value="10M">10M</option>
<option value="6M">6M</option>
<option value="4M">4M</option>
<option value="2M">2M</option>
<option value="222">222</option>
<option value="432">432</option>
<option value="902">902</option>
<option value="1.2G">1.2G</option>
<option value="2.3G">2.3G</option>
<option value="3.4G">3.4G</option>
<option value="5.7G">5.7G</option>
<option value="10G">10G</option>
<option value="24G">24G</option>
<option value="47G">47G</option>
<option value="75G">75G</option>
<option value="122G">122G</option>
<option value="134G">134G</option>
<option value="241G">241G</option>
<option value="Light">Light</option>
<option value="VHF-3-BAND and VHF-FM-ONLY (ARRL VHF Contests only)">VHF-3-BAND and VHF-FM-ONLY (ARRL VHF Contests only)</option>
</select>
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="categorymode">Category-mode: </div>
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categorymode" name="categorymode">
<option value="MIXED">MIXED</option>
<option value="CW">CW</option>
<option value="DIGI">DIGI</option>
<option value="FM">FM</option>
<option value="RTTY">RTTY</option>
<option value="SSB">SSB</option>
</select>
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="categorypower">Category-power: </div>
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categorypower" name="categorypower">
<option value="LOW">LOW</option>
<option value="HIGH">HIGH</option>
<option value="QRP">QRP</option>
</select>
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="categorystation">Category-station: </div>
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categorystation" name="categorystation">
<option value="FIXED">FIXED</option>
<option value="DISTRIBUTED">DISTRIBUTED</option>
<option value="MOBILE">MOBILE</option>
<option value="PORTABLE">PORTABLE</option>
<option value="ROVER">ROVER</option>
<option value="ROVER-LIMITED">ROVER-LIMITED</option>
<option value="ROVER-UNLIMITED">ROVER-UNLIMITED</option>
<option value="EXPEDITION">EXPEDITION</option>
<option value="HQ">HQ</option>
<option value="SCHOOL">SCHOOL</option>
<option value="EXPLORER">EXPLORER</option>
</select>
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="categorytransmitter">Category-transmitter: </div>
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categorytransmitter" name="categorytransmitter">
<option value="ONE">ONE</option>
<option value="TWO">TWO</option>
<option value="LIMITED">LIMITED</option>
<option value="UNLIMITED">UNLIMITED</option>
<option value="SWL">SWL</option>
</select>
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="categoryoverlay">Category-overlay: </div>
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categoryoverlay" name="categoryoverlay">
<option value="CLASSIC">CLASSIC</option>
<option value="ROOKIE">ROOKIE</option>
<option value="TB-WIRES">TB-WIRES</option>
<option value="YOUTH">YOUTH</option>
<option value="NOVICE-TECH">NOVICE-TECH</option>
<option value="YL">YL</option>
</select>
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="operators">Operators: </div>
<input class="form-control my-1 mr-sm-2 col-md-4" id="operators" type="operators" name="operators" aria-label="operators">
</select>
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="soapbox">Soapbox: </div>
<input class="form-control my-1 mr-sm-2 col-md-4" id="soapbox" type="text" name="soapbox" aria-label="soapbox">
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="address">Address: </div>
<input class="form-control my-1 mr-sm-2 col-md-4" id="address" type="text" name="address" aria-label="address">
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="addresscity">Address-city: </div>
<input class="form-control my-1 mr-sm-2 col-md-4" id="addresscity" type="text" name="addresscity" aria-label="addresscity">
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="addressstateprovince">Address-state-province: </div>
<input class="form-control my-1 mr-sm-2 col-md-4" id="addressstateprovince" type="text" name="addressstateprovince" aria-label="addressstateprovince">
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="addresspostalcode">Address-postalcode: </div>
<input class="form-control my-1 mr-sm-2 col-md-4" id="addresspostalcode" type="text" name="addresspostalcode" aria-label="addresspostalcode">
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="addresscountry">Address-country: </div>
<input class="form-control my-1 mr-sm-2 col-md-4" id="addresscountry" type="text" name="addresscountry" aria-label="addresscountry">
</div>
<div hidden="true" class="form-group form-inline row additionalinfo">
<div class="col-md-3 control-label" for="button1id"></div>
<button id="button1id" type="submit" name="button1id" class="btn btn-sm btn-primary"> Export</button>
</div>
</form>
<?php }
else {
echo 'No contests were found in your log.';
}
?>
</div>
</div>
</div>

查看文件

@ -224,12 +224,14 @@
<a class="dropdown-item" href="<?php echo site_url('adif');?>" title="Amateur Data Interchange Format (ADIF) import / export"><i class="fas fa-sync"></i> ADIF Import / Export</a>
<a class="dropdown-item" href="<?php echo site_url('kml');?>" title="KML Export for Google Earth"><i class="fas fa-sync"></i> KML Export</a>
<a class="dropdown-item" href="<?php echo site_url('kmlexport');?>" title="KML Export for Google Earth"><i class="fas fa-sync"></i> KML Export</a>
<a class="dropdown-item" href="<?php echo site_url('dxatlas');?>" title="DX Atlas Gridsquare Export"><i class="fas fa-sync"></i> DX Atlas Gridsquare Export</a>
<a class="dropdown-item" href="<?php echo site_url('csv');?>" title="SOTA CSV Export"><i class="fas fa-sync"></i> SOTA CSV Export</a>
<a class="dropdown-item" href="<?php echo site_url('cabrillo');?>" title="Cabrillo Export"><i class="fas fa-sync"></i> Cabrillo Export</a>
<div class="dropdown-divider"></div>
<?php

查看文件

@ -13,7 +13,7 @@
<div class="card-body">
<form class="form" action="<?php echo site_url('kml/export'); ?>" method="post" enctype="multipart/form-data">
<form class="form" action="<?php echo site_url('kmlexport/export'); ?>" method="post" enctype="multipart/form-data">
<div class="form-group">
<label for="band">Band</label>

查看文件

@ -0,0 +1,51 @@
<div class="container settings">
<div class="row">
<!-- Nav Start -->
<?php $this->load->view('options/sidebar') ?>
<!-- Nav End -->
<!-- Content -->
<div class="col-md-9">
<div class="card">
<div class="card-header"><h2><?php echo $page_title; ?> - <?php echo $sub_heading; ?></h2></div>
<div class="card-body">
<?php if($this->session->flashdata('success')) { ?>
<!-- Display Success Message -->
<div class="alert alert-success">
<?php echo $this->session->flashdata('success'); ?>
</div>
<?php } ?>
<?php if($this->session->flashdata('message')) { ?>
<!-- Display Message -->
<div class="alert-message error">
<?php echo $this->session->flashdata('message'); ?>
</div>
<?php } ?>
<?php if(validation_errors()) { ?>
<div class="alert alert-danger">
<a class="close" data-dismiss="alert">x</a>
<?php echo validation_errors(); ?>
</div>
<?php } ?>
<?php echo form_open('options/oqrs_save'); ?>
<div class="form-group">
<label for="globalSearch">OQRS Global text</label>
<p>This text is an optional text that can be displayed on top of the OQRS page.</p>
<input type="text" name="global_oqrs_text" class="form-control" id="global_oqrs_text" aria-describedby="global_oqrs_text" value="<?php echo $this->optionslib->get_option('global_oqrs_text'); ?>">
</div>
<!-- Save the Form -->
<input class="btn btn-primary" type="submit" value="Save" />
</form>
</div>
</div>
</div>
</div>
</div>

查看文件

@ -4,6 +4,7 @@
<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/appearance'); ?>">Appearance</a></li>
<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/radio'); ?>">Radios</a></li>
<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/email'); ?>">Email</a></li>
<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/oqrs'); ?>">OQRS</a></li>
</ul>
</div>
</div>

查看文件

@ -12,6 +12,10 @@
<?php
if ($global_oqrs_text) {
echo $global_oqrs_text;
echo '<br />';
}
echo '<div class="resulttable">';
if ($stations->result() != NULL) { ?>

查看文件

@ -0,0 +1,91 @@
function loadYears() {
$(".contestyear").empty();
$(".contestname").empty();
$(".contestdates").empty();
$(".additionalinfo").attr("hidden", true);
$.ajax({
url: base_url+'index.php/cabrillo/getYears',
type: 'post',
data: {'station_id': $("#station_id").val()},
success: function (data) {
if (data.length > 0) {
$(".contestyear").append('<div class="col-md-3 control-label" for="year">Select year: </div>' +
'<select id="year" class="custom-select my-1 mr-sm-2 col-md-2" name="year">' +
'</select>' +
' <button onclick="loadContests();" class="btn btn-sm btn-primary" type="button">Proceed</button>');
$.each(data, function(key, value) {
$('#year')
.append($("<option></option>")
.attr("value",value.year)
.text(value.year));
});
} else {
$(".contestyear").append("No contests were found for this station location!");
}
}
});
}
function loadContests() {
$(".contestname").empty();
$(".contestdates").empty();
$.ajax({
url: base_url+'index.php/cabrillo/getContests',
type: 'post',
data: {'year': $("#year").val(),
'station_id': $("#station_id").val()
},
success: function (data) {
$(".contestname").append('<div class="col-md-3 control-label" for="contestid">Select contest: </div>' +
'<select class="custom-select my-1 mr-sm-2 col-md-4" id="contestid" name="contestid">' +
'</select>' +
' <button onclick="loadContestDates();" class="btn btn-sm btn-primary" type="button">Proceed</button>');
$.each(data, function(key, value) {
$('#contestid')
.append($("<option></option>")
.attr("value",value.col_contest_id)
.text(value.col_contest_id));
});
}
});
}
function loadContestDates() {
$(".contestdates").empty();
$.ajax({
url: base_url+'index.php/cabrillo/getContestDates',
type: 'post',
data: {'year': $("#year").val(),
'contestid': $("#contestid").val(),
'station_id': $("#station_id").val()},
success: function (data) {
$(".contestdates").append('<div class="col-md-3 control-label" for="contestdates">Select date range: </div>' +
'<select class="custom-select my-1 mr-sm-2 col-md-2" id="contestdatesfrom" name="contestdatesfrom">' +
'</select>' +
'<select class="custom-select my-1 mr-sm-2 col-md-2" id="contestdatesto" name="contestdatesto">' +
'</select>' +
' <button class="btn btn-sm btn-primary" onclick="addAdditionalInfo();" type="button">Proceed</button>');
$.each(data, function(key, value) {
$('#contestdatesfrom')
.append($("<option></option>")
.attr("value", value.date)
.text(value.date));
});
$.each(data, function(key, value) {
$('#contestdatesto')
.append($("<option></option>")
.attr("value", value.date)
.text(value.date));
});
}
});
}
function addAdditionalInfo() {
$(".additionalinfo").removeAttr("hidden");
}

查看文件

@ -2,11 +2,11 @@
$("#callsign").focus();
$(document).ready(function () {
restoreContestSession();
getSession().done(restoreContestSession);
setRst($("#mode").val());
});
// This erases the contest logging session which is stored in localStorage
// Resets the logging form and deletes session from database
function reset_contest_session() {
$('#name').val("");
$('.callsign-suggestions').text("");
@ -18,7 +18,6 @@ function reset_contest_session() {
$('#exch_sent').val("");
$('#exch_rcvd').val("");
$("#exch_gridsquare_r").val("");
$("#exch_gridsquare_s").val("");
$("#callsign").focus();
setRst($("#mode").val());
@ -28,28 +27,42 @@ function reset_contest_session() {
$(".contest_qso_table_contents").empty();
$('#copyexchangetodok').prop('checked', false);
localStorage.removeItem("contestid");
localStorage.removeItem("exchangetype");
localStorage.removeItem("qso");
localStorage.removeItem("exchangereceived");
localStorage.removeItem("exchangesent");
localStorage.removeItem("serialreceived");
localStorage.removeItem("serialsent");
localStorage.removeItem("gridsquarereceived");
localStorage.removeItem("gridsquaresent");
localStorage.removeItem("copytodok");
$.ajax({
url: base_url + 'index.php/contesting/deleteSession',
type: 'post',
success: function (data) {
}
});
}
// Storing the contestid in contest session
$('#contestname').change(function () {
localStorage.setItem("contestid", $("#contestname").val());
var formdata = new FormData(document.getElementById("qso_input"));
setSession(formdata);
});
// Storing the exchange type in contest session
$('#exchangetype').change(function () {
localStorage.setItem("exchangetype", $('#exchangetype').val());
var exchangetype = $("#exchangetype").val();
var formdata = new FormData(document.getElementById("qso_input"));
setSession(formdata);
setExchangetype(exchangetype);
});
function setSession(formdata) {
$.ajax({
url: base_url + 'index.php/contesting/setSession',
type: 'post',
data: formdata,
processData: false,
contentType: false,
success: function (data) {
}
});
}
// realtime clock
if ( ! manual ) {
$(function ($) {
@ -212,23 +225,25 @@ $("#callsign").keyup(function () {
});
function checkIfWorkedBefore() {
$('#callsign_info').text("");
$.ajax({
url: base_url + 'index.php/contesting/checkIfWorkedBefore',
type: 'post',
data: {
'call': $("#callsign").val(),
'mode': $("#mode").val(),
'band': $("#band").val(),
'contest': $("#contestname").val(),
'qso': localStorage.getItem("qso")
},
success: function (result) {
if (result.message == 'Worked before') {
$('#callsign_info').text("Worked before!");
var call = $("#callsign").val();
if (call.length >= 3) {
$('#callsign_info').text("");
$.ajax({
url: base_url + 'index.php/contesting/checkIfWorkedBefore',
type: 'post',
data: {
'call': call,
'mode': $("#mode").val(),
'band': $("#band").val(),
'contest': $("#contestname").val()
},
success: function (result) {
if (result.message == 'Worked before') {
$('#callsign_info').text("Worked before!");
}
}
}
});
});
}
}
function reset_log_fields() {
@ -295,12 +310,16 @@ $('#band').change(function () {
checkIfWorkedBefore();
});
$('#exchangetype').change(function () {
var exchangetype = $("#exchangetype").val();
setExchangetype(exchangetype);
});
function setSerial(data) {
var serialsent = 1;
if (data.serialsent != "") {
serialsent = parseInt(data.serialsent) + 1;
}
$("#exch_serial_s").val(serialsent);
}
function setExchangetype(exchangetype) {
getSession().done(setSerial);
// Perhaps a better approach is to hide everything, then just enable the things you need
$(".exchanger").hide();
$(".exchanges").hide();
@ -310,29 +329,21 @@ function setExchangetype(exchangetype) {
$(".gridsquares").hide();
$("#exch_serial_s").val("");
var serialsent = localStorage.getItem("serialsent");
if (serialsent == null) {
serialsent = 1;
}
if (exchangetype == 'Exchange') {
$(".exchanger").show();
$(".exchanges").show();
}
else if (exchangetype == 'Serial') {
$("#exch_serial_s").val(serialsent);
$(".serials").show();
$(".serialr").show();
}
else if (exchangetype == 'Serialexchange') {
$("#exch_serial_s").val(serialsent);
$(".exchanger").show();
$(".exchanges").show();
$(".serials").show();
$(".serialr").show();
}
else if (exchangetype == 'Serialgridsquare') {
$("#exch_serial_s").val(serialsent);
$(".serials").show();
$(".serialr").show();
$(".gridsquarer").show();
@ -428,10 +439,7 @@ function logQso() {
contentType: false,
enctype: 'multipart/form-data',
success: function (html) {
if (localStorage.getItem("qso") == null) {
localStorage.setItem("qso", $("#start_date").val() + ' ' + $("#start_time").val() + ',' + $("#callsign").val().toUpperCase() + ',' + $("#contestname").val());
}
setSession(formdata);
$('#name').val("");
$('#callsign').val("");
@ -445,17 +453,6 @@ function logQso() {
}
$("#callsign").focus();
// Store contest session
localStorage.setItem("contestid", $("#contestname").val());
localStorage.setItem("exchangetype", $("#exchangetype").val());
localStorage.setItem("exchangereceived", $("#exch_rcvd").val().toUpperCase());
localStorage.setItem("exchangesent", $("#exch_sent").val().toUpperCase());
localStorage.setItem("serialreceived", $("#exch_serial_r").val());
localStorage.setItem("serialsent", $("#exch_serial_s").val());
localStorage.setItem("gridsquarereceived", $("#exch_gridsquare_r").val());
localStorage.setItem("gridsquaresent", $("#exch_gridsquare_s").val());
localStorage.setItem("copytodok", $('#copyexchangetodok').is(":checked"));
var qTable = $('.qsotable').DataTable();
qTable.search('').draw();
}
@ -463,98 +460,80 @@ function logQso() {
}
}
// We are restoring the settings in the contest logging form here
function restoreContestSession() {
var dokcopy = localStorage.getItem("copytodok");
if (dokcopy != null) {
$('#copyexchangetodok').prop('checked', true);
}
var contestname = localStorage.getItem("contestid");
if (contestname != null) {
$("#contestname").val(contestname);
}
var exchangetype = localStorage.getItem("exchangetype");
if (exchangetype != null) {
$("#exchangetype").val(exchangetype);
setExchangetype(exchangetype);
}
var exchangereceived = localStorage.getItem("exchangereceived");
if (exchangereceived != null) {
$("#exch_rcvd").val(exchangereceived);
}
var exchangesent = localStorage.getItem("exchangesent");
if (exchangesent != null) {
$("#exch_sent").val(exchangesent);
}
var serialreceived = localStorage.getItem("serialreceived");
if (serialreceived != null) {
$("#exch_serial_r").val(serialreceived);
}
var serialsent = localStorage.getItem("serialsent");
if (serialsent != null) {
$("#exch_serial_s").val(serialsent);
}
var gridsquarereceived = localStorage.getItem("gridsquarereceived");
if (gridsquarereceived != null) {
$("#exch_gridsquare_r").val(gridsquarereceived);
}
var gridsquaresent = localStorage.getItem("gridsquaresent");
if (gridsquaresent != null) {
$("#exch_gridsquare_s").val(gridsquaresent);
}
if (localStorage.getItem("qso") != null) {
var qsodata = localStorage.getItem("qso");
$.ajax({
url: base_url + 'index.php/contesting/getSessionQsos',
type: 'post',
data: { 'qso': qsodata, },
success: function (html) {
var mode = '';
$.each(html, function () {
if (this.col_submode == null || this.col_submode == '') {
mode = this.col_mode;
} else {
mode = this.col_submode;
}
$(".qsotable tbody").prepend('<tr>' +
'<td>' + this.col_time_on + '</td>' +
'<td>' + this.col_call + '</td>' +
'<td>' + this.col_band + '</td>' +
'<td>' + mode + '</td>' +
'<td>' + this.col_rst_sent + '</td>' +
'<td>' + this.col_rst_rcvd + '</td>' +
'<td>' + this.col_stx_string + '</td>' +
'<td>' + this.col_srx_string + '</td>' +
'<td>' + this.col_stx + '</td>' +
'<td>' + this.col_srx + '</td>' +
'<td>' + this.col_gridsquare + '</td>' +
'<td>' + this.col_vucc_grids + '</td>' +
'</tr>');
});
if (!$.fn.DataTable.isDataTable('.qsotable')) {
$('.qsotable').DataTable({
"stateSave": true,
"pageLength": 25,
responsive: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"order": [[0, "desc"]]
function getSession() {
return $.ajax({
url: base_url + 'index.php/contesting/getSession',
type: 'post',
});
}
function restoreContestSession(data) {
if (data) {
if (data.copytodok == "1") {
$('#copyexchangetodok').prop('checked', true);
}
if (data.contestid != "") {
$("#contestname").val(data.contestid);
}
if (data.exchangetype != "") {
$("#exchangetype").val(data.exchangetype);
setExchangetype(data.exchangetype);
}
if (data.exchangesent != "") {
$("#exch_sent").val(data.exchangesent);
}
if (data.serialsent != "") {
$("#exch_serial_s").val(data.serialsent);
}
if (data.qso != "") {
$.ajax({
url: base_url + 'index.php/contesting/getSessionQsos',
type: 'post',
data: { 'qso': data.qso, },
success: function (html) {
var mode = '';
$.each(html, function () {
if (this.col_submode == null || this.col_submode == '') {
mode = this.col_mode;
} else {
mode = this.col_submode;
}
$(".qsotable tbody").prepend('<tr>' +
'<td>' + this.col_time_on + '</td>' +
'<td>' + this.col_call + '</td>' +
'<td>' + this.col_band + '</td>' +
'<td>' + mode + '</td>' +
'<td>' + this.col_rst_sent + '</td>' +
'<td>' + this.col_rst_rcvd + '</td>' +
'<td>' + this.col_stx_string + '</td>' +
'<td>' + this.col_srx_string + '</td>' +
'<td>' + this.col_stx + '</td>' +
'<td>' + this.col_srx + '</td>' +
'<td>' + this.col_gridsquare + '</td>' +
'<td>' + this.col_vucc_grids + '</td>' +
'</tr>');
});
if (!$.fn.DataTable.isDataTable('.qsotable')) {
$('.qsotable').DataTable({
"stateSave": true,
"pageLength": 25,
responsive: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"order": [[0, "desc"]]
});
}
}
}
});
});
}
}
}