Merge branch 'magicbug:master' into master

这个提交包含在:
Pat Lang 2021-08-05 12:27:05 -04:00 提交者 GitHub
当前提交 4c9ed28972
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有 23 个文件被更改,包括 297 次插入77 次删除

查看文件

@ -21,6 +21,8 @@ Installation information can be found on the [wiki](https://github.com/magicbug/
Cloudlog has two support systems for code issues use Github issues, however if you have general issues with setting up your server please use our general discussion forum [https://github.com/magicbug/Cloudlog/discussions](https://github.com/magicbug/Cloudlog/discussions).
## Security Vulnerabilities
If you discover a security vulnerability within Cloudlog, please send an e-mail to Peter Goodhall, 2M0SQL via [peter@magicbug.co.uk](mailto:peter@magicbug.co.uk). All security vulnerabilities will be promptly addressed.
## Want Cloudlog Hosting?

7
SECURITY.md 普通文件
查看文件

@ -0,0 +1,7 @@
# Security Policy
## Reporting a Vulnerability
If you discover a security vulnerability within Cloudlog, please send an e-mail to Peter Goodhall, 2M0SQL via [peter@magicbug.co.uk](mailto:peter@magicbug.co.uk).
All security vulnerabilities will be promptly addressed.

查看文件

@ -195,6 +195,14 @@ class Awards extends CI_Controller {
$data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type);
// This is done because we have two different ways to get dxcc info in Cloudlog. Once is using the name (in awards), and the other one is using the ADIF DXCC.
// We replace the values to make it look a bit nicer
if ($type == 'DXCC2') {
$type = 'DXCC';
$dxccname = $this->logbook_model->get_entity($searchphrase);
$searchphrase = $dxccname['name'];
}
// Render Page
$data['page_title'] = "Log View - " . $type;
$data['filter'] = $type . " " . $searchphrase . " and band ".$band . " and mode ".$mode;
@ -274,7 +282,10 @@ class Awards extends CI_Controller {
public function was() {
$this->load->model('was');
$this->load->model('modes');
$data['worked_bands'] = $this->was->get_worked_bands();
$data['modes'] = $this->modes->active(); // Used in the view for mode select
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
@ -297,6 +308,7 @@ class Awards extends CI_Controller {
$postdata['confirmed'] = $this->input->post('confirmed');
$postdata['notworked'] = $this->input->post('notworked');
$postdata['band'] = $this->input->post('band');
$postdata['mode'] = $this->input->post('mode');
}
else { // Setting default values at first load of page
$postdata['lotw'] = 1;
@ -305,10 +317,11 @@ class Awards extends CI_Controller {
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
$postdata['band'] = 'All';
$postdata['mode'] = 'All';
}
$data['was_array'] = $this->was->get_was_array($bands, $postdata);
$data['was_summary'] = $this->was->get_was_summary($bands);
$data['was_summary'] = $this->was->get_was_summary($data['worked_bands']);
// Render Page
$data['page_title'] = "Awards - WAS (Worked All States)";
@ -472,24 +485,23 @@ class Awards extends CI_Controller {
/*
function was_map
This displays the WAS map and requires the $band_type
This displays the WAS map and requires the $band_type and $mode_type
*/
public function was_map($band_type) {
public function was_map($band_type, $mode_type) {
$this->load->model('was');
$data['worked_bands'] = $this->was->get_worked_bands();
$data['mode'] = $mode_type;
$bands[] = $band_type;
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
$postdata['lotw'] = 1;
$postdata['qsl'] = 1;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
$postdata['band'] = $band_type;
$postdata['mode'] = $mode_type;
$data['was_array'] = $this->was->get_was_array($bands, $postdata);

查看文件

@ -35,18 +35,18 @@ class Lookup extends CI_Controller {
$data['bands'] = $this->lookup_model->get_Worked_Bands($station_id);
$queryinfo['type'] = xss_clean($this->input->post('type'));
$queryinfo['dxcc'] = xss_clean($this->input->post('dxcc'));
$queryinfo['was'] = xss_clean($this->input->post('was'));
$queryinfo['sota'] = xss_clean($this->input->post('sota'));
$queryinfo['grid'] = xss_clean($this->input->post('grid'));
$queryinfo['iota'] = xss_clean($this->input->post('iota'));
$queryinfo['cqz'] = xss_clean($this->input->post('cqz'));
$queryinfo['wwff'] = xss_clean($this->input->post('wwff'));
$queryinfo['station_id'] = $station_id;
$queryinfo['bands'] = $data['bands'];
$data['type'] = xss_clean($this->input->post('type'));
$data['dxcc'] = xss_clean($this->input->post('dxcc'));
$data['was'] = xss_clean($this->input->post('was'));
$data['sota'] = xss_clean($this->input->post('sota'));
$data['grid'] = xss_clean($this->input->post('grid'));
$data['iota'] = xss_clean($this->input->post('iota'));
$data['cqz'] = xss_clean($this->input->post('cqz'));
$data['wwff'] = xss_clean($this->input->post('wwff'));
$data['station_id'] = $station_id;
$data['result'] = $this->lookup_model->getSearchResult($data);
$data['result'] = $this->lookup_model->getSearchResult($queryinfo);
$this->load->view('lookup/result', $data);
}

查看文件

@ -149,6 +149,22 @@ class QSLPrint extends CI_Controller {
$data['station_id'] = $station_id;
$this->load->view('qslprint/qslprint', $data);
}
public function open_qso_list() {
$callsign = $this->input->post('callsign');
$this->load->model('qslprint_model');
$data['qsos'] = $this->qslprint_model->open_qso_list($this->security->xss_clean($callsign));
$this->load->view('qslprint/qsolist', $data);
}
public function add_qso_to_print_queue() {
$id = $this->input->post('id');
$this->load->model('qslprint_model');
$this->qslprint_model->add_qso_to_print_queue($this->security->xss_clean($id));
}
}
/* End of file Qslprint.php */

查看文件

@ -1,4 +1,4 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Qra {
@ -13,14 +13,14 @@ class Qra {
* K = Kilometers
* N = Nautical Miles
*/
// Name: qra2latlong
// Task: convert qra to lat/long
function qra2latlong($strQRA)
{
return qra2latlong($strQRA);
}
// calculate the bearing between two squares
function bearing($tx, $rx, $unit = 'M') {
if(strlen($tx) <= 6 && strlen($rx) <= 6) {
@ -28,7 +28,7 @@ class Qra {
$stn = qra2latlong($rx);
$bearing = bearing($my[0], $my[1], $stn[0], $stn[1], $unit);
return $bearing;
}
}
@ -46,7 +46,7 @@ class Qra {
// Feed in Lat Longs plus the unit type
$total_distance = distance($my[0], $my[1], $stn[0], $stn[1], $unit);
// Return the distance
return $total_distance;
}
@ -72,21 +72,10 @@ cos(deg2rad($theta));
}
function bearing($lat1, $lon1, $lat2, $lon2, $unit = 'M') {
if (round($lon1, 1) == round($lon2, 1)) {
if ($lat1 < $lat2) {
$bearing = 0;
} else {
$bearing = 180;
}
} else {
$dist = distance($lat1, $lon1, $lat2, $lon2, $unit);
$arad = acos((sin(deg2rad($lat2)) - sin(deg2rad($lat1)) * cos(deg2rad($dist / 60))) / (sin(deg2rad($dist
/ 60)) * cos(deg2rad($lat1))));
$bearing = $arad * 180 / pi();
if (sin(deg2rad($lon2 - $lon1)) < 0) {
$bearing = 360 - $bearing;
}
}
$dist = distance($lat1, $lon1, $lat2, $lon2, $unit);
$dist = round($dist, 0);
$bearing = get_bearing($lat1, $lon1, $lat2, $lon2);
$dirs = array("N","E","S","W");
@ -99,7 +88,7 @@ function bearing($lat1, $lon1, $lat2, $lon2, $unit = 'M') {
#if ($rounded % 2 == 1)
# $dir = $dirs[round_to_int($rounded/4) % 4] . "-" . $dir;
}
$var_dist = "";
$var_dist = "";
#return $dir;
if (isset($dist)) {
$var_dist = $dist;
@ -118,13 +107,17 @@ $var_dist = "";
return round($bearing, 0)."&#186; ".$dir." ".$var_dist;
}
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-Z]{2}[0-9]{2}[A-Z]{2}$/',$strQRA)) return false;
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');

查看文件

@ -239,7 +239,7 @@ class CQ extends CI_Model{
function getSummaryByBand($band, $station_id) {
$sql = "SELECT count(distinct thcv.col_cqz) as count FROM " . $this->config->item('table_name') . " thcv";
$sql .= " where station_id = " . $station_id;
$sql .= " where station_id = " . $station_id . ' and col_cqz > 0';
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
@ -258,7 +258,7 @@ class CQ extends CI_Model{
function getSummaryByBandConfirmed($band, $station_id){
$sql = "SELECT count(distinct thcv.col_cqz) as count FROM " . $this->config->item('table_name') . " thcv";
$sql .= " where station_id = " . $station_id;
$sql .= " where station_id = " . $station_id . ' and col_cqz > 0';
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";

查看文件

@ -322,7 +322,7 @@ class DXCC extends CI_Model {
from dxcc_entities";
if ($postdata['notworked'] == NULL) {
$sql .= " join (select col_dxcc from ".$this->config->item('table_name')." where station_id = $station_id";
$sql .= " join (select col_dxcc from " . $this->config->item('table_name') . " where station_id = " . $station_id . " and col_dxcc > 0";
if ($postdata['band'] != 'All') {
if ($postdata['band'] == 'SAT') {
@ -377,7 +377,7 @@ class DXCC extends CI_Model {
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
$sql .= " and not exists (select 1 from ".$this->config->item('table_name')." where station_id = $station_id and col_dxcc = thcv.col_dxcc";
$sql .= " and not exists (select 1 from ".$this->config->item('table_name')." where station_id = $station_id and col_dxcc = thcv.col_dxcc and col_dxcc > 0";
if ($postdata['band'] != 'All') {
if ($postdata['band'] == 'SAT') {
@ -530,7 +530,7 @@ class DXCC extends CI_Model {
{
$sql = "SELECT count(distinct thcv.col_dxcc) as count FROM " . $this->config->item('table_name') . " thcv";
$sql .= " where station_id = " . $station_id;
$sql .= " where station_id = " . $station_id . " and col_dxcc > 0";
if ($band == 'SAT') {
@ -561,7 +561,7 @@ class DXCC extends CI_Model {
$sql .= " and thcv.col_band ='" . $band . "'";
}
$sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y')";
$sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y') and col_dxcc > 0";
$query = $this->db->query($sql);

查看文件

@ -244,6 +244,9 @@ class Logbook_model extends CI_Model {
case 'DXCC':
$this->db->where('COL_COUNTRY', $searchphrase);
break;
case 'DXCC2':
$this->db->where('COL_DXCC', $searchphrase);
break;
case 'IOTA':
$this->db->where('COL_IOTA', $searchphrase);
break;
@ -257,6 +260,13 @@ class Logbook_model extends CI_Model {
$this->db->where('COL_STATE', $searchphrase);
$this->db->where_in('COL_DXCC', ['291', '6', '110']);
break;
case 'SOTA':
$this->db->where('COL_SOTA_REF', $searchphrase);
break;
case 'WWFF':
$this->db->where('COL_SIG', 'WWFF');
$this->db->where('COL_SIG_INFO', $searchphrase);
break;
}
$this->db->where('station_id', $station_id);
@ -2099,7 +2109,14 @@ class Logbook_model extends CI_Model {
if (preg_match('/(^KG4)[A-Z09]{3,}/', $call)) { // KG4/ and KG4 5 char calls are Guantanamo Bay. If 6 char, it is USA
$call = "K";
}
} elseif (preg_match_all('/^((\d|[A-Z])+\/)?((\d|[A-Z]){3,})(\/(\d|[A-Z])+)?(\/(\d|[A-Z])+)?$/', $call, $matches)) {
if ($matches[5][0] == '/MM') {
$row['adif'] = 0;
$row['entity'] = 'None';
$row['cqz'] = 0;
return array($row['adif'], $row['entity'], $row['cqz']);
}
}
$len = strlen($call);
@ -2144,7 +2161,16 @@ class Logbook_model extends CI_Model {
if (preg_match('/(^KG4)[A-Z09]{3,}/', $call)) { // KG4/ and KG4 5 char calls are Guantanamo Bay. If 6 char, it is USA
$call = "K";
}
} elseif (preg_match_all('/^((\d|[A-Z])+\/)?((\d|[A-Z]){3,})(\/(\d|[A-Z])+)?(\/(\d|[A-Z])+)?$/', $call, $matches)) {
if ($matches[5][0] == '/MM') {
$row['adif'] = 0;
$row['entity'] = 'None';
$row['cqz'] = 0;
$row['long'] = '0';
$row['lat'] = '0';
return $row;
}
}
$len = strlen($call);

查看文件

@ -63,6 +63,28 @@ class Qslprint_model extends CI_Model {
return true;
}
function add_qso_to_print_queue($id) {
$data = array(
'COL_QSL_SENT' => "R",
);
$this->db->where("COL_PRIMARY_KEY", $id);
$this->db->update($this->config->item('table_name'), $data);
return true;
}
function open_qso_list($callsign) {
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
$this->db->where('COL_CALL like "%'.$callsign.'%"');
$this->db->where('coalesce(COL_QSL_SENT, "") not in ("R", "Q")');
$this->db->order_by("COL_TIME_ON", "ASC");
$query = $this->db->get($this->config->item('table_name'));
return $query;
}
}
?>

查看文件

@ -87,14 +87,14 @@ class was extends CI_Model {
if ($postdata['worked'] != NULL) {
$wasBand = $this->getWasWorked($station_id, $band, $postdata);
foreach ($wasBand as $line) {
$bandWas[$line->col_state][$band] = '<div class="alert-danger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","WAS")\'>W</a></div>';
$bandWas[$line->col_state][$band] = '<div class="alert-danger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","'. $postdata['mode'] . '","WAS")\'>W</a></div>';
$states[$line->col_state]['count']++;
}
}
if ($postdata['confirmed'] != NULL) {
$wasBand = $this->getWasConfirmed($station_id, $band, $postdata);
foreach ($wasBand as $line) {
$bandWas[$line->col_state][$band] = '<div class="alert-success"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","WAS")\'>C</a></div>';
$bandWas[$line->col_state][$band] = '<div class="alert-success"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","'. $postdata['mode'] . '","WAS")\'>C</a></div>';
$states[$line->col_state]['count']++;
}
}
@ -211,6 +211,10 @@ class was extends CI_Model {
$sql = "SELECT distinct col_state FROM " . $this->config->item('table_name') . " thcv
where station_id = " . $station_id;
if ($postdata['mode'] != 'All') {
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
$sql .= $this->addStateToQuery();
$sql .= $this->addBandToQuery($band);
@ -219,6 +223,10 @@ class was extends CI_Model {
" where station_id = ". $station_id .
" and col_state = thcv.col_state";
if ($postdata['mode'] != 'All') {
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
$sql .= $this->addBandToQuery($band);
$sql .= $this->addQslToQuery($postdata);
@ -240,6 +248,10 @@ class was extends CI_Model {
$sql = "SELECT distinct col_state FROM " . $this->config->item('table_name') . " thcv
where station_id = " . $station_id;
if ($postdata['mode'] != 'All') {
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
}
$sql .= $this->addStateToQuery();
$sql .= $this->addBandToQuery($band);

查看文件

@ -5,7 +5,6 @@
<form class="form" action="<?php echo site_url('awards/was'); ?>" method="post" enctype="multipart/form-data">
<fieldset>
<!-- Multiple Checkboxes (inline) -->
<div class="form-group row">
<div class="col-md-2" for="checkboxes">Worked / Confirmed</div>
<div class="col-md-10">
@ -38,11 +37,10 @@
</div>
</div>
<!-- Select Basic -->
<div class="form-group row">
<label class="col-md-2 control-label" for="band">Band</label>
<div class="col-md-2">
<select id="band2" name="band" class="form-control">
<select id="band2" name="band" class="form-control custom-select-sm">
<option value="All" <?php if ($this->input->post('band') == "All" || $this->input->method() !== 'post') echo ' selected'; ?> >Every band</option>
<?php foreach($worked_bands as $band) {
echo '<option value="' . $band . '"';
@ -53,13 +51,34 @@
</div>
</div>
<!-- Button (Double) -->
<div class="form-group row">
<label class="col-md-2 control-label" for="mode">Mode</label>
<div class="col-md-2">
<select id="mode" name="mode" class="form-control custom-select-sm">
<option value="All" <?php if ($this->input->post('mode') == "All" || $this->input->method() !== 'mode') echo ' selected'; ?>>All</option>
<?php
foreach($modes->result() as $mode){
if ($mode->submode == null) {
echo '<option value="' . $mode->mode . '"';
if ($this->input->post('mode') == $mode->mode) echo ' selected';
echo '>'. $mode->mode . '</option>'."\n";
} else {
echo '<option value="' . $mode->submode . '"';
if ($this->input->post('mode') == $mode->submode) echo ' selected';
echo '>' . $mode->submode . '</option>'."\n";
}
}
?>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label" for="button1id"></label>
<div class="col-md-10">
<button id="button2id" type="reset" name="button2id" class="btn btn-warning">Reset</button>
<button id="button1id" type="submit" name="button1id" class="btn btn-primary">Show</button>
<button type="button" onclick="load_was_map();" class="btn btn-info"><i class="fas fa-globe-americas"></i> Show WAS Map</button>
<button id="button2id" type="reset" name="button2id" class="btn btn-sm btn-warning">Reset</button>
<button id="button1id" type="submit" name="button1id" class="btn btn-sm btn-primary">Show</button>
<button type="button" onclick="load_was_map();" class="btn btn-info btn-sm"><i class="fas fa-globe-americas"></i> Show WAS Map</button>
</div>
</div>
@ -99,7 +118,7 @@
<thead>
<tr><td></td>';
foreach($bands as $band) {
foreach($worked_bands as $band) {
echo '<td>' . $band . '</td>';
}
echo '<td>Total</td></tr>

查看文件

@ -135,7 +135,7 @@
'click' : function(event, data) {
displayContacts(data.name,$('#band2').val(), 'All', 'WAS');
displayContacts(data.name,$('#band2').val(), $('#mode').val(), 'WAS');
}
});

查看文件

@ -23,9 +23,9 @@
function load_was_map() {
BootstrapDialog.show({
title: 'Worked All States Map ('+$('#band2').val()+')',
title: 'Worked All States Map ('+$('#band2').val()+' '+$('#mode').val()+')',
cssClass: 'was-map-dialog',
message: $('<div></div>').load(site_url + '/awards/was_map/' + $('#band2').val())
message: $('<div></div>').load(site_url + '/awards/was_map/' + $('#band2').val() + '/' + $('#mode').val())
});
}
@ -2041,13 +2041,58 @@ function deleteQsl(id) {
type: 'post',
data: {'id': id },
success: function(html) {
location.reload();
$("#qslprint_"+id).remove();
}
});
}
});
}
function openQsoList(callsign) {
$.ajax({
url: base_url + 'index.php/qslprint/open_qso_list',
type: 'post',
data: {'callsign': callsign},
success: function(html) {
BootstrapDialog.show({
title: 'QSO List',
size: BootstrapDialog.SIZE_WIDE,
cssClass: 'qso-dialog',
nl2br: false,
message: html,
buttons: [{
label: 'Close',
action: function (dialogItself) {
dialogItself.close();
}
}]
});
}
});
}
function addQsoToPrintQueue(id) {
$.ajax({
url: base_url + 'index.php/qslprint/add_qso_to_print_queue',
type: 'post',
data: {'id': id},
success: function(html) {
var line = '<tr id="qslprint_'+id+'">';
line += '<td style=\'text-align: center\'>'+$("#qsolist_"+id).find("td:eq(0)").text()+'</td>';
line += '<td style=\'text-align: center\'>'+$("#qsolist_"+id).find("td:eq(1)").text()+'</td>';
line += '<td style=\'text-align: center\'>'+$("#qsolist_"+id).find("td:eq(2)").text()+'</td>';
line += '<td style=\'text-align: center\'>'+$("#qsolist_"+id).find("td:eq(3)").text()+'</td>';
line += '<td style=\'text-align: center\'>'+$("#qsolist_"+id).find("td:eq(4)").text()+'</td>';
line += '<td style=\'text-align: center\'><span class="badge badge-light">'+$("#qsolist_"+id).find("td:eq(5)").text()+'</span></td>';
line += '<td style=\'text-align: center\'><button onclick="deleteFromQslQueue('+id+')" class="btn btn-sm btn-danger">Delete from queue</button></td></td>';
line += '<td style=\'text-align: center\'><button onclick="openQsoList(\''+$("#qsolist_"+id).find("td:eq(0)").text()+'\')" class="btn btn-sm btn-success">Open QSO list</button></td>';
line += '</tr>';
$('.table tr:last').after(line);
$("#qsolist_"+id).remove();''
}
});
}
$(".station_id").change(function(){
var station_id = $(".station_id").val();
$.ajax({

查看文件

@ -12,17 +12,33 @@ echo '
<tbody>';
foreach ($result as $mode => $value) {
echo '<tr>
<td>'. strtoupper($mode) .'</td>';
foreach ($value as $key) {
if ($key == 'W') {
echo '<td><div class=\'alert-danger\'>' . $key . '</div></td>';
<td>'. strtoupper($mode) .'</td>';
foreach ($value as $key => $val) {
switch($type) {
case 'dxcc': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $dxcc).'","' . $key . '","' . $mode . '","DXCC2")\'>' . $val . '</a>'; break;
case 'iota': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $iota).'","' . $key . '","' . $mode . '","IOTA")\'>' . $val . '</a>'; break;
case 'grid': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $grid).'","' . $key . '","' . $mode . '","VUCC")\'>' . $val . '</a>'; break;
case 'cqz': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $cqz).'","' . $key . '","' . $mode . '","CQZone")\'>' . $val . '</a>'; break;
case 'was': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $was).'","' . $key . '","' . $mode . '","WAS")\'>' . $val . '</a>'; break;
case 'sota': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $sota).'","' . $key . '","' . $mode . '","SOTA")\'>' . $val . '</a>'; break;
case 'wwff': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $wwff).'","' . $key . '","' . $mode . '","WWFF")\'>' . $val . '</a>'; break;
}
else if ($key == 'C') {
echo '<td><div class=\'alert-success\'>' . $key . '</div></td>';
$info = '<td>';
if ($val == 'W') {
$info .= '<div class=\'alert-danger\'>' . $linkinfo . '</div>';
}
else if ($val == 'C') {
$info .= '<div class=\'alert-success\'>' . $linkinfo . '</div>';
}
else {
echo '<td>' . $key . '</td>';
$info .= $val;
}
$info .= '</td>';
echo $info;
}
echo '</tr>';
}

查看文件

@ -42,6 +42,7 @@
<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\'></th>
</tr>
</thead><tbody>';
@ -55,14 +56,15 @@
}
foreach ($qsos->result() as $qsl) {
echo '<tr>';
echo '<tr id="qslprint_'.$qsl->COL_PRIMARY_KEY.'">';
echo '<td style=\'text-align: center\'>' . $qsl->COL_CALL . '</td>';
echo '<td style=\'text-align: center\'>'; $timestamp = strtotime($qsl->COL_TIME_ON); echo date($custom_date_format, $timestamp); echo '</td>';
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\'><span class="badge badge-light">' . $qsl->station_callsign . '</span></td>';
echo '<td id="'.$qsl->COL_PRIMARY_KEY.'" 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="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>';
echo '</tr>';
}

查看文件

@ -10,6 +10,7 @@ if ($qsos->result() != NULL) {
<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\'></th>
</tr>
</thead><tbody>';
@ -23,14 +24,15 @@ if ($qsos->result() != NULL) {
}
foreach ($qsos->result() as $qsl) {
echo '<tr>';
echo '<tr id="qslprint_'.$qsl->COL_PRIMARY_KEY.'">';
echo '<td style=\'text-align: center\'>' . $qsl->COL_CALL . '</td>';
echo '<td style=\'text-align: center\'>'; $timestamp = strtotime($qsl->COL_TIME_ON); echo date($custom_date_format, $timestamp); echo '</td>';
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\'><span class="badge badge-light">' . $qsl->station_callsign . '</span></td>';
echo '<td id="'.$qsl->COL_PRIMARY_KEY.'" 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="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>';
echo '</tr>';
}

查看文件

@ -0,0 +1,44 @@
<?php
if ($qsos->result() != NULL) {
echo '<table style="width:100%" class="qsolist table-sm table-bordered table-hover table-striped table-condensed">
<thead>
<tr>
<th style=\'text-align: center\'>'.$this->lang->line('gen_hamradio_callsign').'</th>
<th style=\'text-align: center\'>' . $this->lang->line('general_word_date') . '</th>
<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_station') . '</th>
<th style=\'text-align: center\'></th>
</tr>
</thead><tbody>';
// 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');
}
foreach ($qsos->result() as $qsl) {
echo '<tr id ="qsolist_'.$qsl->COL_PRIMARY_KEY.'">';
echo '<td style=\'text-align: center\'>' . $qsl->COL_CALL . '</td>';
echo '<td style=\'text-align: center\'>'; $timestamp = strtotime($qsl->COL_TIME_ON); echo date($custom_date_format, $timestamp); echo '</td>';
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\'><span class="badge badge-light">' . $qsl->station_callsign . '</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>';
}
echo '</tbody></table>';
?>
<?php
} else {
echo '<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>No additional QSO\'s were found. That means they are probably already in the queue.</div>';
}
?>

查看文件

@ -264,7 +264,7 @@
<div class="form-group col-sm-6">
<label for="dxcc_id">DXCC</label>
<select class="custom-select" id="dxcc_id" name="dxcc_id" required>
<option value="0">None</option>
<?php
foreach($dxcc as $d){
echo '<option value=' . $d->adif;

查看文件

@ -245,7 +245,7 @@
<div class="form-group">
<label for="dxcc_id"><?php echo $this->lang->line('gen_hamradio_dxcc'); ?></label>
<select class="custom-select" id="dxcc_id" name="dxcc_id" required>
<option value="0">None</option>
<?php
foreach($dxcc as $d){
echo '<option value=' . $d->adif . '>' . $d->prefix . ' - ' . ucwords(strtolower(($d->name))) . '</option>';
@ -258,7 +258,7 @@
<label for="cqz"><?php echo $this->lang->line('gen_hamradio_cq_zone'); ?></label>
<select class="custom-select" id="cqz" name="cqz" required>
<?php
for ($i = 1; $i<=40; $i++) {
for ($i = 0; $i<=40; $i++) {
echo '<option value="'. $i . '">'. $i .'</option>';
}
?>

查看文件

@ -44,6 +44,7 @@
<label for="stationDXCCInput">Station DXCC</label>
<?php if ($dxcc_list->num_rows() > 0) { ?>
<select class="form-control" id="dxcc_select" name="dxcc" aria-describedby="stationCallsignInputHelp">
<option value="0" selected>NONE</option>
<?php foreach ($dxcc_list->result() as $dxcc) { ?>
<option value="<?php echo $dxcc->adif; ?>"><?php echo $dxcc->name; ?></option>
<?php } ?>

查看文件

@ -55,6 +55,7 @@
<label for="stationDXCCInput">Station DXCC</label>
<?php if ($dxcc_list->num_rows() > 0) { ?>
<select class="form-control" id="dxcc_select" name="dxcc" aria-describedby="stationCallsignInputHelp">
<option value="0" <?php if($my_station_profile->station_dxcc == "0") { ?>selected<?php } ?>>NONE</option>
<?php foreach ($dxcc_list->result() as $dxcc) { ?>
<option value="<?php echo $dxcc->adif; ?>" <?php if($my_station_profile->station_dxcc == $dxcc->adif) { ?>selected<?php } ?>><?php echo $dxcc->name; ?></option>
<?php } ?>

查看文件

@ -10,7 +10,7 @@
# The user and group that own the CLOUDLOG_SUBDIR directories. Passed to 'chown' as-is.
DIR_OWNERSHIP="root:www-data"
# The list of directories that need to have ownership restored after a git pull
declare -a CLOUDLOG_SUBDIRS=("application/config" "assets/qslcard" "backup" "updates" "uploads")
declare -a CLOUDLOG_SUBDIRS=("application/config" "assets" "backup" "updates" "uploads")
# The name of the Git remote to fetch/pull from
GIT_REMOTE="origin"
# If true, pull from the HEAD of the configured origin, otherwise the latest tag