Merge branch 'mastettest' into station_logbooks

This commit is contained in:
Andreas Kristiansen
2021-10-08 11:48:01 +02:00
committed by GitHub
59 changed files with 2330 additions and 1120 deletions

View File

@@ -38,12 +38,12 @@ When submitting PRs please make sure code is commented and includes one feature
## Credits
Thanks to Andy (VE7CXZ), Gavin (M1BXF), Graham (W5ISP), Robert (M0VFC), Corby (K0SKW), Andy (GI0VGV), Tobias (DL4TMA), Tony (G0WFV), Kim (DG9VH), Michael (G7VJR), Andreas (LA8AJA), Matthias (DL9MJ) for contributing code or help to Cloudlog.
Thanks to Andy (VE7CXZ), Gavin (M1BXF), Graham (W5ISP), Robert (M0VFC), Corby (K0SKW), Andy (GI0VGV), Tobias (DL4TMA), Tony (G0WFV), Kim (DG9VH), Michael (G7VJR), Andreas (LA8AJA), Matthias (DL9MJ), Thomas (DO2TWE) and Pat (KT3PJ) for contributing code or help to Cloudlog.
## Patreons & Donors
Cloudlog is supported by Patreon and donations via PayPal, thanks to the following people:
Paul (M0TZO), Tim (G4VXE), Paul (N8HM), Michelle (W5NYV), Mitchell (AD0HJ), Dan (M0TCB), Martin (DK3ML), Juan Carlos (EA5WA), Iain (M0PCB), Charlie (GM1TGY), Ondrej (OK1CDJ), Trystan (G0KAY), Oliver (DL6KBG), Volkmar Schirmer, Jordan (M0PIR), Thomas Ziegler, Mathis (DB9MAT), Ken (VE3HLS), Tyler (WL7T), Jeremy Taylor, Ben Kuhn, Eric Thresher, Michael Cullen, Juuso (OH1JW), Anthony Castiglia, Fernando Ramirez-Ferrer, Robert Dixon, Mark Percival, Julia (KV1V), Timo Tomasini, Ant (NU1U), Christopher Williams, Danny Barnes, Vic, Tom (M0LTE), smurphboy
Paul (M0TZO), Tim (G4VXE), Paul (N8HM), Michelle (W5NYV), Mitchell (AD0HJ), Dan (M0TCB), Martin (DK3ML), Juan Carlos (EA5WA), Iain (M0PCB), Charlie (GM1TGY), Ondrej (OK1CDJ), Trystan (G0KAY), Oliver (DL6KBG), Volkmar Schirmer, Jordan (M0PIR), Thomas Ziegler, Mathis (DB9MAT), Ken (VE3HLS), Tyler (WL7T), Jeremy Taylor, Ben Kuhn, Eric Thresher, Michael Cullen, Juuso (OH1JW), Anthony Castiglia, Fernando Ramirez-Ferrer, Robert Dixon, Mark Percival, Julia (KV1V), Timo Tomasini, Ant (NU1U), Christopher Williams, Danny Barnes, Vic, Tom (M0LTE), smurphboy, Lars (SM0TGU)
If you'd like to donate to Cloudlog to help allow @magicbug spend less time doing commercial work and more time coding Cloudlog then you can donate via [PayPal](https://paypal.me/PGoodhall), [Github Sponsor](https://github.com/sponsors/magicbug) or become a [Patreon](https://www.patreon.com/2m0sql)

View File

@@ -121,26 +121,6 @@ class adif extends CI_Controller {
$this->load->view('adif/mark_lotw', $data);
}
public function mark_qrz() {
// Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1');
$station_id = $this->security->xss_clean($this->input->post('station_profile'));
$this->load->model('adif_data');
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id);
$this->load->model('logbook_model');
foreach ($data['qsos']->result() as $qso)
{
$this->logbook_model->mark_qrz_qsos_sent($qso->COL_PRIMARY_KEY);
}
$this->load->view('adif/mark_qrz', $data);
}
public function export_lotw()
{
// Set memory limit to unlimited to allow heavy usage

View File

@@ -1,16 +1,13 @@
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
This controller will contain features for contesting
This controller contains features for contesting
*/
class Contesting extends CI_Controller {
function __construct()
{
function __construct() {
parent::__construct();
$this->lang->load('contesting');
@@ -18,47 +15,28 @@ class Contesting extends CI_Controller {
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
}
public function index()
{
public function index() {
$this->load->model('cat');
$this->load->model('stations');
$this->load->model('logbook_model');
$this->load->model('user_model');
$this->load->model('modes');
$this->load->model('contesting_model');
$data['active_station_profile'] = $this->stations->find_active();
$data['notice'] = false;
$data['stations'] = $this->stations->all();
$data['my_gridsquare'] = $this->stations->find_gridsquare();
$data['radios'] = $this->cat->radios();
$data['modes'] = $this->modes->active();
$data['contestnames'] = $this->contesting_model->getActivecontests();
$this->load->library('form_validation');
$this->load->library('form_validation');
$this->form_validation->set_rules('start_date', 'Date', 'required');
$this->form_validation->set_rules('start_time', 'Time', 'required');
$this->form_validation->set_rules('callsign', 'Callsign', 'required');
$data['page_title'] = "Contest Logging";
$this->load->view('interface_assets/header', $data);
$this->load->view('contesting/index');
$this->load->view('interface_assets/footer');
//setcookie("radio", $qso_data['radio'], time()+3600*24*99);
//setcookie("station_profile_id", $qso_data['station_profile_id'], time()+3600*24*99);
//$this->session->set_userdata($qso_data);
// If SAT name is set make it session set to sat
if($this->input->post('sat_name')) {
$this->session->set_userdata('prop_mode', 'SAT');
}
$data['page_title'] = "Contest Logging";
$this->load->view('interface_assets/header', $data);
$this->load->view('contesting/index');
$this->load->view('interface_assets/footer');
}
public function getSessionQsos() {
@@ -73,8 +51,7 @@ class Contesting extends CI_Controller {
return json_encode($data);
}
public function create()
{
public function create() {
$this->load->model('Contesting_model');
$this->load->library('form_validation');
@@ -104,8 +81,7 @@ class Contesting extends CI_Controller {
$this->load->view('interface_assets/footer');
}
public function edit($id)
{
public function edit($id) {
$this->load->library('form_validation');
$this->load->model('Contesting_model');

View File

@@ -144,19 +144,17 @@ class eqsl extends CI_Controller {
$active_station_info = $station_profile->row();
// Query the logbook to determine when the last LoTW confirmation was
$eqsl_last_qsl_date = $this->logbook_model->eqsl_last_qsl_rcvd_date();
// Build URL for eQSL inbox file
$eqsl_url .= "?";
$eqsl_url .= "UserName=" . $data['user_eqsl_name'];
$eqsl_url .= "&Password=" . urlencode($data['user_eqsl_password']);
$eqsl_url .= "&RcvdSince=" . $eqsl_last_qsl_date;
$eqsl_url .= "&QTHNickname=" . urlencode($active_station_info->eqslqthnickname);
// Pull back only confirmations
$eqsl_url .= "&ConfirmedOnly=1";
//echo "<br><br>".$eqsl_url."<br><br>";
// Build parameters for eQSL inbox file
$eqsl_params = http_build_query(array(
'UserName' => $data['user_eqsl_name'],
'Password' => $data['user_eqsl_password'],
'RcvdSince' => $eqsl_last_qsl_date,
'QTHNickname' => $active_station_info->eqslqthnickname,
'ConfirmedOnly' => 1
));
//echo "<br><br>".$eqsl_url."<br>".$eqsl_params."<br><br>";
// At this point, what we get isn't the ADI file we need, but rather
// an HTML page, which contains a link to the generated ADI file that we want.
@@ -170,8 +168,10 @@ class eqsl extends CI_Controller {
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
// use the URL we built
// use the URL and params we built
curl_setopt($ch, CURLOPT_URL, $eqsl_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $eqsl_params);
$input = curl_exec($ch);
$chi = curl_getinfo($ch);
@@ -589,11 +589,24 @@ class eqsl extends CI_Controller {
$this->load->view('interface_assets/footer');
}
function image($id, $callsign, $mode, $band, $hour, $minute, $day, $month, $year) {
function image($id) {
$this->load->library('electronicqsl');
$this->load->model('Eqsl_images');
if($this->Eqsl_images->get_image($id) == "No Image") {
$this->load->model('logbook_model');
$qso_query = $this->logbook_model->get_qso($id);
$qso = $qso_query->row();
$qso_timestamp = strtotime($qso->COL_TIME_ON);
$callsign = $qso->COL_CALL;
$band = $qso->COL_BAND;
$mode = $qso->COL_MODE;
$year = date('Y', $qso_timestamp);
$month = date('m', $qso_timestamp);
$day = date('d', $qso_timestamp);
$hour = date('H', $qso_timestamp);
$minute = date('i', $qso_timestamp);
$query = $this->user_model->get_by_id($this->session->userdata('user_id'));
$q = $query->row();
$username = $q->user_eqsl_name;
@@ -613,14 +626,14 @@ class eqsl extends CI_Controller {
}
foreach ($images as $image)
{
header('Content-Type: image/jpg');
readfile ("https://www.eqsl.cc".$image->getAttribute('src'));
$content = file_get_contents("https://www.eqsl.cc".$image->getAttribute('src'));
$filename = uniqid().'.jpg';
file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content);
{
header('Content-Type: image/jpg');
readfile ("https://www.eqsl.cc".$image->getAttribute('src'));
$content = file_get_contents("https://www.eqsl.cc".$image->getAttribute('src'));
$filename = uniqid().'.jpg';
file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content);
$this->Eqsl_images->save_image($id, $filename);
$this->Eqsl_images->save_image($id, $filename);
}
} else {
header('Content-Type: image/jpg');

View File

@@ -137,7 +137,7 @@ class Logbook extends CI_Controller {
$measurement_base = $this->session->userdata('user_measurement_base');
}
$return['callsign_name'] = $this->logbook_model->call_name($callsign);
$return['callsign_name'] = $this->logbook_model->call_name($callsign);
$return['callsign_qra'] = $this->logbook_model->call_qra($callsign);
$return['callsign_qth'] = $this->logbook_model->call_qth($callsign);
$return['callsign_iota'] = $this->logbook_model->call_iota($callsign);
@@ -155,38 +155,8 @@ class Logbook extends CI_Controller {
}
if ($this->config->item('callbook') == "qrz" && $this->config->item('qrz_username') != null && $this->config->item('qrz_password') != null)
{
// Lookup using QRZ
$this->load->library('qrz');
$callbook = $this->logbook_model->loadCallBook($callsign, $this->config->item('use_fullname'));
if(!$this->session->userdata('qrz_session_key')) {
$qrz_session_key = $this->qrz->session($this->config->item('qrz_username'), $this->config->item('qrz_password'));
$this->session->set_userdata('qrz_session_key', $qrz_session_key);
}
$callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'));
}
if ($this->config->item('callbook') == "hamqth" && $this->config->item('hamqth_username') != null && $this->config->item('hamqth_password') != null)
{
// Load the HamQTH library
$this->load->library('hamqth');
if(!$this->session->userdata('hamqth_session_key')) {
$hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password'));
$this->session->set_userdata('hamqth_session_key', $hamqth_session_key);
}
$callbook = $this->hamqth->search($callsign, $this->session->userdata('hamqth_session_key'));
// If HamQTH session has expired, start a new session and retry the search.
if($callbook['error'] == "Session does not exist or expired") {
$hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password'));
$this->session->set_userdata('hamqth_session_key', $hamqth_session_key);
$callbook = $this->hamqth->search($callsign, $this->session->userdata('hamqth_session_key'));
}
}
if (isset($callbook))
{
@@ -552,8 +522,14 @@ class Logbook extends CI_Controller {
$qrz_session_key = $this->qrz->session($this->config->item('qrz_username'), $this->config->item('qrz_password'));
$this->session->set_userdata('qrz_session_key', $qrz_session_key);
}
$data= $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname'));
$data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'));
if (empty($data['callsign']))
{
$qrz_session_key = $this->qrz->session($this->config->item('qrz_username'), $this->config->item('qrz_password'));
$this->session->set_userdata('qrz_session_key', $qrz_session_key);
$data = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname'));
}
}
// There's no hamli integration? Disabled for now.
@@ -610,7 +586,7 @@ class Logbook extends CI_Controller {
$this->session->set_userdata('qrz_session_key', $qrz_session_key);
}
$data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'));
$data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname'));
} else {
// Lookup using hamli
$this->load->library('hamli');

View File

@@ -108,11 +108,8 @@ class Qrz extends CI_Controller {
$data['page_title'] = "QRZ Logbook";
$data['station_profiles'] = $this->stations->all();
$data['station_profile'] = $this->stations->stations_with_qrz_api_key();
$active_station_id = $this->stations->find_active();
$station_profile = $this->stations->profile($active_station_id);
$data['active_station_info'] = $station_profile->row();
$this->load->view('interface_assets/header', $data);
$this->load->view('qrz/export');
@@ -125,6 +122,7 @@ class Qrz extends CI_Controller {
public function upload_station() {
$this->setOptions();
$this->load->model('stations');
$postData = $this->input->post();
$this->load->model('logbook_model');
@@ -148,4 +146,26 @@ class Qrz extends CI_Controller {
echo json_encode($data);
}
}
}
public function mark_qrz() {
// Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1');
$station_id = $this->security->xss_clean($this->input->post('station_profile'));
$this->load->model('adif_data');
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id);
$this->load->model('logbook_model');
foreach ($data['qsos']->result() as $qso)
{
$this->logbook_model->mark_qrz_qsos_sent($qso->COL_PRIMARY_KEY);
}
$this->load->view('interface_assets/header', $data);
$this->load->view('qrz/mark_qrz', $data);
$this->load->view('interface_assets/footer');
}
}

View File

@@ -35,8 +35,8 @@ class QSLPrint extends CI_Controller {
// Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1');
if ($this->uri->segment(3) == 'All') {
$station_id = NULL;
if ($this->uri->segment(3) == 'all') {
$station_id = 'All';
} else {
$station_id = $this->security->xss_clean($this->uri->segment(3));
}
@@ -53,8 +53,8 @@ class QSLPrint extends CI_Controller {
// Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1');
if ($this->uri->segment(3) == 'All') {
$station_id = NULL;
if ($this->uri->segment(3) == 'all') {
$station_id = 'All';
} else {
$station_id = $this->security->xss_clean($this->uri->segment(3));
}
@@ -115,8 +115,8 @@ class QSLPrint extends CI_Controller {
function qsl_printed() {
if ($this->uri->segment(3) == 'All') {
$station_id = NULL;
if ($this->uri->segment(3) == 'all') {
$station_id = 'All';
} else {
$station_id = $this->security->xss_clean($this->uri->segment(3));
}

View File

@@ -153,6 +153,7 @@ class QSO extends CI_Controller {
$this->load->model('logbook_model');
$this->load->model('user_model');
$this->load->model('modes');
$this->load->model('contesting_model');
$this->load->library('form_validation');
@@ -167,6 +168,7 @@ class QSO extends CI_Controller {
$data['dxcc'] = $this->logbook_model->fetchDxcc();
$data['iota'] = $this->logbook_model->fetchIota();
$data['modes'] = $this->modes->all();
$data['contest'] = $this->contesting_model->getActivecontests();
$this->load->view('qso/edit_ajax', $data);
}
@@ -384,7 +386,7 @@ class QSO extends CI_Controller {
foreach ($result as &$value) {
$county = explode(',', $value);
// Limit to 100 as to not slowdown browser too much
if (count($json) <= 100) {
if (count($json) <= 300) {
$json[] = ["name"=>$county[1]];
}
}

View File

@@ -32,6 +32,7 @@ class Search extends CI_Controller {
$this->load->model('Search_filter');
$data['get_table_names'] = $this->Search_filter->get_table_columns();
$data['stored_queries'] = $this->Search_filter->get_stored_queries();
//print_r($this->Search_filter->get_table_columns());
@@ -50,262 +51,342 @@ class Search extends CI_Controller {
}
function json_result() {
if(isset($_POST['search'])) {
$json = $_POST['search'];
$search_items = json_decode($json, true);
$search_type = "";
foreach($search_items as $key=>$value){
if($value == "AND") {
$search_type = "AND";
}
if ($value == "OR") {
$search_type = "OR";
}
if(is_array($value)) {
foreach($value as $values)
{
if(isset($values['rules'])) {
if($values['condition'] == "AND") {
$this->db->group_start();
} else {
$this->db->or_group_start();
}
foreach($values['rules'] as $group_value)
{
if($group_value['operator'] == "equal") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'], $group_value['value']);
} else {
$this->db->or_where($group_value['field'], $group_value['value']);
}
}
if($group_value['operator'] == "not_equal") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' !=', $group_value['value']);
} else {
$this->db->or_where($group_value['field'].' !=', $group_value['value']);
}
}
if($group_value['operator'] == "begins_with") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' like ', $group_value['value']."%");
} else {
$this->db->or_where($group_value['field'].' like ', $group_value['value']."%");
}
}
if($group_value['operator'] == "contains") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' like ', "%".$group_value['value']."%");
} else {
$this->db->or_where($group_value['field'].' like ', "%".$group_value['value']."%");
}
}
if($group_value['operator'] == "ends_with") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' like ', "%".$group_value['value']);
} else {
$this->db->or_where($group_value['field'].' like ', "%".$group_value['value']);
}
}
if($group_value['operator'] == "is_empty") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'], "''");
} else {
$this->db->or_where($group_value['field'], "''");
}
}
if($group_value['operator'] == "is_not_empty") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' !=', "''");
} else {
$this->db->or_where($group_value['field'].' !=', "''");
}
}
if($group_value['operator'] == "is_null") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' is ', NULL);
} else {
$this->db->or_where($group_value['field'].' is ', NULL);
}
}
if($group_value['operator'] == "is_not_null") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' is not ', NULL);
} else {
$this->db->or_where($group_value['field'].' is not ', NULL);
}
}
if($group_value['operator'] == "less") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' <', $group_value['value']);
} else {
$this->db->or_where($group_value['field'].' <', $group_value['value']);
}
}
if($group_value['operator'] == "less_or_equal") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' <=', $group_value['value']);
} else {
$this->db->or_where($group_value['field'].' <=', $group_value['value']);
}
}
if($group_value['operator'] == "greater") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' >', $group_value['value']);
} else {
$this->db->or_where($group_value['field'].' >', $group_value['value']);
}
}
if($group_value['operator'] == "greater_or_equal") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' >=', $group_value['value']);
} else {
$this->db->or_where($group_value['field'].' >=', $group_value['value']);
}
}
}
$this->db->group_end();
} else {
//print_r($values['field']);
if(isset($values['operator'])) {
}
if($values['operator'] == "equal") {
if($search_type == "AND") {
$this->db->where($values['field'], $values['value']);
} else {
$this->db->or_where($values['field'], $values['value']);
}
}
if($values['operator'] == "not_equal") {
if($search_type == "AND") {
$this->db->where($values['field'].' !=', $values['value']);
} else {
$this->db->or_where($values['field'].' !=', $values['value']);
}
}
if($values['operator'] == "begins_with") {
if($search_type == "AND") {
$this->db->where($values['field'].' like ', $values['value']."%");
} else {
$this->db->or_where($values['field'].' like ', $values['value']."%");
}
}
if($values['operator'] == "contains") {
if($search_type == "AND") {
$this->db->where($values['field'].' like ', "%".$values['value']."%");
} else {
$this->db->or_where($values['field'].' like ', "%".$values['value']."%");
}
}
if($values['operator'] == "ends_with") {
if($search_type == "AND") {
$this->db->where($values['field'].' like ', "%".$values['value']);
} else {
$this->db->or_where($values['field'].' like ', "%".$values['value']);
}
}
if($values['operator'] == "is_empty") {
if($search_type == "AND") {
$this->db->where($values['field'], "");
} else {
$this->db->or_where($values['field'], "");
}
}
if($values['operator'] == "is_not_empty") {
if($search_type == "AND") {
$this->db->where($values['field'].' !=', "");
} else {
$this->db->or_where($values['field'].' !=', "");
}
}
if($values['operator'] == "is_null") {
if($search_type == "AND") {
$this->db->where($values['field'].' is ', NULL);
} else {
$this->db->or_where($values['field'].' is ', NULL);
}
}
if($values['operator'] == "is_not_null") {
if($search_type == "AND") {
$this->db->where($values['field'].' is not ', NULL);
} else {
$this->db->or_where($values['field'].' is not ', NULL);
}
}
if($values['operator'] == "less") {
if($search_type == "AND") {
$this->db->where($values['field'].' <', $values['value']);
} else {
$this->db->or_where($values['field'].' <', $values['value']);
}
}
if($values['operator'] == "less_or_equal") {
if($search_type == "AND") {
$this->db->where($values['field'].' <=', $values['value']);
} else {
$this->db->or_where($values['field'].' <=', $values['value']);
}
}
if($values['operator'] == "greater") {
if($search_type == "AND") {
$this->db->where($values['field'].' >', $values['value']);
} else {
$this->db->or_where($values['field'].' >', $values['value']);
}
}
if($values['operator'] == "greater_or_equal") {
if($search_type == "AND") {
$this->db->where($values['field'].' >=', $values['value']);
} else {
$this->db->or_where($values['field'].' >=', $values['value']);
}
}
}
}
}
}
$this->db->order_by('COL_TIME_ON', 'DESC');
$query = $this->db->get($this->config->item('table_name'));
echo json_encode($query->result_array());
} else {
echo "Noooooooob";
}
$result = $this->fetchQueryResult($_POST['search'], false);
echo json_encode($result->result_array());
}
}
function get_stored_queries() {
$this->load->model('Search_filter');
$data['result'] = $this->Search_filter->get_stored_queries();
$this->load->view('search/stored_queries', $data);
}
function search_result() {
if(isset($_POST['search'])) {
$data['results'] = $this->fetchQueryResult($_POST['search'], false);
$this->load->view('search/search_result_ajax', $data);
}
}
function export_to_adif() {
if(isset($_POST['search'])) {
$data['qsos'] = $this->fetchQueryResult($_POST['search'], false);
$this->load->view('adif/data/exportall', $data);
}
}
function export_stored_query_to_adif() {
$this->db->where('id', xss_clean($this->input->post('id')));
$sql = $this->db->get('queries')->result();
$data['qsos'] = $this->db->query($sql[0]->query);
$this->load->view('adif/data/exportall', $data);
}
function run_query() {
$this->db->where('id', xss_clean($this->input->post('id')));
$sql = $this->db->get('queries')->result();
$sql = $sql[0]->query;
if (stristr($sql, 'select') && !stristr($sql, 'delete') && !stristr($sql, 'update')) {
$data['results'] = $this->db->query($sql);
$this->load->view('search/search_result_ajax', $data);
}
}
function save_query() {
if(isset($_POST['search'])) {
$query = $this->fetchQueryResult($_POST['search'], true);
$data = array(
'userid' => xss_clean($this->session->userdata('user_id')),
'query' => $query,
'description' => xss_clean($_POST['description'])
);
$this->db->insert('queries', $data);
$last_id = $this->db->insert_id();
header('Content-Type: application/json');
echo json_encode(array('id' => $last_id, 'description' => xss_clean($_POST['description'])));
}
}
function delete_query() {
$id = xss_clean($this->input->post('id'));
$this->load->model('search_filter');
$this->search_filter->delete_query($id);
}
function save_edited_query() {
$data = array(
'description' => xss_clean($this->input->post('description')),
);
$this->db->where('id', xss_clean($this->input->post('id')));
$this->db->where('userid', $this->session->userdata['user_id']);
$this->db->update('queries', $data);
}
function fetchQueryResult($json, $returnquery) {
$search_items = json_decode($json, true);
$search_type = "";
foreach($search_items as $key=>$value){
if($value == "AND") {
$search_type = "AND";
}
if ($value == "OR") {
$search_type = "OR";
}
if(is_array($value)) {
foreach($value as $values)
{
if(isset($values['rules'])) {
if($values['condition'] == "AND") {
$this->db->group_start();
} else {
$this->db->or_group_start();
}
foreach($values['rules'] as $group_value)
{
if($group_value['operator'] == "equal") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'], $group_value['value']);
} else {
$this->db->or_where($group_value['field'], $group_value['value']);
}
}
if($group_value['operator'] == "not_equal") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' !=', $group_value['value']);
} else {
$this->db->or_where($group_value['field'].' !=', $group_value['value']);
}
}
if($group_value['operator'] == "begins_with") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' like ', $group_value['value']."%");
} else {
$this->db->or_where($group_value['field'].' like ', $group_value['value']."%");
}
}
if($group_value['operator'] == "contains") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' like ', "%".$group_value['value']."%");
} else {
$this->db->or_where($group_value['field'].' like ', "%".$group_value['value']."%");
}
}
if($group_value['operator'] == "ends_with") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' like ', "%".$group_value['value']);
} else {
$this->db->or_where($group_value['field'].' like ', "%".$group_value['value']);
}
}
if($group_value['operator'] == "is_empty") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'], "''");
} else {
$this->db->or_where($group_value['field'], "''");
}
}
if($group_value['operator'] == "is_not_empty") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' !=', "''");
} else {
$this->db->or_where($group_value['field'].' !=', "''");
}
}
if($group_value['operator'] == "is_null") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' is ', NULL);
} else {
$this->db->or_where($group_value['field'].' is ', NULL);
}
}
if($group_value['operator'] == "is_not_null") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' is not ', NULL);
} else {
$this->db->or_where($group_value['field'].' is not ', NULL);
}
}
if($group_value['operator'] == "less") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' <', $group_value['value']);
} else {
$this->db->or_where($group_value['field'].' <', $group_value['value']);
}
}
if($group_value['operator'] == "less_or_equal") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' <=', $group_value['value']);
} else {
$this->db->or_where($group_value['field'].' <=', $group_value['value']);
}
}
if($group_value['operator'] == "greater") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' >', $group_value['value']);
} else {
$this->db->or_where($group_value['field'].' >', $group_value['value']);
}
}
if($group_value['operator'] == "greater_or_equal") {
if($values['condition'] == "AND") {
$this->db->where($group_value['field'].' >=', $group_value['value']);
} else {
$this->db->or_where($group_value['field'].' >=', $group_value['value']);
}
}
}
$this->db->group_end();
} else {
//print_r($values['field']);
if(isset($values['operator'])) {
}
if($values['operator'] == "equal") {
if($search_type == "AND") {
$this->db->where($values['field'], $values['value']);
} else {
$this->db->or_where($values['field'], $values['value']);
}
}
if($values['operator'] == "not_equal") {
if($search_type == "AND") {
$this->db->where($values['field'].' !=', $values['value']);
} else {
$this->db->or_where($values['field'].' !=', $values['value']);
}
}
if($values['operator'] == "begins_with") {
if($search_type == "AND") {
$this->db->where($values['field'].' like ', $values['value']."%");
} else {
$this->db->or_where($values['field'].' like ', $values['value']."%");
}
}
if($values['operator'] == "contains") {
if($search_type == "AND") {
$this->db->where($values['field'].' like ', "%".$values['value']."%");
} else {
$this->db->or_where($values['field'].' like ', "%".$values['value']."%");
}
}
if($values['operator'] == "ends_with") {
if($search_type == "AND") {
$this->db->where($values['field'].' like ', "%".$values['value']);
} else {
$this->db->or_where($values['field'].' like ', "%".$values['value']);
}
}
if($values['operator'] == "is_empty") {
if($search_type == "AND") {
$this->db->where($values['field'], "");
} else {
$this->db->or_where($values['field'], "");
}
}
if($values['operator'] == "is_not_empty") {
if($search_type == "AND") {
$this->db->where($values['field'].' !=', "");
} else {
$this->db->or_where($values['field'].' !=', "");
}
}
if($values['operator'] == "is_null") {
if($search_type == "AND") {
$this->db->where($values['field'].' is ', NULL);
} else {
$this->db->or_where($values['field'].' is ', NULL);
}
}
if($values['operator'] == "is_not_null") {
if($search_type == "AND") {
$this->db->where($values['field'].' is not ', NULL);
} else {
$this->db->or_where($values['field'].' is not ', NULL);
}
}
if($values['operator'] == "less") {
if($search_type == "AND") {
$this->db->where($values['field'].' <', $values['value']);
} else {
$this->db->or_where($values['field'].' <', $values['value']);
}
}
if($values['operator'] == "less_or_equal") {
if($search_type == "AND") {
$this->db->where($values['field'].' <=', $values['value']);
} else {
$this->db->or_where($values['field'].' <=', $values['value']);
}
}
if($values['operator'] == "greater") {
if($search_type == "AND") {
$this->db->where($values['field'].' >', $values['value']);
} else {
$this->db->or_where($values['field'].' >', $values['value']);
}
}
if($values['operator'] == "greater_or_equal") {
if($search_type == "AND") {
$this->db->where($values['field'].' >=', $values['value']);
} else {
$this->db->or_where($values['field'].' >=', $values['value']);
}
}
}
}
}
}
$this->db->order_by('COL_TIME_ON', 'DESC');
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
if ($returnquery) {
$query = $this->db->get_compiled_select($this->config->item('table_name'));
} else {
$query = $this->db->get($this->config->item('table_name'));
}
return $query;
}
}

