比较提交
2 提交
master
...
copilot/fi
| 作者 | SHA1 | 提交日期 | |
|---|---|---|---|
|
|
082044245d | ||
|
|
287b817568 |
共有 55 个文件被更改,包括 12397 次插入 和 1161 次删除
|
|
@ -198,9 +198,6 @@ case 'finnish':
|
|||
case 'russian':
|
||||
$config['language'] = $lang;
|
||||
break;
|
||||
case 'portuguese':
|
||||
$config['language'] = $lang;
|
||||
break;
|
||||
case 'english':
|
||||
$config['language'] = $lang;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
|||
|
|
||||
*/
|
||||
|
||||
$config['migration_version'] = 210;
|
||||
$config['migration_version'] = 207;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class adif extends CI_Controller
|
||||
{
|
||||
class adif extends CI_Controller {
|
||||
|
||||
/* Controls ADIF Import/Export Functions */
|
||||
|
||||
|
|
@ -11,15 +10,11 @@ class adif extends CI_Controller
|
|||
$this->load->helper(array('form', 'url'));
|
||||
|
||||
$this->load->model('user_model');
|
||||
if (!$this->user_model->authorize(2)) {
|
||||
$this->session->set_flashdata('notice', 'You\'re not allowed to do that!');
|
||||
redirect('dashboard');
|
||||
}
|
||||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
}
|
||||
|
||||
/* Shows Export Views */
|
||||
public function export()
|
||||
{
|
||||
public function export() {
|
||||
|
||||
$data['page_title'] = "ADIF Export";
|
||||
|
||||
|
|
@ -70,8 +65,7 @@ class adif extends CI_Controller
|
|||
$this->load->view('adif/data/exportsat', $data);
|
||||
}
|
||||
|
||||
public function export_custom()
|
||||
{
|
||||
public function export_custom() {
|
||||
// Set memory limit to unlimited to allow heavy usage
|
||||
ini_set('memory_limit', '-1');
|
||||
|
||||
|
|
@ -93,14 +87,14 @@ class adif extends CI_Controller
|
|||
|
||||
|
||||
if ($this->input->post('markLotw') == 1) {
|
||||
foreach ($data['qsos']->result() as $qso) {
|
||||
foreach ($data['qsos']->result() as $qso)
|
||||
{
|
||||
$this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function mark_lotw()
|
||||
{
|
||||
public function mark_lotw() {
|
||||
// Set memory limit to unlimited to allow heavy usage
|
||||
ini_set('memory_limit', '-1');
|
||||
|
||||
|
|
@ -109,7 +103,8 @@ class adif extends CI_Controller
|
|||
|
||||
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id);
|
||||
|
||||
foreach ($data['qsos']->result() as $qso) {
|
||||
foreach ($data['qsos']->result() as $qso)
|
||||
{
|
||||
$this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY);
|
||||
}
|
||||
|
||||
|
|
@ -127,13 +122,13 @@ class adif extends CI_Controller
|
|||
|
||||
$this->load->view('adif/data/exportall', $data);
|
||||
|
||||
foreach ($data['qsos']->result() as $qso) {
|
||||
foreach ($data['qsos']->result() as $qso)
|
||||
{
|
||||
$this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY);
|
||||
}
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
public function index() {
|
||||
$this->load->model('stations');
|
||||
|
||||
$data['page_title'] = "ADIF Import / Export";
|
||||
|
|
@ -150,11 +145,10 @@ class adif extends CI_Controller
|
|||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
public function import()
|
||||
{
|
||||
public function import() {
|
||||
$this->load->model('stations');
|
||||
$data['station_profile'] = $this->stations->all_of_user();
|
||||
log_message("debug", "Started ADIF Import");
|
||||
log_message("debug","Started ADIF Import");
|
||||
|
||||
$active_station_id = $this->stations->find_active();
|
||||
$station_profile = $this->stations->profile($active_station_id);
|
||||
|
|
@ -169,7 +163,7 @@ class adif extends CI_Controller
|
|||
|
||||
$this->load->library('upload', $config);
|
||||
|
||||
if (! $this->upload->do_upload()) {
|
||||
if ( ! $this->upload->do_upload()) {
|
||||
$data['error'] = $this->upload->display_errors();
|
||||
|
||||
$data['max_upload'] = ini_get('upload_max_filesize');
|
||||
|
|
@ -187,38 +181,39 @@ class adif extends CI_Controller
|
|||
|
||||
$this->load->library('adif_parser');
|
||||
|
||||
$this->adif_parser->load_from_file('./uploads/' . $data['upload_data']['file_name']);
|
||||
unlink('./uploads/' . $data['upload_data']['file_name']);
|
||||
$data['upload_data'] = ''; // free memory
|
||||
$this->adif_parser->load_from_file('./uploads/'.$data['upload_data']['file_name']);
|
||||
unlink('./uploads/'.$data['upload_data']['file_name']);
|
||||
$data['upload_data']=''; // free memory
|
||||
|
||||
$this->adif_parser->initialize();
|
||||
$custom_errors = "";
|
||||
$alladif = [];
|
||||
while ($record = $this->adif_parser->get_record()) {
|
||||
if (count($record) == 0) {
|
||||
$alladif=[];
|
||||
while($record = $this->adif_parser->get_record())
|
||||
{
|
||||
if(count($record) == 0) {
|
||||
break;
|
||||
};
|
||||
array_push($alladif, $record);
|
||||
array_push($alladif,$record);
|
||||
};
|
||||
$record = ''; // free memory
|
||||
$custom_errors = $this->logbook_model->import_bulk($alladif, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'), $this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName'), false, $this->input->post('skipStationCheck'));
|
||||
$record=''; // free memory
|
||||
$custom_errors = $this->logbook_model->import_bulk($alladif, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName'), false, $this->input->post('skipStationCheck'));
|
||||
} else {
|
||||
$custom_errors = 'Station Profile not valid for User';
|
||||
$custom_errors='Station Profile not valid for User';
|
||||
}
|
||||
|
||||
$data['adif_errors'] = $custom_errors;
|
||||
$data['skip_dupes'] = $this->input->post('skipDuplicate');
|
||||
|
||||
log_message("debug", "Finished ADIF Import");
|
||||
log_message("debug","Finished ADIF Import");
|
||||
$data['page_title'] = "ADIF Imported";
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('adif/import_success');
|
||||
$this->load->view('interface_assets/footer');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function dcl()
|
||||
{
|
||||
public function dcl() {
|
||||
$this->load->model('stations');
|
||||
$data['station_profile'] = $this->stations->all_of_user();
|
||||
|
||||
|
|
@ -230,7 +225,7 @@ class adif extends CI_Controller
|
|||
|
||||
$this->load->library('upload', $config);
|
||||
|
||||
if (! $this->upload->do_upload()) {
|
||||
if ( ! $this->upload->do_upload()) {
|
||||
$data['error'] = $this->upload->display_errors();
|
||||
|
||||
$data['max_upload'] = ini_get('upload_max_filesize');
|
||||
|
|
@ -248,13 +243,14 @@ class adif extends CI_Controller
|
|||
|
||||
$this->load->library('adif_parser');
|
||||
|
||||
$this->adif_parser->load_from_file('./uploads/' . $data['upload_data']['file_name']);
|
||||
$this->adif_parser->load_from_file('./uploads/'.$data['upload_data']['file_name']);
|
||||
|
||||
$this->adif_parser->initialize();
|
||||
$error_count = array(0, 0, 0);
|
||||
$custom_errors = "";
|
||||
while ($record = $this->adif_parser->get_record()) {
|
||||
if (count($record) == 0) {
|
||||
while($record = $this->adif_parser->get_record())
|
||||
{
|
||||
if(count($record) == 0) {
|
||||
break;
|
||||
};
|
||||
|
||||
|
|
@ -274,7 +270,7 @@ class adif extends CI_Controller
|
|||
}
|
||||
}
|
||||
};
|
||||
unlink('./uploads/' . $data['upload_data']['file_name']);
|
||||
unlink('./uploads/'.$data['upload_data']['file_name']);
|
||||
$data['dcl_error_count'] = $error_count;
|
||||
$data['dcl_errors'] = $custom_errors;
|
||||
$data['page_title'] = "DCL Data Imported";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class API extends CI_Controller
|
||||
{
|
||||
class API extends CI_Controller {
|
||||
|
||||
// Do absolutely nothing
|
||||
function index()
|
||||
|
|
@ -15,7 +14,7 @@ class API extends CI_Controller
|
|||
|
||||
// Check if users logged in
|
||||
|
||||
if ($this->user_model->validate_session() == 0) {
|
||||
if($this->user_model->validate_session() == 0) {
|
||||
// user is not logged in
|
||||
redirect('user/login');
|
||||
}
|
||||
|
|
@ -32,13 +31,12 @@ class API extends CI_Controller
|
|||
}
|
||||
|
||||
|
||||
function edit($key)
|
||||
{
|
||||
function edit($key) {
|
||||
$this->load->model('user_model');
|
||||
|
||||
// Check if users logged in
|
||||
|
||||
if ($this->user_model->validate_session() == 0) {
|
||||
if($this->user_model->validate_session() == 0) {
|
||||
// user is not logged in
|
||||
redirect('user/login');
|
||||
}
|
||||
|
|
@ -54,30 +52,33 @@ class API extends CI_Controller
|
|||
|
||||
$data['api_info'] = $this->api_model->key_description($key);
|
||||
|
||||
if ($this->form_validation->run() == FALSE) {
|
||||
if ($this->form_validation->run() == FALSE)
|
||||
{
|
||||
$data['page_title'] = "Edit API Description";
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('api/description');
|
||||
$this->load->view('interface_assets/footer');
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// Success!
|
||||
|
||||
$this->api_model->update_key_description($this->input->post('api_key'), $this->input->post('api_desc'));
|
||||
|
||||
$this->session->set_flashdata('notice', 'API Key <b>' . $this->input->post('api_key') . "</b> description has been updated.");
|
||||
$this->session->set_flashdata('notice', 'API Key <b>'.$this->input->post('api_key')."</b> description has been updated.");
|
||||
|
||||
redirect('api/help');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function generate($rights)
|
||||
{
|
||||
function generate($rights) {
|
||||
$this->load->model('user_model');
|
||||
|
||||
// Check if users logged in
|
||||
|
||||
if ($this->user_model->validate_session() == 0) {
|
||||
if($this->user_model->validate_session() == 0) {
|
||||
// user is not logged in
|
||||
redirect('user/login');
|
||||
}
|
||||
|
|
@ -90,13 +91,12 @@ class API extends CI_Controller
|
|||
redirect('api/help');
|
||||
}
|
||||
|
||||
function delete($key)
|
||||
{
|
||||
function delete($key) {
|
||||
$this->load->model('user_model');
|
||||
|
||||
// Check if users logged in
|
||||
|
||||
if ($this->user_model->validate_session() == 0) {
|
||||
if($this->user_model->validate_session() == 0) {
|
||||
// user is not logged in
|
||||
redirect('user/login');
|
||||
}
|
||||
|
|
@ -106,33 +106,31 @@ class API extends CI_Controller
|
|||
|
||||
$this->api_model->delete_key($key);
|
||||
|
||||
$this->session->set_flashdata('notice', 'API Key <b>' . $key . "</b> has been deleted");
|
||||
$this->session->set_flashdata('notice', 'API Key <b>'.$key."</b> has been deleted");
|
||||
|
||||
redirect('api/help');
|
||||
}
|
||||
|
||||
// Example of authing
|
||||
function auth($key)
|
||||
{
|
||||
function auth($key) {
|
||||
$this->load->model('api_model');
|
||||
header("Content-type: text/xml");
|
||||
if ($this->api_model->access($key) == "No Key Found" || $this->api_model->access($key) == "Key Disabled") {
|
||||
if($this->api_model->access($key) == "No Key Found" || $this->api_model->access($key) == "Key Disabled") {
|
||||
echo "<auth>";
|
||||
echo "<message>Key Invalid - either not found or disabled</message>";
|
||||
echo "</auth>";
|
||||
} else {
|
||||
echo "<auth>";
|
||||
echo "<status>Valid</status>";
|
||||
echo "<rights>" . $this->api_model->access($key) . "</rights>";
|
||||
echo "<rights>".$this->api_model->access($key)."</rights>";
|
||||
echo "</auth>";
|
||||
}
|
||||
}
|
||||
|
||||
function check_auth($key)
|
||||
{
|
||||
function check_auth($key) {
|
||||
$this->load->model('api_model');
|
||||
header("Content-type: text/xml");
|
||||
if ($this->api_model->access($key) == "No Key Found" || $this->api_model->access($key) == "Key Disabled") {
|
||||
if($this->api_model->access($key) == "No Key Found" || $this->api_model->access($key) == "Key Disabled") {
|
||||
// set the content type as json
|
||||
header("Content-type: application/json");
|
||||
|
||||
|
|
@ -152,22 +150,21 @@ class API extends CI_Controller
|
|||
}
|
||||
}
|
||||
|
||||
function station_info($key)
|
||||
{
|
||||
function station_info($key) {
|
||||
$this->load->model('api_model');
|
||||
$this->load->model('stations');
|
||||
header("Content-type: application/json");
|
||||
if (substr($this->api_model->access($key), 0, 1) == 'r') { /* Checkpermission for _r_eading */
|
||||
if(substr($this->api_model->access($key),0,1) == 'r') { /* Checkpermission for _r_eading */
|
||||
$this->api_model->update_last_used($key);
|
||||
$userid = $this->api_model->key_userid($key);
|
||||
$station_ids = array();
|
||||
$stations = $this->stations->all_of_user($userid);
|
||||
$stations=$this->stations->all_of_user($userid);
|
||||
foreach ($stations->result() as $row) {
|
||||
$result['station_id'] = $row->station_id;
|
||||
$result['station_profile_name'] = $row->station_profile_name;
|
||||
$result['station_gridsquare'] = $row->station_gridsquare;
|
||||
$result['station_callsign'] = $row->station_callsign;;
|
||||
$result['station_active'] = $row->station_active;
|
||||
$result['station_id']=$row->station_id;
|
||||
$result['station_profile_name']=$row->station_profile_name;
|
||||
$result['station_gridsquare']=$row->station_gridsquare;
|
||||
$result['station_callsign']=$row->station_callsign;;
|
||||
$result['station_active']=$row->station_active;
|
||||
array_push($station_ids, $result);
|
||||
}
|
||||
echo json_encode($station_ids);
|
||||
|
|
@ -183,8 +180,7 @@ class API extends CI_Controller
|
|||
* Function: QSO
|
||||
* Task: allows passing of ADIF data to Cloudlog
|
||||
*/
|
||||
function qso()
|
||||
{
|
||||
function qso() {
|
||||
header('Content-type: application/json');
|
||||
|
||||
$this->load->model('api_model');
|
||||
|
|
@ -206,7 +202,7 @@ class API extends CI_Controller
|
|||
}
|
||||
}
|
||||
|
||||
if (!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
|
||||
if(!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['status' => 'failed', 'reason' => "missing api key"]);
|
||||
die();
|
||||
|
|
@ -214,13 +210,13 @@ class API extends CI_Controller
|
|||
|
||||
$userid = $this->api_model->key_userid($obj['key']);
|
||||
|
||||
if (!isset($obj['station_profile_id']) || $this->stations->check_station_against_user($obj['station_profile_id'], $userid) == false) {
|
||||
if(!isset($obj['station_profile_id']) || $this->stations->check_station_against_user($obj['station_profile_id'], $userid) == false) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['status' => 'failed', 'reason' => "station id does not belong to the API key owner."]);
|
||||
die();
|
||||
}
|
||||
|
||||
if ($obj['type'] == "adif" && $obj['string'] != "") {
|
||||
if($obj['type'] == "adif" && $obj['string'] != "") {
|
||||
// Load the logbook model for adding QSO records
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
|
|
@ -231,20 +227,22 @@ class API extends CI_Controller
|
|||
$this->adif_parser->feed($obj['string']);
|
||||
|
||||
// Create QSO Record
|
||||
while ($record = $this->adif_parser->get_record()) {
|
||||
if (count($record) == 0) {
|
||||
while($record = $this->adif_parser->get_record())
|
||||
{
|
||||
if(count($record) == 0)
|
||||
{
|
||||
break;
|
||||
};
|
||||
|
||||
|
||||
if (isset($obj['station_profile_id'])) {
|
||||
if (isset($record['station_callsign']) && $this->stations->check_station_against_callsign($obj['station_profile_id'], $record['station_callsign']) == false) {
|
||||
if(isset($obj['station_profile_id'])) {
|
||||
if(isset($record['station_callsign']) && $this->stations->check_station_against_callsign($obj['station_profile_id'], $record['station_callsign']) == false) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['status' => 'failed', 'reason' => "station callsign does not match station callsign in station profile."]);
|
||||
die();
|
||||
}
|
||||
|
||||
if (!(isset($record['call'])) || (trim($record['call']) == '')) {
|
||||
if(!(isset($record['call'])) || (trim($record['call']) == '')) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['status' => 'failed', 'reason' => "QSO Call is empty."]);
|
||||
die();
|
||||
|
|
@ -254,21 +252,23 @@ class API extends CI_Controller
|
|||
|
||||
$msg = $this->logbook_model->import($record, $obj['station_profile_id'], NULL, NULL, NULL, NULL, NULL, NULL, false, false, true);
|
||||
|
||||
if ($msg == "") {
|
||||
if ( $msg == "" ) {
|
||||
$return_count++;
|
||||
} else {
|
||||
$return_msg[] = $msg;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
http_response_code(201);
|
||||
echo json_encode(['status' => 'created', 'type' => $obj['type'], 'string' => $obj['string'], 'imported_count' => $return_count, 'messages' => $return_msg]);
|
||||
echo json_encode(['status' => 'created', 'type' => $obj['type'], 'string' => $obj['string'], 'imported_count' => $return_count, 'messages' => $return_msg ]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// API function to check if a callsign is in the logbook already
|
||||
function logbook_check_callsign()
|
||||
{
|
||||
function logbook_check_callsign() {
|
||||
header('Content-type: application/json');
|
||||
|
||||
$this->load->model('api_model');
|
||||
|
|
@ -280,25 +280,25 @@ class API extends CI_Controller
|
|||
return;
|
||||
}
|
||||
|
||||
if (!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
|
||||
if(!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['status' => 'failed', 'reason' => "missing api key"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isset($obj['logbook_public_slug']) || !isset($obj['callsign'])) {
|
||||
if(!isset($obj['logbook_public_slug']) || !isset($obj['callsign'])) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['status' => 'failed', 'reason' => "missing fields"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($obj['logbook_public_slug'] != "" && $obj['callsign'] != "") {
|
||||
if($obj['logbook_public_slug'] != "" && $obj['callsign'] != "") {
|
||||
|
||||
$logbook_slug = $obj['logbook_public_slug'];
|
||||
$callsign = $obj['callsign'];
|
||||
|
||||
// If $obj['band'] exists
|
||||
if (isset($obj['band'])) {
|
||||
if(isset($obj['band'])) {
|
||||
$band = $obj['band'];
|
||||
} else {
|
||||
$band = null;
|
||||
|
|
@ -306,9 +306,10 @@ class API extends CI_Controller
|
|||
|
||||
$this->load->model('logbooks_model');
|
||||
|
||||
if ($this->logbooks_model->public_slug_exists($logbook_slug)) {
|
||||
if($this->logbooks_model->public_slug_exists($logbook_slug)) {
|
||||
$logbook_id = $this->logbooks_model->public_slug_exists_logbook_id($logbook_slug);
|
||||
if ($logbook_id != false) {
|
||||
if($logbook_id != false)
|
||||
{
|
||||
// Get associated station locations for mysql queries
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id);
|
||||
|
||||
|
|
@ -321,7 +322,7 @@ class API extends CI_Controller
|
|||
} else {
|
||||
// Logbook not found
|
||||
http_response_code(404);
|
||||
echo json_encode(['status' => 'failed', 'reason' => $logbook_slug . " has no associated station locations"]);
|
||||
echo json_encode(['status' => 'failed', 'reason' => $logbook_slug." has no associated station locations"]);
|
||||
die();
|
||||
}
|
||||
// Search Logbook for callsign
|
||||
|
|
@ -330,7 +331,8 @@ class API extends CI_Controller
|
|||
$result = $this->logbook_model->check_if_callsign_worked_in_logbook($callsign, $logbooks_locations_array, $band);
|
||||
|
||||
http_response_code(201);
|
||||
if ($result > 0) {
|
||||
if($result > 0)
|
||||
{
|
||||
echo json_encode(['callsign' => $callsign, 'result' => 'Found']);
|
||||
} else {
|
||||
echo json_encode(['callsign' => $callsign, 'result' => 'Not Found']);
|
||||
|
|
@ -341,12 +343,13 @@ class API extends CI_Controller
|
|||
echo json_encode(['status' => 'failed', 'reason' => "logbook not found"]);
|
||||
die();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// API function to check if a grid is in the logbook already
|
||||
function logbook_check_grid()
|
||||
{
|
||||
function logbook_check_grid() {
|
||||
header('Content-type: application/json');
|
||||
|
||||
$this->load->model('api_model');
|
||||
|
|
@ -357,24 +360,24 @@ class API extends CI_Controller
|
|||
echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]);
|
||||
}
|
||||
|
||||
if (!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
|
||||
if(!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['status' => 'failed', 'reason' => "missing api key"]);
|
||||
}
|
||||
|
||||
if (!isset($obj['logbook_public_slug']) || !isset($obj['grid'])) {
|
||||
if(!isset($obj['logbook_public_slug']) || !isset($obj['grid'])) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['status' => 'failed', 'reason' => "missing fields"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($obj['logbook_public_slug'] != "" && $obj['grid'] != "") {
|
||||
if($obj['logbook_public_slug'] != "" && $obj['grid'] != "") {
|
||||
|
||||
$logbook_slug = $obj['logbook_public_slug'];
|
||||
$grid = $obj['grid'];
|
||||
|
||||
// If $obj['band'] exists
|
||||
if (isset($obj['band'])) {
|
||||
if(isset($obj['band'])) {
|
||||
$band = $obj['band'];
|
||||
} else {
|
||||
$band = null;
|
||||
|
|
@ -382,9 +385,10 @@ class API extends CI_Controller
|
|||
|
||||
$this->load->model('logbooks_model');
|
||||
|
||||
if ($this->logbooks_model->public_slug_exists($logbook_slug)) {
|
||||
if($this->logbooks_model->public_slug_exists($logbook_slug)) {
|
||||
$logbook_id = $this->logbooks_model->public_slug_exists_logbook_id($logbook_slug);
|
||||
if ($logbook_id != false) {
|
||||
if($logbook_id != false)
|
||||
{
|
||||
// Get associated station locations for mysql queries
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id);
|
||||
|
||||
|
|
@ -397,7 +401,7 @@ class API extends CI_Controller
|
|||
} else {
|
||||
// Logbook not found
|
||||
http_response_code(404);
|
||||
echo json_encode(['status' => 'failed', 'reason' => $logbook_slug . " has no associated station locations"]);
|
||||
echo json_encode(['status' => 'failed', 'reason' => $logbook_slug." has no associated station locations"]);
|
||||
die();
|
||||
}
|
||||
// Search Logbook for callsign
|
||||
|
|
@ -406,7 +410,8 @@ class API extends CI_Controller
|
|||
$result = $this->logbook_model->check_if_grid_worked_in_logbook($grid, $logbooks_locations_array, $band);
|
||||
|
||||
http_response_code(201);
|
||||
if ($result > 0) {
|
||||
if($result > 0)
|
||||
{
|
||||
echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Found']);
|
||||
} else {
|
||||
echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Not Found']);
|
||||
|
|
@ -417,7 +422,9 @@ class API extends CI_Controller
|
|||
echo json_encode(['status' => 'failed', 'reason' => "logbook not found"]);
|
||||
die();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -480,13 +487,13 @@ class API extends CI_Controller
|
|||
return;
|
||||
}
|
||||
|
||||
if (!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
|
||||
if(!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['status' => 'failed', 'reason' => "missing api key"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isset($obj['logbook_public_slug']) || !isset($obj['callsign'])) {
|
||||
if(!isset($obj['logbook_public_slug']) || !isset($obj['callsign'])) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['status' => 'failed', 'reason' => "missing fields"]);
|
||||
return;
|
||||
|
|
@ -516,9 +523,10 @@ class API extends CI_Controller
|
|||
]
|
||||
];
|
||||
|
||||
if ($this->logbooks_model->public_slug_exists($logbook_slug)) {
|
||||
if($this->logbooks_model->public_slug_exists($logbook_slug)) {
|
||||
$logbook_id = $this->logbooks_model->public_slug_exists_logbook_id($logbook_slug);
|
||||
if ($logbook_id != false) {
|
||||
if($logbook_id != false)
|
||||
{
|
||||
// Get associated station locations for mysql queries
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id);
|
||||
|
||||
|
|
@ -531,7 +539,7 @@ class API extends CI_Controller
|
|||
} else {
|
||||
// Logbook not found
|
||||
http_response_code(404);
|
||||
echo json_encode(['status' => 'failed', 'reason' => $logbook_slug . " has no associated station locations"]);
|
||||
echo json_encode(['status' => 'failed', 'reason' => $logbook_slug." has no associated station locations"]);
|
||||
die();
|
||||
}
|
||||
|
||||
|
|
@ -596,8 +604,7 @@ class API extends CI_Controller
|
|||
|
||||
/* ENDPOINT for Rig Control */
|
||||
|
||||
function radio()
|
||||
{
|
||||
function radio() {
|
||||
header('Content-type: application/json');
|
||||
|
||||
$this->load->model('api_model');
|
||||
|
|
@ -611,7 +618,7 @@ class API extends CI_Controller
|
|||
// Decode JSON and store
|
||||
$obj = json_decode(file_get_contents("php://input"), true);
|
||||
|
||||
if (!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
|
||||
if(!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['status' => 'failed', 'reason' => "missing api key"]);
|
||||
die();
|
||||
|
|
@ -629,6 +636,7 @@ class API extends CI_Controller
|
|||
$arr = array('status' => 'success');
|
||||
|
||||
echo json_encode($arr);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -637,8 +645,7 @@ class API extends CI_Controller
|
|||
*
|
||||
*/
|
||||
|
||||
function statistics($key = null)
|
||||
{
|
||||
function statistics($key = null) {
|
||||
header('Content-type: application/json');
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
|
|
@ -649,10 +656,10 @@ class API extends CI_Controller
|
|||
|
||||
http_response_code(201);
|
||||
echo json_encode(['Today' => $data['todays_qsos'], 'total_qsos' => $data['total_qsos'], 'month_qsos' => $data['month_qsos'], 'year_qsos' => $data['year_qsos']]);
|
||||
|
||||
}
|
||||
|
||||
function lookup()
|
||||
{
|
||||
function lookup() {
|
||||
// start benchmarking
|
||||
$this->output->enable_profiler(TRUE);
|
||||
/*
|
||||
|
|
@ -672,9 +679,7 @@ class API extends CI_Controller
|
|||
|
||||
// Make sure users logged in
|
||||
$this->load->model('user_model');
|
||||
if (!$this->user_model->authorize($this->config->item('auth_mode'))) {
|
||||
return;
|
||||
}
|
||||
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
|
||||
|
||||
|
||||
$this->load->model("logbook_model");
|
||||
|
|
@ -728,7 +733,7 @@ class API extends CI_Controller
|
|||
|
||||
$last_slash_pos = strrpos($lookup_callsign, '/');
|
||||
|
||||
if (isset($last_slash_pos) && $last_slash_pos > 4) {
|
||||
if(isset($last_slash_pos) && $last_slash_pos > 4) {
|
||||
$suffix_slash = $last_slash_pos === false ? $lookup_callsign : substr($lookup_callsign, $last_slash_pos + 1);
|
||||
switch ($suffix_slash) {
|
||||
case "P":
|
||||
|
|
@ -768,7 +773,8 @@ class API extends CI_Controller
|
|||
*/
|
||||
$call_lookup_results = $this->logbook_model->call_lookup_result($lookup_callsign);
|
||||
|
||||
if ($call_lookup_results != null) {
|
||||
if($call_lookup_results != null)
|
||||
{
|
||||
$return['name'] = $call_lookup_results->COL_NAME;
|
||||
$return['gridsquare'] = $call_lookup_results->COL_GRIDSQUARE;
|
||||
$return['location'] = $call_lookup_results->COL_QTH;
|
||||
|
|
@ -780,6 +786,7 @@ class API extends CI_Controller
|
|||
if ($return['gridsquare'] != "") {
|
||||
$return['latlng'] = $this->qralatlng($return['gridsquare']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -802,8 +809,7 @@ class API extends CI_Controller
|
|||
$this->output->enable_profiler(FALSE);
|
||||
}
|
||||
|
||||
function qralatlng($qra)
|
||||
{
|
||||
function qralatlng($qra) {
|
||||
$this->load->library('Qra');
|
||||
$latlng = $this->qra->qra2latlong($qra);
|
||||
return $latlng;
|
||||
|
|
@ -842,34 +848,30 @@ class API extends CI_Controller
|
|||
* "logbook_slug": "my-public-logbook"
|
||||
* }
|
||||
*/
|
||||
function recent_qsos($public_slug = null, $limit = 10)
|
||||
{
|
||||
function recent_qsos($public_slug = null, $limit = 10) {
|
||||
header('Content-type: application/json');
|
||||
|
||||
// Validate and sanitize $limit
|
||||
if (!is_numeric($limit)) {
|
||||
$limit = 10; // Default to 10 if not numeric
|
||||
} else {
|
||||
$limit = intval($limit);
|
||||
if ($limit < 1) {
|
||||
$limit = 1; // Minimum limit of 1
|
||||
} elseif ($limit > 50) {
|
||||
$limit = 50; // Maximum limit of 50
|
||||
}
|
||||
}
|
||||
|
||||
if ($public_slug == null) {
|
||||
if($public_slug == null) {
|
||||
http_response_code(400);
|
||||
echo json_encode(['status' => 'failed', 'reason' => 'missing public_slug parameter']);
|
||||
return;
|
||||
}
|
||||
|
||||
// Validate and sanitize limit parameter
|
||||
$limit = intval($limit);
|
||||
if ($limit <= 0) {
|
||||
$limit = 10; // default
|
||||
}
|
||||
if ($limit > 50) {
|
||||
$limit = 50; // maximum
|
||||
}
|
||||
|
||||
$this->load->model('logbooks_model');
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
if ($this->logbooks_model->public_slug_exists($public_slug)) {
|
||||
if($this->logbooks_model->public_slug_exists($public_slug)) {
|
||||
$logbook_id = $this->logbooks_model->public_slug_exists_logbook_id($public_slug);
|
||||
if ($logbook_id != false) {
|
||||
if($logbook_id != false) {
|
||||
// Get associated station locations for mysql queries
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id);
|
||||
|
||||
|
|
@ -918,15 +920,6 @@ class API extends CI_Controller
|
|||
$qso['name'] = $row->COL_NAME;
|
||||
}
|
||||
|
||||
$dxcc = $this->logbook_model->check_dxcc_table(strtoupper(trim(strtoupper($row->COL_CALL))), $row->COL_TIME_ON);
|
||||
if (empty($dxcc[0])) {
|
||||
$dxcc_id = null;
|
||||
} else {
|
||||
$qso['country'] = $dxcc[1];
|
||||
$qso['lat'] = $dxcc[4];
|
||||
$qso['long'] = $dxcc[5];
|
||||
}
|
||||
|
||||
$qsos[] = $qso;
|
||||
}
|
||||
|
||||
|
|
@ -936,9 +929,10 @@ class API extends CI_Controller
|
|||
'count' => count($qsos),
|
||||
'logbook_slug' => $public_slug
|
||||
], JSON_PRETTY_PRINT);
|
||||
|
||||
} else {
|
||||
http_response_code(404);
|
||||
echo json_encode(['status' => 'failed', 'reason' => $public_slug . ' has no associated station locations']);
|
||||
echo json_encode(['status' => 'failed', 'reason' => $public_slug.' has no associated station locations']);
|
||||
}
|
||||
} else {
|
||||
http_response_code(404);
|
||||
|
|
|
|||
|
|
@ -22,49 +22,18 @@ class Components extends CI_Controller {
|
|||
$data['user_hamsat_key']='';
|
||||
}
|
||||
$url = 'https://hams.at/api/alerts/upcoming';
|
||||
|
||||
// Initialize error state
|
||||
$data['error'] = false;
|
||||
$data['error_message'] = '';
|
||||
|
||||
try {
|
||||
if ($data['user_hamsat_key'] ?? '' != '') {
|
||||
$options = array(
|
||||
'http' => array(
|
||||
'method' => 'GET',
|
||||
'header' => "Authorization: Bearer ".$data['user_hamsat_key']."\r\n",
|
||||
'timeout' => 10 // Add timeout to prevent long hangs
|
||||
'header' => "Authorization: Bearer ".$data['user_hamsat_key']."\r\n"
|
||||
)
|
||||
);
|
||||
$context = stream_context_create($options);
|
||||
$json = @file_get_contents($url, false, $context);
|
||||
$json = file_get_contents($url, false, $context);
|
||||
} else {
|
||||
$json = @file_get_contents($url, false, stream_context_create(array(
|
||||
'http' => array('timeout' => 10)
|
||||
)));
|
||||
$json = file_get_contents($url);
|
||||
}
|
||||
|
||||
// Check if the request failed
|
||||
if ($json === false) {
|
||||
$data['error'] = true;
|
||||
$data['error_message'] = 'Unable to connect to hams.at service. Please check your internet connection or try again later.';
|
||||
$data['rovedata'] = null;
|
||||
} else {
|
||||
$decoded_data = json_decode($json, true);
|
||||
if ($decoded_data === null && json_last_error() !== JSON_ERROR_NONE) {
|
||||
$data['error'] = true;
|
||||
$data['error_message'] = 'Invalid response received from hams.at service. Please try again later.';
|
||||
$data['rovedata'] = null;
|
||||
} else {
|
||||
$data['rovedata'] = $decoded_data;
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$data['error'] = true;
|
||||
$data['error_message'] = 'An error occurred while fetching satellite data. Please try again later.';
|
||||
$data['rovedata'] = null;
|
||||
}
|
||||
|
||||
$hkey_opt=$this->user_options_model->get_options('hamsat',array('option_name'=>'hamsat_key','option_key'=>'workable'))->result();
|
||||
if (count($hkey_opt)>0) {
|
||||
$data['user_hamsat_workable_only'] = $hkey_opt[0]->option_value;
|
||||
|
|
@ -73,6 +42,7 @@ class Components extends CI_Controller {
|
|||
}
|
||||
|
||||
$this->load->model('stations');
|
||||
$data['rovedata'] = json_decode($json, true);
|
||||
$data['gridsquare'] = strtoupper($this->stations->find_gridsquare());
|
||||
|
||||
// load view
|
||||
|
|
|
|||
|
|
@ -378,31 +378,6 @@ class Lotw extends CI_Controller {
|
|||
redirect('/lotw/');
|
||||
}
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Function: toggle_archive_cert
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Toggles the archive status of a LoTW certificate
|
||||
|
|
||||
*/
|
||||
public function toggle_archive_cert($cert_id) {
|
||||
$this->load->model('user_model');
|
||||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
|
||||
$this->load->model('LotwCert');
|
||||
|
||||
$result = $this->LotwCert->toggle_archive_certificate($this->session->userdata('user_id'), $cert_id);
|
||||
|
||||
if($result['archived']) {
|
||||
$this->session->set_flashdata('Success', 'Certificate Archived.');
|
||||
} else {
|
||||
$this->session->set_flashdata('Success', 'Certificate Unarchived.');
|
||||
}
|
||||
|
||||
redirect('/lotw/');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Mostworked extends CI_Controller {
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->load->model('user_model');
|
||||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
|
||||
// Load language files
|
||||
$this->lang->load('most_worked');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
// Check if users logged in
|
||||
if ($this->user_model->validate_session() == 0) {
|
||||
// user is not logged in
|
||||
redirect('user/login');
|
||||
}
|
||||
|
||||
$this->load->model('mostworked_model');
|
||||
$this->load->model('logbooks_model');
|
||||
|
||||
// Get filter parameters
|
||||
$filters = array(
|
||||
'band' => $this->input->post('band') ?: 'all',
|
||||
'mode' => $this->input->post('mode') ?: 'all',
|
||||
'satellite' => $this->input->post('satellite') ?: 'all',
|
||||
'fromdate' => $this->input->post('fromdate') ?: '',
|
||||
'todate' => $this->input->post('todate') ?: '',
|
||||
'min_qsos' => $this->input->post('min_qsos') ?: 5
|
||||
);
|
||||
|
||||
// Get active station logbook
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
if (!$logbooks_locations_array) {
|
||||
$data['mostworked_callsigns'] = array();
|
||||
} else {
|
||||
$data['mostworked_callsigns'] = $this->mostworked_model->get_most_worked_callsigns($filters);
|
||||
}
|
||||
|
||||
// Get filter dropdown data
|
||||
$data['bands'] = $this->mostworked_model->get_bands();
|
||||
$data['modes'] = $this->mostworked_model->get_modes();
|
||||
$data['satellites'] = $this->mostworked_model->get_satellites();
|
||||
$data['filters'] = $filters;
|
||||
|
||||
$data['page_title'] = "Most Worked Callsigns";
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('mostworked/index', $data);
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
}
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = 'Days with QSOs';
|
|||
$lang['menu_timeline'] = 'Timeline';
|
||||
$lang['menu_accumulated_statistics'] = 'Accumulated Statistics';
|
||||
$lang['menu_timeplotter'] = 'Timeplotter';
|
||||
$lang['menu_most_worked'] = 'Най-Работени';
|
||||
$lang['menu_custom_maps'] = 'Custom Maps';
|
||||
$lang['menu_continents'] = 'Continents';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Най-Работени Позивни';
|
||||
$lang['most_worked_description'] = 'Тази страница показва позивните, с които сте работили най-често от вашия активен дневник.';
|
||||
$lang['most_worked_rank'] = 'Ранг';
|
||||
$lang['most_worked_callsign'] = 'Позивен';
|
||||
$lang['most_worked_contacts'] = 'Контакти';
|
||||
$lang['most_worked_first_qso'] = 'Първо QSO';
|
||||
$lang['most_worked_last_qso'] = 'Последно QSO';
|
||||
$lang['most_worked_bands'] = 'Ленти';
|
||||
$lang['most_worked_modes'] = 'Режими';
|
||||
$lang['most_worked_no_data'] = 'Няма намерени QSO! Уверете се, че имате избран активен дневник и записани QSO.';
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = '天数';
|
|||
$lang['menu_timeline'] = '时间线';
|
||||
$lang['menu_accumulated_statistics'] = '累积统计';
|
||||
$lang['menu_timeplotter'] = '时间图';
|
||||
$lang['menu_most_worked'] = '最常工作';
|
||||
$lang['menu_custom_maps'] = '自定义地图';
|
||||
$lang['menu_continents'] = '大陆';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = '最常工作的呼号';
|
||||
$lang['most_worked_description'] = '此页面显示您从活动日志簿中最频繁工作的呼号。';
|
||||
$lang['most_worked_rank'] = '排名';
|
||||
$lang['most_worked_callsign'] = '呼号';
|
||||
$lang['most_worked_contacts'] = '联系';
|
||||
$lang['most_worked_first_qso'] = '首次QSO';
|
||||
$lang['most_worked_last_qso'] = '最后QSO';
|
||||
$lang['most_worked_bands'] = '频段';
|
||||
$lang['most_worked_modes'] = '模式';
|
||||
$lang['most_worked_no_data'] = '未找到QSO!请确保您已选择活动日志簿并记录了QSO。';
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = 'Dny s QSO';
|
|||
$lang['menu_timeline'] = 'Časová osa';
|
||||
$lang['menu_accumulated_statistics'] = 'Kumulativní statistiky';
|
||||
$lang['menu_timeplotter'] = 'Graf času';
|
||||
$lang['menu_most_worked'] = 'Nejvíce Pracované';
|
||||
$lang['menu_custom_maps'] = 'Vlastní mapy';
|
||||
$lang['menu_continents'] = 'Kontinenty';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Nejvíce Pracované Značky';
|
||||
$lang['most_worked_description'] = 'Tato stránka zobrazuje značky, se kterými jste pracovali nejčastěji z vašeho aktivního deníku.';
|
||||
$lang['most_worked_rank'] = 'Pořadí';
|
||||
$lang['most_worked_callsign'] = 'Značka';
|
||||
$lang['most_worked_contacts'] = 'Kontakty';
|
||||
$lang['most_worked_first_qso'] = 'První QSO';
|
||||
$lang['most_worked_last_qso'] = 'Poslední QSO';
|
||||
$lang['most_worked_bands'] = 'Pásma';
|
||||
$lang['most_worked_modes'] = 'Režimy';
|
||||
$lang['most_worked_no_data'] = 'Nebyly nalezeny žádné QSO! Ujistěte se, že máte vybraný aktivní deník a zaznamenané QSO.';
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = 'Days with QSOs';
|
|||
$lang['menu_timeline'] = 'Timeline';
|
||||
$lang['menu_accumulated_statistics'] = 'Accumulated Statistics';
|
||||
$lang['menu_timeplotter'] = 'Timeplotter';
|
||||
$lang['menu_most_worked'] = 'Meest Gewerkt';
|
||||
$lang['menu_custom_maps'] = 'Custom Maps';
|
||||
$lang['menu_continents'] = 'Continents';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Meest Gewerkte Roepletters';
|
||||
$lang['most_worked_description'] = 'Deze pagina toont de roepletters waarmee u het vaakst heeft gewerkt vanuit uw actieve logboek.';
|
||||
$lang['most_worked_rank'] = 'Rang';
|
||||
$lang['most_worked_callsign'] = 'Roepletter';
|
||||
$lang['most_worked_contacts'] = 'Contacten';
|
||||
$lang['most_worked_first_qso'] = 'Eerste QSO';
|
||||
$lang['most_worked_last_qso'] = 'Laatste QSO';
|
||||
$lang['most_worked_bands'] = 'Banden';
|
||||
$lang['most_worked_modes'] = 'Modi';
|
||||
$lang['most_worked_no_data'] = 'Geen QSO\'s gevonden! Zorg ervoor dat u een actief logboek hebt geselecteerd en QSO\'s hebt gelogd.';
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = 'Days with QSOs';
|
|||
$lang['menu_timeline'] = 'Timeline';
|
||||
$lang['menu_accumulated_statistics'] = 'Accumulated Statistics';
|
||||
$lang['menu_timeplotter'] = 'Timeplotter';
|
||||
$lang['menu_most_worked'] = 'Most Worked';
|
||||
$lang['menu_custom_maps'] = 'Custom Maps';
|
||||
$lang['menu_continents'] = 'Continents';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Most Worked Callsigns';
|
||||
$lang['most_worked_description'] = 'This page shows the callsigns you have worked most frequently from your active logbook.';
|
||||
$lang['most_worked_rank'] = 'Rank';
|
||||
$lang['most_worked_callsign'] = 'Callsign';
|
||||
$lang['most_worked_contacts'] = 'Contacts';
|
||||
$lang['most_worked_first_qso'] = 'First QSO';
|
||||
$lang['most_worked_last_qso'] = 'Last QSO';
|
||||
$lang['most_worked_bands'] = 'Bands';
|
||||
$lang['most_worked_modes'] = 'Modes';
|
||||
$lang['most_worked_no_data'] = 'No QSOs found! Make sure you have an active logbook selected and QSOs logged.';
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = 'QSO:llsia päiviä';
|
|||
$lang['menu_timeline'] = 'Aikajana';
|
||||
$lang['menu_accumulated_statistics'] = 'Kertyneet tilastot';
|
||||
$lang['menu_timeplotter'] = 'Aikajana';
|
||||
$lang['menu_most_worked'] = 'Eniten Työskennellyt';
|
||||
$lang['menu_custom_maps'] = 'Custom Maps';
|
||||
$lang['menu_continents'] = 'Mantereet';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Eniten Työskennellyt Kutsumerkit';
|
||||
$lang['most_worked_description'] = 'Tämä sivu näyttää kutsumerkit, joiden kanssa olet työskennellyt useimmin aktiivisesta lokikirjastasi.';
|
||||
$lang['most_worked_rank'] = 'Sijoitus';
|
||||
$lang['most_worked_callsign'] = 'Kutsumerkki';
|
||||
$lang['most_worked_contacts'] = 'Yhteydet';
|
||||
$lang['most_worked_first_qso'] = 'Ensimmäinen QSO';
|
||||
$lang['most_worked_last_qso'] = 'Viimeinen QSO';
|
||||
$lang['most_worked_bands'] = 'Kaistat';
|
||||
$lang['most_worked_modes'] = 'Tilat';
|
||||
$lang['most_worked_no_data'] = 'QSO:ja ei löytynyt! Varmista, että sinulla on aktiivinen lokikirja valittuna ja QSO:ja kirjattuna.';
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = 'Days with QSOs';
|
|||
$lang['menu_timeline'] = 'Timeline';
|
||||
$lang['menu_accumulated_statistics'] = 'Accumulated Statistics';
|
||||
$lang['menu_timeplotter'] = 'Timeplotter';
|
||||
$lang['menu_most_worked'] = 'Plus Travaillé';
|
||||
$lang['menu_custom_maps'] = 'Custom Maps';
|
||||
$lang['menu_continents'] = 'Continents';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Indicatifs les Plus Travaillés';
|
||||
$lang['most_worked_description'] = 'Cette page affiche les indicatifs que vous avez travaillés le plus fréquemment de votre carnet de trafic actif.';
|
||||
$lang['most_worked_rank'] = 'Rang';
|
||||
$lang['most_worked_callsign'] = 'Indicatif';
|
||||
$lang['most_worked_contacts'] = 'Contacts';
|
||||
$lang['most_worked_first_qso'] = 'Premier QSO';
|
||||
$lang['most_worked_last_qso'] = 'Dernier QSO';
|
||||
$lang['most_worked_bands'] = 'Bandes';
|
||||
$lang['most_worked_modes'] = 'Modes';
|
||||
$lang['most_worked_no_data'] = 'Aucun QSO trouvé ! Assurez-vous d\'avoir un carnet de trafic actif sélectionné et des QSO enregistrés.';
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = 'Tage mit QSOs';
|
|||
$lang['menu_timeline'] = 'Zeitleiste';
|
||||
$lang['menu_accumulated_statistics'] = 'Kumulierte Statistiken';
|
||||
$lang['menu_timeplotter'] = 'Zeitplotter';
|
||||
$lang['menu_most_worked'] = 'Meist Gearbeitet';
|
||||
$lang['menu_custom_maps'] = 'Benutzerdefinierte Karte';
|
||||
$lang['menu_continents'] = 'Kontinente';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Meist Gearbeitete Rufzeichen';
|
||||
$lang['most_worked_description'] = 'Diese Seite zeigt die Rufzeichen, die Sie am häufigsten aus Ihrem aktiven Logbuch gearbeitet haben.';
|
||||
$lang['most_worked_rank'] = 'Rang';
|
||||
$lang['most_worked_callsign'] = 'Rufzeichen';
|
||||
$lang['most_worked_contacts'] = 'Kontakte';
|
||||
$lang['most_worked_first_qso'] = 'Erstes QSO';
|
||||
$lang['most_worked_last_qso'] = 'Letztes QSO';
|
||||
$lang['most_worked_bands'] = 'Bänder';
|
||||
$lang['most_worked_modes'] = 'Modi';
|
||||
$lang['most_worked_no_data'] = 'Keine QSOs gefunden! Stellen Sie sicher, dass Sie ein aktives Logbuch ausgewählt haben und QSOs protokolliert sind.';
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = 'Days with QSOs';
|
|||
$lang['menu_timeline'] = 'Timeline';
|
||||
$lang['menu_accumulated_statistics'] = 'Accumulated Statistics';
|
||||
$lang['menu_timeplotter'] = 'Timeplotter';
|
||||
$lang['menu_most_worked'] = 'Περισσότερα Εργασμένα';
|
||||
$lang['menu_custom_maps'] = 'Custom Maps';
|
||||
$lang['menu_continents'] = 'Continents';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Περισσότερα Εργασμένα Διακριτικά';
|
||||
$lang['most_worked_description'] = 'Αυτή η σελίδα δείχνει τα διακριτικά που έχετε εργαστεί πιο συχνά από το ενεργό σας ημερολόγιο.';
|
||||
$lang['most_worked_rank'] = 'Κατάταξη';
|
||||
$lang['most_worked_callsign'] = 'Διακριτικό';
|
||||
$lang['most_worked_contacts'] = 'Επαφές';
|
||||
$lang['most_worked_first_qso'] = 'Πρώτο QSO';
|
||||
$lang['most_worked_last_qso'] = 'Τελευταίο QSO';
|
||||
$lang['most_worked_bands'] = 'Ζώνες';
|
||||
$lang['most_worked_modes'] = 'Τρόποι';
|
||||
$lang['most_worked_no_data'] = 'Δεν βρέθηκαν QSO! Βεβαιωθείτε ότι έχετε επιλέξει ενεργό ημερολόγιο και καταγεγραμμένα QSO.';
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = 'Giorni con QSO';
|
|||
$lang['menu_timeline'] = 'Cronologia';
|
||||
$lang['menu_accumulated_statistics'] = 'Statistiche accumulate';
|
||||
$lang['menu_timeplotter'] = 'Plotter temporale';
|
||||
$lang['menu_most_worked'] = 'Più Lavorato';
|
||||
$lang['menu_custom_maps'] = 'Mappe personalizzate';
|
||||
$lang['menu_continents'] = 'Continenti';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Nominativi Più Lavorati';
|
||||
$lang['most_worked_description'] = 'Questa pagina mostra i nominativi con cui hai lavorato più frequentemente dal tuo logbook attivo.';
|
||||
$lang['most_worked_rank'] = 'Posizione';
|
||||
$lang['most_worked_callsign'] = 'Nominativo';
|
||||
$lang['most_worked_contacts'] = 'Contatti';
|
||||
$lang['most_worked_first_qso'] = 'Primo QSO';
|
||||
$lang['most_worked_last_qso'] = 'Ultimo QSO';
|
||||
$lang['most_worked_bands'] = 'Bande';
|
||||
$lang['most_worked_modes'] = 'Modi';
|
||||
$lang['most_worked_no_data'] = 'Nessun QSO trovato! Assicurati di aver selezionato un logbook attivo e di aver registrato dei QSO.';
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = 'Dni z QSO';
|
|||
$lang['menu_timeline'] = 'Oś czasu';
|
||||
$lang['menu_accumulated_statistics'] = 'Skumulowane statystyki';
|
||||
$lang['menu_timeplotter'] = 'Ploter czasu';
|
||||
$lang['menu_most_worked'] = 'Najczęściej Pracowane';
|
||||
$lang['menu_custom_maps'] = 'Niestandardowe mapy';
|
||||
$lang['menu_continents'] = 'Kontynenty';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Najczęściej Pracowane Znaki';
|
||||
$lang['most_worked_description'] = 'Ta strona pokazuje znaki, z którymi pracowałeś najczęściej z twojego aktywnego dziennika.';
|
||||
$lang['most_worked_rank'] = 'Pozycja';
|
||||
$lang['most_worked_callsign'] = 'Znak';
|
||||
$lang['most_worked_contacts'] = 'Kontakty';
|
||||
$lang['most_worked_first_qso'] = 'Pierwsze QSO';
|
||||
$lang['most_worked_last_qso'] = 'Ostatnie QSO';
|
||||
$lang['most_worked_bands'] = 'Pasma';
|
||||
$lang['most_worked_modes'] = 'Tryby';
|
||||
$lang['most_worked_no_data'] = 'Nie znaleziono QSO! Upewnij się, że masz wybrany aktywny dziennik i zarejestrowane QSO.';
|
||||
|
|
@ -31,7 +31,6 @@ $lang['menu_days_with_qsos'] = 'Dias com QSOs';
|
|||
$lang['menu_timeline'] = 'Linha do Tempo';
|
||||
$lang['menu_accumulated_statistics'] = 'Estatísticas Acumuladas';
|
||||
$lang['menu_timeplotter'] = 'Gráfico Temporal';
|
||||
$lang['menu_most_worked'] = 'Mais Trabalhado';
|
||||
$lang['menu_custom_maps'] = 'Mapas Personalizados';
|
||||
$lang['menu_continents'] = 'Continentes';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Indicativos Mais Trabalhados';
|
||||
$lang['most_worked_description'] = 'Esta página mostra os indicativos com os quais você trabalhou com mais frequência a partir do seu livro de registro ativo.';
|
||||
$lang['most_worked_rank'] = 'Posição';
|
||||
$lang['most_worked_callsign'] = 'Indicativo';
|
||||
$lang['most_worked_contacts'] = 'Contatos';
|
||||
$lang['most_worked_first_qso'] = 'Primeiro QSO';
|
||||
$lang['most_worked_last_qso'] = 'Último QSO';
|
||||
$lang['most_worked_bands'] = 'Bandas';
|
||||
$lang['most_worked_modes'] = 'Modos';
|
||||
$lang['most_worked_no_data'] = 'Nenhum QSO encontrado! Certifique-se de ter um livro de registro ativo selecionado e QSOs registrados.';
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = 'Дней с QSO';
|
|||
$lang['menu_timeline'] = 'Лента событий';
|
||||
$lang['menu_accumulated_statistics'] = 'Объединённая статистика';
|
||||
$lang['menu_timeplotter'] = 'Графики';
|
||||
$lang['menu_most_worked'] = 'Самые Работанные';
|
||||
$lang['menu_custom_maps'] = 'Карты';
|
||||
$lang['menu_continents'] = 'Континенты';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Самые Работанные Позывные';
|
||||
$lang['most_worked_description'] = 'Эта страница показывает позывные, с которыми вы работали чаще всего из вашего активного журнала.';
|
||||
$lang['most_worked_rank'] = 'Ранг';
|
||||
$lang['most_worked_callsign'] = 'Позывной';
|
||||
$lang['most_worked_contacts'] = 'Контакты';
|
||||
$lang['most_worked_first_qso'] = 'Первое QSO';
|
||||
$lang['most_worked_last_qso'] = 'Последнее QSO';
|
||||
$lang['most_worked_bands'] = 'Диапазоны';
|
||||
$lang['most_worked_modes'] = 'Режимы';
|
||||
$lang['most_worked_no_data'] = 'QSO не найдены! Убедитесь, что у вас выбран активный журнал и записаны QSO.';
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = 'Días con QSOs';
|
|||
$lang['menu_timeline'] = 'Línea de Tiempo';
|
||||
$lang['menu_accumulated_statistics'] = 'Estadísticas Acumuladas';
|
||||
$lang['menu_timeplotter'] = 'Gráfico de Tiempo';
|
||||
$lang['menu_most_worked'] = 'Más Trabajado';
|
||||
$lang['menu_custom_maps'] = 'Mapas Personalizados';
|
||||
$lang['menu_continents'] = 'Continentes';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Indicativos Más Trabajados';
|
||||
$lang['most_worked_description'] = 'Esta página muestra los indicativos que has trabajado con más frecuencia desde tu libro de guardia activo.';
|
||||
$lang['most_worked_rank'] = 'Rango';
|
||||
$lang['most_worked_callsign'] = 'Indicativo';
|
||||
$lang['most_worked_contacts'] = 'Contactos';
|
||||
$lang['most_worked_first_qso'] = 'Primer QSO';
|
||||
$lang['most_worked_last_qso'] = 'Último QSO';
|
||||
$lang['most_worked_bands'] = 'Bandas';
|
||||
$lang['most_worked_modes'] = 'Modos';
|
||||
$lang['most_worked_no_data'] = '¡No se encontraron QSOs! Asegúrate de tener un libro de guardia activo seleccionado y QSOs registrados.';
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
<<<<<<< HEAD
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = 'Dagar med QSOs';
|
|||
$lang['menu_timeline'] = 'Tidslinje';
|
||||
$lang['menu_accumulated_statistics'] = 'Ackumulerad statistik';
|
||||
$lang['menu_timeplotter'] = 'Tidplotter';
|
||||
$lang['menu_most_worked'] = 'Mest Arbetade';
|
||||
$lang['menu_custom_maps'] = 'Anpassade kartor';
|
||||
$lang['menu_continents'] = 'Kontinenter';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'Mest Arbetade Anropssignaler';
|
||||
$lang['most_worked_description'] = 'Den här sidan visar de anropssignaler du har arbetat med oftast från din aktiva loggbok.';
|
||||
$lang['most_worked_rank'] = 'Rang';
|
||||
$lang['most_worked_callsign'] = 'Anropssignal';
|
||||
$lang['most_worked_contacts'] = 'Kontakter';
|
||||
$lang['most_worked_first_qso'] = 'Första QSO';
|
||||
$lang['most_worked_last_qso'] = 'Senaste QSO';
|
||||
$lang['most_worked_bands'] = 'Band';
|
||||
$lang['most_worked_modes'] = 'Lägen';
|
||||
$lang['most_worked_no_data'] = 'Inga QSO hittades! Se till att du har en aktiv loggbok vald och QSO loggade.';
|
||||
|
|
@ -32,7 +32,6 @@ $lang['menu_days_with_qsos'] = "QSO'lu Günler";
|
|||
$lang['menu_timeline'] = 'Zaman Çizelgesi';
|
||||
$lang['menu_accumulated_statistics'] = 'Birikmiş İstatistikler';
|
||||
$lang['menu_timeplotter'] = 'Zaman Çizici';
|
||||
$lang['menu_most_worked'] = 'En Çok Çalışılan';
|
||||
$lang['menu_custom_maps'] = 'Özel Haritalar';
|
||||
$lang['menu_continents'] = 'Kıtalar';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
$lang['most_worked_title'] = 'En Çok Çalışılan Çağrı İşaretleri';
|
||||
$lang['most_worked_description'] = 'Bu sayfa, aktif günlük defterinizden en sık çalıştığınız çağrı işaretlerini gösterir.';
|
||||
$lang['most_worked_rank'] = 'Sıra';
|
||||
$lang['most_worked_callsign'] = 'Çağrı İşareti';
|
||||
$lang['most_worked_contacts'] = 'İletişimler';
|
||||
$lang['most_worked_first_qso'] = 'İlk QSO';
|
||||
$lang['most_worked_last_qso'] = 'Son QSO';
|
||||
$lang['most_worked_bands'] = 'Bantlar';
|
||||
$lang['most_worked_modes'] = 'Modlar';
|
||||
$lang['most_worked_no_data'] = 'QSO bulunamadı! Aktif bir günlük defteri seçtiğinizden ve QSO\'lar kaydettiğinizden emin olun.';
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_indexes_lotw_users extends CI_Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
if ($this->db->table_exists('lotw_users')) {
|
||||
// add an index on callsign if no index exists on that column
|
||||
$callsignIndex = $this->db->query("SHOW INDEX FROM lotw_users WHERE Column_name = 'callsign'");
|
||||
if ($callsignIndex->num_rows() == 0) {
|
||||
$this->db->query("ALTER TABLE lotw_users ADD INDEX `callsign` (`callsign`)");
|
||||
}
|
||||
|
||||
// add an index on lastupload if it doesn't exist
|
||||
$lastuploadIndex = $this->db->query("SHOW INDEX FROM lotw_users WHERE Column_name = 'lastupload'");
|
||||
if ($lastuploadIndex->num_rows() == 0) {
|
||||
$this->db->query("ALTER TABLE lotw_users ADD INDEX `lastupload` (`lastupload`)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->table_exists('lotw_users')) {
|
||||
// drop the indexes we might have created (only if the index name matches)
|
||||
$li = $this->db->query("SHOW INDEX FROM lotw_users WHERE Key_name = 'lastupload'");
|
||||
if ($li->num_rows() > 0) {
|
||||
$this->db->query("ALTER TABLE lotw_users DROP INDEX `lastupload`");
|
||||
}
|
||||
|
||||
$ci = $this->db->query("SHOW INDEX FROM lotw_users WHERE Key_name = 'callsign'");
|
||||
if ($ci->num_rows() > 0) {
|
||||
$this->db->query("ALTER TABLE lotw_users DROP INDEX `callsign`");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Class Migration_lotw_cert_archive_status
|
||||
*
|
||||
* Adds a simple boolean `archived` column to the `lotw_certs` table so
|
||||
* certificates can be marked as archived.
|
||||
*/
|
||||
class Migration_lotw_cert_archive_status extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (! $this->db->field_exists('archived', 'lotw_certs')) {
|
||||
$fields = array(
|
||||
'archived BOOLEAN DEFAULT FALSE',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('lotw_certs', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->field_exists('archived', 'lotw_certs')) {
|
||||
$this->dbforge->drop_column('lotw_certs', 'archived');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* Tag Cloudlog as 2.7.1
|
||||
*/
|
||||
|
||||
class Migration_tag_2_7_1 extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
// Tag Cloudlog 2.7.1
|
||||
$this->db->where('option_name', 'version');
|
||||
$this->db->update('options', array('option_value' => '2.7.1'));
|
||||
|
||||
// Trigger Version Info Dialog
|
||||
$this->db->where('option_type', 'version_dialog');
|
||||
$this->db->where('option_name', 'confirmed');
|
||||
$this->db->update('user_options', array('option_value' => 'false'));
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->db->where('option_name', 'version');
|
||||
$this->db->update('options', array('option_value' => '2.7.0'));
|
||||
}
|
||||
}
|
||||
|
|
@ -1932,8 +1932,6 @@ class Logbook_model extends CI_Model
|
|||
|
||||
function get_last_qsos($num, $StationLocationsArray = null)
|
||||
{
|
||||
// Ensure $num is always an integer to prevent SQL injection
|
||||
$num = intval($num);
|
||||
|
||||
if ($StationLocationsArray == null) {
|
||||
$CI = &get_instance();
|
||||
|
|
@ -1951,7 +1949,7 @@ class Logbook_model extends CI_Model
|
|||
order by col_time_on desc, col_primary_key desc
|
||||
limit " . $num .
|
||||
") hrd
|
||||
LEFT JOIN station_profile ON station_profile.station_id = hrd.station_id
|
||||
JOIN station_profile ON station_profile.station_id = hrd.station_id
|
||||
LEFT JOIN dxcc_entities ON hrd.col_dxcc = dxcc_entities.adif
|
||||
order by col_time_on desc, col_primary_key desc";
|
||||
|
||||
|
|
@ -4093,7 +4091,7 @@ class Logbook_model extends CI_Model
|
|||
|
||||
$csadditions = '/^P$|^R$|^A$|^M$/';
|
||||
|
||||
$dxcc_exceptions = $this->db->select('`entity`, `adif`, `cqz`, `cont`,`lat`,`long`')
|
||||
$dxcc_exceptions = $this->db->select('`entity`, `adif`, `cqz`, `cont`')
|
||||
->where('call', $call)
|
||||
->where('(start <= ', $date)
|
||||
->or_where('start is null)', NULL, false)
|
||||
|
|
@ -4103,7 +4101,7 @@ class Logbook_model extends CI_Model
|
|||
|
||||
if ($dxcc_exceptions->num_rows() > 0) {
|
||||
$row = $dxcc_exceptions->row_array();
|
||||
return array($row['adif'], $row['entity'], $row['cqz'], $row['cont'], $row['lat'], $row['long']);
|
||||
return array($row['adif'], $row['entity'], $row['cqz'], $row['cont']);
|
||||
}
|
||||
if (preg_match('/(^KG4)[A-Z09]{3}/', $call)) { // KG4/ and KG4 5 char calls are Guantanamo Bay. If 4 or 6 char, it is USA
|
||||
$call = "K";
|
||||
|
|
@ -4158,7 +4156,7 @@ class Logbook_model extends CI_Model
|
|||
// query the table, removing a character from the right until a match
|
||||
for ($i = $len; $i > 0; $i--) {
|
||||
//printf("searching for %s\n", substr($call, 0, $i));
|
||||
$dxcc_result = $this->db->select('`call`, `entity`, `adif`, `cqz`, `cont`,`lat`,`long`')
|
||||
$dxcc_result = $this->db->select('`call`, `entity`, `adif`, `cqz`, `cont`')
|
||||
->where('call', substr($call, 0, $i))
|
||||
->where('(start <= ', $date)
|
||||
->or_where("start is null)", NULL, false)
|
||||
|
|
@ -4171,7 +4169,7 @@ class Logbook_model extends CI_Model
|
|||
|
||||
if ($dxcc_result->num_rows() > 0) {
|
||||
$row = $dxcc_result->row_array();
|
||||
return array($row['adif'], $row['entity'], $row['cqz'], $row['cont'], $row['lat'], $row['long']);
|
||||
return array($row['adif'], $row['entity'], $row['cqz'], $row['cont']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class LotwCert extends CI_Model {
|
|||
*/
|
||||
function lotw_certs($user_id) {
|
||||
|
||||
$this->db->select('lotw_certs.lotw_cert_id as lotw_cert_id, lotw_certs.callsign as callsign, dxcc_entities.name as cert_dxcc, dxcc_entities.end as cert_dxcc_end, lotw_certs.qso_start_date as qso_start_date, lotw_certs.qso_end_date as qso_end_date, lotw_certs.date_created as date_created, lotw_certs.date_expires as date_expires, lotw_certs.last_upload as last_upload, lotw_certs.archived as archived');
|
||||
$this->db->select('lotw_certs.lotw_cert_id as lotw_cert_id, lotw_certs.callsign as callsign, dxcc_entities.name as cert_dxcc, dxcc_entities.end as cert_dxcc_end, lotw_certs.qso_start_date as qso_start_date, lotw_certs.qso_end_date as qso_end_date, lotw_certs.date_created as date_created, lotw_certs.date_expires as date_expires, lotw_certs.last_upload as last_upload');
|
||||
$this->db->where('user_id', $user_id);
|
||||
$this->db->join('dxcc_entities','lotw_certs.cert_dxcc_id = dxcc_entities.adif','left');
|
||||
$this->db->order_by('cert_dxcc', 'ASC');
|
||||
|
|
@ -77,29 +77,6 @@ class LotwCert extends CI_Model {
|
|||
$this->db->delete('lotw_certs');
|
||||
}
|
||||
|
||||
function toggle_archive_certificate($user_id, $lotw_cert_id) {
|
||||
// First get current archive status
|
||||
$this->db->select('archived');
|
||||
$this->db->where('lotw_cert_id', $lotw_cert_id);
|
||||
$this->db->where('user_id', $user_id);
|
||||
$query = $this->db->get('lotw_certs');
|
||||
|
||||
if($query->num_rows() == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$current_status = $query->row()->archived;
|
||||
$new_status = $current_status ? 0 : 1;
|
||||
|
||||
// Update the archive status
|
||||
$data = array('archived' => $new_status);
|
||||
$this->db->where('lotw_cert_id', $lotw_cert_id);
|
||||
$this->db->where('user_id', $user_id);
|
||||
$this->db->update('lotw_certs', $data);
|
||||
|
||||
return array('archived' => $new_status);
|
||||
}
|
||||
|
||||
function last_upload($certID) {
|
||||
|
||||
$data = array(
|
||||
|
|
@ -119,7 +96,7 @@ class LotwCert extends CI_Model {
|
|||
}
|
||||
|
||||
function lotw_cert_expired($user_id, $date) {
|
||||
$array = array('user_id' => $user_id, 'date_expires <' => $date, 'archived' => 0);
|
||||
$array = array('user_id' => $user_id, 'date_expires <' => $date);
|
||||
$this->db->where($array);
|
||||
$query = $this->db->get('lotw_certs');
|
||||
|
||||
|
|
@ -131,7 +108,7 @@ class LotwCert extends CI_Model {
|
|||
}
|
||||
|
||||
function lotw_cert_expiring($user_id, $date) {
|
||||
$array = array('user_id' => $user_id, 'DATE_SUB(date_expires, INTERVAL 30 DAY) <' => $date, 'date_expires >' => $date, 'archived' => 0);
|
||||
$array = array('user_id' => $user_id, 'DATE_SUB(date_expires, INTERVAL 30 DAY) <' => $date, 'date_expires >' => $date);
|
||||
$this->db->where($array);
|
||||
$query = $this->db->get('lotw_certs');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,216 +0,0 @@
|
|||
<?php
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Mostworked_model extends CI_Model
|
||||
{
|
||||
/*
|
||||
* Get callsigns worked more than a minimum number of times from the active logbook
|
||||
*/
|
||||
function get_most_worked_callsigns($filters = array())
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
if (!$logbooks_locations_array) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$location_list = "'" . implode("','", $logbooks_locations_array) . "'";
|
||||
|
||||
// Set defaults
|
||||
$min_qsos = isset($filters['min_qsos']) ? intval($filters['min_qsos']) : 5;
|
||||
$band = isset($filters['band']) ? $filters['band'] : 'all';
|
||||
$mode = isset($filters['mode']) ? $filters['mode'] : 'all';
|
||||
$satellite = isset($filters['satellite']) ? $filters['satellite'] : 'all';
|
||||
$fromdate = isset($filters['fromdate']) ? $filters['fromdate'] : '';
|
||||
$todate = isset($filters['todate']) ? $filters['todate'] : '';
|
||||
|
||||
$sql = "SELECT
|
||||
CASE
|
||||
WHEN col_call REGEXP '/[PMAQLBR]$|/MM$|/AM$|/QRP$|/LH$|/BCN$' THEN
|
||||
SUBSTRING(col_call, 1, LOCATE('/', col_call) - 1)
|
||||
ELSE
|
||||
col_call
|
||||
END as callsign,
|
||||
COUNT(*) as contact_count,
|
||||
MIN(col_time_on) as first_qso,
|
||||
MAX(col_time_on) as last_qso,
|
||||
GROUP_CONCAT(DISTINCT col_band ORDER BY col_band) as bands,
|
||||
GROUP_CONCAT(DISTINCT COALESCE(col_submode, col_mode) ORDER BY col_mode) as modes
|
||||
FROM " . $this->config->item('table_name') . "
|
||||
WHERE station_id IN (" . $location_list . ")
|
||||
AND col_call IS NOT NULL
|
||||
AND col_call != ''";
|
||||
|
||||
// Apply filters
|
||||
if ($band != 'all') {
|
||||
if ($band == 'SAT') {
|
||||
$sql .= " AND col_prop_mode = 'SAT'";
|
||||
} else {
|
||||
$sql .= " AND col_band = '" . $this->db->escape_str($band) . "'";
|
||||
$sql .= " AND (col_prop_mode != 'SAT' OR col_prop_mode IS NULL)";
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != 'all') {
|
||||
$sql .= " AND (col_mode = '" . $this->db->escape_str($mode) . "' OR col_submode = '" . $this->db->escape_str($mode) . "')";
|
||||
}
|
||||
|
||||
if ($satellite != 'all') {
|
||||
$sql .= " AND col_sat_name = '" . $this->db->escape_str($satellite) . "'";
|
||||
}
|
||||
|
||||
if (!empty($fromdate)) {
|
||||
$sql .= " AND DATE(col_time_on) >= '" . $this->db->escape_str($fromdate) . "'";
|
||||
}
|
||||
|
||||
if (!empty($todate)) {
|
||||
$sql .= " AND DATE(col_time_on) <= '" . $this->db->escape_str($todate) . "'";
|
||||
}
|
||||
|
||||
$sql .= " GROUP BY CASE
|
||||
WHEN col_call REGEXP '/[PMAQLBR]$|/MM$|/AM$|/QRP$|/LH$|/BCN$' THEN
|
||||
SUBSTRING(col_call, 1, LOCATE('/', col_call) - 1)
|
||||
ELSE
|
||||
col_call
|
||||
END
|
||||
HAVING contact_count >= " . $min_qsos . "
|
||||
ORDER BY contact_count DESC, callsign ASC";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
/*
|
||||
* Get list of modes from the active logbook
|
||||
*/
|
||||
function get_modes()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
if (!$logbooks_locations_array) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$location_list = "'" . implode("','", $logbooks_locations_array) . "'";
|
||||
|
||||
$sql = "SELECT DISTINCT COALESCE(col_submode, col_mode) as mode
|
||||
FROM " . $this->config->item('table_name') . "
|
||||
WHERE station_id IN (" . $location_list . ")
|
||||
AND COALESCE(col_submode, col_mode) IS NOT NULL
|
||||
AND COALESCE(col_submode, col_mode) != ''
|
||||
ORDER BY mode";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
/*
|
||||
* Get list of satellites from the active logbook
|
||||
*/
|
||||
function get_satellites()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
if (!$logbooks_locations_array) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$location_list = "'" . implode("','", $logbooks_locations_array) . "'";
|
||||
|
||||
$sql = "SELECT DISTINCT col_sat_name as satellite
|
||||
FROM " . $this->config->item('table_name') . "
|
||||
WHERE station_id IN (" . $location_list . ")
|
||||
AND col_sat_name IS NOT NULL
|
||||
AND col_sat_name != ''
|
||||
ORDER BY col_sat_name";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
/*
|
||||
* Get list of bands from the active logbook
|
||||
*/
|
||||
function get_bands()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
if (!$logbooks_locations_array) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$location_list = "'" . implode("','", $logbooks_locations_array) . "'";
|
||||
|
||||
$sql = "SELECT DISTINCT col_band as band
|
||||
FROM " . $this->config->item('table_name') . "
|
||||
WHERE station_id IN (" . $location_list . ")
|
||||
AND col_band IS NOT NULL
|
||||
AND col_band != ''
|
||||
AND (col_prop_mode != 'SAT' OR col_prop_mode IS NULL)
|
||||
ORDER BY
|
||||
CASE col_band
|
||||
WHEN '160m' THEN 1
|
||||
WHEN '80m' THEN 2
|
||||
WHEN '60m' THEN 3
|
||||
WHEN '40m' THEN 4
|
||||
WHEN '30m' THEN 5
|
||||
WHEN '20m' THEN 6
|
||||
WHEN '17m' THEN 7
|
||||
WHEN '15m' THEN 8
|
||||
WHEN '12m' THEN 9
|
||||
WHEN '10m' THEN 10
|
||||
WHEN '6m' THEN 11
|
||||
WHEN '4m' THEN 12
|
||||
WHEN '2m' THEN 13
|
||||
WHEN '1.25m' THEN 14
|
||||
WHEN '70cm' THEN 15
|
||||
ELSE 999
|
||||
END, col_band";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
$results = array();
|
||||
foreach($query->result() as $row) {
|
||||
$results[] = $row->band;
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get detailed contact information for a specific callsign
|
||||
*/
|
||||
function get_callsign_details($callsign)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
if (!$logbooks_locations_array) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$location_list = "'" . implode("','", $logbooks_locations_array) . "'";
|
||||
|
||||
$this->db->select('col_time_on, col_band, col_mode, col_submode, col_rst_sent, col_rst_rcvd, col_country, col_qsl_sent, col_qsl_rcvd');
|
||||
$this->db->from($this->config->item('table_name'));
|
||||
$this->db->where('station_id IN (' . $location_list . ')', NULL, FALSE);
|
||||
$this->db->where('col_call', $callsign);
|
||||
$this->db->order_by('col_time_on', 'DESC');
|
||||
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
}
|
||||
|
|
@ -12,15 +12,8 @@
|
|||
<div class="alert alert-warning" role="warning">
|
||||
Private feed key empty. Please set the feed key in your profile.
|
||||
</div>
|
||||
<?php } elseif ($error) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<strong>Connection Error:</strong> <?php echo htmlspecialchars($error_message); ?>
|
||||
</div>
|
||||
<?php } elseif ($rovedata === null || !isset($rovedata['data'])) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<strong>Data Error:</strong> Unable to retrieve satellite data. Please try refreshing the page or check back later.
|
||||
</div>
|
||||
<?php } elseif ($rovedata['data'] == []) { ?>
|
||||
<?php } else { ?>
|
||||
<?php if ($rovedata['data'] == []) { ?>
|
||||
<div class="alert alert-warning" role="warning">
|
||||
<?php echo lang('hams_at_no_activations_found'); ?>
|
||||
</div>
|
||||
|
|
@ -160,4 +153,5 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
|
@ -158,31 +158,6 @@ if ($this->session->userdata('user_id') != null) {
|
|||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/buttons.html5.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/selectize.js"></script>
|
||||
|
||||
<?php if ($this->uri->segment(1) == "mostworked") { ?>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#mostworked_table').DataTable({
|
||||
"pageLength": 25,
|
||||
"responsive": true,
|
||||
"order": [[ 0, "asc" ]],
|
||||
"columnDefs": [
|
||||
{ "orderable": false, "targets": 0 },
|
||||
{ "type": "num", "targets": 2 }
|
||||
],
|
||||
"language": {
|
||||
url: getDataTablesLanguageUrl()
|
||||
}
|
||||
});
|
||||
|
||||
// Clear filters button
|
||||
$('#clear_filters').click(function() {
|
||||
$('#mostworked_filter_form')[0].reset();
|
||||
$('#mostworked_filter_form').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->uri->segment(1) == "station") { ?>
|
||||
<script language="javascript" src="<?php echo base_url(); ?>assets/js/HamGridSquare.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets/js/sections/station_locations.js"></script>
|
||||
|
|
|
|||
|
|
@ -133,8 +133,6 @@
|
|||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="<?php echo site_url('timeplotter'); ?>" title="View time when worked"><i class="fas fa-chart-bar"></i> <?php echo lang('menu_timeplotter'); ?></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="<?php echo site_url('mostworked'); ?>" title="Most Worked Callsigns"><i class="fas fa-address-book"></i> <?php echo lang('menu_most_worked'); ?></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="<?php echo site_url('map/custom'); ?>" title="Custom Maps of QSOs"><i class="fas fa-map"></i> <?php echo lang('menu_custom_maps'); ?></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="<?php echo site_url('continents'); ?>" title="Continents"><i class="fas fa-globe-europe"></i> <?php echo lang('menu_continents'); ?></a>
|
||||
|
|
|
|||
|
|
@ -78,9 +78,6 @@
|
|||
<?php $current_date = date('Y-m-d H:i:s'); ?>
|
||||
<?php $warning_date = date('Y-m-d H:i:s', strtotime($row->date_expires.'-30 days')); ?>
|
||||
|
||||
<?php if ($row->archived) { ?>
|
||||
<span class="badge text-bg-secondary"><?php echo 'Archived'; ?></span>
|
||||
<?php } else { ?>
|
||||
<?php if ($current_date > $row->date_expires) { ?>
|
||||
<span class="badge text-bg-danger"><?php echo lang('lotw_expired'); ?></span>
|
||||
<?php } else if ($current_date <= $row->date_expires && $current_date > $warning_date) { ?>
|
||||
|
|
@ -88,7 +85,6 @@
|
|||
<?php } else { ?>
|
||||
<span class="badge text-bg-success"><?php echo lang('lotw_valid'); ?></span>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($row->last_upload) {
|
||||
$last_upload = date($this->config->item('qso_date_format').' H:i:s', strtotime( $row->last_upload )); ?>
|
||||
|
|
@ -98,15 +94,6 @@
|
|||
<?php } ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($row->archived) { ?>
|
||||
<a class="btn btn-outline-info btn-sm me-1" href="<?php echo site_url('lotw/toggle_archive_cert/'.$row->lotw_cert_id); ?>" role="button">
|
||||
<i class="fas fa-box-open"></i> Unarchive
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<a class="btn btn-outline-secondary btn-sm me-1" href="<?php echo site_url('lotw/toggle_archive_cert/'.$row->lotw_cert_id); ?>" role="button">
|
||||
<i class="fas fa-archive"></i> Archive
|
||||
</a>
|
||||
<?php } ?>
|
||||
<a class="btn btn-outline-danger btn-sm" href="<?php echo site_url('lotw/delete_cert/'.$row->lotw_cert_id); ?>" role="button"><i class="far fa-trash-alt"></i> <?php echo lang('lotw_btn_delete'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -1,137 +0,0 @@
|
|||
<div class="container" style="padding-top: 10px;">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Most Worked Callsigns</h2>
|
||||
<p class="card-text">Callsigns worked multiple times from your active logbook, showing contact frequency and other details.</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!-- Filter Form -->
|
||||
<form method="post" id="mostworked_filter_form">
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-2">
|
||||
<label for="band" class="form-label">Band:</label>
|
||||
<select class="form-select form-select-sm" name="band" id="band">
|
||||
<option value="all" <?php echo ($filters['band'] == 'all') ? 'selected' : ''; ?>>All Bands</option>
|
||||
<option value="SAT" <?php echo ($filters['band'] == 'SAT') ? 'selected' : ''; ?>>Satellites</option>
|
||||
<?php foreach($bands as $band) { ?>
|
||||
<option value="<?php echo $band; ?>" <?php echo ($filters['band'] == $band) ? 'selected' : ''; ?>><?php echo $band; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="mode" class="form-label">Mode:</label>
|
||||
<select class="form-select form-select-sm" name="mode" id="mode">
|
||||
<option value="all" <?php echo ($filters['mode'] == 'all') ? 'selected' : ''; ?>>All Modes</option>
|
||||
<?php foreach($modes as $mode) { ?>
|
||||
<option value="<?php echo $mode->mode; ?>" <?php echo ($filters['mode'] == $mode->mode) ? 'selected' : ''; ?>><?php echo $mode->mode; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="satellite" class="form-label">Satellite:</label>
|
||||
<select class="form-select form-select-sm" name="satellite" id="satellite">
|
||||
<option value="all" <?php echo ($filters['satellite'] == 'all') ? 'selected' : ''; ?>>All Satellites</option>
|
||||
<?php foreach($satellites as $sat) { ?>
|
||||
<option value="<?php echo $sat->satellite; ?>" <?php echo ($filters['satellite'] == $sat->satellite) ? 'selected' : ''; ?>><?php echo $sat->satellite; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="fromdate" class="form-label">From Date:</label>
|
||||
<input type="date" class="form-control form-control-sm" name="fromdate" id="fromdate" value="<?php echo $filters['fromdate']; ?>">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="todate" class="form-label">To Date:</label>
|
||||
<input type="date" class="form-control form-control-sm" name="todate" id="todate" value="<?php echo $filters['todate']; ?>">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="min_qsos" class="form-label">Min QSOs:</label>
|
||||
<select class="form-select form-select-sm" name="min_qsos" id="min_qsos">
|
||||
<option value="2" <?php echo ($filters['min_qsos'] == 2) ? 'selected' : ''; ?>>2+</option>
|
||||
<option value="3" <?php echo ($filters['min_qsos'] == 3) ? 'selected' : ''; ?>>3+</option>
|
||||
<option value="5" <?php echo ($filters['min_qsos'] == 5) ? 'selected' : ''; ?>>5+</option>
|
||||
<option value="10" <?php echo ($filters['min_qsos'] == 10) ? 'selected' : ''; ?>>10+</option>
|
||||
<option value="20" <?php echo ($filters['min_qsos'] == 20) ? 'selected' : ''; ?>>20+</option>
|
||||
<option value="50" <?php echo ($filters['min_qsos'] == 50) ? 'selected' : ''; ?>>50+</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-12">
|
||||
<button type="submit" class="btn btn-primary btn-sm">Apply Filters</button>
|
||||
<button type="button" class="btn btn-secondary btn-sm" id="clear_filters">Clear Filters</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php if (empty($mostworked_callsigns)) { ?>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<strong>No QSOs found!</strong> Make sure you have an active logbook selected and QSOs logged, or try adjusting your filters.
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="alert alert-info" role="alert">
|
||||
<strong><?php echo count($mostworked_callsigns); ?> callsigns</strong> worked <?php echo $filters['min_qsos']; ?>+ times with current filters.
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="mostworked_table" class="table table-striped table-hover">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th class="text-center" style="width: 80px;">Rank</th>
|
||||
<th style="width: 150px;">Callsign</th>
|
||||
<th class="text-center" style="width: 100px;">Contacts</th>
|
||||
<th class="text-center" style="width: 120px;">First QSO</th>
|
||||
<th class="text-center" style="width: 120px;">Last QSO</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $rank = 1; ?>
|
||||
<?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');
|
||||
}
|
||||
|
||||
foreach ($mostworked_callsigns as $row) { ?>
|
||||
<tr>
|
||||
<td class="text-center align-middle">
|
||||
<span class="badge bg-secondary"><?php echo $rank++; ?></span>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<strong class="text-primary fs-6"><?php echo str_replace("0","Ø",strtoupper($row->callsign)); ?></strong>
|
||||
</td>
|
||||
<td class="text-center align-middle">
|
||||
<span class="badge bg-primary fs-6"><?php echo $row->contact_count; ?></span>
|
||||
</td>
|
||||
<td class="text-center align-middle">
|
||||
<small class="text-muted">
|
||||
<?php
|
||||
$timestamp = strtotime($row->first_qso);
|
||||
echo date($custom_date_format, $timestamp);
|
||||
?>
|
||||
</small>
|
||||
</td>
|
||||
<td class="text-center align-middle">
|
||||
<small class="text-muted">
|
||||
<?php
|
||||
$timestamp = strtotime($row->last_qso);
|
||||
echo date($custom_date_format, $timestamp);
|
||||
?>
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -34,9 +34,6 @@ function frequencyToBand(frequency) {
|
|||
else if(result >= 50000000 && result <= 56000000) {
|
||||
return '6m';
|
||||
}
|
||||
else if(result >= 70000000 && result <= 72000000) {
|
||||
return '4m';
|
||||
}
|
||||
else if(result >= 144000000 && result <= 148000000) {
|
||||
return '2m';
|
||||
}
|
||||
|
|
|
|||
文件差异因一行或多行过长而隐藏
12097
assets/json/WABSquares.geojson.backup
普通文件
12097
assets/json/WABSquares.geojson.backup
普通文件
文件差异内容过多而无法显示
加载差异
|
|
@ -200,9 +200,6 @@ case 'finnish':
|
|||
case 'russian':
|
||||
$config['language'] = $lang;
|
||||
break;
|
||||
case 'portuguese':
|
||||
$config['language'] = $lang;
|
||||
break;
|
||||
case 'english':
|
||||
$config['language'] = $lang;
|
||||
break;
|
||||
|
|
|
|||
正在加载…
在新工单中引用