比较提交

..

2 提交

作者 SHA1 备注 提交日期
copilot-swe-agent[bot]
082044245d Remove water-only WAB squares from WABSquares.geojson
Co-authored-by: magicbug <84308+magicbug@users.noreply.github.com>
2025-08-22 14:05:04 +00:00
copilot-swe-agent[bot]
287b817568 Initial plan 2025-08-22 13:59:26 +00:00
共有 55 个文件被更改,包括 12397 次插入1161 次删除

查看文件

@ -198,9 +198,6 @@ case 'finnish':
case 'russian': case 'russian':
$config['language'] = $lang; $config['language'] = $lang;
break; break;
case 'portuguese':
$config['language'] = $lang;
break;
case 'english': case 'english':
$config['language'] = $lang; $config['language'] = $lang;
break; 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 */ /* Controls ADIF Import/Export Functions */
@ -11,15 +10,11 @@ class adif extends CI_Controller
$this->load->helper(array('form', 'url')); $this->load->helper(array('form', 'url'));
$this->load->model('user_model'); $this->load->model('user_model');
if (!$this->user_model->authorize(2)) { if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
$this->session->set_flashdata('notice', 'You\'re not allowed to do that!');
redirect('dashboard');
}
} }
/* Shows Export Views */ /* Shows Export Views */
public function export() public function export() {
{
$data['page_title'] = "ADIF Export"; $data['page_title'] = "ADIF Export";
@ -70,8 +65,7 @@ class adif extends CI_Controller
$this->load->view('adif/data/exportsat', $data); $this->load->view('adif/data/exportsat', $data);
} }
public function export_custom() public function export_custom() {
{
// Set memory limit to unlimited to allow heavy usage // Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1'); ini_set('memory_limit', '-1');
@ -80,10 +74,10 @@ class adif extends CI_Controller
$station_id = $this->security->xss_clean($this->input->post('station_profile')); $station_id = $this->security->xss_clean($this->input->post('station_profile'));
// Used for exporting QSOs not previously exported to LoTW // Used for exporting QSOs not previously exported to LoTW
if ($this->input->post('exportLotw') == 1) { if ($this->input->post('exportLotw') == 1) {
$exportLotw = true; $exportLotw = true;
} else { } else {
$exportLotw = false; $exportLotw = false;
} }
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id, $exportLotw); $data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id, $exportLotw);
@ -93,28 +87,29 @@ class adif extends CI_Controller
if ($this->input->post('markLotw') == 1) { 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); {
} $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
// Set memory limit to unlimited to allow heavy usage ini_set('memory_limit', '-1');
ini_set('memory_limit', '-1');
$station_id = $this->security->xss_clean($this->input->post('station_profile')); $station_id = $this->security->xss_clean($this->input->post('station_profile'));
$this->load->model('adif_data'); $this->load->model('adif_data');
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id); $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); {
} $this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY);
}
$this->load->view('adif/mark_lotw', $data); $this->load->view('adif/mark_lotw', $data);
} }
public function export_lotw() public function export_lotw()
{ {
@ -127,21 +122,21 @@ class adif extends CI_Controller
$this->load->view('adif/data/exportall', $data); $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); $this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY);
} }
} }
public function index() public function index() {
{
$this->load->model('stations'); $this->load->model('stations');
$data['page_title'] = "ADIF Import / Export"; $data['page_title'] = "ADIF Import / Export";
$data['max_upload'] = ini_get('upload_max_filesize'); $data['max_upload'] = ini_get('upload_max_filesize');
$data['station_profile'] = $this->stations->all_of_user(); $data['station_profile'] = $this->stations->all_of_user();
$active_station_id = $this->stations->find_active(); $active_station_id = $this->stations->find_active();
$station_profile = $this->stations->profile($active_station_id); $station_profile = $this->stations->profile($active_station_id);
$data['active_station_info'] = $station_profile->row(); $data['active_station_info'] = $station_profile->row();
@ -150,14 +145,13 @@ class adif extends CI_Controller
$this->load->view('interface_assets/footer'); $this->load->view('interface_assets/footer');
} }
public function import() public function import() {
{
$this->load->model('stations'); $this->load->model('stations');
$data['station_profile'] = $this->stations->all_of_user(); $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(); $active_station_id = $this->stations->find_active();
$station_profile = $this->stations->profile($active_station_id); $station_profile = $this->stations->profile($active_station_id);
$data['active_station_info'] = $station_profile->row(); $data['active_station_info'] = $station_profile->row();
@ -169,7 +163,7 @@ class adif extends CI_Controller
$this->load->library('upload', $config); $this->load->library('upload', $config);
if (! $this->upload->do_upload()) { if ( ! $this->upload->do_upload()) {
$data['error'] = $this->upload->display_errors(); $data['error'] = $this->upload->display_errors();
$data['max_upload'] = ini_get('upload_max_filesize'); $data['max_upload'] = ini_get('upload_max_filesize');
@ -187,38 +181,39 @@ class adif extends CI_Controller
$this->load->library('adif_parser'); $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']);
unlink('./uploads/' . $data['upload_data']['file_name']); unlink('./uploads/'.$data['upload_data']['file_name']);
$data['upload_data'] = ''; // free memory $data['upload_data']=''; // free memory
$this->adif_parser->initialize(); $this->adif_parser->initialize();
$custom_errors = ""; $custom_errors = "";
$alladif = []; $alladif=[];
while ($record = $this->adif_parser->get_record()) { while($record = $this->adif_parser->get_record())
if (count($record) == 0) { {
if(count($record) == 0) {
break; break;
}; };
array_push($alladif, $record); array_push($alladif,$record);
}; };
$record = ''; // free memory $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')); $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 { } else {
$custom_errors = 'Station Profile not valid for User'; $custom_errors='Station Profile not valid for User';
} }
$data['adif_errors'] = $custom_errors; $data['adif_errors'] = $custom_errors;
$data['skip_dupes'] = $this->input->post('skipDuplicate'); $data['skip_dupes'] = $this->input->post('skipDuplicate');
log_message("debug", "Finished ADIF Import"); log_message("debug","Finished ADIF Import");
$data['page_title'] = "ADIF Imported"; $data['page_title'] = "ADIF Imported";
$this->load->view('interface_assets/header', $data); $this->load->view('interface_assets/header', $data);
$this->load->view('adif/import_success'); $this->load->view('adif/import_success');
$this->load->view('interface_assets/footer'); $this->load->view('interface_assets/footer');
} }
} }
public function dcl() public function dcl() {
{
$this->load->model('stations'); $this->load->model('stations');
$data['station_profile'] = $this->stations->all_of_user(); $data['station_profile'] = $this->stations->all_of_user();
@ -230,7 +225,7 @@ class adif extends CI_Controller
$this->load->library('upload', $config); $this->load->library('upload', $config);
if (! $this->upload->do_upload()) { if ( ! $this->upload->do_upload()) {
$data['error'] = $this->upload->display_errors(); $data['error'] = $this->upload->display_errors();
$data['max_upload'] = ini_get('upload_max_filesize'); $data['max_upload'] = ini_get('upload_max_filesize');
@ -248,33 +243,34 @@ class adif extends CI_Controller
$this->load->library('adif_parser'); $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(); $this->adif_parser->initialize();
$error_count = array(0, 0, 0); $error_count = array(0, 0, 0);
$custom_errors = ""; $custom_errors = "";
while ($record = $this->adif_parser->get_record()) { while($record = $this->adif_parser->get_record())
if (count($record) == 0) { {
if(count($record) == 0) {
break; break;
}; };
$dok_result = $this->logbook_model->update_dok($record, $this->input->post('ignoreAmbiguous'), $this->input->post('onlyConfirmed'), $this->input->post('overwriteDok')); $dok_result = $this->logbook_model->update_dok($record, $this->input->post('ignoreAmbiguous'), $this->input->post('onlyConfirmed'), $this->input->post('overwriteDok'));
if (!empty($dok_result)) { if (!empty($dok_result)) {
switch ($dok_result[0]) { switch ($dok_result[0]) {
case 0: case 0:
$error_count[0]++; $error_count[0]++;
break; break;
case 1: case 1:
$custom_errors .= $dok_result[1]; $custom_errors .= $dok_result[1];
$error_count[1]++; $error_count[1]++;
break; break;
case 2: case 2:
$custom_errors .= $dok_result[1]; $custom_errors .= $dok_result[1];
$error_count[2]++; $error_count[2]++;
} }
} }
}; };
unlink('./uploads/' . $data['upload_data']['file_name']); unlink('./uploads/'.$data['upload_data']['file_name']);
$data['dcl_error_count'] = $error_count; $data['dcl_error_count'] = $error_count;
$data['dcl_errors'] = $custom_errors; $data['dcl_errors'] = $custom_errors;
$data['page_title'] = "DCL Data Imported"; $data['page_title'] = "DCL Data Imported";
@ -282,7 +278,7 @@ class adif extends CI_Controller
$this->load->view('adif/dcl_success'); $this->load->view('adif/dcl_success');
$this->load->view('interface_assets/footer'); $this->load->view('interface_assets/footer');
} }
} }
} }
/* End of file adif.php */ /* End of file adif.php */