View File

@@ -94,6 +94,7 @@ $lang['gen_hamradio_wwff_reference'] = 'WWFF Reference';
$lang['gen_hamradio_dok'] = 'DOK';
$lang['gen_hamradio_state'] = 'State';
$lang['gen_hamradio_iota'] = 'IOTA';
$lang['gen_hamradio_sota'] = 'SOTA';
$lang['gen_hamradio_gridsquare'] = 'Gridsquare';
$lang['gen_hamradio_sig'] = 'Sig';

View File

@@ -14,7 +14,7 @@ $lang['general_word_date'] = 'Datum';
$lang['general_word_time'] = 'Zeit';
$lang['general_word_none'] = 'None';
$lang['general_word_name'] = 'Name';
$lang['general_word_location'] = 'Stelle';
$lang['general_word_location'] = 'Standort';
$lang['general_word_comment'] = 'Kommentar';
$lang['general_word_general'] = 'Allgemeines';
$lang['general_word_satellite'] = 'Satellit';

View File

@@ -110,6 +110,8 @@ class AdifHelper {
$line .= $this->getAdifFieldLine("SRX_STRING", $qso->COL_SRX_STRING);
$line .= $this->getAdifFieldLine("CONTEST_ID", $qso->COL_CONTEST_ID);
$line .= $this->getAdifFieldLine("TX_PWR", $qso->COL_TX_PWR);
$line .= $this->getAdifFieldLine("COMMENT", $qso->COL_COMMENT);

View File

@@ -56,41 +56,44 @@ class Hamqth {
public function search($callsign, $key)
{
$data = null;
try {
// URL to the XML Source
$xml_feed_url = 'https://www.hamqth.com/xml.php?id=' . $key . '&callsign=' . $callsign . '&prg=cloudlog';
// URL to the XML Source
$xml_feed_url = 'https://www.hamqth.com/xml.php?id='.$key.'&callsign='.$callsign.'&prg=cloudlog';
// CURL Functions
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $xml_feed_url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$xml = curl_exec($ch);
curl_close($ch);
// CURL Functions
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $xml_feed_url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$xml = curl_exec($ch);
curl_close($ch);
// Create XML object
$xml = simplexml_load_string($xml);
if (empty($xml)) return;
// Create XML object
$xml = simplexml_load_string($xml);
// Return Required Fields
$data['callsign'] = (string)$xml->search->callsign;
$data['name'] = (string)$xml->search->nick;
$data['gridsquare'] = (string)$xml->search->grid;
$data['city'] = (string)$xml->search->adr_city;
$data['lat'] = (string)$xml->search->latitude;
$data['long'] = (string)$xml->search->longitude;
$data['iota'] = (string)$xml->search->iota;
$data['us_state'] = (string)$xml->search->us_state;
$data['us_county'] = (string)$xml->search->us_county;
$data['error'] = (string)$xml->session->error;
// Return Required Fields
$data['callsign'] = (string) $xml->search->callsign;
$data['name'] = (string) $xml->search->nick;
$data['gridsquare'] = (string) $xml->search->grid;
$data['city'] = (string) $xml->search->adr_city;
$data['lat'] = (string) $xml->search->latitude;
$data['long'] = (string) $xml->search->longitude;
$data['iota'] = (string) $xml->search->iota;
$data['us_state'] = (string) $xml->search->us_state;
$data['us_county'] = (string) $xml->search->us_county;
$data['error'] = (string) $xml->session->error;
if($xml->search->country == "United States") {
$data['state'] = (string) $xml->search->us_state;
$data['us_county'] = (string) $xml->search->us_county;
} else {
$data['state'] = null;
$data['us_county'] = null;
}
return $data;
if ($xml->search->country == "United States") {
$data['state'] = (string)$xml->search->us_state;
$data['us_county'] = (string)$xml->search->us_county;
} else {
$data['state'] = null;
$data['us_county'] = null;
}
} finally {
return $data;
}
}
}

View File

@@ -23,14 +23,18 @@ class Qra {
// calculate the bearing between two squares
function bearing($tx, $rx, $unit = 'M') {
if(strlen($tx) <= 6 && strlen($rx) <= 6) {
$my = qra2latlong($tx);
$stn = qra2latlong($rx);
$bearing = bearing($my[0], $my[1], $stn[0], $stn[1], $unit);
return $bearing;
if(strlen($tx) > 6) {
$tx = substr($tx, 0, 6);
}
if(strlen($rx) > 6) {
$rx = substr($rx, 0, 6);
}
$my = qra2latlong($tx);
$stn = qra2latlong($rx);
$bearing = bearing($my[0], $my[1], $stn[0], $stn[1], $unit);
return $bearing;
}
/*
@@ -40,6 +44,12 @@ class Qra {
*
*/
function distance($tx, $rx, $unit = 'M') {
if(strlen($tx) > 6) {
$tx = substr($tx, 0, 6);
}
if(strlen($rx) > 6) {
$rx = substr($rx, 0, 6);
}
// Calc LatLongs
$my = qra2latlong($tx);
$stn = qra2latlong($rx);
@@ -52,12 +62,9 @@ class Qra {
}
}
function distance($lat1, $lon1, $lat2, $lon2, $unit = 'M') {
$theta = $lon1 - $lon2;
$dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) *
cos(deg2rad($theta));
$dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));
$dist = acos($dist);
$dist = rad2deg($dist);
$dist = $dist * 60 * 1.1515;
@@ -111,27 +118,28 @@ function get_bearing($lat1, $lon1, $lat2, $lon2) {
return (rad2deg(atan2(sin(deg2rad($lon2) - deg2rad($lon1)) * cos(deg2rad($lat2)), cos(deg2rad($lat1)) * sin(deg2rad($lat2)) - sin(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($lon2) - deg2rad($lon1)))) + 360) % 360;
}
function qra2latlong($strQRA)
{
if (strlen($strQRA) %2 == 0) {
$strQRA = strtoupper($strQRA);
if (strlen($strQRA) == 4) $strQRA .= "MM";
if (!preg_match('/^[A-R]{2}[0-9]{2}[A-X]{2}$/',$strQRA)) return false;
list($a,$b,$c,$d,$e,$f) = str_split($strQRA,1);
$a = ord($a) - ord('A');
$b = ord($b) - ord('A');
$c = ord($c) - ord('0');
$d = ord($d) - ord('0');
$e = ord($e) - ord('A');
$f = ord($f) - ord('A');
$nLong = ($a*20) + ($c*2) + (($e+0.5)/12) - 180;
$nLat = ($b*10) + $d + (($f+0.5)/24) - 90;
$arLatLong = array($nLat,$nLong);
return($arLatLong);
} else {
return array(0, 0);
function qra2latlong($strQRA) {
if (strlen($strQRA) %2 == 0) {
$strQRA = strtoupper($strQRA);
if (strlen($strQRA) == 4) $strQRA .= "MM";
if(strlen($strQRA) > 6) {
$strQRA = substr($strQRA, 0, 6);
}
if (!preg_match('/^[A-R]{2}[0-9]{2}[A-X]{2}$/',$strQRA)) return false;
list($a,$b,$c,$d,$e,$f) = str_split($strQRA,1);
$a = ord($a) - ord('A');
$b = ord($b) - ord('A');
$c = ord($c) - ord('0');
$d = ord($d) - ord('0');
$e = ord($e) - ord('A');
$f = ord($f) - ord('A');
$nLong = ($a*20) + ($c*2) + (($e+0.5)/12) - 180;
$nLat = ($b*10) + $d + (($f+0.5)/24) - 90;
$arLatLong = array($nLat,$nLong);
return($arLatLong);
} else {
return array(0, 0);
}
}
/* End of file Qra.php */

View File

@@ -54,42 +54,51 @@ class Qrz {
}
public function search($callsign, $key)
public function search($callsign, $key, $use_fullname)
{
$data = null;
try {
// URL to the XML Source
$xml_feed_url = 'http://xmldata.qrz.com/xml/current/?s=' . $key . ';callsign=' . $callsign . '';
// URL to the XML Source
$xml_feed_url = 'http://xmldata.qrz.com/xml/current/?s='.$key.';callsign='.$callsign.'';
// CURL Functions
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $xml_feed_url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$xml = curl_exec($ch);
curl_close($ch);
// Create XML object
$xml = simplexml_load_string($xml);
// Return Required Fields
$data['callsign'] = (string) $xml->Callsign->call;
$data['name'] = (string) $xml->Callsign->fname;
$data['gridsquare'] = (string) $xml->Callsign->grid;
$data['city'] = (string) $xml->Callsign->addr2;
$data['lat'] = (string) $xml->Callsign->lat;
$data['long'] = (string) $xml->Callsign->lon;
$data['iota'] = (string) $xml->Callsign->iota;
$data['qslmgr'] = (string) $xml->Callsign->qslmgr;
// CURL Functions
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $xml_feed_url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$xml = curl_exec($ch);
curl_close($ch);
if($xml->Callsign->country == "United States") {
$data['state'] = (string) $xml->Callsign->state;
$data['us_county'] = (string) $xml->Callsign->county;
} else {
$data['state'] = null;
$data['us_county'] = null;
}
// Create XML object
$xml = simplexml_load_string($xml);
if (empty($xml)) return;
return $data;
// Return Required Fields
$data['callsign'] = (string)$xml->Callsign->call;
if ($use_fullname === true) {
$data['name'] = (string)$xml->Callsign->fname. ' ' . (string)$xml->Callsign->name;
} else {
$data['name'] = (string)$xml->Callsign->fname;
}
$data['name'] = trim($data['name']);
$data['gridsquare'] = (string)$xml->Callsign->grid;
$data['city'] = (string)$xml->Callsign->addr2;
$data['lat'] = (string)$xml->Callsign->lat;
$data['long'] = (string)$xml->Callsign->lon;
$data['iota'] = (string)$xml->Callsign->iota;
$data['qslmgr'] = (string)$xml->Callsign->qslmgr;
if ($xml->Callsign->country == "United States") {
$data['state'] = (string)$xml->Callsign->state;
$data['us_county'] = (string)$xml->Callsign->county;
} else {
$data['state'] = null;
$data['us_county'] = null;
}
} finally {
return $data;
}
}
}

View File

@@ -0,0 +1,14 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Migration_add_queries_table extends CI_Migration
{
public function up()
{
$this->db->query("create table if not exists queries (id integer not null auto_increment, query text, description text, userid integer not null, primary key (id)) ENGINE=myisam DEFAULT CHARSET=utf8;");
}
public function down()
{
$this->db->query("");
}
}

View File

@@ -25,7 +25,7 @@ class adif_data extends CI_Model {
if ($station_id == NULL) {
$this->db->where($this->config->item('table_name').'.station_id', $active_station_id);
} else {
} else if ($station_id != 'All') {
$this->db->where($this->config->item('table_name').'.station_id', $station_id);
}

View File

@@ -21,7 +21,10 @@ class Contesting_model extends CI_Model {
$date = DateTime::createFromFormat('d-m-Y H:i:s', $qsoarray[0]);
$date = $date->format('Y-m-d H:i:s');
$sql = "SELECT date_format(col_time_on, '%d-%m-%Y %H:%i:%s') as col_time_on, col_call, col_band, col_mode, col_submode, col_rst_sent, col_rst_rcvd, col_srx, col_srx_string, col_stx, col_stx_string FROM " .
$sql = "SELECT date_format(col_time_on, '%d-%m-%Y %H:%i:%s') as col_time_on, col_call, col_band, col_mode,
col_submode, col_rst_sent, col_rst_rcvd, coalesce(col_srx, '') col_srx, coalesce(col_srx_string, '') col_srx_string,
coalesce(col_stx, '') col_stx, coalesce(col_stx_string, '') col_stx_string, coalesce(col_gridsquare, '') col_gridsquare,
coalesce(col_vucc_grids, '') col_vucc_grids FROM " .
$this->config->item('table_name') .
" WHERE station_id = " . $station_id .
" AND COL_TIME_ON >= '" . $date . "'" .

View File

@@ -23,18 +23,11 @@ class Logbook_model extends CI_Model {
}
// Contest exchange, need to separate between serial and other type of exchange
if($this->input->post('exchangeradio')) {
if($this->input->post('exchangeradio') == "serial") {
$srx = $this->input->post('exch_recv');
$stx = $this->input->post('exch_sent');
$srx_string = null;
$stx_string = null;
} else {
$srx = null;
$stx = null;
$srx_string = $this->input->post('exch_recv');
$stx_string = $this->input->post('exch_sent');
}
if($this->input->post('exchangetype')) {
$srx_string = $this->input->post('exch_recv');
$stx_string = $this->input->post('exch_sent');
$srx = $this->input->post('exch_serial_r');
$stx = $this->input->post('exch_serial_s');
} else {
$srx_string = null;
$stx_string = null;
@@ -162,7 +155,7 @@ class Logbook_model extends CI_Model {
'COL_SIG' => trim($this->input->post('sig')),
'COL_SIG_INFO' => trim($this->input->post('sig_info')),
'COL_DARC_DOK' => trim($this->input->post('darc_dok')),
'COL_NOTES' => $this->input->post('notes'),
'COL_NOTES' => $this->input->post('notes'),
);
$station_id = $this->input->post('station_profile');
@@ -494,6 +487,12 @@ class Logbook_model extends CI_Model {
$srx_string = null;
}
if (stristr($this->input->post('usa_county'), ',')) {
$uscounty = $this->input->post('usa_county');
} else {
$uscounty = $this->input->post('usa_state') .",".$this->input->post('usa_county');
}
$data = array(
'COL_TIME_ON' => $this->input->post('time_on'),
'COL_TIME_OFF' => $this->input->post('time_off'),
@@ -543,7 +542,7 @@ class Logbook_model extends CI_Model {
'station_id' => $this->input->post('station_profile'),
'COL_OPERATOR' => $this->input->post('operator_callsign'),
'COL_STATE' =>$this->input->post('usa_state'),
'COL_CNTY' =>$this->input->post('usa_state') .",".$this->input->post('usa_county'),
'COL_CNTY' => $uscounty
);
if ($this->exists_qrz_api_key($data['station_id'])) {
@@ -802,23 +801,21 @@ class Logbook_model extends CI_Model {
COL_SAT_MODE,
COL_QSL_RCVD,
COL_COMMENT,
(CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) AS COL_ROUTING,
ADIF,
ENTITY
FROM '.$this->config->item('table_name').', dxcc_prefixes, station_profile
WHERE
COL_QSL_SENT in (\'R\', \'Q\')
and (CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) like CONCAT(dxcc_prefixes.call,\'%\')
and (end is null or end > now())
and ' . $this->config->item('table_name') . '.station_id = station_profile.station_id';
(select adif from dxcc_prefixes where (CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) like concat(dxcc_prefixes.`call`,\'%\') order by end limit 1) as ADIF,
(select entity from dxcc_prefixes where (CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) like concat(dxcc_prefixes.`call`,\'%\') order by end limit 1) as ENTITY,
(CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) AS COL_ROUTING
FROM '.$this->config->item('table_name').' thcv
join station_profile on thcv.station_id = station_profile.station_id
WHERE
COL_QSL_SENT in (\'R\', \'Q\')';
if ($station_id2 == NULL) {
$sql .= ' and ' . $this->config->item('table_name') . '.station_id = ' . $station_id;
} else {
$sql .= ' and ' . $this->config->item('table_name') . '.station_id = ' . $station_id2;
$sql .= ' and thcv.station_id = ' . $station_id;
} else if ($station_id2 != 'All') {
$sql .= ' and thcv.station_id = ' . $station_id2;
}
$sql .= ' ORDER BY adif, col_routing';
$sql .= ' ORDER BY ADIF, COL_ROUTING';
$query = $this->db->query($sql);
return $query;
@@ -1667,7 +1664,7 @@ class Logbook_model extends CI_Model {
$entity = $this->get_entity($record['dxcc']);
$dxcc = array($record['dxcc'], $entity['name']);
} else {
$dxcc = NULL;
$dxcc = $this->check_dxcc_table($record['call'], $time_off);
}
} else {
$dxcc = $this->check_dxcc_table($record['call'], $time_off);
@@ -1680,7 +1677,9 @@ class Logbook_model extends CI_Model {
if(isset($record['country'])) {
$country = $record['country'];
} else {
$country = ucwords(strtolower($dxcc[1]));
if (isset($dxcc[1])) {
$country = ucwords(strtolower($dxcc[1]));
}
}
// RST recevied
@@ -2410,6 +2409,54 @@ class Logbook_model extends CI_Model {
}
}
public function loadCallBook($callsign, $use_fullname=false)
{
$callbook = null;
try {
if ($this->config->item('callbook') == "qrz" && $this->config->item('qrz_username') != null && $this->config->item('qrz_password') != null) {
// Lookup using QRZ
$this->load->library('qrz');
if (!$this->session->userdata('qrz_session_key')) {
$qrz_session_key = $this->qrz->session($this->config->item('qrz_username'), $this->config->item('qrz_password'));
$this->session->set_userdata('qrz_session_key', $qrz_session_key);
}
$callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'), $use_fullname);
// if we got nothing, it's probably because our session key is invalid, try again
if (!isset($callbook['callsign']))
{
$qrz_session_key = $this->qrz->session($this->config->item('qrz_username'), $this->config->item('qrz_password'));
$this->session->set_userdata('qrz_session_key', $qrz_session_key);
$callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'), $use_fullname);
}
}
if ($this->config->item('callbook') == "hamqth" && $this->config->item('hamqth_username') != null && $this->config->item('hamqth_password') != null) {
// Load the HamQTH library
$this->load->library('hamqth');
if (!$this->session->userdata('hamqth_session_key')) {
$hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password'));
$this->session->set_userdata('hamqth_session_key', $hamqth_session_key);
}
$callbook = $this->hamqth->search($callsign, $this->session->userdata('hamqth_session_key'));
// If HamQTH session has expired, start a new session and retry the search.
if ($callbook['error'] == "Session does not exist or expired") {
$hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password'));
$this->session->set_userdata('hamqth_session_key', $hamqth_session_key);
$callbook = $this->hamqth->search($callsign, $this->session->userdata('hamqth_session_key'));
}
}
} finally {
return $callbook;
}
}
public function update_all_station_ids() {
@@ -2537,4 +2584,6 @@ function validateADIFDate($date, $format = 'Ymd')
$d = DateTime::createFromFormat($format, $date);
return $d && $d->format($format) == $date;
}
?>

View File

@@ -22,7 +22,7 @@ class Qslprint_model extends CI_Model {
if ($station_id2 == NULL) {
$this->db->where("station_id", $station_id);
} else {
} else if ($station_id2 != 'All') {
$this->db->where("station_id", $station_id2);
}

View File

@@ -13,6 +13,15 @@ class Search_filter extends CI_Model {
return $query;
}
function get_stored_queries() {
$this->db->where('userid', $this->session->userdata('user_id'));
return $this->db->get('queries')->result();
}
function delete_query($id) {
$this->db->delete('queries', array('id' => xss_clean($id), 'userid' =>$this->session->userdata('user_id')));
}
}
?>
?>

View File

@@ -363,7 +363,7 @@ class User_Model extends CI_Model {
// FUNCTION: array timezones()
// Returns a list of timezones
function timezones() {
$r = $this->db->query('SELECT id, name FROM timezones ORDER BY offset');
$r = $this->db->query('SELECT id, name FROM timezones ORDER BY `offset`');
$ts = array();
foreach ($r->result_array() as $t) {
$ts[$t['id']] = $t['name'];

View File

@@ -14,9 +14,6 @@
<li class="nav-item">
<a class="nav-link" id="lotw-tab" data-toggle="tab" href="#lotw" role="tab" aria-controls="lotw" aria-selected="false">Logbook Of The World</a>
</li>
<li class="nav-item">
<a class="nav-link" id="qrz-tab" data-toggle="tab" href="#qrz" role="tab" aria-controls="qrz" aria-selected="false">QRZ Logbook</a>
</li>
</ul>
</div>
@@ -186,40 +183,6 @@
<button type="submit" class="btn-sm btn-primary" value="Export">Mark QSOs as exported to LoTW</button>
</form>
</div>
<div class="tab-pane fade" id="qrz" role="tabpanel" aria-labelledby="home-tab">
<form class="form" action="<?php echo site_url('adif/mark_qrz'); ?>" method="post" enctype="multipart/form-data">
<select name="station_profile" class="custom-select mb-2 mr-sm-2" style="width: 20%;">
<option value="0">Select Station Profile</option>
<?php foreach ($station_profile->result() as $station) { ?>
<option value="<?php echo $station->station_id; ?>">Callsign: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)</option>
<?php } ?>
</select>
<p><span class="badge badge-warning">Warning</span> If a date range is not selected then all QSOs will be marked!</p>
<p class="card-text">From date:</p>
<div class="row">
<div class="input-group date col-md-3" id="datetimepicker5" data-target-input="nearest">
<input name="from" type="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-target="#datetimepicker1"/>
<div class="input-group-append" data-target="#datetimepicker5" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
<p class="card-text">To date:</p>
<div class="row">
<div class="input-group date col-md-3" id="datetimepicker6" data-target-input="nearest">
<input name="to" "totype="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-target="#datetimepicker2"/>
<div class="input-group-append" data-target="#datetimepicker6" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
<br>
<button type="submit" class="btn-sm btn-primary" value="Export">Mark QSOs as exported to QRZ Logbook</button>
</form>
</div>
</div>
</div>
</div>

View File

@@ -19,7 +19,7 @@
<?php echo validation_errors(); ?>
<form method="post" name="create_profile">
<form>
<div class="form-group">
<label for="contestInput">Contest Name</label>
<input type="text" class="form-control" name="contestname" id="contestInput" aria-describedby="contestInputHelp" required>
@@ -32,7 +32,7 @@
<small id="adifcontestInputHelp" class="form-text text-muted">Name of Contest in ADIF-specification</small>
</div>
<button onclick="createContest(this.form);" class="btn btn-primary btn-sm"><i class="fas fa-plus-square"></i> Create Contest</button>
<button type="button" onclick="createContest(this.form);" class="btn btn-primary btn-sm"><i class="fas fa-plus-square"></i> Create Contest</button>
</form>
</div>

View File

@@ -8,19 +8,18 @@
<div class="card-body">
<form id="qso_input" name="qsos">
<div class="form-group row">
<label class="col-auto control-label" for="radio"><?php echo $this->lang->line('contesting_exchange_type'); ?></label>
<label class="col-auto control-label" for="radio"><?php echo $this->lang->line('contesting_exchange_type'); ?></label>
<div class="col-auto">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="exchangeradio" id="serial" value="serial" checked>
<label class="form-check-label" for="serial"><?php echo $this->lang->line('contesting_exchange_type_serial'); ?></label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="exchangeradio" id="other" value="other">
<label class="form-check-label" for="other"><?php echo $this->lang->line('contesting_exchange_type_other'); ?></label>
</div>
</div>
<div class="col-auto">
<select class="form-control-sm" id="exchangetype" name="exchangetype">
<option value='None'>None</option>
<option value='Exchange'>Exchange</option>
<option value='Gridsquare'>Gridsquare</option>
<option value='Serial'>Serial</option>
<option value='Serialexchange'>Serial + Exchange</option>
<option value='Serialgridsquare'>Serial + Gridsquare</option>
</select>
</div>
<label class="col-auto control-label" for="contestname"><?php echo $this->lang->line('contesting_contest_name'); ?></label>
@@ -121,21 +120,40 @@
<input type="text" class="form-control form-control-sm" name="rst_sent" id="rst_sent" value="59">
</div>
<div class="form-group col-md-1">
<div style="display:none" class="form-group col-md-1 serials">
<label for="exch_serial_s">Serial (S)</label>
<input type="number" class="form-control form-control-sm" name="exch_serial_s" id="exch_serial_s" value="">
</div>
<div style="display:none" class="form-group col-md-1 exchanges">
<label for="exch_sent"><?php echo $this->lang->line('gen_hamradio_exchange_sent_short'); ?></label>
<input type="text" class="form-control form-control-sm" name="exch_sent" id="exch_sent" value="">
</div>
<div style="display:none" class="form-group col-md-2 gridsquares">
<label for="exch_gridsquare_s">Gridsquare (S)</label>
<input disabled type="text" class="form-control form-control-sm" name="exch_gridsquare_s" id="exch_gridsquare_s" value="<?php echo $my_gridsquare;?>">
</div>
<div class="form-group col-md-1">
<label for="rst_recv"><?php echo $this->lang->line('gen_hamradio_rstr'); ?></label>
<input type="text" class="form-control form-control-sm" name="rst_recv" id="rst_recv" value="59">
</div>
<div class="form-group col-md-1">
<label for="exch_recv"><?php echo $this->lang->line('gen_hamradio_exchange_recv_short'); ?></label>
<input type="text" class="form-control form-control-sm" name="exch_recv" id="exch_recv" value="">
</div>
<div style="display:none" class="form-group col-md-1 serialr">
<label for="exch_serial_r">Serial (R)</label>
<input type="number" class="form-control form-control-sm" name="exch_serial_r" id="exch_serial_r" value="">
</div>
<div style="display:none" class="form-group col-md-1 exchanger">
<label for="exch_recv"><?php echo $this->lang->line('gen_hamradio_exchange_recv_short'); ?></label>
<input type="text" class="form-control form-control-sm" name="exch_recv" id="exch_recv" value="">
</div>
<div style="display:none" class="form-group col-md-2 gridsquarer">
<label for="exch_gridsquare_r">Gridsquare (R)</label>
<input type="text" class="form-control form-control-sm" name="locator" id="exch_gridsquare_r" value="">
</div>
</div>
<div class="form-row">
@@ -180,6 +198,10 @@
<th><?php echo $this->lang->line('gen_hamradio_rstr'); ?></th>
<th><?php echo $this->lang->line('gen_hamradio_exchange_sent_short'); ?></th>
<th><?php echo $this->lang->line('gen_hamradio_exchange_recv_short'); ?></th>
<th>Serial (R)</th>
<th>Serial (S)</th>
<th>Gridsquare</th>
<th>Vucc Gridsquare</th>
</tr>
</thead>
@@ -190,3 +212,6 @@
</div>
</div>
</div>
<?php
//var_dump($_SESSION);
?>

View File

@@ -48,6 +48,7 @@
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
@@ -60,6 +61,7 @@
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
@@ -72,6 +74,7 @@
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
@@ -84,6 +87,7 @@
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
@@ -126,6 +130,7 @@
case 'RSTR': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_RCVD; if ($row->COL_SRX_STRING) { echo '<span class="label">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
@@ -138,6 +143,7 @@
case 'RSTR': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_RCVD; if ($row->COL_SRX_STRING) { echo '<span class="label">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
@@ -150,6 +156,7 @@
case 'RSTR': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_RCVD; if ($row->COL_SRX_STRING) { echo '<span class="label">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
@@ -162,6 +169,7 @@
case 'RSTR': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_RCVD; if ($row->COL_SRX_STRING) { echo '<span class="label">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;

View File

@@ -39,7 +39,7 @@
<label class="form-check-label" for="exampleRadios1">
Import directly from eQSL
</label>
<p>Cloudlog will use the eQSL credentials from your Cloudlog user profile to connect to eQSL and download confirmations. Only confirmations received since your last eQSL-confirmed QSO will be downloaded.</p>
<p>Cloudlog will use the eQSL credentials from your Cloudlog user profile to connect to eQSL and download confirmations.</p>
</div>
<input class="btn btn-primary" type="submit" value="Import eQSL QSO Matches" />

View File

@@ -20,7 +20,7 @@
<?php } ?>
</div>
<div id="map" style="width: 100%; height: 800px"></div>
<div id="gridsquare_map" style="width: 100%; height: 800px"></div>
<div class="container">
<?php if ($this->uri->segment(2) == "satellites") { ?>

View File

@@ -6,6 +6,7 @@
<script src="<?php echo base_url(); ?>assets/js/jquery.jclock.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/leaflet.js"></script>
<script type="text/javascript" src="<?php echo base_url() ;?>assets/js/radiohelpers.js"></script>
<script type="text/javascript" src="<?php echo base_url() ;?>assets/js/darkmodehelpers.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrapdialog/js/bootstrap-dialog.min.js"></script>
<script type="text/javascript">
/*
@@ -51,87 +52,320 @@ function load_was_map() {
<?php if ($this->uri->segment(1) == "search" && $this->uri->segment(2) == "filter") { ?>
<script type="text/javascript" src="<?php echo base_url() ;?>assets/js/query-builder.standalone.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/query-builder.standalone.min.js"></script>
<script type="text/javascript">
$(".search-results-box").hide();
$(".search-results-box").hide();
$('#builder').queryBuilder({
filters: [
<?php foreach ($get_table_names->result() as $row) {
$value_name = str_replace("COL_", "", $row->Field);
if ($value_name != "PRIMARY_KEY" && strpos($value_name, 'MY_') === false && strpos($value_name, '_INTL') == false) { ?>
{
id: '<?php echo $row->Field; ?>',
label: '<?php echo $value_name; ?>',
<?php if (strpos($row->Type, 'int(') !== false) { ?>
type: 'integer',
operators: ['equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal']
<?php } elseif(strpos($row->Type, 'double') !== false) { ?>
type: 'double',
operators: ['equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal']
<?php } elseif(strpos($row->Type, 'datetime') !== false) { ?>
type: 'datetime',
operators: ['equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal']
<?php } else { ?>
type: 'string',
operators: ['equal', 'not_equal', 'begins_with', 'contains', 'ends_with', 'is_empty', 'is_not_empty', 'is_null', 'is_not_null']
<?php } ?>
},
<?php } ?>
<?php } ?>
]
});
filters: [
<?php foreach ($get_table_names->result() as $row) {
$value_name = str_replace("COL_", "", $row->Field);
if ($value_name != "PRIMARY_KEY" && strpos($value_name, 'MY_') === false && strpos($value_name, '_INTL') == false) { ?> {
id: '<?php echo $row->Field; ?>',
label: '<?php echo $value_name; ?>',
<?php if (strpos($row->Type, 'int(') !== false) { ?>
type: 'integer',
operators: ['equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal']
<?php } elseif (strpos($row->Type, 'double') !== false) { ?>
type: 'double',
operators: ['equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal']
<?php } elseif (strpos($row->Type, 'datetime') !== false) { ?>
type: 'datetime',
operators: ['equal', 'not_equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal']
<?php } else { ?>
type: 'string',
operators: ['equal', 'not_equal', 'begins_with', 'contains', 'ends_with', 'is_empty', 'is_not_empty', 'is_null', 'is_not_null']
<?php } ?>
},
<?php } ?>
<?php } ?>
]
});
$('#btn-get').on('click', function() {
var result = $('#builder').queryBuilder('getRules');
if (!$.isEmptyObject(result)) {
//alert(JSON.stringify(result, null, 2));
$.post( "<?php echo site_url('search/json_result');?>", { search: JSON.stringify(result, null, 2), temp: "testvar" })
.done(function( data ) {
//console.log(data)
//alert( "Data Loaded: " + data );
$('.qso').remove();
$(".search-results-box").show();
function export_search_result() {
var result = $('#builder').queryBuilder('getRules');
if (!$.isEmptyObject(result)) {
xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
var a;
if (xhttp.readyState === 4 && xhttp.status === 200) {
// Trick for making downloadable link
a = document.createElement('a');
a.href = window.URL.createObjectURL(xhttp.response);
// Give filename you wish to download
a.download = "advanced_search_export.adi";
a.style.display = 'none';
document.body.appendChild(a);
a.click();
}
};
// Post data to URL which handles post request
xhttp.open("POST", "<?php echo site_url('search/export_to_adif'); ?>", true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
// You should set responseType as blob for binary responses
xhttp.responseType = 'blob';
xhttp.send("search=" + JSON.stringify(result, null, 2));
}
}
$.each(JSON.parse(data), function(i, item) {
function export_stored_query(id) {
xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
var a;
if (xhttp.readyState === 4 && xhttp.status === 200) {
// Trick for making downloadable link
a = document.createElement('a');
a.href = window.URL.createObjectURL(xhttp.response);
// Give filename you wish to download
a.download = "advanced_search_export.adi";
a.style.display = 'none';
document.body.appendChild(a);
a.click();
}
};
// Post data to URL which handles post request
xhttp.open("POST", "<?php echo site_url('search/export_stored_query_to_adif'); ?>", true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
// You should set responseType as blob for binary responses
xhttp.responseType = 'blob';
xhttp.send("id=" + id);
}
var band = "";
if(item.COL_SAT_NAME != "") {
band = item.COL_SAT_NAME;
} else {
band = item.COL_BAND;
}
var callsign = '<a href="javascript:displayQso(' + item.COL_PRIMARY_KEY + ');" >' + item.COL_CALL + '</a>';
if (item.COL_SUBMODE == '' || item.COL_SUBMODE == null) {
$('#results').append('<tr class="qso"><td>' + item.COL_TIME_ON + '</td><td>' + callsign + '</td><td>' + item.COL_MODE + '</td><td>' + item.COL_RST_SENT + '</td><td>' + item.COL_RST_RCVD + '</td><td>' + band + '</td><td>' + item.COL_COUNTRY + '</td><td></td></tr>');
}
else {
$('#results').append('<tr class="qso"><td>' + item.COL_TIME_ON + '</td><td>' + callsign + '</td><td>' + item.COL_SUBMODE + '</td><td>' + item.COL_RST_SENT + '</td><td>' + item.COL_RST_RCVD + '</td><td>' + band + '</td><td>' + item.COL_COUNTRY + '</td><td></td></tr>');
}
$('#btn-save').on('click', function() {
var resultquery = $('#builder').queryBuilder('getRules');
if (!$.isEmptyObject(resultquery)) {
let message = 'Description: <input class="form-control input-group-sm getqueryname">'
BootstrapDialog.confirm({
title: 'Query description',
size: BootstrapDialog.SIZE_NORMAL,
cssClass: 'description-dialog',
closable: true,
nl2br: false,
message: message,
btnCancelLabel: 'Cancel',
btnOKLabel: 'Save',
callback: function(result) {
if (result) {
$.post("<?php echo site_url('search/save_query'); ?>", {
search: JSON.stringify(resultquery, null, 2),
description: $(".getqueryname").val()
})
.done(function(data) {
$(".alert").remove();
$(".card-body.main").append('<div class="alert alert-success"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>Your query has been saved!</div>');
$('#querydropdown').append(new Option(data.description, data.id)); // We add the saved query to the dropdown
});
}
},
});
} else {
BootstrapDialog.show({
title: 'Stored Queries',
type: BootstrapDialog.TYPE_WARNING,
size: BootstrapDialog.SIZE_NORMAL,
cssClass: 'queries-dialog',
nl2br: false,
message: 'You need to make a query before you search!',
buttons: [{
label: 'Close',
action: function(dialogItself) {
dialogItself.close();
}
}]
});
}
});
function run_query() {
$(".alert").remove();
$(".runbutton").addClass('running');
$(".runbutton").prop('disabled', true);
let id = $('#querydropdown').val();
$.post("<?php echo site_url('search/run_query'); ?>", {
id: id
})
.done(function(data) {
$('.exportbutton').html('<button class="btn btn-sm btn-primary" onclick="export_stored_query(' + id + ')">Export to ADIF</button>');
$('.card-body.result').empty();
$(".search-results-box").show();
$('.card-body.result').append(data);
$('.table').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
dom: 'Bfrtip',
buttons: [
'csv'
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
$(".runbutton").removeClass('running');
$(".runbutton").prop('disabled', false);
});
}
function delete_stored_query(id) {
BootstrapDialog.confirm({
title: 'DANGER',
message: 'Warning! Are you sure you want delete this stored query?',
type: BootstrapDialog.TYPE_DANGER,
closable: true,
draggable: true,
btnOKClass: 'btn-danger',
callback: function(result) {
if (result) {
$.ajax({
url: base_url + 'index.php/search/delete_query',
type: 'post',
data: {
'id': id
},
success: function(data) {
$(".bootstrap-dialog-message").prepend('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>The stored query has been deleted!</div>');
$("#query_" + id).remove(); // removes query from table in dialog
$("#querydropdown option[value='" + id + "']").remove(); // removes query from dropdown
},
error: function() {
$(".bootstrap-dialog-message").prepend('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>The stored query could not be deleted. Please try again!</div>');
},
});
}
}
});
});
}
else{
//console.log("invalid object :");
}
});
$('#btn-set').on('click', function() {
//$('#builder').queryBuilder('setRules', rules_basic);
var result = $('#builder').queryBuilder('getRules');
if (!$.isEmptyObject(result)) {
rules_basic = result;
function edit_stored_query(id) {
$('#description_' + id).attr('contenteditable', 'true');
$('#description_' + id).focus();
$('#edit_' + id).html('<a class="btn btn-primary btn-sm" href="javascript:save_edited_query(' + id + ');">Save</a>'); // Change to save button
}
});
//When rules changed :
$('#builder').on('getRules.queryBuilder.filter', function(e) {
//$log.info(e.value);
});
function save_edited_query(id) {
$('#description_' + id).attr('contenteditable', 'false');
$('#edit_' + id).html('<a class="btn btn-outline-primary btn-sm" href="javascript:edit_stored_query(' + id + ');">Edit</a>');
$.ajax({
url: base_url + 'index.php/search/save_edited_query',
type: 'post',
data: {
id: id,
description: $('#description_' + id).html(),
},
success: function(html) {
$('#edit_' + id).html('<a class="btn btn-outline-primary btn-sm" href="javascript:edit_stored_query(' + id + ');">Edit</a>'); // Change to edit button
$(".bootstrap-dialog-message").prepend('<div class="alert alert-success"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>The query description has been updated!</div>');
$("#querydropdown option[value='" + id + "']").text($('#description_' + id).html()); // Change text in dropdown
},
error: function() {
$(".bootstrap-dialog-message").prepend('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>Something went wrong with the save. Please try again!</div>');
},
});
}
$('#btn-edit').on('click', function() {
$(".alert").remove();
$.ajax({
url: base_url + 'index.php/search/get_stored_queries',
type: 'post',
success: function(html) {
BootstrapDialog.show({
title: 'Stored Queries',
size: BootstrapDialog.SIZE_WIDE,
cssClass: 'queries-dialog',
nl2br: false,
message: html,
buttons: [{
label: 'Close',
action: function(dialogItself) {
dialogItself.close();
}
}]
});
}
});
});
$('#btn-get').on('click', function() {
$(".alert").remove();
var result = $('#builder').queryBuilder('getRules');
if (!$.isEmptyObject(result)) {
$(".searchbutton").addClass('running');
$(".searchbutton").prop('disabled', true);
$.post("<?php echo site_url('search/search_result'); ?>", {
search: JSON.stringify(result, null, 2),
temp: "testvar"
})
.done(function(data) {
$('.exportbutton').html('<button class="btn btn-sm btn-primary" onclick="export_search_result();">Export to ADIF</button>');
$('.card-body.result').empty();
$(".search-results-box").show();
$('.card-body.result').append(data);
$('.table').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
dom: 'Bfrtip',
buttons: [
'csv'
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
$(".searchbutton").removeClass('running');
$(".searchbutton").prop('disabled', false);
$("#btn-save").show();
});
} else {
BootstrapDialog.show({
title: 'Stored Queries',
type: BootstrapDialog.TYPE_WARNING,
size: BootstrapDialog.SIZE_NORMAL,
cssClass: 'queries-dialog',
nl2br: false,
message: 'You need to make a query before you search!',
buttons: [{
label: 'Close',
action: function(dialogItself) {
dialogItself.close();
}
}]
});
}
});
$('#btn-set').on('click', function() {
//$('#builder').queryBuilder('setRules', rules_basic);
var result = $('#builder').queryBuilder('getRules');
if (!$.isEmptyObject(result)) {
rules_basic = result;
}
});
//When rules changed :
$('#builder').on('getRules.queryBuilder.filter', function(e) {
//$log.info(e.value);
});
</script>
<?php } ?>
@@ -618,7 +852,7 @@ $(document).on('keypress',function(e) {
</script>
<?php } ?>
<?php if ( ($this->uri->segment(1) == "qso" && $_GET['manual'] == 0) || $this->uri->segment(1) == "contesting") { ?>
<?php if ( ($this->uri->segment(1) == "qso" && $_GET['manual'] == 0) || ($this->uri->segment(1) == "contesting" && $this->uri->segment(2) != "add")) { ?>
<script>
function setRst(mode) {
if(mode == 'JT65' || mode == 'JT65B' || mode == 'JT6C' || mode == 'JTMS' || mode == 'ISCAT' || mode == 'MSK144' || mode == 'JTMSK' || mode == 'QRA64' || mode == 'FT8' || mode == 'FT4' || mode == 'JS8' || mode == 'JT9' || mode == 'JT9-1' || mode == 'ROS'){
@@ -636,8 +870,7 @@ $(document).on('keypress',function(e) {
}
}
</script>
<?php } ?>
<?php if ( ($this->uri->segment(1) == "qso" && $_GET['manual'] == 0) || $this->uri->segment(1) == "contesting") { ?>
<script>
// Javascript for controlling rig frequency.
var updateFromCAT = function() {
@@ -781,10 +1014,10 @@ $(document).ready(function(){
});
var map = L.map('map', {
var map = L.map('gridsquare_map', {
layers: [layer],
center: [19, 0],
zoom: 3
zoom: 2
});
var grid_two = <?php echo $grid_2char; ?>;
@@ -808,46 +1041,45 @@ $(document).ready(function(){
console.log(loc_4char);
console.log(map.getZoom());
if(map.getZoom() > 5) {
if(map.getZoom() > 2) {
<?php if ($this->session->userdata('user_callsign')) { ?>
var band = '';
var search_type = "<?php echo $this->uri->segment(2); ?>";
if(search_type == "satellites") {
console.log("satellites search");
var search_tags = "search_sat/" + loc_4char;
band = 'SAT';
} else {
var band = "<?php echo $this->uri->segment(3); ?>";
console.log(band);
var search_tags = "search_band/" + band + "/" + loc_4char;
band = "<?php echo $this->uri->segment(3); ?>";
}
$(".modal-body").empty();
$.ajax({
url: base_url + 'index.php/awards/qso_details_ajax',
type: 'post',
data: {
'Searchphrase': loc_4char,
'Band': band,
'Mode': 'All',
'Type': 'VUCC'
},
success: function (html) {
$(".modal-body").html(html);
$(".modal-body table").addClass('table-sm');
$(".modal-body h5").empty();
var count = $('.table tr').length;
count = count - 1;
$('#qso_count').text(count);
if (count > 1) {
$('#gt1_qso').text("s");
} else {
$('#gt1_qso').text("");
}
$.getJSON( "<?php echo site_url('gridsquares/');?>" + search_tags, function( data ) {
var count = Object.keys(data).length;
console.log("Count: " + count);
var items = [];
$.each( data, function( i, item ) {
console.log(item.COL_CALL + item.COL_SAT_NAME);
if(item.COL_SAT_NAME != undefined) {
items.push( "<tr><td>" + item.COL_TIME_ON + "</td><td>" + item.COL_CALL + "</td><td>" + item.COL_MODE + "</td><td>" + item.COL_SAT_NAME + "</td><td>" + item.COL_GRIDSQUARE + item.COL_VUCC_GRIDS + "</td></tr>" );
} else {
items.push( "<tr><td>" + item.COL_TIME_ON + "</td><td>" + item.COL_CALL + "</td><td>" + item.COL_MODE + "</td><td>" + item.COL_BAND + "</td><td>" + item.COL_GRIDSQUARE + item.COL_VUCC_GRIDS + "</td></tr>" );
}
});
$('#qso_count').text(count);
if (count > 1) {
$('#gt1_qso').text("s");
} else {
$('#gt1_qso').text("");
}
$("#grid_results tbody").empty();
if (count > 0) {
$("#grid_results tbody").append(items.join( "" ));
$('#square_number').text(loc_4char);
$('#exampleModal').modal('show');
}
});
if (count > 0) {
$('#square_number').text(loc_4char);
$('#exampleModal').modal('show');
}
}
});
<?php } ?>
}
};
@@ -984,10 +1216,8 @@ $(document).ready(function(){
]
});
// using this to change color of csv-button if dark mode is chosen
var background = $('body').css( "background-color");
if (background != ('rgb(255, 255, 255)')) {
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
</script>
@@ -1009,10 +1239,8 @@ $(document).ready(function(){
]
});
// using this to change color of csv-button if dark mode is chosen
var background = $('body').css( "background-color");
if (background != ('rgb(255, 255, 255)')) {
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
</script>
@@ -1077,10 +1305,8 @@ $(document).ready(function(){
]
});
// using this to change color of csv-button if dark mode is chosen
var background = $('body').css( "background-color");
if (background != ('rgb(255, 255, 255)')) {
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
</script>
@@ -1114,10 +1340,8 @@ $(document).ready(function(){
]
});
// using this to change color of csv-button if dark mode is chosen
var background = $('body').css( "background-color");
if (background != ('rgb(255, 255, 255)')) {
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
</script>
@@ -1150,10 +1374,8 @@ $(document).ready(function(){
]
});
// using this to change color of csv-button if dark mode is chosen
var background = $('body').css( "background-color");
if (background != ('rgb(255, 255, 255)')) {
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
</script>
@@ -1213,7 +1435,7 @@ $(document).ready(function(){
},
success: function(data) {
if (data.message == 'OK') {
$("#qso_" + id).find("td:eq(8)").find("span:eq(0)").attr('class', 'qsl-red'); // Paints arrow green
$("#qso_" + id).find("td:eq(8)").find("span:eq(0)").attr('class', 'qsl-grey'); // Paints arrow grey
}
else {
$(".bootstrap-dialog-message").append('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>You are not allowed to update QSL status!</div>');
@@ -1266,27 +1488,27 @@ $(document).ready(function(){
nl2br: false,
message: html,
onshown: function(dialog) {
var state = $("#input_usa_state option:selected").text();
var state = $("#input_usa_state_edit option:selected").text();
if (state != "") {
$("#stationCntyInput").prop('disabled', false);
$("#stationCntyInputEdit").prop('disabled', false);
selectize_usa_county();
}
$('#input_usa_state').change(function(){
var state = $("#input_usa_state option:selected").text();
$('#input_usa_state_edit').change(function(){
var state = $("#input_usa_state_edit option:selected").text();
if (state != "") {
$("#stationCntyInput").prop('disabled', false);
$("#stationCntyInputEdit").prop('disabled', false);
selectize_usa_county();
} else {
$("#stationCntyInput").prop('disabled', true);
$("#stationCntyInputEdit").prop('disabled', true);
//$('#stationCntyInput')[0].selectize.destroy();
$("#stationCntyInput").val("");
$("#stationCntyInputEdit").val("");
}
});
$('#sota_ref').selectize({
$('#sota_ref_edit').selectize({
maxItems: 1,
closeAfterSelect: true,
loadThrottle: 250,
@@ -1314,7 +1536,7 @@ $(document).ready(function(){
}
});
$('#darc_dok').selectize({
$('#darc_dok_edit').selectize({
maxItems: 1,
closeAfterSelect: true,
loadThrottle: 250,
@@ -1322,7 +1544,7 @@ $(document).ready(function(){
labelField: 'name',
searchField: 'name',
options: [],
create: false,
create: true,
load: function(query, callback) {
if (!query) return callback(); // Only trigger if 3 or more characters are entered
$.ajax({
@@ -1349,7 +1571,7 @@ $(document).ready(function(){
function selectize_usa_county() {
var baseURL= "<?php echo base_url();?>";
$('#stationCntyInput').selectize({
$('#stationCntyInputEdit').selectize({
delimiter: ';',
maxItems: 1,
closeAfterSelect: true,
@@ -1360,7 +1582,7 @@ $(document).ready(function(){
options: [],
create: false,
load: function(query, callback) {
var state = $("#input_usa_state option:selected").text();
var state = $("#input_usa_state_edit option:selected").text();
if (!query || state == "") return callback();
$.ajax({
@@ -1420,10 +1642,8 @@ $(document).ready(function(){
]
});
// using this to change color of csv-button if dark mode is chosen
var background = $('body').css( "background-color");
if (background != ('rgb(255, 255, 255)')) {
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
@@ -1753,139 +1973,8 @@ function deleteQsl(id) {
});
}
</script>
<?php if ($this->uri->segment(1) == "contesting") { ?>
<?php if ($this->uri->segment(1) == "contesting" && $this->uri->segment(2) != "add" ) { ?>
<script src="<?php echo base_url() ;?>assets/js/sections/contesting.js"></script>
<script>
function logQso() {
if ($("#callsign").val().length > 0) {
$('.callsign-suggestions').text("");
var table = $('.qsotable').DataTable();
var data = [[$("#start_date").val()+ ' ' + $("#start_time").val(),
$("#callsign").val().toUpperCase(),
$("#band").val(),
$("#mode").val(),
$("#rst_sent").val(),
$("#rst_recv").val(),
$("#exch_sent").val(),
$("#exch_recv").val()]];
table.rows.add(data).draw();
var baseURL= "<?php echo base_url();?>";
var formdata = new FormData(document.getElementById("qso_input"));
$.ajax({
url: baseURL + 'index.php/qso/saveqso',
type: 'post',
data: formdata,
processData: false,
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());
}
$('#name').val("");
$('#callsign').val("");
$('#comment').val("");
$('#exch_recv').val("");
if ($('input[name=exchangeradio]:checked', '#qso_input').val() == "serial") {
$("#exch_sent").val(+$("#exch_sent").val() + 1);
}
$("#callsign").focus();
// Store contest session
localStorage.setItem("contestid", $("#contestname").val());
localStorage.setItem("exchangetype", $('input[name=exchangeradio]:checked', '#qso_input').val());
localStorage.setItem("exchangesent", $("#exch_sent").val());
}
});
}
}
// We are restoring the settings in the contest logging form here
function restoreContestSession() {
var contestname = localStorage.getItem("contestid");
if (contestname != null) {
$("#contestname").val(contestname);
}
var exchangetype = localStorage.getItem("exchangetype");
if (exchangetype == "other") {
$("[name=exchangeradio]").val(["other"]);
}
var exchangesent = localStorage.getItem("exchangesent");
if (exchangesent != null) {
$("#exch_sent").val(exchangesent);
}
if (localStorage.getItem("qso") != null) {
var baseURL= "<?php echo base_url();?>";
//alert(localStorage.getItem("qso"));
var qsodata = localStorage.getItem("qso");
$.ajax({
url: baseURL + 'index.php/contesting/getSessionQsos',
type: 'post',
data: {'qso': qsodata,},
success: function (html) {
var mode = '';
var sentexchange = '';
var receivedexchange = '';
$.each(html, function(){
if (this.col_submode == null || this.col_submode == '') {
mode = this.col_mode;
} else {
mode = this.col_submode;
}
if (this.col_srx == null || this.col_srx == '') {
receivedexchange = this.col_srx_string;
} else {
receivedexchange = this.col_srx;
}
if (this.col_stx == null || this.col_stx == '') {
sentexchange = this.col_stx_string;
} else {
sentexchange = this.col_stx;
}
$(".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>'+ sentexchange + '</td>' +
'<td>'+ receivedexchange + '</td>' +
'</tr>');
});
if (!$.fn.DataTable.isDataTable('.qsotable')) {
$('.qsotable').DataTable({
"pageLength": 25,
responsive: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"order": [[ 0, "desc" ]]
});
}
}
});
}
}
</script>
<?php } ?>
<?php if ($this->uri->segment(1) == "station") { ?>
@@ -1961,10 +2050,9 @@ function deleteQsl(id) {
'csv'
]
});
// using this to change color of csv-button if dark mode is chosen
var background = $('body').css( "background-color");
if (background != ('rgb(255, 255, 255)')) {
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
@@ -2010,13 +2098,10 @@ function deleteQsl(id) {
]
});
// using this to change color of csv-button if dark mode is chosen
var background = $('body').css( "background-color");
if (background != ('rgb(255, 255, 255)')) {
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
</script>
<?php } ?>

View File

@@ -41,7 +41,7 @@
</div>
</div>
<br/>
<div class="form-group row">
<div class="form-group row" style="display: none">
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="importMissing" value="1" id="importMissing">

View File

@@ -19,7 +19,7 @@
<?php echo validation_errors(); ?>
<form method="post" name="create_profile">
<form>
<div class="form-group">
<label for="modeInput">ADIF Mode</label>
<input type="text" class="form-control" name="mode" id="modeInput" aria-describedby="modeInputHelp" required>
@@ -51,7 +51,7 @@
<small id="activeInputHelp" class="form-text text-muted">Set to active if to be listed in Modes-list</small>
</div>
<button onclick="createMode(this.form);" class="btn btn-primary"><i class="fas fa-plus-square"></i> Create mode</button>
<button type="button" onclick="createMode(this.form);" class="btn btn-primary"><i class="fas fa-plus-square"></i> Create mode</button>
</form>
</div>

View File

@@ -5,15 +5,24 @@
<div class="card">
<div class="card-header">
Upload Logbook
<ul class="nav nav-tabs card-header-tabs pull-right" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="export-tab" data-toggle="tab" href="#export" role="tab" aria-controls="import" aria-selected="true">Upload Logbook</a>
</li>
<li class="nav-item">
<a class="nav-link" id="mark-tab" data-toggle="tab" href="#mark" role="tab" aria-controls="export" aria-selected="false">Mark QSOs</a>
</li>
</ul>
</div>
<div class="card-body">
<div class="tab-content">
<div class="tab-pane active" id="export" role="tabpanel" aria-labelledby="export-tab">
<p>Here you can see and upload all QSOs which have not been previously uploaded to a QRZ logbook.</p>
<p>You need to set a QRZ Logbook API key in your station profile. Only station profiles with an API Key set are displayed.</p>
<p><span class="badge badge-warning">Warning</span>This might take a while as QSO uploads are processed sequentially.</p>
<?php
if ($station_profile->result()) {
echo '
@@ -39,7 +48,7 @@
echo '<td><button id="qrzUpload" type="button" name="qrzUpload" class="btn btn-primary btn-sm ld-ext-right" onclick="ExportQrz('. $station->station_id .')"><i class="fas fa-cloud-upload-alt"></i> Upload<div class="ld ld-ring ld-spin"></div></button></td>';
echo '</tr>';
}
echo '</tfoot></table></div>';
echo '</tfoot></table>';
}
else {
@@ -48,5 +57,39 @@
?>
</div>
</div>
<div class="tab-pane fade" id="mark" role="tabpanel" aria-labelledby="home-tab">
<form class="form" action="<?php echo site_url('qrz/mark_qrz'); ?>" method="post" enctype="multipart/form-data">
<select name="station_profile" class="custom-select mb-4 mr-sm-4" style="width: 30%;">
<option value="0">Select Station Profile</option>
<?php foreach ($station_profiles->result() as $station) { ?>
<option value="<?php echo $station->station_id; ?>">Callsign: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)</option>
<?php } ?>
</select>
<p><span class="badge badge-warning">Warning</span> If a date range is not selected then all QSOs will be marked!</p>
<p class="card-text">From date:</p>
<div class="row">
<div class="input-group date col-md-3" id="datetimepicker5" data-target-input="nearest">
<input name="from" type="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-target="#datetimepicker1"/>
<div class="input-group-append" data-target="#datetimepicker5" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
<p class="card-text">To date:</p>
<div class="row">
<div class="input-group date col-md-3" id="datetimepicker6" data-target-input="nearest">
<input name="to" "totype="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-target="#datetimepicker2"/>
<div class="input-group-append" data-target="#datetimepicker6" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
<br>
<button type="submit" class="btn-sm btn-primary" value="Export">Mark QSOs as exported to QRZ Logbook</button>
</form>
</div>
</div>
</div>
</div>
</div>

View File

@@ -14,6 +14,7 @@
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
@@ -26,6 +27,7 @@
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
@@ -38,6 +40,7 @@
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
@@ -50,6 +53,7 @@
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
@@ -62,6 +66,7 @@
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
@@ -95,6 +100,7 @@
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
@@ -106,6 +112,7 @@
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
@@ -118,6 +125,7 @@
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
@@ -129,6 +137,7 @@
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
@@ -140,6 +149,7 @@
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;

View File

@@ -40,6 +40,7 @@
<th style=\'text-align: center\'>'. $this->lang->line('general_word_time') .'</th>
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_mode') . '</th>
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_band') . '</th>
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_qsl') . ' ' . $this->lang->line('general_word_qslcard_via') . '</th>
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_station') . '</th>
<th style=\'text-align: center\'></th>
<th style=\'text-align: center\'></th>
@@ -62,6 +63,7 @@
echo '<td style=\'text-align: center\'>'; $timestamp = strtotime($qsl->COL_TIME_ON); echo date('H:i', $timestamp); echo '</td>';
echo '<td style=\'text-align: center\'>'; echo $qsl->COL_SUBMODE==null?$qsl->COL_MODE:$qsl->COL_SUBMODE; echo '</td>';
echo '<td style=\'text-align: center\'>'; if($qsl->COL_SAT_NAME != null) { echo $qsl->COL_SAT_NAME; } else { echo strtolower($qsl->COL_BAND); }; echo '</td>';
echo '<td style=\'text-align: center\'>' . $qsl->COL_QSL_VIA . '</td>';
echo '<td style=\'text-align: center\'><span class="badge badge-light">' . $qsl->station_callsign . '</span></td>';
echo '<td style=\'text-align: center\'><button onclick="deleteFromQslQueue(\''.$qsl->COL_PRIMARY_KEY.'\')" class="btn btn-sm btn-danger">Delete from queue</button></td>';
echo '<td style=\'text-align: center\'><button onclick="openQsoList(\''.$qsl->COL_CALL.'\')" class="btn btn-sm btn-success">Open QSO list</button></td>';

View File

@@ -8,6 +8,7 @@ if ($qsos->result() != NULL) {
<th style=\'text-align: center\'>'. $this->lang->line('general_word_time') .'</th>
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_mode') . '</th>
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_band') . '</th>
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_qsl') . ' ' . $this->lang->line('general_word_qslcard_via') . '</th>
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_station') . '</th>
<th style=\'text-align: center\'></th>
<th style=\'text-align: center\'></th>
@@ -30,6 +31,7 @@ if ($qsos->result() != NULL) {
echo '<td style=\'text-align: center\'>'; $timestamp = strtotime($qsl->COL_TIME_ON); echo date('H:i', $timestamp); echo '</td>';
echo '<td style=\'text-align: center\'>'; echo $qsl->COL_SUBMODE==null?$qsl->COL_MODE:$qsl->COL_SUBMODE; echo '</td>';
echo '<td style=\'text-align: center\'>'; if($qsl->COL_SAT_NAME != null) { echo $qsl->COL_SAT_NAME; } else { echo strtolower($qsl->COL_BAND); }; echo '</td>';
echo '<td style=\'text-align: center\'>' . $qsl->COL_QSL_VIA . '</td>';
echo '<td style=\'text-align: center\'><span class="badge badge-light">' . $qsl->station_callsign . '</span></td>';
echo '<td style=\'text-align: center\'><button onclick="deleteFromQslQueue(\''.$qsl->COL_PRIMARY_KEY.'\')" class="btn btn-sm btn-danger">Delete from queue</button></td>';
echo '<td style=\'text-align: center\'><button onclick="openQsoList(\''.$qsl->COL_CALL.'\')" class="btn btn-sm btn-success">Open QSO list</button></td>';

View File

@@ -9,7 +9,14 @@ if ($qsos->result() != NULL) {
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_mode') . '</th>
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_band') . '</th>
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_station') . '</th>
<th style=\'text-align: center\'></th>
<th style=\'text-align: center\'>QSL</th>';
if($this->session->userdata('user_lotw_name') != "") {
echo '<th style=\'text-align: center\'>LoTW</th>';
}
if ($this->session->userdata('user_eqsl_name') != "") {
echo '<th style=\'text-align: center\'>eQSL</th>';
}
echo '<th style=\'text-align: center\'></th>
</tr>
</thead><tbody>';
@@ -30,6 +37,39 @@ if ($qsos->result() != NULL) {
echo '<td style=\'text-align: center\'>'; echo $qsl->COL_SUBMODE==null?$qsl->COL_MODE:$qsl->COL_SUBMODE; echo '</td>';
echo '<td style=\'text-align: center\'>'; if($qsl->COL_SAT_NAME != null) { echo $qsl->COL_SAT_NAME; } else { echo strtolower($qsl->COL_BAND); }; echo '</td>';
echo '<td style=\'text-align: center\'><span class="badge badge-light">' . $qsl->station_callsign . '</span></td>';
echo '<td style=\'text-align: center\' class="qsl">
<span class="qsl-';
switch ($qsl->COL_QSL_SENT) {
case "Y": echo "green"; break;
case "Q": echo "yellow"; break;
case "R": echo "yellow"; break;
case "I": echo "grey"; break;
default: echo "red";
}
echo '">&#9650;</span>
<span class="qsl-';
switch ($qsl->COL_QSL_RCVD) {
case "Y": echo "green"; break;
case "Q": echo "yellow"; break;
case "R": echo "yellow"; break;
case "I": echo "grey"; break;
default: echo "red";
}
echo '">&#9660;</span></td>';
if($this->session->userdata('user_lotw_name') != "") {
echo '<td style=\'text-align: center\' class="lotw">';
if ($qsl->COL_LOTW_QSL_SENT != ''){
echo '<span class="lotw-' . ($qsl->COL_LOTW_QSL_SENT=='Y'?'green':'red') . '">&#9650;</span>
<span class="lotw-' . ($qsl->COL_LOTW_QSL_RCVD=='Y'?'green':'red') . '">&#9660;</span>';
}
echo '</td>';
}
if ($this->session->userdata('user_eqsl_name') != ""){
echo '<td style=\'text-align: center\' class="eqsl">
<span class="eqsl-' . ($qsl->COL_EQSL_QSL_SENT=='Y'?'green':'red') . '">&#9650;</span>
<span class="eqsl-' . ($qsl->COL_EQSL_QSL_RCVD=='Y'?'green':'red') . '">&#9650;</span>
</td>';
}
echo '<td id="'.$qsl->COL_PRIMARY_KEY.'" style=\'text-align: center\'><button onclick="addQsoToPrintQueue(\''.$qsl->COL_PRIMARY_KEY.'\')" class="btn btn-sm btn-success">Add to print queue</button></td>';
echo '</tr>';
}

View File

@@ -42,6 +42,7 @@
<a class="nav-item nav-link" id="nav-qso-notes-tab" data-toggle="tab" href="#nav-qso-notes" role="tab" aria-controls="nav-qso-notes" aria-selected="false">Notes</a>
<a class="nav-item nav-link" id="nav-qsl-tab" data-toggle="tab" href="#nav-qsl" role="tab" aria-controls="nav-qsl" aria-selected="false">QSL</a>
<a class="nav-item nav-link" id="nav-station-tab" data-toggle="tab" href="#nav-station" role="tab" aria-controls="nav-station" aria-selected="false">Station</a>
<a class="nav-item nav-link" id="nav-contest-tab" data-toggle="tab" href="#nav-contest" role="tab" aria-controls="nav-contest" aria-selected="false">Contest</a>
</div>
</nav>
@@ -191,19 +192,8 @@
</div>
</div>
<?php if ($qso->COL_STX_STRING) { ?>
<div class="form-group">
<label for="stx_string">TX Serial</label>
<input type="text" class="form-control" id="band" name="stx_string" value="<?php echo $qso->COL_STX_STRING; ?>">
</div>
<?php } ?>
<?php if ($qso->COL_SRX_STRING) { ?>
<div class="form-group">
<label for="srx_string">RX Serial</label>
<input type="text" class="form-control" id="srx_string" name="srx_string" value="<?php echo $qso->COL_SRX_STRING; ?>">
</div>
<?php } ?>
<div class="form-row">
<div class="form-group col-sm-6">
<label for="locator">Gridsquare</label>
@@ -315,7 +305,7 @@
<div class="form-group">
<label for="usa_state">USA State</label>
<select class="custom-select" id="input_usa_state" name="usa_state">
<select class="custom-select" id="input_usa_state_edit" name="usa_state">
<option value=""></option>
<option value="AL" <?php if($qso->COL_STATE == "AL") { echo "selected=\"selected\""; } ?>>Alabama (AL)</option>
<option value="AK" <?php if($qso->COL_STATE == "AK") { echo "selected=\"selected\""; } ?>>Alaska (AK)</option>
@@ -373,7 +363,7 @@
<div class="form-group">
<label for="stationCntyInput">USA County</label>
<input disabled="disabled" class="form-control" id="stationCntyInput" type="text" name="usa_county" value="<?php echo $qso->COL_CNTY; ?>" />
<input disabled="disabled" class="form-control" id="stationCntyInputEdit" type="text" name="usa_county" value="<?php echo $qso->COL_CNTY; ?>" />
</div>
<div class="form-group">
@@ -396,7 +386,7 @@
<div class="form-group">
<label for="sota_ref">SOTA</label>
<input type="text" class="form-control" id="sota_ref" name="sota_ref" value="<?php echo $qso->COL_SOTA_REF; ?>">
<input type="text" class="form-control" id="sota_ref_edit" name="sota_ref" value="<?php echo $qso->COL_SOTA_REF; ?>">
</div>
<div class="form-group">
@@ -411,7 +401,7 @@
<div class="form-group">
<label for="darc_dok">DOK</label>
<input type="text" class="form-control" id="darc_dok" name="darc_dok" value="<?php echo $qso->COL_DARC_DOK; ?>">
<input type="text" class="form-control" id="darc_dok_edit" name="darc_dok" value="<?php echo $qso->COL_DARC_DOK; ?>">
</div>
</div>
@@ -578,8 +568,50 @@
</div>
<!-- Contest Panel Contents -->
<div class="tab-pane fade" id="nav-contest" role="tabpanel" aria-labelledby="nav-contest-tab">
<div class="form-group">
<label for="contest_name">Contest Name</label>
<select class="custom-select" id="contest_name" name="contest_name">
<option value =""></option>
</div>
<?php
foreach($contest as $c) {
echo '<option value=' . $c['adifname'];
if ($qso->COL_CONTEST_ID == $c['adifname']) {
echo " selected=\"selected\"";
}
echo '>' . $c['name'] . '</option>';
}
?>
</select>
</div>
<div class="form-row">
<div class="form-group col-sm-3">
<label for="srx">Serial (R)</label>
<input type="text" id="srx" class="form-control" name="srx" value="<?php echo $qso->COL_SRX; ?>" />
</div>
<div class="form-group col-sm-3">
<label for="stx">Serial (S)</label>
<input type="text" id="stx" class="form-control" name="stx" value="<?php echo $qso->COL_STX; ?>" />
</div>
<div class="form-group col-sm-3">
<label for="srx_string">Exchange (R)</label>
<input type="text" id="srx_string" class="form-control" name="srx_string" value="<?php echo $qso->COL_SRX_STRING; ?>" />
</div>
<div class="form-group col-sm-3">
<label for="stx_string">Exchange (S)</label>
<input type="text" id="stx_string" class="form-control" name="stx_string" value="<?php echo $qso->COL_STX_STRING; ?>" />
</div>
</div>
</div>
<input type="hidden" name="id" value="<?php echo $qso->COL_PRIMARY_KEY; ?>" />

View File

@@ -24,17 +24,41 @@
</li>
</ul>
</div>
<div class="card-body">
<div class="card-body main">
<div class="card-text" id="builder"></div>
<p class="card-text">
<button class="btn btn-primary" id="btn-get">Search</button>
<button class="btn btn-sm btn-primary ld-ext-right searchbutton" id="btn-get">Search<div class="ld ld-ring ld-spin"></div></button>
<button class="btn btn-warning" id="btn-reset">Reset</button>
<button class="btn btn-sm btn-warning" id="btn-reset">Reset</button>
</p>
<p>
<button style="display:none;" class="btn btn-sm btn-primary" id="btn-save">Save query</button>
<span class="badge badge-info">Info</span> You can find out how to use the <a href="https://github.com/magicbug/Cloudlog/wiki/Search----Filter" target="_blank">search filter functions</a> in the wiki.</a>
<?php if ($stored_queries) { ?>
<button class="btn btn-sm btn-primary" id="btn-edit">Edit queries</button></p>
<div class="form-group row">
<label class="col-md-2 control-label" for="querydropdown"> Stored queries:</label>
<div class="col-md-3">
<select id="querydropdown" name="querydropdown" class="form-control custom-select-sm">
<?php
foreach($stored_queries as $q){
echo '<option value="' . $q->id . '">'. $q->description . '</option>'."\n";
}
?>
</select>
</div>
<button class="btn btn-sm btn-primary ld-ext-right runbutton" onclick="run_query()">Run Query<div class="ld ld-ring ld-spin"></div></button>
</div>
<?php
}
?>
<div style="display:none;"><span class="badge badge-info">Info</span> You can find out how to use the <a href="https://github.com/magicbug/Cloudlog/wiki/Search----Filter" target="_blank">search filter functions</a> in the wiki.</a></div>
</p>
</div>
@@ -45,24 +69,9 @@
<!-- Search Results here -->
<div class="card search-results-box">
<div class="card-header">
Search Results
Search Results: <div class="exportbutton"><button class="btn btn-sm btn-primary" id="btn-export">Export to ADIF</button></div>
</div>
<div class="card-body">
<div class="table-responsive">
<table id="results" class="table table-striped table-hover">
<tr class="titles">
<td>Date/Time</td>
<td>Call</td>
<td>Mode</td>
<td>Sent</td>
<td>Recv'd</td>
<td>Band</td>
<td>Country</td>
<td></td>
</tr>
</table>
</div>
<div class="card-body result">
</div>
</div>

View File

@@ -0,0 +1,282 @@
<div class="table-responsive">
<table style="width:100%" class="table table-sm tablewas table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr class="titles">
<td><?php echo $this->lang->line('general_word_date'); ?></td>
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
<td><?php echo $this->lang->line('general_word_time'); ?></td>
<?php } ?>
<td><?php echo $this->lang->line('gen_hamradio_call'); ?></td>
<?php
echo '<td>';
switch($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</td>';
echo '<td>';
switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</td>';
echo '<td>';
switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</td>';
echo '<td>';
switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</td>';
echo '<td>';
switch($this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</td>';
if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<td>QSL</td>
<?php if($this->session->userdata('user_eqsl_name') != "") { ?>
<td>eQSL</td>
<?php } ?>
<?php if($this->session->userdata('user_lotw_name') != "") { ?>
<td>LoTW</td>
<?php } ?>
<?php } ?>
<td><?php echo $this->lang->line('gen_hamradio_station'); ?></td>
<?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<td></td>
<?php } ?>
</tr>
</thead>
<tbody>
<?php $i = 0; foreach ($results->result() as $row) { ?>
<?php
// Get Date format
if($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/cloudlog.php
$custom_date_format = $this->config->item('qso_date_format');
}
?>
<?php echo '<tr class="tr'.($i & 1).'" id ="qso_'. $row->COL_PRIMARY_KEY .'">'; ?>
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); ?></td>
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
<?php } ?>
<td>
<a id="edit_qso" href="javascript:displayQso(<?php echo $row->COL_PRIMARY_KEY; ?>)"><?php echo str_replace("0","&Oslash;",strtoupper($row->COL_CALL)); ?></a>
</td>
<?php
switch($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span class="badge badge-light">' . $row->COL_STX . '</span>';}if ($row->COL_STX_STRING) { echo '<span class="badge badge-light">' . $row->COL_STX_STRING . '</span>';}; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
}
echo '</td>';
switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span class="badge badge-light">' . $row->COL_STX . '</span>';}if ($row->COL_STX_STRING) { echo '<span class="badge badge-light">' . $row->COL_STX_STRING . '</span>';}; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
}
echo '</td>';
switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span class="badge badge-light">' . $row->COL_STX . '</span>';}if ($row->COL_STX_STRING) { echo '<span class="badge badge-light">' . $row->COL_STX_STRING . '</span>';}; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
}
echo '</td>';
switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span class="badge badge-light">' . $row->COL_STX . '</span>';}if ($row->COL_STX_STRING) { echo '<span class="badge badge-light">' . $row->COL_STX_STRING . '</span>';}; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
}
echo '</td>';
switch($this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span class="badge badge-light">' . $row->COL_STX . '</span>';}if ($row->COL_STX_STRING) { echo '<span class="badge badge-light">' . $row->COL_STX_STRING . '</span>';}; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
}
echo '</td>';
if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<td class="qsl">
<span class="qsl-<?php
switch ($row->COL_QSL_SENT) {
case "Y":
echo "green";
break;
case "Q":
echo "yellow";
break;
case "R":
echo "yellow";
break;
case "I":
echo "grey";
break;
default:
echo "red";
}
?>">&#9650;</span>
<span class="qsl-<?php
switch ($row->COL_QSL_RCVD) {
case "Y":
echo "green";
break;
case "Q":
echo "yellow";
break;
case "R":
echo "yellow";
break;
case "I":
echo "grey";
break;
default:
echo "red";
}
?>">&#9660;</span>
</td>
<?php if ($this->session->userdata('user_eqsl_name') != ""){ ?>
<td class="eqsl">
<span class="eqsl-<?php echo ($row->COL_EQSL_QSL_SENT=='Y')?'green':'red'?>">&#9650;</span>
<span class="eqsl-<?php echo ($row->COL_EQSL_QSL_RCVD=='Y')?'green':'red'?>">
<?php if($row->COL_EQSL_QSL_RCVD =='Y') { ?>
<a style="color: green" href="<?php echo site_url("eqsl/image/".$row->COL_PRIMARY_KEY); ?>" data-fancybox="images" data-width="528" data-height="336">&#9660;</a>
<?php } else { ?>
&#9660;
<?php } ?>
</span>
</td>
<?php } ?>
<?php if($this->session->userdata('user_lotw_name') != "") { ?>
<td class="lotw">
<?php if ($row->COL_LOTW_QSL_SENT != ''){ ?>
<span class="lotw-<?php echo ($row->COL_LOTW_QSL_SENT=='Y')?'green':'red'?>">&#9650;</span>
<span class="lotw-<?php echo ($row->COL_LOTW_QSL_RCVD=='Y')?'green':'red'?>">&#9660;</span>
<?php } ?>
</td>
<?php } ?>
<?php } ?>
<?php if(isset($row->station_callsign)) { ?>
<td>
<span class="badge badge-light"><?php echo $row->station_callsign; ?></span>
</td>
<?php } ?>
<?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<td>
<div class="dropdown">
<a class="btn btn-sm btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-cog"></i>
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" id="edit_qso" href="javascript:qso_edit(<?php echo $row->COL_PRIMARY_KEY; ?>)"><i class="fas fa-edit"></i> <?php echo $this->lang->line('general_edit_qso'); ?></a>
<div class="qsl_<?php echo $row->COL_PRIMARY_KEY; ?>">
<div class="dropdown-divider"></div>
<?php if($row->COL_QSL_RCVD !='Y') { ?>
<a class="dropdown-item" href="javascript:qsl_rcvd(<?php echo $row->COL_PRIMARY_KEY; ?>, 'B')" ><i class="fas fa-envelope"></i> <?php echo $this->lang->line('general_mark_qsl_rx_bureau'); ?></a>
<a class="dropdown-item" href="javascript:qsl_rcvd(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D')" ><i class="fas fa-envelope"></i> <?php echo $this->lang->line('general_mark_qsl_rx_direct'); ?></a>
<a class="dropdown-item" href="javascript:qsl_requested(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D')" ><i class="fas fa-envelope"></i> Mark QSL Card Requested</a>
<?php } ?>
<a class="dropdown-item" href="javascript:qsl_ignore(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D')" ><i class="fas fa-envelope"></i> Mark QSL Card Not Required</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="https://www.qrz.com/db/<?php echo $row->COL_CALL; ?>" target="_blank"><i class="fas fa-question"></i> Lookup on QRZ</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="javascript:qso_delete(<?php echo $row->COL_PRIMARY_KEY; ?>, '<?php echo $row->COL_CALL; ?>')"><i class="fas fa-trash-alt"></i> <?php echo $this->lang->line('general_delete_qso'); ?></a>
</div>
</div>
</td>
<?php } ?>
</tr>
<?php $i++; } ?>
</tbody>
</table>
</div>

View File

@@ -0,0 +1,27 @@
<?php
$i = 1;
?>
<table class="table-sm table table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr>
<th>#</th>
<th>Description</th>
<th>Query</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<?php
foreach ($result as $q) {
echo '<tr id="query_' . $q->id . '">';
echo '<td>' . $i++ . '</td>';
echo '<td contenteditable="false" id="description_' . $q->id . '">' . $q->description . '</td>';
echo '<td>' . $q->query . '</td>';
echo '<td id="edit_' . $q->id . '"><a class="btn btn-outline-primary btn-sm" href="javascript:edit_stored_query(' . $q->id . ');">Edit</a></>';
echo '<td><a class="btn btn-danger btn-sm" href="javascript:delete_stored_query(' . $q->id . ');">Delete</a></td>';
echo '</tr>';
}
?>
</tbody>
</table>

View File

@@ -1,131 +1,208 @@
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
// Load the Visualization API and the piechart package.
google.load('visualization', '1', {'packages':['corechart']});
// Load the Visualization API and the piechart package.
google.load('visualization', '1', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawModeChart);
google.setOnLoadCallback(drawBandChart);
google.setOnLoadCallback(drawSatChart);
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawModeChart);
google.setOnLoadCallback(drawBandChart);
google.setOnLoadCallback(drawSatChart);
// Callback that creates and populates a data table,
// instantiates the pie chart, passes in the data and
// draws it.
function drawModeChart() {
// Callback that creates and populates a data table,
// instantiates the pie chart, passes in the data and
// draws it.
function drawModeChart() {
// Create our data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
data.addRows([
['SSB', <?php echo $total_ssb; ?>],
['CW', <?php echo $total_cw; ?>],
['FM', <?php echo $total_fm; ?>],
['Digi', <?php echo $total_digi; ?>],
]);
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.PieChart(document.getElementById('modechart_div'));
chart.draw(data, {width: 700, height: 440});
}
function drawBandChart() {
// Create our data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
data.addRows([
<?php foreach($total_bands->result() as $row) { ?>
['<?php echo $row->band; ?>', <?php echo $row->count; ?>],
<?php } ?>
]);
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.PieChart(document.getElementById('bandchart_div'));
chart.draw(data, {width: 700, height: 440});
}
function drawSatChart() {
// Create our data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
data.addRows([
<?php foreach($total_sat->result() as $row1) { ?>
<?php if($row1->COL_SAT_NAME != null) { ?>
['<?php echo $row1->COL_SAT_NAME; ?>', <?php echo $row1->count; ?>],
<?php } ?>
<?php } ?>
]);
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.PieChart(document.getElementById('satchart_div'));
chart.draw(data, {width: 700, height: 440});
}
</script>
<script type="text/javascript">
google.setOnLoadCallback(barchart);
function barchart() {
var data = google.visualization.arrayToDataTable([
['Year', 'QSOs'],
<?php foreach($totals_year->result() as $qso_numbers) { ?>
['<?php echo $qso_numbers->year; ?>', <?php echo $qso_numbers->total; ?>],
<?php } ?>
// Create our data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
data.addRows([
['SSB', <?php echo $total_ssb; ?>],
['CW', <?php echo $total_cw; ?>],
['FM', <?php echo $total_fm; ?>],
['Digi', <?php echo $total_digi; ?>],
]);
var color = ifDarkModeThemeReturn('white');
var options = {
title: 'Total QSOs Per Year',
vAxis: {title: 'QSOs', titleTextStyle: {color: 'black'}},
hAxis: {title: 'Year', titleTextStyle: {color: 'black'}}
title: 'Modes',
width: 900,
height: 440,
backgroundColor: getBodyBackground(),
legendTextStyle: {
color: color
},
titleTextStyle: {
fontSize: 20,
color: color
},
hAxisTextStyle: {
color: color
},
vAxisTextStyle: {
color: color
}
};
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.PieChart(document.getElementById('modechart_div'));
chart.draw(data, options);
}
function drawBandChart() {
// Create our data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
data.addRows([
<?php foreach($total_bands->result() as $row) { ?>
['<?php echo $row->band; ?>', <?php echo $row->count; ?>],
<?php } ?>
]);
var color = ifDarkModeThemeReturn('white');
var options = {
title: 'Bands',
width: 900,
height: 440,
backgroundColor: getBodyBackground(),
legendTextStyle: {
color: color
},
titleTextStyle: {
fontSize: 20,
color: color
},
hAxisTextStyle: {
color: color
},
vAxisTextStyle: {
color: color
}
};
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.PieChart(document.getElementById('bandchart_div'));
chart.draw(data, options);
}
function drawSatChart() {
// Create our data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
data.addRows([
<?php foreach($total_sat->result() as $row1) { ?>
<?php if($row1->COL_SAT_NAME != null) { ?>
['<?php echo $row1->COL_SAT_NAME; ?>', <?php echo $row1->count; ?>],
<?php } ?>
<?php } ?>
]);
var color = ifDarkModeThemeReturn('white');
var options = {
width: 900,
height: 440,
backgroundColor: getBodyBackground(),
legendTextStyle: {
color: color
},
titleTextStyle: {
fontSize: 20,
color: color
},
hAxisTextStyle: {
color: color
},
vAxisTextStyle: {
color: color
}
};
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.PieChart(document.getElementById('satchart_div'));
chart.draw(data, options);
}
</script>
<script type="text/javascript">
google.setOnLoadCallback(barchart);
function barchart() {
var data = google.visualization.arrayToDataTable([
['Year', 'QSOs'],
<?php foreach($totals_year->result() as $qso_numbers) { ?>
['<?php echo $qso_numbers->year; ?>', <?php echo $qso_numbers->total; ?>],
<?php } ?>
]);
var color = ifDarkModeThemeReturn('white');
var options = {
title: 'Total QSOs Per Year',
width: 900,
height: 500,
backgroundColor: getBodyBackground(),
legendTextStyle: {
color: color
},
titleTextStyle: {
fontSize: 20,
color: color
},
hAxis: {
title: 'Year',
titleTextStyle: {
color: color
},
textStyle: {
color: color
}
},
vAxis: {
title: 'QSOs',
titleTextStyle: {
color: color
},
textStyle: {
color: color
}
}
};
var chart = new google.visualization.ColumnChart(document.getElementById('totals_year'));
chart.draw(data, options);
}
</script>
}
</script>
<div class="container statistics">
<h2>
<?php echo $page_title; ?>
<small class="text-muted">Explore the logbook.</small>
</h2>
<h2>
<?php echo $page_title; ?>
<small class="text-muted">Explore the logbook.</small>
</h2>
<br>
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">General</a>
</li>
<li class="nav-item">
<a class="nav-link" id="satellite-tab" data-toggle="tab" href="#satellite" role="tab" aria-controls="satellite" aria-selected="false">Satellites</a>
</li>
</ul>
<br>
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">General</a>
</li>
<li class="nav-item">
<a class="nav-link" id="satellite-tab" data-toggle="tab" href="#satellite" role="tab" aria-controls="satellite" aria-selected="false">Satellites</a>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
<div id="totals_year" style="width: 900px; height: 500px;"></div>
<div id="modechart_div"></div>
<div id="bandchart_div"></div>
</div>
<div class="tab-pane fade" id="satellite" role="tabpanel" aria-labelledby="satellite-tab">
<div id="satchart_div"></div>
</div>
</div>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
<div id="totals_year"></div>
<div id="modechart_div"></div>
<div id="bandchart_div"></div>
</div>
<div class="tab-pane fade" id="satellite" role="tabpanel" aria-labelledby="satellite-tab">
<div id="satchart_div"></div>
</div>
</div>
</div>

View File

@@ -149,6 +149,7 @@
<option value="RSTR"><?php echo $this->lang->line('gen_hamradio_rstr'); ?></option>
<option value="Country"><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA"><?php echo $this->lang->line('gen_hamradio_iota'); ?></option>
<option value="SOTA"><?php echo $this->lang->line('gen_hamradio_sota'); ?></option>
<option value="State"><?php echo $this->lang->line('gen_hamradio_state'); ?></option>
<option value="Grid"><?php echo $this->lang->line('gen_hamradio_gridsquare'); ?></option>
</select>
@@ -163,6 +164,7 @@
<option value="RSTR"><?php echo $this->lang->line('gen_hamradio_rstr'); ?></option>
<option value="Country"><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA"><?php echo $this->lang->line('gen_hamradio_iota'); ?></option>
<option value="SOTA"><?php echo $this->lang->line('gen_hamradio_sota'); ?></option>
<option value="State"><?php echo $this->lang->line('gen_hamradio_state'); ?></option>
<option value="Grid"><?php echo $this->lang->line('gen_hamradio_gridsquare'); ?></option>
</select>
@@ -177,6 +179,7 @@
<option value="RSTR" selected ='selected'><?php echo $this->lang->line('gen_hamradio_rstr'); ?></option>
<option value="Country"><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA"><?php echo $this->lang->line('gen_hamradio_iota'); ?></option>
<option value="SOTA"><?php echo $this->lang->line('gen_hamradio_sota'); ?></option>
<option value="State"><?php echo $this->lang->line('gen_hamradio_state'); ?></option>
<option value="Grid"><?php echo $this->lang->line('gen_hamradio_gridsquare'); ?></option>
</select>
@@ -191,6 +194,7 @@
<option value="RSTR"><?php echo $this->lang->line('gen_hamradio_rstr'); ?></option>
<option value="Country"><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA"><?php echo $this->lang->line('gen_hamradio_iota'); ?></option>
<option value="SOTA"><?php echo $this->lang->line('gen_hamradio_sota'); ?></option>
<option value="State"><?php echo $this->lang->line('gen_hamradio_state'); ?></option>
<option value="Grid"><?php echo $this->lang->line('gen_hamradio_gridsquare'); ?></option>
</select>
@@ -205,6 +209,7 @@
<option value="RSTR"><?php echo $this->lang->line('gen_hamradio_rstr'); ?></option>
<option value="Country" selected ='selected'><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA"><?php echo $this->lang->line('gen_hamradio_iota'); ?></option>
<option value="SOTA"><?php echo $this->lang->line('gen_hamradio_sota'); ?></option>
<option value="State"><?php echo $this->lang->line('gen_hamradio_state'); ?></option>
<option value="Grid"><?php echo $this->lang->line('gen_hamradio_gridsquare'); ?></option>
</select>

View File

@@ -335,6 +335,7 @@
<option value="RSTR" <?php if ($user_column1 == "RSTR") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_rstr'); ?></option>
<option value="Country" <?php if ($user_column1 == "Country") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA" <?php if ($user_column1 == "IOTA") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_iota'); ?></option>
<option value="SOTA" <?php if ($user_column1 == "SOTA") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_sota'); ?></option>
<option value="State" <?php if ($user_column1 == "State") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_state'); ?></option>
<option value="Grid" <?php if ($user_column1 == "Grid") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_gridsquare'); ?></option>
</select>
@@ -349,6 +350,7 @@
<option value="RSTR" <?php if ($user_column2 == "RSTR") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_rstr'); ?></option>
<option value="Country" <?php if ($user_column2 == "Country") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA" <?php if ($user_column2 == "IOTA") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_iota'); ?></option>
<option value="SOTA" <?php if ($user_column2 == "SOTA") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_sota'); ?></option>
<option value="State" <?php if ($user_column2 == "State") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_state'); ?></option>
<option value="Grid" <?php if ($user_column2 == "Grid") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_gridsquare'); ?></option>
</select>
@@ -363,6 +365,7 @@
<option value="RSTR" <?php if ($user_column3 == "RSTR") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_rstr'); ?></option>
<option value="Country" <?php if ($user_column3 == "Country") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA" <?php if ($user_column3 == "IOTA") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_iota'); ?></option>
<option value="SOTA" <?php if ($user_column3 == "SOTA") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_sota'); ?></option>
<option value="State" <?php if ($user_column3 == "State") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_state'); ?></option>
<option value="Grid" <?php if ($user_column3 == "Grid") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_gridsquare'); ?></option>
</select>
@@ -377,6 +380,7 @@
<option value="RSTR" <?php if ($user_column4 == "RSTR") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_rstr'); ?></option>
<option value="Country" <?php if ($user_column4 == "Country") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA" <?php if ($user_column4 == "IOTA") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_iota'); ?></option>
<option value="SOTA" <?php if ($user_column4 == "SOTA") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_sota'); ?></option>
<option value="State" <?php if ($user_column4 == "State") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_state'); ?></option>
<option value="Grid" <?php if ($user_column4 == "Grid") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_gridsquare'); ?></option>
</select>
@@ -390,6 +394,7 @@
<option value="RSTR" <?php if ($user_column5 == "RSTR") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_rstr'); ?></option>
<option value="Country" <?php if ($user_column5 == "Country") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA" <?php if ($user_column5 == "IOTA") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_iota'); ?></option>
<option value="SOTA" <?php if ($user_column5 == "SOTA") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_sota'); ?></option>
<option value="State" <?php if ($user_column5 == "State") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_state'); ?></option>
<option value="Grid" <?php if ($user_column5 == "Grid") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_gridsquare'); ?></option>
</select>

View File

@@ -1,24 +1,21 @@
<div id="container">
<div id="container" class="container mx-auto pt-5" style="max-width:400px">
<h2>Log in</h2>
<?php $this->load->view('layout/messages'); ?>
<form method="post" action="<?php echo site_url('user/login'); ?>" name="users">
<table>
<tr>
<td>Username</td>
<td><input type="text" name="user_name" value="<?php echo $this->input->post('user_name'); ?>"></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="user_password" /></td>
</tr>
</table>
<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" />
<div><input type="submit" value="Log in" /></div>
<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" />
<div class="form-group">
<label for="user_name">Username</label>
<input id="user_name" type="text" name="user_name" class="form-control" value="<?php echo $this->input->post('user_name'); ?>">
</div>
<div class="form-group">
<label for="password">Password</label>
<input id="password" type="password" name="user_password" class="form-control">
</div>
<div class="form-group">
<input class="btn-info p-2 col" type="submit" value="Log in" />
</div
</form>
</div>

View File

@@ -37,7 +37,14 @@
<td><a href="<?php echo site_url('user/edit')."/".$row->user_id; ?>"><?php echo $row->user_name; ?></a></td>
<td><?php echo $row->user_email; ?></td>
<td><?php $l = $this->config->item('auth_level'); echo $l[$row->user_type]; ?></td>
<td><a href="<?php echo site_url('user/edit')."/".$row->user_id; ?>" class="btn btn-outline-primary btn-sm"><i class="fas fa-user-edit"></i> Edit</a> <a href="<?php echo site_url('user/delete')."/".$row->user_id; ?>" class="btn btn-danger btn-sm"><i class="fas fa-user-minus"></i> Delete</a></td>
<td>
<a href="<?php echo site_url('user/edit')."/".$row->user_id; ?>" class="btn btn-outline-primary btn-sm"><i class="fas fa-user-edit"></i> Edit</a>
<?php
if ($_SESSION['user_id'] != $row->user_id) {
echo "<a href=" . site_url('user/delete'). "/" . $row->user_id . " class=\"btn btn-danger btn-sm\"><i class=\"fas fa-user-minus\"></i> Delete</a>";
}
?>
</td>
</tr>
<?php $i++; } ?>
</tbody>
@@ -50,4 +57,4 @@
</div>
</div>
</div>

View File

@@ -97,7 +97,7 @@
<span class="eqsl-<?php echo ($row->COL_EQSL_QSL_SENT=='Y')?'green':'red'?>">&#9650;</span>
<span class="eqsl-<?php echo ($row->COL_EQSL_QSL_RCVD=='Y')?'green':'red'?>">
<?php if($row->COL_EQSL_QSL_RCVD =='Y') { ?>
<a style="color: green" href="<?php echo site_url("eqsl/image/".$row->COL_PRIMARY_KEY."/".$row->COL_CALL."/".$row->COL_MODE."/".$row->COL_BAND."/".date('H', $timestamp)."/".date('i', $timestamp)."/".date('d', $timestamp)."/".date('m', $timestamp)."/".date('Y', $timestamp)); ?>" data-fancybox="images" data-width="528" data-height="336">&#9660;</a>
<a style="color: green" href="<?php echo site_url("eqsl/image/".$row->COL_PRIMARY_KEY); ?>" data-fancybox="images" data-width="528" data-height="336">&#9660;</a>
<?php } else { ?>
&#9660;
<?php } ?>

View File

@@ -14,6 +14,7 @@
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
@@ -27,6 +28,7 @@
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
@@ -38,6 +40,7 @@
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
@@ -50,6 +53,7 @@
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
@@ -62,6 +66,7 @@
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
@@ -110,6 +115,7 @@
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
@@ -121,6 +127,7 @@
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
@@ -133,6 +140,7 @@
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
@@ -144,6 +152,7 @@
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
@@ -155,6 +164,7 @@
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
@@ -205,7 +215,7 @@
<span class="eqsl-<?php echo ($row->COL_EQSL_QSL_SENT=='Y')?'green':'red'?>">&#9650;</span>
<span class="eqsl-<?php echo ($row->COL_EQSL_QSL_RCVD=='Y')?'green':'red'?>">
<?php if($row->COL_EQSL_QSL_RCVD =='Y') { ?>
<a style="color: green" href="<?php echo site_url("eqsl/image/".$row->COL_PRIMARY_KEY."/".$row->COL_CALL."/".$row->COL_MODE."/".$row->COL_BAND."/".date('H', $timestamp)."/".date('i', $timestamp)."/".date('d', $timestamp)."/".date('m', $timestamp)."/".date('Y', $timestamp)); ?>" data-fancybox="images" data-width="528" data-height="336">&#9660;</a>
<a style="color: green" href="<?php echo site_url("eqsl/image/".$row->COL_PRIMARY_KEY); ?>" data-fancybox="images" data-width="528" data-height="336">&#9660;</a>
<?php } else { ?>
&#9660;
<?php } ?>

View File

@@ -244,7 +244,6 @@ color: #ffffff;
}
}
/*
* Timepicker alignment
*/

View File

@@ -7,8 +7,9 @@
*/
.leaflet-tile {
filter: brightness(0.7) grayscale(0.6) !important;
filter: invert() hue-rotate(180deg) sepia(100%) hue-rotate(180deg) !important;
}
path.grid-rectangle {
stroke: rgba(200, 200, 200, 0.5);
}
@@ -19,8 +20,8 @@ span.grid-text>font {
}
path.grid-confirmed {
fill: rgba(144, 238, 144, 0.3) !important;
stroke: rgba(144, 238, 144, 0.3) !important;
fill: rgba(144, 238, 144, 0.4) !important;
stroke: rgba(144, 238, 144, 0.4) !important;
}
path.grid-worked {

View File

@@ -0,0 +1,41 @@
// use closure to cache result (color is only read once)
function _getBodyBackground() {
var result = null;
function inner() {
if (result === null) {
result = $('body').css( "background-color");
}
return result;
}
return inner;
}
getBodyBackground = _getBodyBackground();
// use closure to cache result (check it once is enough)
function _isDarkModeTheme() {
var result = null;
function inner() {
if (result === null) {
// TODO use better solution as soon as the themes know if they are dark or not
// check if background color is white
result = false;
var background = getBodyBackground();
if (background != ('rgb(255, 255, 255)')) {
result = true;
}
}
return result;
}
return inner;
}
isDarkModeTheme = _isDarkModeTheme();
function ifDarkModeThemeReturn(darkModeValue, notDarkModeValue) {
if (isDarkModeTheme()) {
return darkModeValue;
}
if (!notDarkModeValue) {
return null;
}
return notDarkModeValue;
}

View File

@@ -4,7 +4,7 @@
L.Maidenhead = L.LayerGroup.extend({
options: {
// Line and label color
color: 'rgba(255, 0, 0, 0.4)',
@@ -28,7 +28,7 @@ L.Maidenhead = L.LayerGroup.extend({
this.eachLayer(map.addLayer, map);
},
onRemove: function (map) {
// remove layer listeners and elements
map.off('viewreset '+ this.options.redraw, this.map);
@@ -36,8 +36,8 @@ L.Maidenhead = L.LayerGroup.extend({
},
redraw: function () {
var d3 = new Array(20,10,10,10,10,10,1 ,1 ,1 ,1 ,1/24,1/24,1/24,1/24,1/24,1/240,1/240,1/240,1/240,1/240/24,1/240/24 );
var lat_cor = new Array(0 ,8 ,8 ,8 ,10,14,6 ,8 ,8 ,8 ,1.4 ,2.5 ,3 ,3.5 ,4 ,4 ,3.5 ,3.5 ,3 ,1.8 ,1.6 );
var d3 = new Array(20, 10, 10, 1, 1, 1, 1, 1, 1, 1, 1 / 24, 1 / 24, 1 / 24, 1 / 24, 1 / 24, 1 / 240, 1 / 240, 1 / 240, 1 / 240, 1 / 240 / 24, 1 / 240 / 24);
var lat_cor = new Array(0, 8, 8, 8, 8, 1.7, 6, 8, 8, 8, 1.4, 2.5, 3, 3.5, 4, 4, 3.5, 3.5, 3, 1.8, 1.6);
var bounds = map.getBounds();
var zoom = map.getZoom();
var unit = d3[zoom];
@@ -54,10 +54,11 @@ L.Maidenhead = L.LayerGroup.extend({
var top = Math.ceil(n/unit)*unit;
var bottom = Math.floor(s/unit)*unit;
this.eachLayer(this.removeLayer, this);
for (var lon = left; lon < right; lon += (unit*2)) {
for (var lat = bottom; lat < top; lat += unit) {
var bounds = [[lat,lon],[lat+unit,lon+(unit*2)]];
if(grid_two.includes(this._getLocator(lon,lat)) || grid_four.includes(this._getLocator(lon,lat)) || grid_six.includes(this._getLocator(lon,lat))) {
if(grid_two_confirmed.includes(this._getLocator(lon,lat)) || grid_four_confirmed.includes(this._getLocator(lon,lat)) || grid_six_confirmed.includes(this._getLocator(lon,lat))) {
@@ -65,19 +66,51 @@ L.Maidenhead = L.LayerGroup.extend({
} else {
this.addLayer(L.rectangle(bounds, {className: 'grid-rectangle grid-worked', color: this.options.color, weight: 1, fillOpacity: 1, fill:true, interactive: false}));
}
if (zoom < 2 || zoom > 4) {
this.addLayer(this._getLabel(lon+unit-(unit/lcor),lat+(unit/2)+(unit/lcor*c)));
}
if (zoom < 3 ) {
this.addLayer(L.rectangle(bounds, {className: 'grid-rectangle', color: this.options.color, weight: 1, fill:false, interactive: false}));
}
} else {
this.addLayer(L.rectangle(bounds, {className: 'grid-rectangle', color: this.options.color, weight: 1, fill:false, interactive: false}));
if (zoom < 3 || zoom > 5) {
this.addLayer(L.rectangle(bounds, {className: 'grid-rectangle', color: this.options.color, weight: 1, fill:false, interactive: false}));
}
}
//var pont = map.latLngToLayerPoint([lat,lon]);
//console.log(pont.x);
this.addLayer(this._getLabel(lon+unit-(unit/lcor),lat+(unit/2)+(unit/lcor*c)));
if (zoom < 3 || zoom > 5) {
this.addLayer(this._getLabel(lon+unit-(unit/lcor),lat+(unit/2)+(unit/lcor*c)));
}
}
}
// Added this to print fields and field name, while still showing worked/confirmed gridsquares
if (zoom < 5 && zoom > 2) {
unit = 10;
var left = Math.floor(w / (unit * 2)) * (unit * 2);
var right = Math.ceil(e / (unit * 2)) * (unit * 2);
var top = Math.ceil(n / unit) * unit;
var bottom = Math.floor(s / unit) * unit;
for (var lon = left; lon < right; lon += (unit * 2)) {
for (var lat = bottom; lat < top; lat += unit) {
var bounds = [[lat, lon], [lat + unit, lon + (unit * 2)]];
this.addLayer(L.rectangle(bounds, {
className: 'grid-rectangle',
color: this.options.color,
weight: 1,
fill: false,
interactive: false
}));
this.addLayer(this._getLabel2(lon + unit - (unit / lcor), lat + (unit / 2) + (unit / lcor * c)));
}
}
}
return this;
},
_getLabel: function(lon,lat) {
var title_size = new Array(0 ,10,12,16,20,26,15,16,24,36,12 ,14 ,20 ,36 ,60 ,12 ,20 ,36 ,60 ,12 ,24 );
var title_size = new Array(0, 10, 14, 16, 6, 13, 14, 16, 24, 36, 12, 14, 20, 36, 60, 12, 20, 36, 60, 12, 24);
var zoom = map.getZoom();
var size = title_size[zoom]+'px';
var title = '<span class="grid-text" style="cursor: default;"><font style="color:'+this.options.color+'; font-size:'+size+'; font-weight: 900; ">' + this._getLocator(lon,lat) + '</font></span>';
@@ -85,12 +118,12 @@ L.Maidenhead = L.LayerGroup.extend({
var marker = L.marker([lat,lon], {icon: myIcon}, clickable=false);
return marker;
},
_getLocator: function(lon,lat) {
var ydiv_arr=new Array(10, 1, 1/24, 1/240, 1/240/24);
var d1 = "ABCDEFGHIJKLMNOPQR".split("");
var d2 = "ABCDEFGHIJKLMNOPQRSTUVWX".split("");
var d4 = new Array(0 ,1 ,1 ,1 ,1 ,1 ,2 ,2 ,2 ,2 ,3 ,3 ,3 ,3 ,3 ,4 ,4 ,4 ,4 ,5 ,5 );
var d4 = new Array(0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5);
var locator = "";
var x = lon;
var y = lat;
@@ -107,15 +140,56 @@ L.Maidenhead = L.LayerGroup.extend({
if ((i%2)==0) {
locator += Math.floor(rlon/(ydiv_arr[i+1]*2)) +""+ Math.floor(rlat/(ydiv_arr[i+1]));
} else {
locator += d2[Math.floor(rlon/(ydiv_arr[i+1]*2))] +""+ d2[Math.floor(rlat/(ydiv_arr[i+1]))];
locator += d2[Math.floor(rlon/(ydiv_arr[i+1]*2))] +""+ d2[Math.floor(rlat/(ydiv_arr[i+1]))];
}
}
}
}
return locator;
},
/*
Need this for the field printing, while showing worked/confirmed grids
*/
_getLabel2: function(lon,lat) {
var title_size = new Array(0, 10, 12, 16, 20, 26, 26, 16, 24, 36, 12, 14, 20, 36, 60, 12, 20, 36, 60, 12, 24);
var zoom = map.getZoom();
var size = title_size[zoom]+'px';
var title = '<span class="grid-text" style="cursor: default;"><font style="color:'+this.options.color+'; font-size:'+size+'; font-weight: 900; ">' + this._getLocator2(lon,lat) + '</font></span>';
var myIcon = L.divIcon({className: 'my-div-icon', html: title});
var marker = L.marker([lat,lon], {icon: myIcon}, clickable=false);
return marker;
},
/*
Need this for the field printing, while showing worked/confirmed grids
*/
_getLocator2: function(lon,lat) {
var ydiv_arr=new Array(10, 1, 1/24, 1/240, 1/240/24);
var d1 = "ABCDEFGHIJKLMNOPQR".split("");
var d2 = "ABCDEFGHIJKLMNOPQRSTUVWX".split("");
var d4 = new Array(0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5);
var locator = "";
var x = lon;
var y = lat;
var precision = d4[map.getZoom()];
while (x < -180) {x += 360;}
while (x > 180) {x -=360;}
x = x + 180;
y = y + 90;
locator = locator + d1[Math.floor(x/20)] + d1[Math.floor(y/10)];
for (var i=0; i<4; i=i+1) {
if (precision > i+1) {
rlon = x%(ydiv_arr[i]*2);
rlat = y%(ydiv_arr[i]);
if ((i%2)==0) {
locator += Math.floor(rlon/(ydiv_arr[i+1]*2)) +""+ Math.floor(rlat/(ydiv_arr[i+1]));
} else {
locator += d2[Math.floor(rlon/(ydiv_arr[i+1]*2))] +""+ d2[Math.floor(rlat/(ydiv_arr[i+1]))];
}
}
}
return locator;
},
});

View File

@@ -3,11 +3,7 @@ function accumulatePlot(form) {
$(".ld-ext-right").prop('disabled', true);
// using this to change color of legend and label according to background color
var background = $('body').css( "background-color");
var color = 'grey';
if (background != ('rgb(255, 255, 255)')) {
color = 'white';
}
var color = ifDarkModeThemeReturn('white', 'grey');
var award = form.awardradio.value;
var mode = form.mode.value;
@@ -99,9 +95,9 @@ function accumulatePlot(form) {
},
legend: {
labels: {
fontColor: color,
fontColor: color
}
},
}
}
});
$(".ld-ext-right").removeClass('running');

View File

@@ -2,19 +2,11 @@
$("#callsign").focus();
// Init serial sent as 1 when loading page
$("#exch_sent").val(1);
$("#exch_serial_s").val(1);
$( document ).ready(function() {
restoreContestSession();
setRst($("#mode").val());
// Check to see what serial type is selected and set validation
if($('#serial').is(':checked')) {
set_serial_number_input_validation();
}
if($('#other').is(':checked')) {
set_other_input_validation();
}
});
// This erases the contest logging session which is stored in localStorage
@@ -23,18 +15,29 @@ function reset_contest_session() {
$('.callsign-suggestions').text("");
$('#callsign').val("");
$('#comment').val("");
$('#exch_sent').val("1");
$("#exch_serial_s").val("1");
$("#exch_serial_r").val("");
$('#exch_sent').val("");
$('#exch_recv').val("");
$("#exch_gridsquare_r").val("");
$("#exch_gridsquare_s").val("");
$("#callsign").focus();
setRst($("#mode").val());
$("#serial").prop("checked", true);
$("#exchangetype").val("None");
$("#contestname").val("Other").change();
$(".contest_qso_table_contents").empty();
localStorage.removeItem("contestid");
localStorage.removeItem("exchangetype");
localStorage.removeItem("exchangesent");
localStorage.removeItem("qso");
localStorage.removeItem("exchangereceived");
localStorage.removeItem("exchangesent");
localStorage.removeItem("serialreceived");
localStorage.removeItem("serialsent");
localStorage.removeItem("gridsquarereceived");
localStorage.removeItem("gridsquaresent");
}
// Storing the contestid in contest session
@@ -43,11 +46,10 @@ $('#contestname').change(function() {
});
// Storing the exchange type in contest session
$('input[type=radio][name=exchangeradio]').change(function() {
localStorage.setItem("exchangetype", $('input[name=exchangeradio]:checked', '#qso_input').val());
$('#exchangetype').change(function() {
localStorage.setItem("exchangetype", $('#exchangetype').val());
});
// realtime clock
$(function($) {
var options = {
@@ -83,7 +85,7 @@ $(function() {
});
});
// Here we capture keystrokes fo execute functions
// Here we capture keystrokes to execute functions
document.onkeyup = function(e) {
// ALT-W wipe
if (e.altKey && e.which == 87) {
@@ -96,15 +98,61 @@ document.onkeyup = function(e) {
logQso();
} else if (e.which == 27) {
reset_log_fields();
// Space to jump to either callsign or sent exchange
// Space to jump to either callsign or the various exchanges
} else if (e.which == 32) {
if ($(document.activeElement).attr("id") == "callsign") {
$("#exch_recv").focus();
return false;
} else if ($(document.activeElement).attr("id") == "exch_recv") {
$("#callsign").focus();
return false;
}
var exchangetype = $("#exchangetype").val();
if (exchangetype == 'Exchange') {
if ($(document.activeElement).attr("id") == "callsign") {
$("#exch_recv").focus();
return false;
} else if ($(document.activeElement).attr("id") == "exch_recv") {
$("#callsign").focus();
return false;
}
}
else if (exchangetype == 'Serial') {
if ($(document.activeElement).attr("id") == "callsign") {
$("#exch_serial_r").focus();
return false;
} else if ($(document.activeElement).attr("id") == "exch_serial_r") {
$("#callsign").focus();
return false;
}
}
else if (exchangetype == 'Serialexchange') {
if ($(document.activeElement).attr("id") == "callsign") {
$("#exch_serial_r").focus();
return false;
} else if ($(document.activeElement).attr("id") == "exch_serial_r") {
$("#exch_recv").focus();
return false;
} else if ($(document.activeElement).attr("id") == "exch_recv") {
$("#callsign").focus();
return false;
}
}
else if (exchangetype == 'Serialgridsquare') {
if ($(document.activeElement).attr("id") == "callsign") {
$("#exch_serial_r").focus();
return false;
} else if ($(document.activeElement).attr("id") == "exch_serial_r") {
$("#exch_gridsquare_r").focus();
return false;
} else if ($(document.activeElement).attr("id") == "exch_gridsquare_r") {
$("#callsign").focus();
return false;
}
}
else if (exchangetype == 'Gridsquare') {
if ($(document.activeElement).attr("id") == "callsign") {
$("#exch_gridsquare_r").focus();
return false;
} else if ($(document.activeElement).attr("id") == "exch_gridsquare_r") {
$("#callsign").focus();
return false;
}
}
}
};
@@ -129,6 +177,8 @@ function reset_log_fields() {
$('#callsign').val("");
$('#comment').val("");
$('#exch_recv').val("");
$('#exch_serial_r').val("");
$('#exch_gridsquare_r').val("");
$("#callsign").focus();
setRst($("#mode").val());
}
@@ -163,11 +213,12 @@ if ($('#frequency').val() == "")
}
/* on mode change */
$('.mode').change(function() {
$('#mode').change(function() {
$.get('qso/band_to_freq/' + $('#band').val() + '/' + $('.mode').val(), function(result) {
$('#frequency').val(result);
$('#frequency_rx').val("");
});
setRst($("#mode").val());
});
/* Calculate Frequency */
@@ -179,34 +230,225 @@ $('#band').change(function() {
});
});
// Change Serial Validation when selected
$('#serial').change(function() {
if($('#serial').is(':checked')) {
set_serial_number_input_validation();
}
$('#exchangetype').change(function(){
var exchangetype = $("#exchangetype").val();
setExchangetype(exchangetype);
});
// Change other serial type when selected
$('#other').change(function() {
if($('#other').is(':checked')) {
set_other_input_validation();
}
});
/*
Function: set_serial_number_input_validation
Job: This sets the field input to number for validation
*/
function set_serial_number_input_validation() {
$('#exch_sent').attr('type', 'number');
$('#exch_recv').attr('type', 'number');
function setExchangetype(exchangetype) {
if (exchangetype == 'None') {
$(".exchanger").hide();
$(".exchanges").hide();
$(".serials").hide();
$(".serialr").hide();
$(".gridsquarer").hide();
$(".gridsquares").hide();
}
else if (exchangetype == 'Exchange') {
$(".exchanger").show();
$(".exchanges").show();
$(".serials").hide();
$(".serialr").hide();
$(".gridsquarer").hide();
$(".gridsquares").hide();
}
else if (exchangetype == 'Serial') {
$(".exchanger").hide();
$(".exchanges").hide();
$(".serials").show();
$(".serialr").show();
$(".gridsquarer").hide();
$(".gridsquares").hide();
}
else if (exchangetype == 'Serialexchange') {
$(".exchanger").show();
$(".exchanges").show();
$(".serials").show();
$(".serialr").show();
$(".gridsquarer").hide();
$(".gridsquares").hide();
}
else if (exchangetype == 'Serialgridsquare') {
$(".exchanger").hide();
$(".exchanges").hide();
$(".serials").show();
$(".serialr").show();
$(".gridsquarer").show();
$(".gridsquares").show();
}
else if (exchangetype == 'Gridsquare') {
$(".exchanger").hide();
$(".exchanges").hide();
$(".serials").hide();
$(".serialr").hide();
$(".gridsquarer").show();
$(".gridsquares").show();
}
}
/*
Function: set_other_input_validation
Job: This sets the field input to text for validation
*/
function set_other_input_validation() {
$('#exch_sent').attr('type', 'text');
$('#exch_recv').attr('type', 'text');
}
Function: logQso
Job: this handles the logging done in the contesting module.
*/
function logQso() {
if ($("#callsign").val().length > 0) {
$('.callsign-suggestions').text("");
var table = $('.qsotable').DataTable();
var gridsquare = $("#exch_gridsquare_r").val();
var vucc = '';
if (gridsquare.indexOf(',') != -1) {
vucc = gridsquare;
gridsquare = '';
}
var data = [[
$("#start_date").val()+ ' ' + $("#start_time").val(),
$("#callsign").val().toUpperCase(),
$("#band").val(),
$("#mode").val(),
$("#rst_sent").val(),
$("#rst_recv").val(),
$("#exch_sent").val(),
$("#exch_recv").val(),
$("#exch_serial_s").val(),
$("#exch_serial_r").val(),
gridsquare,
vucc,
]];
table.rows.add(data).draw();
var formdata = new FormData(document.getElementById("qso_input"));
$.ajax({
url: base_url + 'index.php/qso/saveqso',
type: 'post',
data: formdata,
processData: false,
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());
}
$('#name').val("");
$('#callsign').val("");
$('#comment').val("");
$('#exch_recv').val("");
$('#exch_gridsquare_r').val("");
$('#exch_serial_r').val("");
var exchangetype = $("#exchangetype").val();
if (exchangetype == "Serial" || exchangetype == 'Serialexchange' || exchangetype == 'Serialgridsquare') {
$("#exch_serial_s").val(+$("#exch_serial_s").val() + 1);
}
$("#callsign").focus();
// Store contest session
localStorage.setItem("contestid", $("#contestname").val());
localStorage.setItem("exchangetype", $("#exchangetype").val());
localStorage.setItem("exchangereceived", $("#exch_recv").val());
localStorage.setItem("exchangesent", $("#exch_sent").val());
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());
}
});
}
}
// We are restoring the settings in the contest logging form here
function restoreContestSession() {
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_recv").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({
"pageLength": 25,
responsive: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"order": [[ 0, "desc" ]]
});
}
}
});
}
}

View File

@@ -8,6 +8,7 @@ $.ajax({
dataDxcc.push(this.Days);
});
var ctx = document.getElementById("myChartDiff").getContext('2d');
var color = ifDarkModeThemeReturn('white', 'grey');
var myChart = new Chart(ctx, {
type: 'bar',
data: {
@@ -24,10 +25,21 @@ $.ajax({
scales: {
yAxes: [{
ticks: {
beginAtZero:true
beginAtZero:true,
fontColor: color
}
}],
xAxes: [{
ticks: {
fontColor: color
}
}]
},
legend: {
labels: {
fontColor: color
}
}
}
});
}

View File

@@ -19,26 +19,43 @@ function distPlot(form) {
if (tmp.ok == 'OK') {
if (!($('#information').length > 0))
$("#distances_div").append('<div id="information"></div><div id="graphcontainer" style="height: 600px; margin: 0 auto"></div>');
var color = ifDarkModeThemeReturn('white', 'grey');
var options = {
chart: {
type: 'column',
zoomType: 'xy',
renderTo: 'graphcontainer'
renderTo: 'graphcontainer',
backgroundColor: getBodyBackground()
},
title: {
text: 'Distance Distribution'
text: 'Distance Distribution',
style: {
color: color
}
},
xAxis: {
categories: [],
crosshair: true,
type: "category",
min:0,
max:100
max:100,
labels: {
style: {
color: color
}
}
},
yAxis: {
title: {
text: '# QSOs'
text: '# QSOs',
style: {
color: color
}
},
labels: {
style: {
color: color
}
}
},
navigator: {
@@ -47,6 +64,9 @@ function distPlot(form) {
labels: {
formatter: function() {
return this.value * '50' + ' ' + tmp.unit;
},
style: {
color: color
}
}
}
@@ -63,6 +83,11 @@ function distPlot(form) {
}
}
},
legend: {
itemStyle: {
color: color
}
},
series: []
};
var myComments=[];
@@ -77,7 +102,6 @@ function distPlot(form) {
options.xAxis.categories.push(this.dist);
series.name = 'Number of QSOs';
series.data.push(this.count);
});
options.series.push(series);

View File

@@ -86,7 +86,7 @@ $( document ).ready(function() {
labelField: 'name',
searchField: 'name',
options: [],
create: false,
create: true,
load: function(query, callback) {
if (!query) return callback(); // Only trigger if at least 1 character is entered
$.ajax({
@@ -466,6 +466,27 @@ if ($('#frequency').val() == "")
});
}
/* time input shortcut */
$('#start_time').change(function() {
var raw_time = $(this).val();
if(raw_time.match(/^\d\[0-6]d$/)) {
raw_time = "0"+raw_time;
}
if(raw_time.match(/^[012]\d[0-5]\d$/)) {
raw_time = raw_time.substring(0,2)+":"+raw_time.substring(2,4);
$('#start_time').val(raw_time);
}
});
/* date input shortcut */
$('#start_date').change(function() {
raw_date = $(this).val();
if(raw_date.match(/^[12]\d{3}[01]\d[0123]\d$/)) {
raw_date = raw_date.substring(0,4)+"-"+raw_date.substring(4,6)+"-"+raw_date.substring(6,8);
$('#start_date').val(raw_date);
}
});
/* on mode change */
$('.mode').change(function() {
$.get('qso/band_to_freq/' + $('#band').val() + '/' + $('.mode').val(), function(result) {

View File

@@ -27,14 +27,19 @@ function plotTimeplotterChart(tmp) {
$("#container").remove();
$("#info").remove();
$("#timeplotter_div").append('<p id="info">' + tmp.qsocount + ' contacts were plotted.</p><div id="container" style="height: 600px;"></div>');
var color = ifDarkModeThemeReturn('white', 'grey');
var options = {
chart: {
type: 'column',
zoomType: 'xy',
renderTo: 'container'
renderTo: 'container',
backgroundColor: getBodyBackground()
},
title: {
text: 'Time Distribution'
text: 'Time Distribution',
style: {
color: color
}
},
xAxis: {
categories: [],
@@ -42,10 +47,23 @@ function plotTimeplotterChart(tmp) {
type: "category",
min:0,
max:47,
labels: {
style: {
color: color
}
}
},
yAxis: {
title: {
text: '# QSOs'
text: '# QSOs',
style: {
color: color
}
},
labels: {
style: {
color: color
}
}
},
rangeSelector: {
@@ -60,6 +78,11 @@ function plotTimeplotterChart(tmp) {
}
}
},
legend: {
itemStyle: {
color: color
}
},
series: []
};
var myComments=[];

View File

@@ -42,10 +42,12 @@ $config['display_freq'] = false;
|
| 'qrz_username' QRZ.com user login
| 'qrz_password' QRZ.com user password
| 'use_fullname' Get full names from QRZ, may not be GDPR compliant
*/
$config['qrz_username'] = "";
$config['qrz_password'] = "";
$config['use_fullname'] = false;
/*
|--------------------------------------------------------------------------