查看文件

@ -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 // Do absolutely nothing
function index() function index()
@ -15,7 +14,7 @@ class API extends CI_Controller
// Check if users logged in // Check if users logged in
if ($this->user_model->validate_session() == 0) { if($this->user_model->validate_session() == 0) {
// user is not logged in // user is not logged in
redirect('user/login'); redirect('user/login');
} }
@ -32,13 +31,12 @@ class API extends CI_Controller
} }
function edit($key) function edit($key) {
{
$this->load->model('user_model'); $this->load->model('user_model');
// Check if users logged in // Check if users logged in
if ($this->user_model->validate_session() == 0) { if($this->user_model->validate_session() == 0) {
// user is not logged in // user is not logged in
redirect('user/login'); redirect('user/login');
} }
@ -47,37 +45,40 @@ class API extends CI_Controller
$this->load->helper(array('form', 'url')); $this->load->helper(array('form', 'url'));
$this->load->library('form_validation'); $this->load->library('form_validation');
$this->form_validation->set_rules('api_desc', 'API Description', 'required'); $this->form_validation->set_rules('api_desc', 'API Description', 'required');
$this->form_validation->set_rules('api_key', 'API Key is required do not change this field', 'required'); $this->form_validation->set_rules('api_key', 'API Key is required do not change this field', 'required');
$data['api_info'] = $this->api_model->key_description($key); $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"; {
$data['page_title'] = "Edit API Description";
$this->load->view('interface_assets/header', $data); $this->load->view('interface_assets/header', $data);
$this->load->view('api/description'); $this->load->view('api/description');
$this->load->view('interface_assets/footer'); $this->load->view('interface_assets/footer');
} else { }
else
{
// Success! // Success!
$this->api_model->update_key_description($this->input->post('api_key'), $this->input->post('api_desc')); $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'); redirect('api/help');
} }
} }
function generate($rights) function generate($rights) {
{
$this->load->model('user_model'); $this->load->model('user_model');
// Check if users logged in // Check if users logged in
if ($this->user_model->validate_session() == 0) { if($this->user_model->validate_session() == 0) {
// user is not logged in // user is not logged in
redirect('user/login'); redirect('user/login');
} }
@ -90,13 +91,12 @@ class API extends CI_Controller
redirect('api/help'); redirect('api/help');
} }
function delete($key) function delete($key) {
{
$this->load->model('user_model'); $this->load->model('user_model');
// Check if users logged in // Check if users logged in
if ($this->user_model->validate_session() == 0) { if($this->user_model->validate_session() == 0) {
// user is not logged in // user is not logged in
redirect('user/login'); redirect('user/login');
} }
@ -106,33 +106,31 @@ class API extends CI_Controller
$this->api_model->delete_key($key); $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'); redirect('api/help');
} }
// Example of authing // Example of authing
function auth($key) function auth($key) {
{
$this->load->model('api_model'); $this->load->model('api_model');
header("Content-type: text/xml"); 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 "<auth>";
echo "<message>Key Invalid - either not found or disabled</message>"; echo "<message>Key Invalid - either not found or disabled</message>";
echo "</auth>"; echo "</auth>";
} else { } else {
echo "<auth>"; echo "<auth>";
echo "<status>Valid</status>"; echo "<status>Valid</status>";
echo "<rights>" . $this->api_model->access($key) . "</rights>"; echo "<rights>".$this->api_model->access($key)."</rights>";
echo "</auth>"; echo "</auth>";
} }
} }
function check_auth($key) function check_auth($key) {
{
$this->load->model('api_model'); $this->load->model('api_model');
header("Content-type: text/xml"); 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 // set the content type as json
header("Content-type: application/json"); header("Content-type: application/json");
@ -152,24 +150,23 @@ class API extends CI_Controller
} }
} }
function station_info($key) function station_info($key) {
{
$this->load->model('api_model'); $this->load->model('api_model');
$this->load->model('stations'); $this->load->model('stations');
header("Content-type: application/json"); 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); $this->api_model->update_last_used($key);
$userid = $this->api_model->key_userid($key); $userid = $this->api_model->key_userid($key);
$station_ids = array(); $station_ids = array();
$stations = $this->stations->all_of_user($userid); $stations=$this->stations->all_of_user($userid);
foreach ($stations->result() as $row) { foreach ($stations->result() as $row) {
$result['station_id'] = $row->station_id; $result['station_id']=$row->station_id;
$result['station_profile_name'] = $row->station_profile_name; $result['station_profile_name']=$row->station_profile_name;
$result['station_gridsquare'] = $row->station_gridsquare; $result['station_gridsquare']=$row->station_gridsquare;
$result['station_callsign'] = $row->station_callsign;; $result['station_callsign']=$row->station_callsign;;
$result['station_active'] = $row->station_active; $result['station_active']=$row->station_active;
array_push($station_ids, $result); array_push($station_ids, $result);
} }
echo json_encode($station_ids); echo json_encode($station_ids);
} else { } else {
http_response_code(401); http_response_code(401);
@ -178,13 +175,12 @@ class API extends CI_Controller
} }
/* /*
* *
* Function: QSO * Function: QSO
* Task: allows passing of ADIF data to Cloudlog * Task: allows passing of ADIF data to Cloudlog
*/ */
function qso() function qso() {
{
header('Content-type: application/json'); header('Content-type: application/json');
$this->load->model('api_model'); $this->load->model('api_model');
@ -198,29 +194,29 @@ class API extends CI_Controller
$obj = json_decode(file_get_contents("php://input"), true); $obj = json_decode(file_get_contents("php://input"), true);
if ($obj === NULL) { if ($obj === NULL) {
// Decoding not valid try simple www-x-form-urlencoded // Decoding not valid try simple www-x-form-urlencoded
$objTmp = file_get_contents("php://input"); $objTmp = file_get_contents("php://input");
parse_str($objTmp, $obj); parse_str($objTmp, $obj);
if ($obj === NULL) { if ($obj === NULL) {
echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]); echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]);
die(); die();
} }
} }
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); http_response_code(401);
echo json_encode(['status' => 'failed', 'reason' => "missing api key"]); echo json_encode(['status' => 'failed', 'reason' => "missing api key"]);
die(); die();
} }
$userid = $this->api_model->key_userid($obj['key']); $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); http_response_code(401);
echo json_encode(['status' => 'failed', 'reason' => "station id does not belong to the API key owner."]); echo json_encode(['status' => 'failed', 'reason' => "station id does not belong to the API key owner."]);
die(); die();
} }
if ($obj['type'] == "adif" && $obj['string'] != "") { if($obj['type'] == "adif" && $obj['string'] != "") {
// Load the logbook model for adding QSO records // Load the logbook model for adding QSO records
$this->load->model('logbook_model'); $this->load->model('logbook_model');
@ -231,20 +227,22 @@ class API extends CI_Controller
$this->adif_parser->feed($obj['string']); $this->adif_parser->feed($obj['string']);
// Create QSO Record // Create QSO Record
while ($record = $this->adif_parser->get_record()) { while($record = $this->adif_parser->get_record())
if (count($record) == 0) { {
if(count($record) == 0)
{
break; break;
}; };
if (isset($obj['station_profile_id'])) { 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($record['station_callsign']) && $this->stations->check_station_against_callsign($obj['station_profile_id'], $record['station_callsign']) == false) {
http_response_code(401); http_response_code(401);
echo json_encode(['status' => 'failed', 'reason' => "station callsign does not match station callsign in station profile."]); echo json_encode(['status' => 'failed', 'reason' => "station callsign does not match station callsign in station profile."]);
die(); die();
} }
if (!(isset($record['call'])) || (trim($record['call']) == '')) { if(!(isset($record['call'])) || (trim($record['call']) == '')) {
http_response_code(401); http_response_code(401);
echo json_encode(['status' => 'failed', 'reason' => "QSO Call is empty."]); echo json_encode(['status' => 'failed', 'reason' => "QSO Call is empty."]);
die(); 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); $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++; $return_count++;
} else { } else {
$return_msg[] = $msg; $return_msg[] = $msg;
} }
} }
}; };
http_response_code(201); 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 // 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'); header('Content-type: application/json');
$this->load->model('api_model'); $this->load->model('api_model');
@ -276,29 +276,29 @@ class API extends CI_Controller
// Decode JSON and store // Decode JSON and store
$obj = json_decode(file_get_contents("php://input"), true); $obj = json_decode(file_get_contents("php://input"), true);
if ($obj === NULL) { if ($obj === NULL) {
echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]); echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]);
return; 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); http_response_code(401);
echo json_encode(['status' => 'failed', 'reason' => "missing api key"]); echo json_encode(['status' => 'failed', 'reason' => "missing api key"]);
return; return;
} }
if (!isset($obj['logbook_public_slug']) || !isset($obj['callsign'])) { if(!isset($obj['logbook_public_slug']) || !isset($obj['callsign'])) {
http_response_code(401); http_response_code(401);
echo json_encode(['status' => 'failed', 'reason' => "missing fields"]); echo json_encode(['status' => 'failed', 'reason' => "missing fields"]);
return; return;
} }
if ($obj['logbook_public_slug'] != "" && $obj['callsign'] != "") { if($obj['logbook_public_slug'] != "" && $obj['callsign'] != "") {
$logbook_slug = $obj['logbook_public_slug']; $logbook_slug = $obj['logbook_public_slug'];
$callsign = $obj['callsign']; $callsign = $obj['callsign'];
// If $obj['band'] exists // If $obj['band'] exists
if (isset($obj['band'])) { if(isset($obj['band'])) {
$band = $obj['band']; $band = $obj['band'];
} else { } else {
$band = null; $band = null;
@ -306,12 +306,13 @@ class API extends CI_Controller
$this->load->model('logbooks_model'); $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); $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 // Get associated station locations for mysql queries
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id); $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id);
if (!$logbooks_locations_array) { if (!$logbooks_locations_array) {
// Logbook not found // Logbook not found
http_response_code(404); http_response_code(404);
@ -321,7 +322,7 @@ class API extends CI_Controller
} else { } else {
// Logbook not found // Logbook not found
http_response_code(404); 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(); die();
} }
// Search Logbook for callsign // 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); $result = $this->logbook_model->check_if_callsign_worked_in_logbook($callsign, $logbooks_locations_array, $band);
http_response_code(201); http_response_code(201);
if ($result > 0) { if($result > 0)
{
echo json_encode(['callsign' => $callsign, 'result' => 'Found']); echo json_encode(['callsign' => $callsign, 'result' => 'Found']);
} else { } else {
echo json_encode(['callsign' => $callsign, 'result' => 'Not Found']); 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"]); echo json_encode(['status' => 'failed', 'reason' => "logbook not found"]);
die(); die();
} }
} }
} }
// API function to check if a grid is in the logbook already // 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'); header('Content-type: application/json');
$this->load->model('api_model'); $this->load->model('api_model');
@ -354,27 +357,27 @@ class API extends CI_Controller
// Decode JSON and store // Decode JSON and store
$obj = json_decode(file_get_contents("php://input"), true); $obj = json_decode(file_get_contents("php://input"), true);
if ($obj === NULL) { if ($obj === NULL) {
echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]); 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); http_response_code(401);
echo json_encode(['status' => 'failed', 'reason' => "missing api key"]); 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); http_response_code(401);
echo json_encode(['status' => 'failed', 'reason' => "missing fields"]); echo json_encode(['status' => 'failed', 'reason' => "missing fields"]);
return; return;
} }
if ($obj['logbook_public_slug'] != "" && $obj['grid'] != "") { if($obj['logbook_public_slug'] != "" && $obj['grid'] != "") {
$logbook_slug = $obj['logbook_public_slug']; $logbook_slug = $obj['logbook_public_slug'];
$grid = $obj['grid']; $grid = $obj['grid'];
// If $obj['band'] exists // If $obj['band'] exists
if (isset($obj['band'])) { if(isset($obj['band'])) {
$band = $obj['band']; $band = $obj['band'];
} else { } else {
$band = null; $band = null;
@ -382,12 +385,13 @@ class API extends CI_Controller
$this->load->model('logbooks_model'); $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); $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 // Get associated station locations for mysql queries
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id); $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id);
if (!$logbooks_locations_array) { if (!$logbooks_locations_array) {
// Logbook not found // Logbook not found
http_response_code(404); http_response_code(404);
@ -397,7 +401,7 @@ class API extends CI_Controller
} else { } else {
// Logbook not found // Logbook not found
http_response_code(404); 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(); die();
} }
// Search Logbook for callsign // 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); $result = $this->logbook_model->check_if_grid_worked_in_logbook($grid, $logbooks_locations_array, $band);
http_response_code(201); http_response_code(201);
if ($result > 0) { if($result > 0)
{
echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Found']); echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Found']);
} else { } else {
echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Not Found']); 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"]); echo json_encode(['status' => 'failed', 'reason' => "logbook not found"]);
die(); die();
} }
} }
} }
@ -480,16 +487,16 @@ class API extends CI_Controller
return; 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); http_response_code(401);
echo json_encode(['status' => 'failed', 'reason' => "missing api key"]); echo json_encode(['status' => 'failed', 'reason' => "missing api key"]);
return; return;
} }
if (!isset($obj['logbook_public_slug']) || !isset($obj['callsign'])) { if(!isset($obj['logbook_public_slug']) || !isset($obj['callsign'])) {
http_response_code(401); http_response_code(401);
echo json_encode(['status' => 'failed', 'reason' => "missing fields"]); echo json_encode(['status' => 'failed', 'reason' => "missing fields"]);
return; return;
} }
// Load models // Load models
@ -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); $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 // Get associated station locations for mysql queries
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id); $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id);
@ -531,7 +539,7 @@ class API extends CI_Controller
} else { } else {
// Logbook not found // Logbook not found
http_response_code(404); 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(); die();
} }
@ -596,8 +604,7 @@ class API extends CI_Controller
/* ENDPOINT for Rig Control */ /* ENDPOINT for Rig Control */
function radio() function radio() {
{
header('Content-type: application/json'); header('Content-type: application/json');
$this->load->model('api_model'); $this->load->model('api_model');
@ -611,7 +618,7 @@ class API extends CI_Controller
// Decode JSON and store // Decode JSON and store
$obj = json_decode(file_get_contents("php://input"), true); $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); http_response_code(401);
echo json_encode(['status' => 'failed', 'reason' => "missing api key"]); echo json_encode(['status' => 'failed', 'reason' => "missing api key"]);
die(); die();
@ -629,6 +636,7 @@ class API extends CI_Controller
$arr = array('status' => 'success'); $arr = array('status' => 'success');
echo json_encode($arr); 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'); header('Content-type: application/json');
$this->load->model('logbook_model'); $this->load->model('logbook_model');
@ -649,10 +656,10 @@ class API extends CI_Controller
http_response_code(201); 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']]); 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 // start benchmarking
$this->output->enable_profiler(TRUE); $this->output->enable_profiler(TRUE);
/* /*
@ -672,9 +679,7 @@ class API extends CI_Controller
// Make sure users logged in // Make sure users logged in
$this->load->model('user_model'); $this->load->model('user_model');
if (!$this->user_model->authorize($this->config->item('auth_mode'))) { if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
return;
}
$this->load->model("logbook_model"); $this->load->model("logbook_model");
@ -706,9 +711,9 @@ class API extends CI_Controller
* Handle POST data being sent to check lookups * Handle POST data being sent to check lookups
* *
*/ */
$raw_input = json_decode(file_get_contents("php://input"), true); $raw_input = json_decode(file_get_contents("php://input"), true);
$lookup_callsign = strtoupper($raw_input['callsign']); $lookup_callsign = strtoupper($raw_input['callsign']);
/* /*
@ -716,7 +721,7 @@ class API extends CI_Controller
* Handle Callsign field * Handle Callsign field
* *
*/ */
$return['callsign'] = $lookup_callsign; $return['callsign'] = $lookup_callsign;
/* /*
* *
@ -724,63 +729,65 @@ class API extends CI_Controller
* *
*/ */
$callsign_dxcc_lookup = $this->logbook_model->dxcc_lookup($lookup_callsign, $date); $callsign_dxcc_lookup = $this->logbook_model->dxcc_lookup($lookup_callsign, $date);
$last_slash_pos = strrpos($lookup_callsign, '/'); $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); $suffix_slash = $last_slash_pos === false ? $lookup_callsign : substr($lookup_callsign, $last_slash_pos + 1);
switch ($suffix_slash) { switch ($suffix_slash) {
case "P": case "P":
$suffix_slash_item = "Portable"; $suffix_slash_item = "Portable";
break; break;
case "M": case "M":
$suffix_slash_item = "Mobile"; $suffix_slash_item = "Mobile";
case "MM": case "MM":
$suffix_slash_item = "Maritime Mobile"; $suffix_slash_item = "Maritime Mobile";
break; break;
default: default:
// If its not one of the above suffix slashes its likely dxcc // If its not one of the above suffix slashes its likely dxcc
$ans2 = $this->logbook_model->dxcc_lookup($suffix_slash, $date); $ans2 = $this->logbook_model->dxcc_lookup($suffix_slash, $date);
$suffix_slash_item = null; $suffix_slash_item = null;
}
$return['suffix_slash'] = $suffix_slash_item;
} }
$return['suffix_slash'] = $suffix_slash_item; // If the final slash is a DXCC then find it!
} if (isset($ans2['call'])) {
$return['dxcc'] = $ans2['entity'];
// If the final slash is a DXCC then find it! $return['dxcc_lat'] = $ans2['lat'];
if (isset($ans2['call'])) { $return['dxcc_long'] = $ans2['long'];
$return['dxcc'] = $ans2['entity']; $return['dxcc_cqz'] = $ans2['cqz'];
$return['dxcc_lat'] = $ans2['lat']; } else {
$return['dxcc_long'] = $ans2['long']; $return['dxcc'] = $callsign_dxcc_lookup['entity'];
$return['dxcc_cqz'] = $ans2['cqz']; $return['dxcc_lat'] = $callsign_dxcc_lookup['lat'];
} else { $return['dxcc_long'] = $callsign_dxcc_lookup['long'];
$return['dxcc'] = $callsign_dxcc_lookup['entity']; $return['dxcc_cqz'] = $callsign_dxcc_lookup['cqz'];
$return['dxcc_lat'] = $callsign_dxcc_lookup['lat']; }
$return['dxcc_long'] = $callsign_dxcc_lookup['long'];
$return['dxcc_cqz'] = $callsign_dxcc_lookup['cqz'];
}
/* /*
* *
* Pool any local data we have for a callsign * Pool any local data we have for a callsign
* *
*/ */
$call_lookup_results = $this->logbook_model->call_lookup_result($lookup_callsign); $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['name'] = $call_lookup_results->COL_NAME;
$return['location'] = $call_lookup_results->COL_QTH; $return['gridsquare'] = $call_lookup_results->COL_GRIDSQUARE;
$return['iota_ref'] = $call_lookup_results->COL_IOTA; $return['location'] = $call_lookup_results->COL_QTH;
$return['qsl_manager'] = $call_lookup_results->COL_QSL_VIA; $return['iota_ref'] = $call_lookup_results->COL_IOTA;
$return['state'] = $call_lookup_results->COL_STATE; $return['qsl_manager'] = $call_lookup_results->COL_QSL_VIA;
$return['us_county'] = $call_lookup_results->COL_CNTY; $return['state'] = $call_lookup_results->COL_STATE;
$return['us_county'] = $call_lookup_results->COL_CNTY;
if ($return['gridsquare'] != "") {
$return['latlng'] = $this->qralatlng($return['gridsquare']);
}
if ($return['gridsquare'] != "") {
$return['latlng'] = $this->qralatlng($return['gridsquare']);
} }
}
/* /*
@ -802,8 +809,7 @@ class API extends CI_Controller
$this->output->enable_profiler(FALSE); $this->output->enable_profiler(FALSE);
} }
function qralatlng($qra) function qralatlng($qra) {
{
$this->load->library('Qra'); $this->load->library('Qra');
$latlng = $this->qra->qra2latlong($qra); $latlng = $this->qra->qra2latlong($qra);
return $latlng; return $latlng;
@ -842,34 +848,30 @@ class API extends CI_Controller
* "logbook_slug": "my-public-logbook" * "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'); header('Content-type: application/json');
// Validate and sanitize $limit if($public_slug == null) {
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) {
http_response_code(400); http_response_code(400);
echo json_encode(['status' => 'failed', 'reason' => 'missing public_slug parameter']); echo json_encode(['status' => 'failed', 'reason' => 'missing public_slug parameter']);
return; 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('logbooks_model');
$this->load->model('logbook_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); $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 // Get associated station locations for mysql queries
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id); $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id);
@ -881,7 +883,7 @@ class API extends CI_Controller
// Get recent QSOs using existing method // Get recent QSOs using existing method
$recent_qsos_query = $this->logbook_model->get_last_qsos($limit, $logbooks_locations_array); $recent_qsos_query = $this->logbook_model->get_last_qsos($limit, $logbooks_locations_array);
if ($recent_qsos_query == null) { if ($recent_qsos_query == null) {
http_response_code(404); http_response_code(404);
echo json_encode(['status' => 'failed', 'reason' => 'No QSOs found']); echo json_encode(['status' => 'failed', 'reason' => 'No QSOs found']);
@ -900,7 +902,7 @@ class API extends CI_Controller
'rst_sent' => $row->COL_RST_SENT, 'rst_sent' => $row->COL_RST_SENT,
'rst_rcvd' => $row->COL_RST_RCVD 'rst_rcvd' => $row->COL_RST_RCVD
); );
// Add optional fields if they exist // Add optional fields if they exist
if ($row->COL_STX_STRING) { if ($row->COL_STX_STRING) {
$qso['stx_string'] = $row->COL_STX_STRING; $qso['stx_string'] = $row->COL_STX_STRING;
@ -917,16 +919,7 @@ class API extends CI_Controller
if ($row->COL_NAME) { if ($row->COL_NAME) {
$qso['name'] = $row->COL_NAME; $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; $qsos[] = $qso;
} }
@ -936,9 +929,10 @@ class API extends CI_Controller
'count' => count($qsos), 'count' => count($qsos),
'logbook_slug' => $public_slug 'logbook_slug' => $public_slug
], JSON_PRETTY_PRINT); ], JSON_PRETTY_PRINT);
} else { } else {
http_response_code(404); 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 { } else {
http_response_code(404); http_response_code(404);

查看文件

@ -22,49 +22,18 @@ class Components extends CI_Controller {
$data['user_hamsat_key']=''; $data['user_hamsat_key']='';
} }
$url = 'https://hams.at/api/alerts/upcoming'; $url = 'https://hams.at/api/alerts/upcoming';
if ($data['user_hamsat_key'] ?? '' != '') {
// Initialize error state $options = array(
$data['error'] = false; 'http' => array(
$data['error_message'] = ''; 'method' => 'GET',
'header' => "Authorization: Bearer ".$data['user_hamsat_key']."\r\n"
try { )
if ($data['user_hamsat_key'] ?? '' != '') { );
$options = array( $context = stream_context_create($options);
'http' => array( $json = file_get_contents($url, false, $context);
'method' => 'GET', } else {
'header' => "Authorization: Bearer ".$data['user_hamsat_key']."\r\n", $json = file_get_contents($url);
'timeout' => 10 // Add timeout to prevent long hangs
)
);
$context = stream_context_create($options);
$json = @file_get_contents($url, false, $context);
} else {
$json = @file_get_contents($url, false, stream_context_create(array(
'http' => array('timeout' => 10)
)));
}
// 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(); $hkey_opt=$this->user_options_model->get_options('hamsat',array('option_name'=>'hamsat_key','option_key'=>'workable'))->result();
if (count($hkey_opt)>0) { if (count($hkey_opt)>0) {
$data['user_hamsat_workable_only'] = $hkey_opt[0]->option_value; $data['user_hamsat_workable_only'] = $hkey_opt[0]->option_value;
@ -73,6 +42,7 @@ class Components extends CI_Controller {
} }
$this->load->model('stations'); $this->load->model('stations');
$data['rovedata'] = json_decode($json, true);
$data['gridsquare'] = strtoupper($this->stations->find_gridsquare()); $data['gridsquare'] = strtoupper($this->stations->find_gridsquare());
// load view // load view

查看文件

@ -378,31 +378,6 @@ class Lotw extends CI_Controller {
redirect('/lotw/'); 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_timeline'] = 'Timeline';
$lang['menu_accumulated_statistics'] = 'Accumulated Statistics'; $lang['menu_accumulated_statistics'] = 'Accumulated Statistics';
$lang['menu_timeplotter'] = 'Timeplotter'; $lang['menu_timeplotter'] = 'Timeplotter';
$lang['menu_most_worked'] = 'Най-Работени';
$lang['menu_custom_maps'] = 'Custom Maps'; $lang['menu_custom_maps'] = 'Custom Maps';
$lang['menu_continents'] = 'Continents'; $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_timeline'] = '时间线';
$lang['menu_accumulated_statistics'] = '累积统计'; $lang['menu_accumulated_statistics'] = '累积统计';
$lang['menu_timeplotter'] = '时间图'; $lang['menu_timeplotter'] = '时间图';
$lang['menu_most_worked'] = '最常工作';
$lang['menu_custom_maps'] = '自定义地图'; $lang['menu_custom_maps'] = '自定义地图';
$lang['menu_continents'] = '大陆'; $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_timeline'] = 'Časová osa';
$lang['menu_accumulated_statistics'] = 'Kumulativní statistiky'; $lang['menu_accumulated_statistics'] = 'Kumulativní statistiky';
$lang['menu_timeplotter'] = 'Graf času'; $lang['menu_timeplotter'] = 'Graf času';
$lang['menu_most_worked'] = 'Nejvíce Pracované';
$lang['menu_custom_maps'] = 'Vlastní mapy'; $lang['menu_custom_maps'] = 'Vlastní mapy';
$lang['menu_continents'] = 'Kontinenty'; $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_timeline'] = 'Timeline';
$lang['menu_accumulated_statistics'] = 'Accumulated Statistics'; $lang['menu_accumulated_statistics'] = 'Accumulated Statistics';
$lang['menu_timeplotter'] = 'Timeplotter'; $lang['menu_timeplotter'] = 'Timeplotter';
$lang['menu_most_worked'] = 'Meest Gewerkt';
$lang['menu_custom_maps'] = 'Custom Maps'; $lang['menu_custom_maps'] = 'Custom Maps';
$lang['menu_continents'] = 'Continents'; $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_timeline'] = 'Timeline';
$lang['menu_accumulated_statistics'] = 'Accumulated Statistics'; $lang['menu_accumulated_statistics'] = 'Accumulated Statistics';
$lang['menu_timeplotter'] = 'Timeplotter'; $lang['menu_timeplotter'] = 'Timeplotter';
$lang['menu_most_worked'] = 'Most Worked';
$lang['menu_custom_maps'] = 'Custom Maps'; $lang['menu_custom_maps'] = 'Custom Maps';
$lang['menu_continents'] = 'Continents'; $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_timeline'] = 'Aikajana';
$lang['menu_accumulated_statistics'] = 'Kertyneet tilastot'; $lang['menu_accumulated_statistics'] = 'Kertyneet tilastot';
$lang['menu_timeplotter'] = 'Aikajana'; $lang['menu_timeplotter'] = 'Aikajana';
$lang['menu_most_worked'] = 'Eniten Työskennellyt';
$lang['menu_custom_maps'] = 'Custom Maps'; $lang['menu_custom_maps'] = 'Custom Maps';
$lang['menu_continents'] = 'Mantereet'; $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_timeline'] = 'Timeline';
$lang['menu_accumulated_statistics'] = 'Accumulated Statistics'; $lang['menu_accumulated_statistics'] = 'Accumulated Statistics';
$lang['menu_timeplotter'] = 'Timeplotter'; $lang['menu_timeplotter'] = 'Timeplotter';
$lang['menu_most_worked'] = 'Plus Travaillé';
$lang['menu_custom_maps'] = 'Custom Maps'; $lang['menu_custom_maps'] = 'Custom Maps';
$lang['menu_continents'] = 'Continents'; $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_timeline'] = 'Zeitleiste';
$lang['menu_accumulated_statistics'] = 'Kumulierte Statistiken'; $lang['menu_accumulated_statistics'] = 'Kumulierte Statistiken';
$lang['menu_timeplotter'] = 'Zeitplotter'; $lang['menu_timeplotter'] = 'Zeitplotter';
$lang['menu_most_worked'] = 'Meist Gearbeitet';
$lang['menu_custom_maps'] = 'Benutzerdefinierte Karte'; $lang['menu_custom_maps'] = 'Benutzerdefinierte Karte';
$lang['menu_continents'] = 'Kontinente'; $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_timeline'] = 'Timeline';
$lang['menu_accumulated_statistics'] = 'Accumulated Statistics'; $lang['menu_accumulated_statistics'] = 'Accumulated Statistics';
$lang['menu_timeplotter'] = 'Timeplotter'; $lang['menu_timeplotter'] = 'Timeplotter';
$lang['menu_most_worked'] = 'Περισσότερα Εργασμένα';
$lang['menu_custom_maps'] = 'Custom Maps'; $lang['menu_custom_maps'] = 'Custom Maps';
$lang['menu_continents'] = 'Continents'; $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_timeline'] = 'Cronologia';
$lang['menu_accumulated_statistics'] = 'Statistiche accumulate'; $lang['menu_accumulated_statistics'] = 'Statistiche accumulate';
$lang['menu_timeplotter'] = 'Plotter temporale'; $lang['menu_timeplotter'] = 'Plotter temporale';
$lang['menu_most_worked'] = 'Più Lavorato';
$lang['menu_custom_maps'] = 'Mappe personalizzate'; $lang['menu_custom_maps'] = 'Mappe personalizzate';
$lang['menu_continents'] = 'Continenti'; $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_timeline'] = 'Oś czasu';
$lang['menu_accumulated_statistics'] = 'Skumulowane statystyki'; $lang['menu_accumulated_statistics'] = 'Skumulowane statystyki';
$lang['menu_timeplotter'] = 'Ploter czasu'; $lang['menu_timeplotter'] = 'Ploter czasu';
$lang['menu_most_worked'] = 'Najczęściej Pracowane';
$lang['menu_custom_maps'] = 'Niestandardowe mapy'; $lang['menu_custom_maps'] = 'Niestandardowe mapy';
$lang['menu_continents'] = 'Kontynenty'; $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_timeline'] = 'Linha do Tempo';
$lang['menu_accumulated_statistics'] = 'Estatísticas Acumuladas'; $lang['menu_accumulated_statistics'] = 'Estatísticas Acumuladas';
$lang['menu_timeplotter'] = 'Gráfico Temporal'; $lang['menu_timeplotter'] = 'Gráfico Temporal';
$lang['menu_most_worked'] = 'Mais Trabalhado';
$lang['menu_custom_maps'] = 'Mapas Personalizados'; $lang['menu_custom_maps'] = 'Mapas Personalizados';
$lang['menu_continents'] = 'Continentes'; $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_timeline'] = 'Лента событий';
$lang['menu_accumulated_statistics'] = 'Объединённая статистика'; $lang['menu_accumulated_statistics'] = 'Объединённая статистика';
$lang['menu_timeplotter'] = 'Графики'; $lang['menu_timeplotter'] = 'Графики';
$lang['menu_most_worked'] = 'Самые Работанные';
$lang['menu_custom_maps'] = 'Карты'; $lang['menu_custom_maps'] = 'Карты';
$lang['menu_continents'] = 'Континенты'; $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_timeline'] = 'Línea de Tiempo';
$lang['menu_accumulated_statistics'] = 'Estadísticas Acumuladas'; $lang['menu_accumulated_statistics'] = 'Estadísticas Acumuladas';
$lang['menu_timeplotter'] = 'Gráfico de Tiempo'; $lang['menu_timeplotter'] = 'Gráfico de Tiempo';
$lang['menu_most_worked'] = 'Más Trabajado';
$lang['menu_custom_maps'] = 'Mapas Personalizados'; $lang['menu_custom_maps'] = 'Mapas Personalizados';
$lang['menu_continents'] = 'Continentes'; $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 <?php
defined('BASEPATH') OR exit('No direct script access allowed'); 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_timeline'] = 'Tidslinje';
$lang['menu_accumulated_statistics'] = 'Ackumulerad statistik'; $lang['menu_accumulated_statistics'] = 'Ackumulerad statistik';
$lang['menu_timeplotter'] = 'Tidplotter'; $lang['menu_timeplotter'] = 'Tidplotter';
$lang['menu_most_worked'] = 'Mest Arbetade';
$lang['menu_custom_maps'] = 'Anpassade kartor'; $lang['menu_custom_maps'] = 'Anpassade kartor';
$lang['menu_continents'] = 'Kontinenter'; $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_timeline'] = 'Zaman Çizelgesi';
$lang['menu_accumulated_statistics'] = 'Birikmiş İstatistikler'; $lang['menu_accumulated_statistics'] = 'Birikmiş İstatistikler';
$lang['menu_timeplotter'] = 'Zaman Çizici'; $lang['menu_timeplotter'] = 'Zaman Çizici';
$lang['menu_most_worked'] = 'En Çok Çalışılan';
$lang['menu_custom_maps'] = 'Özel Haritalar'; $lang['menu_custom_maps'] = 'Özel Haritalar';
$lang['menu_continents'] = 'Kıtalar'; $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,9 +1932,7 @@ class Logbook_model extends CI_Model
function get_last_qsos($num, $StationLocationsArray = null) function get_last_qsos($num, $StationLocationsArray = null)
{ {
// Ensure $num is always an integer to prevent SQL injection
$num = intval($num);
if ($StationLocationsArray == null) { if ($StationLocationsArray == null) {
$CI = &get_instance(); $CI = &get_instance();
$CI->load->model('logbooks_model'); $CI->load->model('logbooks_model');
@ -1947,13 +1945,13 @@ class Logbook_model extends CI_Model
$location_list = "'" . implode("','", $logbooks_locations_array) . "'"; $location_list = "'" . implode("','", $logbooks_locations_array) . "'";
$sql = "SELECT * FROM ( select * from " . $this->config->item('table_name') . " $sql = "SELECT * FROM ( select * from " . $this->config->item('table_name') . "
WHERE station_id IN(" . $location_list . ") WHERE station_id IN(" . $location_list . ")
order by col_time_on desc, col_primary_key desc order by col_time_on desc, col_primary_key desc
limit " . $num . limit " . $num .
") hrd ") 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 LEFT JOIN dxcc_entities ON hrd.col_dxcc = dxcc_entities.adif
order by col_time_on desc, col_primary_key desc"; order by col_time_on desc, col_primary_key desc";
$query = $this->db->query($sql); $query = $this->db->query($sql);
@ -4084,7 +4082,7 @@ class Logbook_model extends CI_Model
return null; return null;
} }
} }
/* /*
* Check the dxxc_prefixes table and return (dxcc, country) * Check the dxxc_prefixes table and return (dxcc, country)
*/ */
@ -4093,7 +4091,7 @@ class Logbook_model extends CI_Model
$csadditions = '/^P$|^R$|^A$|^M$/'; $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('call', $call)
->where('(start <= ', $date) ->where('(start <= ', $date)
->or_where('start is null)', NULL, false) ->or_where('start is null)', NULL, false)
@ -4103,7 +4101,7 @@ class Logbook_model extends CI_Model
if ($dxcc_exceptions->num_rows() > 0) { if ($dxcc_exceptions->num_rows() > 0) {
$row = $dxcc_exceptions->row_array(); $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 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"; $call = "K";
@ -4158,7 +4156,7 @@ class Logbook_model extends CI_Model
// query the table, removing a character from the right until a match // query the table, removing a character from the right until a match
for ($i = $len; $i > 0; $i--) { for ($i = $len; $i > 0; $i--) {
//printf("searching for %s\n", substr($call, 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('call', substr($call, 0, $i))
->where('(start <= ', $date) ->where('(start <= ', $date)
->or_where("start is null)", NULL, false) ->or_where("start is null)", NULL, false)
@ -4171,7 +4169,7 @@ class Logbook_model extends CI_Model
if ($dxcc_result->num_rows() > 0) { if ($dxcc_result->num_rows() > 0) {
$row = $dxcc_result->row_array(); $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) { 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->where('user_id', $user_id);
$this->db->join('dxcc_entities','lotw_certs.cert_dxcc_id = dxcc_entities.adif','left'); $this->db->join('dxcc_entities','lotw_certs.cert_dxcc_id = dxcc_entities.adif','left');
$this->db->order_by('cert_dxcc', 'ASC'); $this->db->order_by('cert_dxcc', 'ASC');
@ -77,29 +77,6 @@ class LotwCert extends CI_Model {
$this->db->delete('lotw_certs'); $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) { function last_upload($certID) {
$data = array( $data = array(
@ -119,7 +96,7 @@ class LotwCert extends CI_Model {
} }
function lotw_cert_expired($user_id, $date) { 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); $this->db->where($array);
$query = $this->db->get('lotw_certs'); $query = $this->db->get('lotw_certs');
@ -131,7 +108,7 @@ class LotwCert extends CI_Model {
} }
function lotw_cert_expiring($user_id, $date) { 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); $this->db->where($array);
$query = $this->db->get('lotw_certs'); $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,19 +12,12 @@
<div class="alert alert-warning" role="warning"> <div class="alert alert-warning" role="warning">
Private feed key empty. Please set the feed key in your profile. Private feed key empty. Please set the feed key in your profile.
</div> </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'] == []) { ?>
<div class="alert alert-warning" role="warning">
<?php echo lang('hams_at_no_activations_found'); ?>
</div>
<?php } else { ?> <?php } else { ?>
<?php if ($rovedata['data'] == []) { ?>
<div class="alert alert-warning" role="warning">
<?php echo lang('hams_at_no_activations_found'); ?>
</div>
<?php } else { ?>
<table class="table table-striped table-hover"> <table class="table table-striped table-hover">
<thead> <thead>
<tr> <tr>
@ -159,5 +152,6 @@
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<?php } ?>
<?php } ?> <?php } ?>
</div> </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/buttons.html5.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/selectize.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") { ?> <?php if ($this->uri->segment(1) == "station") { ?>
<script language="javascript" src="<?php echo base_url(); ?>assets/js/HamGridSquare.js"></script> <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> <script src="<?php echo base_url(); ?>assets/js/sections/station_locations.js"></script>

查看文件

@ -133,8 +133,6 @@
<div class="dropdown-divider"></div> <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> <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> <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> <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> <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> <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,16 +78,12 @@
<?php $current_date = date('Y-m-d H:i:s'); ?> <?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 $warning_date = date('Y-m-d H:i:s', strtotime($row->date_expires.'-30 days')); ?>
<?php if ($row->archived) { ?> <?php if ($current_date > $row->date_expires) { ?>
<span class="badge text-bg-secondary"><?php echo 'Archived'; ?></span> <span class="badge text-bg-danger"><?php echo lang('lotw_expired'); ?></span>
<?php } else if ($current_date <= $row->date_expires && $current_date > $warning_date) { ?>
<span class="badge text-bg-warning"><?php echo lang('lotw_expiring'); ?></span>
<?php } else { ?> <?php } else { ?>
<?php if ($current_date > $row->date_expires) { ?> <span class="badge text-bg-success"><?php echo lang('lotw_valid'); ?></span>
<span class="badge text-bg-danger"><?php echo lang('lotw_expired'); ?></span>
<?php } else if ($current_date <= $row->date_expires && $current_date > $warning_date) { ?>
<span class="badge text-bg-warning"><?php echo lang('lotw_expiring'); ?></span>
<?php } else { ?>
<span class="badge text-bg-success"><?php echo lang('lotw_valid'); ?></span>
<?php } ?>
<?php } ?> <?php } ?>
<?php if ($row->last_upload) { <?php if ($row->last_upload) {
@ -98,15 +94,6 @@
<?php } ?> <?php } ?>
</td> </td>
<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> <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> </td>
</tr> </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","&Oslash;",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) { else if(result >= 50000000 && result <= 56000000) {
return '6m'; return '6m';
} }
else if(result >= 70000000 && result <= 72000000) {
return '4m';
}
else if(result >= 144000000 && result <= 148000000) { else if(result >= 144000000 && result <= 148000000) {
return '2m'; return '2m';
} }

文件差异因一行或多行过长而隐藏

文件差异内容过多而无法显示 加载差异

查看文件

@ -200,9 +200,6 @@ case 'finnish':
case 'russian': case 'russian':
$config['language'] = $lang; $config['language'] = $lang;
break; break;
case 'portuguese':
$config['language'] = $lang;
break;
case 'english': case 'english':
$config['language'] = $lang; $config['language'] = $lang;
break; break;