Merge branch 'dev' into cron_expressions

This commit is contained in:
HB9HIL
2024-05-09 20:28:35 +02:00
committed by GitHub
45 changed files with 971 additions and 805 deletions

View File

@@ -656,7 +656,7 @@ class Logbook extends CI_Controller {
if (!empty($logbooks_locations_array) && $query->num_rows() > 0)
{
$html .= "<div class=\"table-responsive\">";
$html .= "<table class=\"table\">";
$html .= "<table class=\"table table-striped\">";
$html .= "<tr>";
$html .= "<th>Date</th>";
$html .= "<th>Callsign</th>";

View File

@@ -27,30 +27,40 @@ class Lookup extends CI_Controller {
}
public function search() {
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$this->load->model('lookup_model');
$this->load->model('bands');
$data['bands'] = $this->bands->get_worked_bands(xss_clean($this->input->post('type')));
$data['type'] = xss_clean($this->input->post('type'));
$data['dxcc'] = xss_clean($this->input->post('dxcc'));
$data['was'] = xss_clean($this->input->post('was'));
$data['sota'] = xss_clean($this->input->post('sota'));
$data['grid'] = xss_clean($this->input->post('grid'));
$data['iota'] = xss_clean($this->input->post('iota'));
$data['cqz'] = xss_clean($this->input->post('cqz'));
$data['wwff'] = xss_clean($this->input->post('wwff'));
$data['location_list'] = $location_list;
$data['result'] = $this->lookup_model->getSearchResult($data);
if ($data['type'] == "lotw") {
$this->load->model('logbook_model');
$data['callsign'] = xss_clean($this->input->post('lotw'));
$data['lotw_lastupload'] = $this->logbook_model->check_last_lotw($data['callsign']);
$this->load->view('lookup/lotwuser', $data);
} else {
$this->load->model('bands');
$data['bands'] = $this->bands->get_worked_bands(xss_clean($this->input->post('type')));
$data['dxcc'] = xss_clean($this->input->post('dxcc'));
$data['was'] = xss_clean($this->input->post('was'));
$data['sota'] = xss_clean($this->input->post('sota'));
$data['grid'] = xss_clean($this->input->post('grid'));
$data['iota'] = xss_clean($this->input->post('iota'));
$data['cqz'] = xss_clean($this->input->post('cqz'));
$data['wwff'] = xss_clean($this->input->post('wwff'));
$data['location_list'] = $location_list;
$data['result'] = $this->lookup_model->getSearchResult($data);
$this->load->view('lookup/result', $data);
}
$this->load->view('lookup/result', $data);
}
public function scp() {
@@ -131,11 +141,11 @@ class Lookup extends CI_Controller {
public function get_state_list() {
$this->load->library('subdivisions');
$dxcc = xss_clean($this->input->post('dxcc'));
$states_result = $this->subdivisions->get_state_list($dxcc);
$subdivision_name = $this->subdivisions->get_primary_subdivision_name($dxcc);
if ($states_result->num_rows() > 0) {
$states_array = $states_result->result_array();
$result = array(
@@ -150,7 +160,7 @@ class Lookup extends CI_Controller {
echo json_encode(array('status' => 'No States for this DXCC in Database'));
}
}
public function get_county() {
$json = [];

View File

@@ -30,27 +30,14 @@ class Update extends CI_Controller {
}
/*
* Create a path to a file in the updates folder, respecting the datadir
* configuration option.
*/
private function make_update_path($path) {
$path = "updates/" . $path;
$datadir = $this->config->item('datadir');
if(!$datadir) {
return $path;
}
return $datadir . "/" . $path;
}
/*
* Load the dxcc entities
*/
public function dxcc_entities() {
// Load Database connectors
// Load the cty file
$xml_data = simplexml_load_file($this->make_update_path("cty.xml"));
// Load the cty file
$this->load->library('Paths');
$xml_data = simplexml_load_file($this->paths->make_update_path("cty.xml"));
//$xml_data->entities->entity->count();
@@ -98,9 +85,10 @@ class Update extends CI_Controller {
* Load the dxcc exceptions
*/
public function dxcc_exceptions() {
// Load Database connectors
// Load the cty file
$xml_data = simplexml_load_file($this->make_update_path("cty.xml"));
// Load the cty file
$this->load->library('Paths');
$xml_data = simplexml_load_file($this->paths->make_update_path("cty.xml"));
$count = 0;
$a_data=[];
@@ -139,9 +127,10 @@ class Update extends CI_Controller {
* Load the dxcc prefixes
*/
public function dxcc_prefixes() {
// Load Database connectors
// Load the cty file
$xml_data = simplexml_load_file($this->make_update_path("cty.xml"));
$this->load->library('Paths');
$xml_data = simplexml_load_file($this->paths->make_update_path("cty.xml"));
$count = 0;
$a_data=[];
@@ -180,59 +169,63 @@ class Update extends CI_Controller {
// Updates the DXCC & Exceptions from the Club Log Cty.xml file.
public function dxcc() {
$this->load->library('Paths');
// set the last run in cron table for the correct cron id
$this->load->model('cron_model');
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
$this->update_status("Downloading file");
$this->update_status("Downloading file");
// give it 10 minutes...
set_time_limit(600);
// give it 10 minutes...
set_time_limit(600);
// Load Migration data if any.
$this->load->library('migration');
$this->fix_migrations();
$this->migration->latest();
// Load Migration data if any.
$this->load->library('migration');
$this->fix_migrations();
$this->migration->latest();
// Download latest file.
$url = "https://cdn.clublog.org/cty.php?api=608df94896cb9c5421ae748235492b43815610c9";
// Download latest file.
$url = "https://cdn.clublog.org/cty.php?api=608df94896cb9c5421ae748235492b43815610c9";
$gz = gzopen($url, 'r');
if ($gz === FALSE) {
$this->update_status("FAILED: Could not download from clublog.org");
log_message('error', 'FAILED: Could not download exceptions from clublog.org');
return;
}
$gz = gzopen($url, 'r');
if ($gz === FALSE) {
$this->update_status("FAILED: Could not download from clublog.org");
log_message('error', 'FAILED: Could not download exceptions from clublog.org');
return;
}
$data = "";
while (!gzeof($gz)) {
$data .= gzgetc($gz);
}
gzclose($gz);
$data = "";
while (!gzeof($gz)) {
$data .= gzgetc($gz);
}
gzclose($gz);
if (file_put_contents($this->make_update_path("cty.xml"), $data) === FALSE) {
$this->update_status("FAILED: Could not write to cty.xml file");
return;
}
if (file_put_contents($this->paths->make_update_path("cty.xml"), $data) === FALSE) {
$this->update_status("FAILED: Could not write to cty.xml file");
return;
}
// Clear the tables, ready for new data
$this->db->empty_table("dxcc_entities");
$this->db->empty_table("dxcc_exceptions");
$this->db->empty_table("dxcc_prefixes");
$this->update_status();
// Clear the tables, ready for new data
$this->db->empty_table("dxcc_entities");
$this->db->empty_table("dxcc_exceptions");
$this->db->empty_table("dxcc_prefixes");
$this->update_status();
// Parse the three sections of the file and update the tables
$this->db->trans_start();
$this->dxcc_entities();
$this->dxcc_exceptions();
$this->dxcc_prefixes();
$this->db->trans_complete();
// Parse the three sections of the file and update the tables
$this->db->trans_start();
$this->dxcc_entities();
$this->dxcc_exceptions();
$this->dxcc_prefixes();
$this->db->trans_complete();
$this->update_status("DONE");
$this->update_status("DONE");
}
public function update_status($done=""){
$this->load->library('Paths');
if ($done != "Downloading file"){
// Check that everything is done?
if ($done == ""){
@@ -246,18 +239,18 @@ class Update extends CI_Controller {
$html = $done."....<br/>";
}
file_put_contents($this->make_update_path("status.html"), $html);
file_put_contents($this->paths->make_update_path("status.html"), $html);
}
private function fix_migrations(){
$res = $this->db->query("select version from migrations");
$res = $this->db->query("SELECT version FROM migrations");
if ($res->num_rows() >0){
$row = $res->row();
$version = $row->version;
if ($version < 7){
$this->db->query("update migrations set version=7");
$this->db->query("UPDATE migrations SET version=7");
}
}
}
@@ -308,37 +301,10 @@ class Update extends CI_Controller {
public function update_clublog_scp() {
// set the last run in cron table for the correct cron id
$this->load->model('cron_model');
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
$this->load->model('Update_model');
$result = $this->Update_model->clublog_scp();
echo $result;
$strFile = $this->make_update_path("clublog_scp.txt");
$url = "https://cdn.clublog.org/clublog.scp.gz";
set_time_limit(300);
echo "Downloading Club Log SCP file...<br>";
$gz = gzopen($url, 'r');
if ($gz)
{
$data = "";
while (!gzeof($gz)) {
$data .= gzgetc($gz);
}
gzclose($gz);
if (file_put_contents($strFile, $data) !== FALSE)
{
$nCount = count(file($strFile));
if ($nCount > 0)
{
echo "DONE: " . number_format($nCount) . " callsigns loaded";
} else {
echo "FAILED: Empty file";
}
} else {
echo "FAILED: Could not write to Club Log SCP file";
}
} else {
echo "FAILED: Could not connect to Club Log";
}
}
public function download_lotw_users() {
@@ -360,48 +326,10 @@ class Update extends CI_Controller {
public function lotw_users() {
// set the last run in cron table for the correct cron id
$this->load->model('cron_model');
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
$this->load->model('Update_model');
$result = $this->Update_model->lotw_users();
echo $result;
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;
$file = 'https://lotw.arrl.org/lotw-user-activity.csv';
$handle = fopen($file, "r");
if ($handle === FALSE) {
echo "Something went wrong with fetching the LoTW uses file";
return;
}
$this->db->empty_table("lotw_users");
$i = 0;
$data = fgetcsv($handle,1000,",");
do {
if ($data[0]) {
$lotwdata[$i]['callsign'] = $data[0];
$lotwdata[$i]['lastupload'] = $data[1] . ' ' . $data[2];
if (($i % 2000) == 0) {
$this->db->insert_batch('lotw_users', $lotwdata);
unset($lotwdata);
// echo 'Record ' . $i . '<br />';
}
$i++;
}
} while ($data = fgetcsv($handle,1000,","));
fclose($handle);
$this->db->insert_batch('lotw_users', $lotwdata);
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
echo "This page was created in ".$totaltime." seconds <br />";
echo "Records inserted: " . $i . " <br/>";
}
public function lotw_check() {
@@ -422,29 +350,10 @@ class Update extends CI_Controller {
*/
public function update_dok() {
// set the last run in cron table for the correct cron id
$this->load->model('cron_model');
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
$contents = file_get_contents('https://www.df2et.de/cqrlog/dok_and_sdok.txt', true);
if($contents === FALSE) {
echo "Something went wrong with fetching the DOK file.";
} else {
$file = './assets/json/dok.txt';
if (file_put_contents($file, $contents) !== FALSE) { // Save our content to the file.
$nCount = count(file($file));
if ($nCount > 0)
{
echo "DONE: " . number_format($nCount) . " DOKs and SDOKs saved";
} else {
echo"FAILED: Empty file";
}
} else {
echo"FAILED: Could not write to dok.txt file";
}
}
$this->load->model('Update_model');
$result = $this->Update_model->dok();
echo $result;
}
/*
@@ -452,47 +361,10 @@ class Update extends CI_Controller {
*/
public function update_sota() {
// set the last run in cron table for the correct cron id
$this->load->model('cron_model');
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
$csvfile = 'https://www.sotadata.org.uk/summitslist.csv';
$sotafile = './assets/json/sota.txt';
$csvhandle = fopen($csvfile,"r");
if ($csvhandle === FALSE) {
echo "Something went wrong with fetching the SOTA file";
return;
}
$data = fgetcsv($csvhandle,1000,","); // Skip line we are not interested in
$data = fgetcsv($csvhandle,1000,","); // Skip line we are not interested in
$data = fgetcsv($csvhandle,1000,",");
$sotafilehandle = fopen($sotafile, 'w');
if ($sotafilehandle === FALSE) {
echo"FAILED: Could not write to sota.txt file";
return;
}
$nCount = 0;
do {
if ($data[0]) {
fwrite($sotafilehandle, $data[0].PHP_EOL);
$nCount++;
}
} while ($data = fgetcsv($csvhandle,1000,","));
fclose($csvhandle);
fclose($sotafilehandle);
if ($nCount > 0)
{
echo "DONE: " . number_format($nCount) . " SOTA's saved";
} else {
echo"FAILED: Empty file";
}
$this->load->model('Update_model');
$result = $this->Update_model->sota();
echo $result;
}
/*
@@ -500,99 +372,18 @@ class Update extends CI_Controller {
*/
public function update_wwff() {
// set the last run in cron table for the correct cron id
$this->load->model('cron_model');
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
$this->load->model('Update_model');
$result = $this->Update_model->wwff();
echo $result;
$csvfile = 'https://wwff.co/wwff-data/wwff_directory.csv';
$wwfffile = './assets/json/wwff.txt';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $csvfile);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_USERAGENT, 'Wavelog Updater');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$csv = curl_exec($ch);
curl_close($ch);
if ($csv === FALSE) {
echo "Something went wrong with fetching the WWFF file";
return;
}
$wwfffilehandle = fopen($wwfffile, 'w');
if ($wwfffilehandle === FALSE) {
echo"FAILED: Could not write to wwff.txt file";
return;
}
$data = str_getcsv($csv,"\n");
$nCount = 0;
foreach ($data as $idx => $row) {
if ($idx == 0) continue; // Skip line we are not interested in
$row = str_getcsv($row, ',');
if ($row[0]) {
fwrite($wwfffilehandle, $row[0].PHP_EOL);
$nCount++;
}
}
fclose($wwfffilehandle);
if ($nCount > 0)
{
echo "DONE: " . number_format($nCount) . " WWFF's saved";
} else {
echo"FAILED: Empty file";
}
}
public function update_pota() {
// set the last run in cron table for the correct cron id
$this->load->model('cron_model');
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
$csvfile = 'https://pota.app/all_parks.csv';
$potafile = './assets/json/pota.txt';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $csvfile);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_USERAGENT, 'Wavelog Updater');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$csv = curl_exec($ch);
curl_close($ch);
if ($csv === FALSE) {
echo "Something went wrong with fetching the POTA file";
return;
}
$potafilehandle = fopen($potafile, 'w');
if ($potafilehandle === FALSE) {
echo"FAILED: Could not write to pota.txt file";
return;
}
$data = str_getcsv($csv,"\n");
$nCount = 0;
foreach ($data as $idx => $row) {
if ($idx == 0) continue; // Skip line we are not interested in
$row = str_getcsv($row, ',');
if ($row[0]) {
fwrite($potafilehandle, $row[0].PHP_EOL);
$nCount++;
}
}
fclose($potafilehandle);
if ($nCount > 0)
{
echo "DONE: " . number_format($nCount) . " POTA's saved";
} else {
echo"FAILED: Empty file";
}
$this->load->model('Update_model');
$result = $this->Update_model->pota();
echo $result;
}
}

View File

@@ -149,7 +149,14 @@ class User extends CI_Controller {
$this->input->post('user_wwff_to_qso_tab'),
$this->input->post('user_pota_to_qso_tab'),
$this->input->post('user_sig_to_qso_tab'),
$this->input->post('user_dok_to_qso_tab')
$this->input->post('user_dok_to_qso_tab'),
$this->input->post('user_lotw_name'),
$this->input->post('user_lotw_password'),
$this->input->post('user_eqsl_name'),
$this->input->post('user_eqsl_password'),
$this->input->post('user_clublog_name'),
$this->input->post('user_clublog_password'),
$this->input->post('user_winkey')
)) {
// Check for errors
case EUSERNAMEEXISTS:
@@ -227,6 +234,7 @@ class User extends CI_Controller {
$query = $this->user_model->get_by_id($this->uri->segment(3));
$data['existing_languages'] = $this->find();
$pwd_placeholder = '**********';
$this->load->model('bands');
$this->load->library('form_validation');
@@ -275,7 +283,11 @@ class User extends CI_Controller {
if($this->input->post('user_password', true)) {
$data['user_password'] = $this->input->post('user_password',true);
} else {
$data['user_password'] = $q->user_password;
if ($q->user_password !== '' && $q->user_password !== null) {
$data['user_password'] = $pwd_placeholder;
} else {
$data['user_password'] = '';
}
}
if($this->input->post('user_type', true)) {
@@ -341,13 +353,21 @@ class User extends CI_Controller {
if($this->input->post('user_clublog_password')) {
$data['user_clublog_password'] = $this->input->post('user_clublog_password', true);
} else {
$data['user_clublog_password'] = $q->user_clublog_password;
if ($q->user_clublog_password !== '' && $q->user_clublog_password !== null) {
$data['user_clublog_password'] = $pwd_placeholder;
} else {
$data['user_clublog_password'] = '';
}
}
if($this->input->post('user_lotw_password')) {
$data['user_lotw_password'] = $this->input->post('user_lotw_password', true);
} else {
$data['user_lotw_password'] = $q->user_lotw_password;
if ($q->user_lotw_password !== '' && $q->user_lotw_password !== null) {
$data['user_lotw_password'] = $pwd_placeholder;
} else {
$data['user_lotw_password'] = '';
}
}
if($this->input->post('user_eqsl_name')) {
@@ -359,7 +379,11 @@ class User extends CI_Controller {
if($this->input->post('user_eqsl_password')) {
$data['user_eqsl_password'] = $this->input->post('user_eqsl_password', true);
} else {
$data['user_eqsl_password'] = $q->user_eqsl_password;
if ($q->user_eqsl_password !== '' && $q->user_eqsl_password !== null) {
$data['user_eqsl_password'] = $pwd_placeholder;
} else {
$data['user_eqsl_password'] = '';
}
}
if($this->input->post('user_measurement_base')) {
@@ -510,7 +534,7 @@ class User extends CI_Controller {
if($this->input->post('user_hamsat_key', true)) {
$data['user_hamsat_key'] = $this->input->post('user_hamsat_key', true);
} else {
$hkey_opt=$this->user_options_model->get_options('hamsat',array('option_name'=>'hamsat_key','option_key'=>'api'))->result();
$hkey_opt=$this->user_options_model->get_options('hamsat',array('option_name'=>'hamsat_key','option_key'=>'api'), $this->uri->segment(3))->result();
if (count($hkey_opt)>0) {
$data['user_hamsat_key'] = $hkey_opt[0]->option_value;
} else {
@@ -521,7 +545,7 @@ class User extends CI_Controller {
if($this->input->post('user_hamsat_workable_only')) {
$data['user_hamsat_workable_only'] = $this->input->post('user_hamsat_workable_only', false);
} else {
$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'), $this->uri->segment(3))->result();
if (count($hkey_opt)>0) {
$data['user_hamsat_workable_only'] = $hkey_opt[0]->option_value;
}
@@ -530,7 +554,7 @@ class User extends CI_Controller {
if($this->input->post('user_iota_to_qso_tab')) {
$data['user_iota_to_qso_tab'] = $this->input->post('user_iota_to_qso_tab', false);
} else {
$qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'iota','option_key'=>'show'))->result();
$qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'iota','option_key'=>'show'), $this->uri->segment(3))->result();
if (count($qkey_opt)>0) {
$data['user_iota_to_qso_tab'] = $qkey_opt[0]->option_value;
}
@@ -539,7 +563,7 @@ class User extends CI_Controller {
if($this->input->post('user_sota_to_qso_tab')) {
$data['user_sota_to_qso_tab'] = $this->input->post('user_sota_to_qso_tab', false);
} else {
$qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'sota','option_key'=>'show'))->result();
$qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'sota','option_key'=>'show'), $this->uri->segment(3))->result();
if (count($qkey_opt)>0) {
$data['user_sota_to_qso_tab'] = $qkey_opt[0]->option_value;
}
@@ -548,7 +572,7 @@ class User extends CI_Controller {
if($this->input->post('user_wwff_to_qso_tab')) {
$data['user_wwff_to_qso_tab'] = $this->input->post('user_wwff_to_qso_tab', false);
} else {
$qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'wwff','option_key'=>'show'))->result();
$qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'wwff','option_key'=>'show'), $this->uri->segment(3))->result();
if (count($qkey_opt)>0) {
$data['user_wwff_to_qso_tab'] = $qkey_opt[0]->option_value;
}
@@ -557,7 +581,7 @@ class User extends CI_Controller {
if($this->input->post('user_pota_to_qso_tab')) {
$data['user_pota_to_qso_tab'] = $this->input->post('user_pota_to_qso_tab', false);
} else {
$qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'pota','option_key'=>'show'))->result();
$qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'pota','option_key'=>'show'), $this->uri->segment(3))->result();
if (count($qkey_opt)>0) {
$data['user_pota_to_qso_tab'] = $qkey_opt[0]->option_value;
}
@@ -566,7 +590,7 @@ class User extends CI_Controller {
if($this->input->post('user_sig_to_qso_tab')) {
$data['user_sig_to_qso_tab'] = $this->input->post('user_sig_to_qso_tab', false);
} else {
$qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'sig','option_key'=>'show'))->result();
$qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'sig','option_key'=>'show'), $this->uri->segment(3))->result();
if (count($qkey_opt)>0) {
$data['user_sig_to_qso_tab'] = $qkey_opt[0]->option_value;
}
@@ -575,7 +599,7 @@ class User extends CI_Controller {
if($this->input->post('user_dok_to_qso_tab')) {
$data['user_dok_to_qso_tab'] = $this->input->post('user_dok_to_qso_tab', false);
} else {
$qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'dok','option_key'=>'show'))->result();
$qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'dok','option_key'=>'show'), $this->uri->segment(3))->result();
if (count($qkey_opt)>0) {
$data['user_dok_to_qso_tab'] = $qkey_opt[0]->option_value;
}
@@ -612,8 +636,8 @@ class User extends CI_Controller {
'qso'=>array('fas fa-broadcast-tower', 'fas fa-user', 'fas fa-dot-circle' ),
'qsoconfirm'=>array('0', 'fas fa-broadcast-tower', 'fas fa-user', 'fas fa-dot-circle', 'fas fa-check-circle' ));
$data['user_locations_quickswitch'] = ($this->user_options_model->get_options('header_menu', array('option_name'=>'locations_quickswitch'))->row()->option_value ?? 'false');
$data['user_utc_headermenu'] = ($this->user_options_model->get_options('header_menu', array('option_name'=>'utc_headermenu'))->row()->option_value ?? 'false');
$data['user_locations_quickswitch'] = ($this->user_options_model->get_options('header_menu', array('option_name'=>'locations_quickswitch'), $this->uri->segment(3))->row()->option_value ?? 'false');
$data['user_utc_headermenu'] = ($this->user_options_model->get_options('header_menu', array('option_name'=>'utc_headermenu'), $this->uri->segment(3))->row()->option_value ?? 'false');
$this->load->view('interface_assets/header', $data);
$this->load->view('user/edit', $data);

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to';
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
$lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username';
$lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password';
$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password';
$lang['account_clublog'] = 'Club Log';
$lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign';

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = '上传卫星状态到';
$lang['account_logbook_of_the_world'] = 'Logbook of the WorldLoTW';
$lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) 用户名';
$lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) 密码';
$lang['account_leave_blank_to_keep_existing_password'] = '留空以保留现有密码';
$lang['account_clublog'] = 'Clublog';
$lang['account_clublog_email_callsign'] = 'Clublog 邮件地址/呼号';

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Nahrávání stavu SAT QSOs na'
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
$lang['account_logbook_of_the_world_lotw_username'] = 'Přihlašovací jméno Logbook of The World (LoTW)';
$lang['account_logbook_of_the_world_lotw_password'] = 'Heslo Logbook of The World (LoTW)';
$lang['account_leave_blank_to_keep_existing_password'] = 'Ponechte prázdné, pokud chcete zachovat stávající heslo';
$lang['account_clublog'] = 'Club Log';
$lang['account_clublog_email_callsign'] = 'Email nebo značka volacího znaku Club Logu';

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to';
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
$lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username';
$lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password';
$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password';
$lang['account_clublog'] = 'Club Log';
$lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign';

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to';
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
$lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username';
$lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password';
$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password';
$lang['account_clublog'] = 'Club Log';
$lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign';

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to';
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
$lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Käyttäjänimi';
$lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Salasana';
$lang['account_leave_blank_to_keep_existing_password'] = 'Jätä tyhjäksi säilyttääksesi tietokannan nykyisen salasanan';
$lang['account_clublog'] = 'Club Log';
$lang['account_clublog_email_callsign'] = 'Club Log Sähköposti/Kutsu';

View File

@@ -73,7 +73,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = "Envoi des statuts des QSO par S
$lang['account_logbook_of_the_world'] = "Logbook of the World";
$lang['account_logbook_of_the_world_lotw_username'] = "Utilisateur";
$lang['account_logbook_of_the_world_lotw_password'] = "Mot de passe";
$lang['account_leave_blank_to_keep_existing_password'] = "(Laisser vide pour conserver le mot de passe existant)";
$lang['account_clublog'] = "Club Log";
$lang['account_clublog_email_callsign'] = "Email/Callsign";

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Status von SAT QSOs hochladen a
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
$lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Benutzername';
$lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Passwort';
$lang['account_leave_blank_to_keep_existing_password'] = 'Leer lassen um das existierende Passwort zu übernehmen';
$lang['account_clublog'] = 'Club Log';
$lang['account_clublog_email_callsign'] = 'Club Log Email/Rufzeichen';

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to';
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
$lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username';
$lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password';
$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password';
$lang['account_clublog'] = 'Club Log';
$lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign';

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to';
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
$lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username';
$lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password';
$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password';
$lang['account_clublog'] = 'Club Log';
$lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign';

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to';
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
$lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username';
$lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password';
$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password';
$lang['account_clublog'] = 'Club Log';
$lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign';

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Загружать статус
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
$lang['account_logbook_of_the_world_lotw_username'] = 'Логин';
$lang['account_logbook_of_the_world_lotw_password'] = 'Пароль';
$lang['account_leave_blank_to_keep_existing_password'] = 'Оставьте пустым для сохранения текущего пароля';
$lang['account_clublog'] = 'Club Log';
$lang['account_clublog_email_callsign'] = 'Емэйл/позывной';

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Subir los estados de QSOs de SA
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
$lang['account_logbook_of_the_world_lotw_username'] = 'Nombre de Usuario Logbook of The World (LoTW)';
$lang['account_logbook_of_the_world_lotw_password'] = 'Contraseña Logbook of The World (LoTW)';
$lang['account_leave_blank_to_keep_existing_password'] = 'Deje la contraseña en blanco para mantener la contraseña actual';
$lang['account_clublog'] = 'Club Log';
$lang['account_clublog_email_callsign'] = 'Correo/Indicativo de Club Log';

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Ladda upp status för SAT QSOs
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
$lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Användarnamn';
$lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Lösenord';
$lang['account_leave_blank_to_keep_existing_password'] = 'Lämna tomt om du vill behålla befintligt lösenord';
$lang['account_clublog'] = 'Club Log';
$lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign';

View File

@@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to';
$lang['account_logbook_of_the_world'] = 'Logbook of the World';
$lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username';
$lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password';
$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password';
$lang['account_clublog'] = 'Club Log';
$lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign';

View File

@@ -20,4 +20,16 @@ class Paths
$CI->load->model('Qsl_model');
return $CI->Qsl_model->get_imagePath();
}
function make_update_path($path) {
$CI = & get_instance();
$path = "updates/" . $path;
$datadir = $CI->config->item('datadir');
if(!$datadir) {
return $path;
}
return $datadir . "/" . $path;
}
}

View File

@@ -0,0 +1,237 @@
<?php
// This model handles all file updates (cronjobs)
class Update_model extends CI_Model {
function clublog_scp() {
// set the last run in cron table for the correct cron id
$this->load->model('cron_model');
$this->load->library('Paths');
$this->cron_model->set_last_run($this->router->class . '_' . $this->router->method);
$strFile = $this->paths->make_update_path("clublog_scp.txt");
$url = "https://cdn.clublog.org/clublog.scp.gz";
set_time_limit(300);
$gz = gzopen($url, 'r');
if ($gz) {
$data = "";
while (!gzeof($gz)) {
$data .= gzgetc($gz);
}
gzclose($gz);
if (file_put_contents($strFile, $data) !== FALSE) {
$nCount = count(file($strFile));
if ($nCount > 0) {
return "DONE: " . number_format($nCount) . " callsigns loaded";
} else {
return "FAILED: Empty file";
}
} else {
return "FAILED: Could not write to Club Log SCP file";
}
} else {
return "FAILED: Could not connect to Club Log";
}
}
function dok() {
// set the last run in cron table for the correct cron id
$this->load->model('cron_model');
$this->cron_model->set_last_run($this->router->class . '_' . $this->router->method);
$contents = file_get_contents('https://www.df2et.de/cqrlog/dok_and_sdok.txt', true);
if ($contents === FALSE) {
return "Something went wrong with fetching the DOK file.";
} else {
$file = './assets/json/dok.txt';
if (file_put_contents($file, $contents) !== FALSE) { // Save our content to the file.
$nCount = count(file($file));
if ($nCount > 0) {
return "DONE: " . number_format($nCount) . " DOKs and SDOKs saved";
} else {
return "FAILED: Empty file";
}
} else {
return "FAILED: Could not write to dok.txt file";
}
}
}
function sota() {
// set the last run in cron table for the correct cron id
$this->load->model('cron_model');
$this->cron_model->set_last_run($this->router->class . '_' . $this->router->method);
$csvfile = 'https://www.sotadata.org.uk/summitslist.csv';
$sotafile = './assets/json/sota.txt';
$csvhandle = fopen($csvfile, "r");
if ($csvhandle === FALSE) {
return "Something went wrong with fetching the SOTA file";
}
$data = fgetcsv($csvhandle, 1000, ","); // Skip line we are not interested in
$data = fgetcsv($csvhandle, 1000, ","); // Skip line we are not interested in
$data = fgetcsv($csvhandle, 1000, ",");
$sotafilehandle = fopen($sotafile, 'w');
if ($sotafilehandle === FALSE) {
return "FAILED: Could not write to sota.txt file";
}
$nCount = 0;
do {
if ($data[0]) {
fwrite($sotafilehandle, $data[0] . PHP_EOL);
$nCount++;
}
} while ($data = fgetcsv($csvhandle, 1000, ","));
fclose($csvhandle);
fclose($sotafilehandle);
if ($nCount > 0) {
return "DONE: " . number_format($nCount) . " SOTA's saved";
} else {
return "FAILED: Empty file";
}
}
function wwff() {
// set the last run in cron table for the correct cron id
$this->load->model('cron_model');
$this->cron_model->set_last_run($this->router->class . '_' . $this->router->method);
$csvfile = 'https://wwff.co/wwff-data/wwff_directory.csv';
$wwfffile = './assets/json/wwff.txt';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $csvfile);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_USERAGENT, 'Wavelog Updater');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$csv = curl_exec($ch);
curl_close($ch);
if ($csv === FALSE) {
return "Something went wrong with fetching the WWFF file";
}
$wwfffilehandle = fopen($wwfffile, 'w');
if ($wwfffilehandle === FALSE) {
return "FAILED: Could not write to wwff.txt file";
}
$data = str_getcsv($csv, "\n");
$nCount = 0;
foreach ($data as $idx => $row) {
if ($idx == 0) continue; // Skip line we are not interested in
$row = str_getcsv($row, ',');
if ($row[0]) {
fwrite($wwfffilehandle, $row[0] . PHP_EOL);
$nCount++;
}
}
fclose($wwfffilehandle);
if ($nCount > 0) {
return "DONE: " . number_format($nCount) . " WWFF's saved";
} else {
return "FAILED: Empty file";
}
}
function pota() {
// set the last run in cron table for the correct cron id
$this->load->model('cron_model');
$this->cron_model->set_last_run($this->router->class . '_' . $this->router->method);
$csvfile = 'https://pota.app/all_parks.csv';
$potafile = './assets/json/pota.txt';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $csvfile);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_USERAGENT, 'Wavelog Updater');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$csv = curl_exec($ch);
curl_close($ch);
if ($csv === FALSE) {
return "Something went wrong with fetching the POTA file";
}
$potafilehandle = fopen($potafile, 'w');
if ($potafilehandle === FALSE) {
return "FAILED: Could not write to pota.txt file";
}
$data = str_getcsv($csv, "\n");
$nCount = 0;
foreach ($data as $idx => $row) {
if ($idx == 0) continue; // Skip line we are not interested in
$row = str_getcsv($row, ',');
if ($row[0]) {
fwrite($potafilehandle, $row[0] . PHP_EOL);
$nCount++;
}
}
fclose($potafilehandle);
if ($nCount > 0) {
return "DONE: " . number_format($nCount) . " POTA's saved";
} else {
return "FAILED: Empty file";
}
}
function lotw_users() {
// set the last run in cron table for the correct cron id
$this->load->model('cron_model');
$this->cron_model->set_last_run($this->router->class . '_' . $this->router->method);
$mtime = microtime();
$mtime = explode(" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;
$file = 'https://lotw.arrl.org/lotw-user-activity.csv';
$handle = fopen($file, "r");
if ($handle === FALSE) {
return "Something went wrong with fetching the LoTW uses file";
}
$this->db->empty_table("lotw_users");
$i = 0;
$data = fgetcsv($handle, 1000, ",");
do {
if ($data[0]) {
$lotwdata[$i]['callsign'] = $data[0];
$lotwdata[$i]['lastupload'] = $data[1] . ' ' . $data[2];
if (($i % 2000) == 0) {
$this->db->insert_batch('lotw_users', $lotwdata);
unset($lotwdata);
// echo 'Record ' . $i . '<br />';
}
$i++;
}
} while ($data = fgetcsv($handle, 1000, ","));
fclose($handle);
$this->db->insert_batch('lotw_users', $lotwdata);
$mtime = microtime();
$mtime = explode(" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
return "Records inserted: " . $i . " in " . $totaltime . " seconds <br />";
}
}

View File

@@ -151,7 +151,9 @@ class User_Model extends CI_Model {
$user_show_profile_image, $user_previous_qsl_type, $user_amsat_status_upload, $user_mastodon_url,
$user_default_band, $user_default_confirmation, $user_qso_end_times, $user_quicklog, $user_quicklog_enter,
$language, $user_hamsat_key, $user_hamsat_workable_only, $user_iota_to_qso_tab, $user_sota_to_qso_tab,
$user_wwff_to_qso_tab, $user_pota_to_qso_tab, $user_sig_to_qso_tab, $user_dok_to_qso_tab) {
$user_wwff_to_qso_tab, $user_pota_to_qso_tab, $user_sig_to_qso_tab, $user_dok_to_qso_tab,
$user_lotw_name, $user_lotw_password, $user_eqsl_name, $user_eqsl_password, $user_clublog_name, $user_clublog_password,
$user_winkey) {
// Check that the user isn't already used
if(!$this->exists($username)) {
$data = array(
@@ -186,7 +188,14 @@ class User_Model extends CI_Model {
'user_qso_end_times' => xss_clean($user_qso_end_times),
'user_quicklog' => xss_clean($user_quicklog),
'user_quicklog_enter' => xss_clean($user_quicklog_enter),
'language' => xss_clean($language)
'language' => xss_clean($language),
'user_lotw_name' => xss_clean($user_lotw_name),
'user_lotw_password' => xss_clean($user_lotw_password),
'user_eqsl_name' => xss_clean($user_eqsl_name),
'user_eqsl_password' => xss_clean($user_eqsl_password),
'user_clublog_name' => xss_clean($user_clublog_name),
'user_clublog_password' => xss_clean($user_clublog_password),
'winkey' => xss_clean($user_winkey)
);
// Check the password is valid
@@ -291,28 +300,44 @@ class User_Model extends CI_Model {
return EEMAILEXISTS;
}
$pwd_placeholder = '**********';
// Hash password
if($fields['user_password'] != NULL)
{
$data['user_password'] = $this->_hash($fields['user_password']);
if($data['user_password'] == EPASSWORDINVALID) {
return EPASSWORDINVALID;
if ($fields['user_password'] !== $pwd_placeholder) {
$data['user_password'] = $this->_hash($fields['user_password']);
if($data['user_password'] == EPASSWORDINVALID) {
return EPASSWORDINVALID;
}
}
}
if($fields['user_lotw_password'] != NULL)
if($fields['user_lotw_password'] != '')
{
$data['user_lotw_password'] = $fields['user_lotw_password'];
if ($fields['user_lotw_password'] !== $pwd_placeholder) {
$data['user_lotw_password'] = $fields['user_lotw_password'];
}
} else {
$data['user_lotw_password'] = NULL;
}
if($fields['user_clublog_password'] != NULL)
if($fields['user_clublog_password'] != '')
{
$data['user_clublog_password'] = $fields['user_clublog_password'];
if ($fields['user_clublog_password'] !== $pwd_placeholder) {
$data['user_clublog_password'] = $fields['user_clublog_password'];
}
} else {
$data['user_clublog_password'] = NULL;
}
if($fields['user_eqsl_password'] != NULL)
if($fields['user_eqsl_password'] != '')
{
$data['user_eqsl_password'] = $fields['user_eqsl_password'];
if ($fields['user_eqsl_password'] !== $pwd_placeholder) {
$data['user_eqsl_password'] = $fields['user_eqsl_password'];
}
} else {
$data['user_eqsl_password'] = NULL;
}
// Update the user

View File

@@ -1,4 +1,4 @@
<div class="container">
<div class="container gridsquare_map_form">
<br>
@@ -96,7 +96,7 @@
</div>
<div id="gridmapcontainer">
<div id="gridsquare_map" class="map-leaflet" style="width: 100%; height: 800px"></div>
<div id="gridsquare_map" class="map-leaflet" style="width: 100%;"></div>
</div>
<div class="coordinates d-flex">
<div class="cohidden"><?php echo lang('gen_hamradio_latitude')?>:&nbsp;</div>

View File

@@ -1,21 +1,5 @@
<style>
.coordinates {
justify-content: center;
align-items: stretch;
}
.cohidden {
display:none;
}
#latDeg, #lngDeg {
width: 170px;
}
#locator, #distance, #bearing {
width: 120px;
}
</style>
<div class="container">
<div class="container gridsquare_map_form">
<!-- Award Info Box -->
<br>
<div id="awardInfoButton">
@@ -40,7 +24,7 @@
</div>
<div id="gridmapcontainer">
<div id="gridsquare_map" class="map-leaflet" style="width: 100%; height: 800px"></div>
<div id="gridsquare_map" class="map-leaflet" style="width: 100%;"></div>
</div>
<div class="coordinates d-flex">
<div class="cohidden"><?php echo lang('gen_hamradio_latitude')?>: </div>

View File

@@ -1,4 +1,4 @@
<div class="container">
<div class="container gridsquare_map_form">
<!-- Award Info Box -->
<br>
<div id="awardInfoButton">
@@ -23,7 +23,7 @@
<div id="gridmapcontainer">
<div id="gridsquare_map" class="map-leaflet" style="width: 100%; height: 800px"></div>
<div id="gridsquare_map" class="map-leaflet" style="width: 100%;"></div>
</div>
<div class="coordinates d-flex">
<div class="cohidden"><?php echo lang('gen_hamradio_latitude')?>: </div>

View File

@@ -66,7 +66,15 @@
<tr>
<td>PHP Version</td>
<td><?php echo phpversion(); ?></td>
<td>
<?php
if (version_compare(PHP_VERSION, '8.0.0') >= 0) {
echo phpversion()." <span class=\"badge text-bg-success\">OK</span>";
} else {
echo phpversion()." <span data-bs-toggle=\"tooltip\" title=\"Please update!\" class=\"badge text-bg-warning\">Deprecated</span>";
}
?>
</td>
</tr>
<tr>
@@ -587,4 +595,4 @@
<?php } else { ?>
var local_branch = 'n/a';
<?php } ?>
</script>
</script>

View File

@@ -1,4 +1,4 @@
<div class="container">
<div class="container gridsquare_map_form">
<br>
@@ -140,7 +140,7 @@
</div>
<div id="gridmapcontainer">
<div id="gridsquare_map" class="map-leaflet" style="width: 100%; height: 800px"></div>
<div id="gridsquare_map" class="map-leaflet" style="width: 100%;"></div>
</div>
<div class="coordinates d-flex">
<div class="cohidden"><?php echo lang('gen_hamradio_latitude') ?>:&nbsp;</div>

View File

@@ -1,67 +1,67 @@
<script type="text/javascript">
/*
*
* Define custom date format
*
*/
var custom_date_format = "<?php echo $custom_date_format ?>";
var lang_gen_hamradio_latitude = '<?php echo lang('gen_hamradio_latitude'); ?>';
var lang_gen_hamradio_longitude = '<?php echo lang('gen_hamradio_longitude'); ?>';
var lang_gen_hamradio_gridsquare = '<?php echo lang('gen_hamradio_gridsquare'); ?>';
var lang_gen_hamradio_distance = '<?php echo lang('gen_hamradio_distance'); ?>';
var lang_gen_hamradio_bearing = '<?php echo lang('gen_hamradio_bearing'); ?>';
<?php
echo "var homegrid ='" . strtoupper($homegrid[0]) . "';";
if (!isset($options)) {
$options = "{\"datetime\":{\"show\":\"true\"},\"de\":{\"show\":\"true\"},\"dx\":{\"show\":\"true\"},\"mode\":{\"show\":\"true\"},\"rstr\":{\"show\":\"true\"},\"rsts\":{\"show\":\"true\"},\"band\":{\"show\":\"true\"},\"myrefs\":{\"show\":\"true\"},\"refs\":{\"show\":\"true\"},\"name\":{\"show\":\"true\"},\"qslvia\":{\"show\":\"true\"},\"qsl\":{\"show\":\"true\"},\"lotw\":{\"show\":\"true\"},\"eqsl\":{\"show\":\"true\"},\"qslmsg\":{\"show\":\"true\"},\"dxcc\":{\"show\":\"true\"},\"state\":{\"show\":\"true\"},\"cqzone\":{\"show\":\"true\"},\"ituzone\":{\"show\":\"true\"},\"iota\":{\"show\":\"true\"},\"pota\":{\"show\":\"true\"},\"operator\":{\"show\":\"true\"},\"comment\":{\"show\":\"true\"}}";
}
$current_opts=json_decode($options);
echo "var user_options = $options;";
if (!isset($current_opts->pota)) {
echo "\nvar o_template = { pota: {show: 'true'}};";
echo "\nuser_options={...user_options, ...o_template};";
}
if (!isset($current_opts->operator)) {
echo "\nvar o_template = { operator: {show: 'true'}};";
echo "\nuser_options={...user_options, ...o_template};";
}
if (!isset($current_opts->comment)) {
echo "\nvar o_template = { comment: {show: 'true'}};";
echo "\nuser_options={...user_options, ...o_template};";
}
if (!isset($current_opts->ituzone)) {
echo "\nvar o_template = { ituzone: {show: 'true'}};";
echo "\nuser_options={...user_options, ...o_template};";
}
/*
*
* Define custom date format
*
*/
var custom_date_format = "<?php echo $custom_date_format ?>";
var lang_gen_hamradio_latitude = '<?php echo lang('gen_hamradio_latitude'); ?>';
var lang_gen_hamradio_longitude = '<?php echo lang('gen_hamradio_longitude'); ?>';
var lang_gen_hamradio_gridsquare = '<?php echo lang('gen_hamradio_gridsquare'); ?>';
var lang_gen_hamradio_distance = '<?php echo lang('gen_hamradio_distance'); ?>';
var lang_gen_hamradio_bearing = '<?php echo lang('gen_hamradio_bearing'); ?>';
<?php
echo "var homegrid ='" . strtoupper($homegrid[0]) . "';";
if (!isset($options)) {
$options = "{\"datetime\":{\"show\":\"true\"},\"de\":{\"show\":\"true\"},\"dx\":{\"show\":\"true\"},\"mode\":{\"show\":\"true\"},\"rstr\":{\"show\":\"true\"},\"rsts\":{\"show\":\"true\"},\"band\":{\"show\":\"true\"},\"myrefs\":{\"show\":\"true\"},\"refs\":{\"show\":\"true\"},\"name\":{\"show\":\"true\"},\"qslvia\":{\"show\":\"true\"},\"qsl\":{\"show\":\"true\"},\"lotw\":{\"show\":\"true\"},\"eqsl\":{\"show\":\"true\"},\"qslmsg\":{\"show\":\"true\"},\"dxcc\":{\"show\":\"true\"},\"state\":{\"show\":\"true\"},\"cqzone\":{\"show\":\"true\"},\"ituzone\":{\"show\":\"true\"},\"iota\":{\"show\":\"true\"},\"pota\":{\"show\":\"true\"},\"operator\":{\"show\":\"true\"},\"comment\":{\"show\":\"true\"}}";
}
$current_opts = json_decode($options);
echo "var user_options = $options;";
if (!isset($current_opts->pota)) {
echo "\nvar o_template = { pota: {show: 'true'}};";
echo "\nuser_options={...user_options, ...o_template};";
}
if (!isset($current_opts->operator)) {
echo "\nvar o_template = { operator: {show: 'true'}};";
echo "\nuser_options={...user_options, ...o_template};";
}
if (!isset($current_opts->comment)) {
echo "\nvar o_template = { comment: {show: 'true'}};";
echo "\nuser_options={...user_options, ...o_template};";
}
if (!isset($current_opts->ituzone)) {
echo "\nvar o_template = { ituzone: {show: 'true'}};";
echo "\nuser_options={...user_options, ...o_template};";
}
foreach ($mapoptions as $mo) {
if ($mo != null) {
echo "var " . $mo->option_name . "=" . $mo->option_value . ";";
}
}
?>
var tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"
foreach ($mapoptions as $mo) {
if ($mo != null) {
echo "var " . $mo->option_name . "=" . $mo->option_value . ";";
}
}
?>
var tileUrl = "<?php echo $this->optionslib->get_option('option_map_tile_server'); ?>"
</script>
<style>
.row>[class*="col-"] {
padding-right: 5px;
padding-left: 5px;
}
.row>[class*="col-"] {
padding-right: 5px;
padding-left: 5px;
}
</style>
<?php
$options = json_decode($options);
?>
<div class="container-fluid qso_manager pt-3 ps-4 pe-4">
<?php if ($this->session->flashdata('message')) { ?>
<!-- Display Message -->
<div class="alert-message error">
<p><?php echo $this->session->flashdata('message'); ?></p>
</div>
<?php } ?>
<div class="row">
<div id="lba_div">
<div class="container-fluid qso_manager pt-3 ps-4 pe-4">
<?php if ($this->session->flashdata('message')) { ?>
<!-- Display Message -->
<div class="alert-message error">
<p><?php echo $this->session->flashdata('message'); ?></p>
</div>
<?php } ?>
<div class="row">
<form id="searchForm" name="searchForm" action="<?php echo base_url()."index.php/logbookadvanced/search";?>"
method="post">
<form id="searchForm" name="searchForm" action="<?php echo base_url()."index.php/logbookadvanced/search";?>" method="post">
<input type="hidden" id="dupes" name="dupes" value="">
<div class="filterbody collapse">
<div class="row">
@@ -112,8 +112,7 @@ $options = json_decode($options);
</div>
<div class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="gridsquare"><?php echo lang('gen_hamradio_gridsquare'); ?></label>
<input type="text" name="gridsquare" id="gridsquare" class="form-control form-control-sm"
value="">
<input type="text" name="gridsquare" id="gridsquare" class="form-control form-control-sm" value="">
</div>
<div class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="mode"><?php echo lang('gen_hamradio_mode'); ?></label>
@@ -392,13 +391,13 @@ $options = json_decode($options);
</div>
<div class="row pt-2">
<div class="mb-3 d-flex align-items-center col-lg d-flex flex-row justify-content-center align-items-center">
<button type="button" class="btn btn-sm btn-primary me-1" data-bs-toggle="collapse"
<button type="button" class="btn btn-sm btn-primary me-1 lba_buttons" data-bs-toggle="collapse"
data-bs-target=".quickfilterbody"><?php echo lang('filter_quickfilters'); ?></button>
<button type="button" class="btn btn-sm btn-primary me-1" data-bs-toggle="collapse"
<button type="button" class="btn btn-sm btn-primary me-1 lba_buttons" data-bs-toggle="collapse"
data-bs-target=".qslfilterbody"><?php echo lang('filter_qsl_filters'); ?></button>
<button type="button" class="btn btn-sm btn-primary me-1" data-bs-toggle="collapse"
<button type="button" class="btn btn-sm btn-primary me-1 lba_buttons" data-bs-toggle="collapse"
data-bs-target=".filterbody"><?php echo lang('filter_filters'); ?></button>
<button type="button" class="btn btn-sm btn-primary me-1" data-bs-toggle="collapse"
<button type="button" class="btn btn-sm btn-primary me-1 lba_buttons" data-bs-toggle="collapse"
data-bs-target=".actionbody"><?php echo lang('filter_actions'); ?></button>
<label for="qsoResults" class="me-2"><?php echo lang('filter_results'); ?></label>
<select id="qsoResults" name="qsoresults" class="form-select form-select-sm me-2 w-auto">
@@ -434,87 +433,88 @@ $options = json_decode($options);
<button type="options" class="btn btn-sm btn-primary me-1" id="optionButton"><?php echo lang('filter_options'); ?></button>
<button type="reset" class="btn btn-sm btn-danger me-1" id="resetButton"><?php echo lang('filter_reset'); ?></button>
</div>
</div>
</form>
<table style="width:100%" class="table-sm table table-bordered table-hover table-striped table-condensed text-center" id="qsoList">
<thead>
<tr>
<th>
<div class="form-check" style="margin-top: -1.5em"><input class="form-check-input" type="checkbox" id="checkBoxAll" /></div>
</th>
<?php if (($options->datetime->show ?? "true") == "true") {
echo '<th>' . lang('general_word_datetime') . '</th>';
} ?>
<?php if (($options->de->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_de') . '</th>';
} ?>
<?php if (($options->dx->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_dx') . '</th>';
} ?>
<?php if (($options->mode->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_mode') . '</th>';
} ?>
<?php if (($options->rsts->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_rsts') . '</th>';
} ?>
<?php if (($options->rstr->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_rstr') . '</th>';
} ?>
<?php if (($options->band->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_band') . '</th>';
} ?>
<?php if (($options->myrefs->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_myrefs') . '</th>';
} ?>
<?php if (($options->refs->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_refs') . '</th>';
} ?>
<?php if (($options->name->show ?? "true") == "true") {
echo '<th>' . lang('general_word_name') . '</th>';
} ?>
<?php if (($options->qslvia->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_qslvia') . '</th>';
} ?>
<?php if (($options->qsl->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_qsl') . '</th>';
} ?>
<?php if ($this->session->userdata('user_eqsl_name') != "" && ($options->eqsl->show ?? "true") == "true") {
echo '<th class="eqslconfirmation">eQSL</th>';
} ?>
<?php if ($this->session->userdata('user_lotw_name') != "" && ($options->lotw->show ?? "true") == "true") {
echo '<th class="lotwconfirmation">LoTW</th>';
} ?>
<?php if (($options->qslmsg->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_qslmsg') . '</th>';
} ?>
<?php if (($options->dxcc->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_dxcc') . '</th>';
} ?>
<?php if (($options->state->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_state') . '</th>';
} ?>
<?php if (($options->cqzone->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_cq_zone') . '</th>';
} ?>
<?php if (($options->ituzone->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_itu_zone') . '</th>';
} ?>
<?php if (($options->iota->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_iota') . '</th>';
} ?>
<?php if (($options->pota->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_pota') . '</th>';
} ?>
<?php if (($options->operator->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_operator') . '</th>';
} ?>
<?php if (($options->comment->show ?? "true") == "true") {
echo '<th>' . lang('general_word_comment') . '</th>';
} ?>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</form>
<table style="width:100%" class="table-sm table table-bordered table-hover table-striped table-condensed text-center" id="qsoList">
<thead>
<tr>
<th>
<div class="form-check" style="margin-top: -1.5em"><input class="form-check-input" type="checkbox" id="checkBoxAll" /></div>
</th>
<?php if (($options->datetime->show ?? "true") == "true") {
echo '<th>' . lang('general_word_datetime') . '</th>';
} ?>
<?php if (($options->de->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_de') . '</th>';
} ?>
<?php if (($options->dx->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_dx') . '</th>';
} ?>
<?php if (($options->mode->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_mode') . '</th>';
} ?>
<?php if (($options->rsts->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_rsts') . '</th>';
} ?>
<?php if (($options->rstr->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_rstr') . '</th>';
} ?>
<?php if (($options->band->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_band') . '</th>';
} ?>
<?php if (($options->myrefs->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_myrefs') . '</th>';
} ?>
<?php if (($options->refs->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_refs') . '</th>';
} ?>
<?php if (($options->name->show ?? "true") == "true") {
echo '<th>' . lang('general_word_name') . '</th>';
} ?>
<?php if (($options->qslvia->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_qslvia') . '</th>';
} ?>
<?php if (($options->qsl->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_qsl') . '</th>';
} ?>
<?php if ($this->session->userdata('user_eqsl_name') != "" && ($options->eqsl->show ?? "true") == "true"){
echo '<th class="eqslconfirmation">eQSL</th>';
} ?>
<?php if ($this->session->userdata('user_lotw_name') != "" && ($options->lotw->show ?? "true") == "true"){
echo '<th class="lotwconfirmation">LoTW</th>';
} ?>
<?php if (($options->qslmsg->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_qslmsg') . '</th>';
} ?>
<?php if (($options->dxcc->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_dxcc') . '</th>';
} ?>
<?php if (($options->state->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_state') . '</th>';
} ?>
<?php if (($options->cqzone->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_cq_zone') . '</th>';
} ?>
<?php if (($options->ituzone->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_itu_zone') . '</th>';
} ?>
<?php if (($options->iota->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_iota') . '</th>';
} ?>
<?php if (($options->pota->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_pota') . '</th>';
} ?>
<?php if (($options->operator->show ?? "true") == "true") {
echo '<th>' . lang('gen_hamradio_operator') . '</th>';
} ?>
<?php if (($options->comment->show ?? "true") == "true") {
echo '<th>' . lang('general_word_comment') . '</th>';
} ?>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>

View File

@@ -7,6 +7,7 @@
<option value="sota">SOTA</option>
<option value="was">US State</option>
<option value="wwff">WWFF</option>
<option value="lotw">LoTW user</option>
</select>
<div>&nbsp;</div>
<input style="display:none" class="form-control input-group-sm w-auto" id="quicklookuptext" type="text" name="searchfield" placeholder="" aria-label="Search">
@@ -63,4 +64,4 @@
</form>
<br />
<div class="table-responsive" id="lookupresulttable">
</div>
</div>

View File

@@ -0,0 +1,16 @@
<?php
echo 'LoTW User: ';
if (isset($lotw_lastupload) && $lotw_lastupload != '') {
$lotw_hint = '';
if ($lotw_lastupload > 365) {
$lotw_hint = ' lotw_info_red';
} elseif ($lotw_lastupload > 30) {
$lotw_hint = ' lotw_info_orange';
} elseif ($lotw_lastupload > 7) {
$lotw_hint = ' lotw_info_yellow';
}
echo '<a id="lotw_badge" href="https://lotw.arrl.org/lotwuser/act?act='.$callsign.'" target="_blank"><small id="lotw_info" class="badge text-bg-success'.$lotw_hint.'" data-bs-toggle="tooltip" title="LoTW User">Yes</small></a> <a id="lotw_badge" href="https://lotw.arrl.org/lotwuser/act?act='.$callsign.'" target="_blank"> last upload</a> '.$lotw_lastupload.' days ago';
} else {
echo "<span data-bs-toggle=\"tooltip\" title=\"No LoTW User\" class=\"badge text-bg-danger\" style=\"padding-left: 0.2em; padding-right: 0.2em;\">No</span>";
}
?>

View File

@@ -1,7 +1,7 @@
<div id="qso-last-table">
<div class="table-responsive" style="font-size: 0.95rem;">
<table class="table">
<table class="table table-striped">
<tr class="log_title titles">
<th><?php echo lang('general_word_date'); ?>/<?php echo lang('general_word_time'); ?></th>
<th><?php echo lang('gen_hamradio_call'); ?></th>
@@ -61,13 +61,13 @@ function echo_table_col($row, $name) {
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF) . '</td>'; break;
case 'WWFF': echo '<td>' . ($row->COL_WWFF_REF) . '</td>'; break;
case 'POTA': echo '<td>' . ($row->COL_POTA_REF) . '</td>'; break;
case 'Grid':
$ci->load->library('qra');
case 'Grid':
$ci->load->library('qra');
echo '<td>' . ($ci->qra->echoQrbCalcLink($row->COL_MY_GRIDSQUARE, $row->COL_VUCC_GRIDS, $row->COL_GRIDSQUARE)) . '</td>'; break;
case 'Distance': echo '<td>' . ($row->COL_DISTANCE ? $row->COL_DISTANCE . '&nbsp;km' : '') . '</td>'; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'.$row->COL_SAT_NAME.'</a></td>'; } else { echo strtolower($row->COL_BAND); } echo '</td>'; break;
case 'Frequency':
$ci->load->library('frequency');
case 'Frequency':
$ci->load->library('frequency');
echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'.$row->COL_SAT_NAME.'</a></td>'; } else { if($row->COL_FREQ != null) { echo $ci->frequency->hz_to_mhz($row->COL_FREQ); } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
case 'State': echo '<td>' . ($row->COL_STATE) . '</td>'; break;
case 'Operator': echo '<td>' . ($row->COL_OPERATOR) . '</td>'; break;

View File

@@ -694,7 +694,13 @@
<div id="partial_view" style="font-size: 0.95rem;"></div>
<div id="qso-last-table" hx-get="<?php echo site_url('/qso/component_past_contacts'); ?>" hx-trigger="load, qso_event, every 5s">
<?php
$result = $this->optionslib->get_option('disable_refresh_past_contacts');
if($result === null) { ?>
<div id="qso-last-table" hx-get="<?php echo site_url('/qso/component_past_contacts'); ?>" hx-trigger="load, qso_event, every 5s">
<?php } else { ?>
<div id="qso-last-table" hx-get="<?php echo site_url('/qso/component_past_contacts'); ?>" hx-trigger="load, qso_event">
<?php } ?>
</div>
</div>

View File

@@ -63,13 +63,12 @@
<div class="mb-3">
<label><?php echo lang('account_password'); ?></label>
<div class="input-group">
<input class="form-control" type="password" name="user_password" />
<input class="form-control" type="password" name="user_password" value="<?php if(isset($user_password)) { echo $user_password; } ?>" />
<span class="input-group-btn"><button class="btn btn-default btn-pwd-showhide" type="button"><i class="fa fa-eye-slash"></i></button></span>
</div>
<?php if(isset($password_error)) {
echo "<small class=\"badge bg-danger\">".$password_error."</small>";
} else if (!isset($user_add)) { ?>
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
<?php } ?>
</div>
@@ -81,7 +80,7 @@
<?php
$levels = $this->config->item('auth_level');
foreach ($levels as $key => $value) {
echo '<option value="'. $key . '" '. (($user_type == $key)?"selected=\"selected\"":""). '>' . $value . '</option>';
echo '<option value="'. $key . '" '. (($user_type ?? '') == $key ? "selected=\"selected\"":""). '>' . $value . '</option>';
}
?>
</select>
@@ -708,13 +707,12 @@
<div class="mb-3">
<label><?php echo lang('account_logbook_of_the_world_lotw_password'); ?></label>
<div class="input-group">
<input class="form-control" type="password" name="user_lotw_password" />
<input class="form-control" type="password" name="user_lotw_password" value="<?php if(isset($user_lotw_password)) { echo $user_lotw_password; } ?>" />
<span class="input-group-btn"><button class="btn btn-default btn-pwd-showhide" type="button"><i class="fa fa-eye-slash"></i></button></span>
</div>
<?php if(isset($lotwpassword_error)) {
echo "<small class=\"badge bg-danger\">".$lotwpassword_error."</small>";
} else if (!isset($user_add)) { ?>
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
<?php } ?>
</div>
</div>
@@ -735,13 +733,12 @@
<div class="mb-3">
<label><?php echo lang('account_eqslcc_password'); ?></label>
<div class="input-group">
<input class="form-control" type="password" name="user_eqsl_password" />
<input class="form-control" type="password" name="user_eqsl_password" value="<?php if(isset($user_eqsl_password)) { echo $user_eqsl_password; } ?>" />
<span class="input-group-btn"><button class="btn btn-default btn-pwd-showhide" type="button"><i class="fa fa-eye-slash"></i></button></span>
</div>
<?php if(isset($eqslpassword_error)) {
echo "<small class=\"badge bg-danger\">".$eqslpassword_error."</small>";
} else if (!isset($user_add)) { ?>
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
<?php } ?>
</div>
</div>
@@ -763,13 +760,12 @@
<div class="mb-3">
<label><?php echo lang('account_clublog_password'); ?></label>
<div class="input-group">
<input class="form-control" type="password" name="user_clublog_password" />
<input class="form-control" type="password" name="user_clublog_password" value="<?php if(isset($user_clublog_password)) { echo $user_clublog_password; } ?>" />
<span class="input-group-btn"><button class="btn btn-default btn-pwd-showhide" type="button"><i class="fa fa-eye-slash"></i></button></span>
</div>
<?php if(isset($clublogpassword_error)) {
echo "<small class=\"badge bg-danger\">".$clublogpassword_error."</small>";
} else if (!isset($user_add)) { ?>
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
<?php } ?>
</div>
</div>

View File

@@ -59,6 +59,32 @@
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/L.MaidenheadColoured.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/sections/gridmap.js?"></script>
<script>
// auto setting of gridmap height
function set_map_height() {
//header menu
var headerNavHeight = $('nav').outerHeight();
// console.log('nav: ' + headerNavHeight);
// line with coordinates
// var coordinatesHeight = $('.coordinates').outerHeight();
// console.log('.coordinates: ' + coordinatesHeight);
// form for gridsquare map
var gridsquareFormHeight = $('.gridsquare_map_form').outerHeight();
// console.log('.gridsquare_map_form: ' + gridsquareFormHeight);
// calculate correct map height
var gridsquareMapHeight = window.innerHeight - headerNavHeight - gridsquareFormHeight - 8;
// and set it
$('#gridsquare_map').css('height', gridsquareMapHeight + 'px');
// console.log('#gridsquare_map: ' + gridsquareMapHeight);
}
</script>
<script>
var layer = L.tileLayer('<?php echo $this->optionslib->get_option('option_map_tile_server');?>', {

View File

@@ -65,11 +65,6 @@
height: 500px !important;
}
#gridsquare_map {
height: calc(100vh - 380px) !important;
max-height: 900px !important;
}
@media (min-width: 992px) {
.modal-lg, .modal-xl {
max-width: 1300px;

View File

@@ -223,11 +223,6 @@ path.grid-worked {
height: 500px !important;
}
#gridsquare_map {
height: calc(100vh - 380px) !important;
max-height: 900px !important;
}
#mapqso {
height: 400px !important;
}

View File

@@ -241,11 +241,6 @@ div.alert-danger {
height: 500px !important;
}
#gridsquare_map {
height: calc(100vh - 380px) !important;
max-height: 900px !important;
}
#mapqso {
height: 400px !important;
}

View File

@@ -65,11 +65,6 @@ thead > tr > td {
height: 500px !important;
}
#gridsquare_map {
height: calc(100vh - 380px) !important;
max-height: 900px !important;
}
@media (min-width: 992px) {
.modal-lg, .modal-xl {
max-width: 1300px;

View File

@@ -666,11 +666,6 @@ div#station_logbooks_linked_table_paginate {
margin-bottom: 0px;
}
#advancedmap {
height: calc(100vh - 280px) !important;
max-height: 1000px !important;
}
.lotw-cert-list table {
margin-bottom: 0px;
}
@@ -840,9 +835,14 @@ label {
}
.coordinates {
justify-content: center;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
justify-content: center;
align-items: stretch;
}
.cohidden {
display:none;
}

View File

@@ -87,11 +87,6 @@ path.grid-worked {
height: 400px !important;
}
#gridsquare_map {
height: calc(100vh - 380px) !important;
max-height: 900px !important;
}
/*
* Dark Navigation
*/

View File

@@ -661,7 +661,7 @@ function changeLookupType(type) {
$('#quicklookupcqz').hide();
$('#quicklookupwas').hide();
$('#quicklookuptext').hide();
} else if (type == "vucc" || type == "sota" || type == "wwff") {
} else if (type == "vucc" || type == "sota" || type == "wwff" || type == "lotw") {
$('#quicklookuptext').show();
$('#quicklookupiota').hide();
$('#quicklookupdxcc').hide();
@@ -698,6 +698,7 @@ function getLookupResult() {
iota: $('#quicklookupiota').val(),
sota: $('#quicklookuptext').val(),
wwff: $('#quicklookuptext').val(),
lotw: $('#quicklookuptext').val(),
},
success: function (html) {
$('#lookupresulttable').html(html);
@@ -929,6 +930,28 @@ $(document).ready(function() {
}
});
// auto setting of gridmap height
function set_map_height() {
//header menu
var headerNavHeight = $('nav').outerHeight();
// console.log('nav: ' + headerNavHeight);
// line with coordinates
var coordinatesHeight = $('.coordinates').outerHeight();
// console.log('.coordinates: ' + coordinatesHeight);
// form for gridsquare map
var gridsquareFormHeight = $('.gridsquare_map_form').outerHeight();
// console.log('.gridsquare_map_form: ' + gridsquareFormHeight);
// calculate correct map height
var gridsquareMapHeight = window.innerHeight - headerNavHeight - coordinatesHeight - gridsquareFormHeight;
// and set it
$('#gridsquare_map').css('height', gridsquareMapHeight + 'px');
// console.log('#gridsquare_map: ' + gridsquareMapHeight);
}
console.log("Ready to unleash your coding prowess and join the fun?\n\n" +
"Check out our GitHub Repository and dive into the coding adventure:\n\n" +

View File

@@ -13,7 +13,8 @@ function gridPlot(form) {
if(container != null){
container._leaflet_id = null;
container.remove();
$("#gridmapcontainer").append('<div id="gridsquare_map" class="map-leaflet" style="width: 100%; height: 800px"></div>');
$("#gridmapcontainer").append('<div id="gridsquare_map" class="map-leaflet" style="width: 100%;"></div>');
set_map_height();
}
ajax_url = site_url + '/awards/getFfmaGridsjs';
@@ -23,6 +24,7 @@ function gridPlot(form) {
type: 'get',
success: function (data) {
$('.cohidden').show();
set_map_height();
$(".ld-ext-right-plot").removeClass('running');
$(".ld-ext-right-plot").prop('disabled', false);
$('#plot').prop("disabled", false);
@@ -145,5 +147,8 @@ function spawnGridsquareModal(loc_4char) {
}
$(document).ready(function(){
gridPlot(this.form);
gridPlot(this.form);
$(window).resize(function () {
set_map_height();
});
})

View File

@@ -39,7 +39,8 @@ function gridPlot(form, visitor=true) {
if(container != null){
container._leaflet_id = null;
container.remove();
$("#gridmapcontainer").append('<div id="gridsquare_map" class="map-leaflet" style="width: 100%; height: 800px"></div>');
$("#gridmapcontainer").append('<div id="gridsquare_map" class="map-leaflet" style="width: 100%;"></div>');
set_map_height();
}
if (typeof type == 'undefined') { type=''; }
@@ -68,6 +69,7 @@ function gridPlot(form, visitor=true) {
},
success: function (data) {
$('.cohidden').show();
set_map_height();
$(".ld-ext-right-plot").removeClass('running');
$(".ld-ext-right-plot").prop('disabled', false);
$('#plot').prop("disabled", false);
@@ -219,5 +221,8 @@ function clearMarkers() {
}
$(document).ready(function(){
gridPlot(this.form, visitor);
gridPlot(this.form, visitor);
$(window).resize(function () {
set_map_height();
});
})

View File

@@ -13,7 +13,8 @@ function gridPlot(form, dxcc) {
if(container != null){
container._leaflet_id = null;
container.remove();
$("#gridmapcontainer").append('<div id="gridsquare_map" class="map-leaflet" style="width: 100%; height: 800px"></div>');
$("#gridmapcontainer").append('<div id="gridsquare_map" class="map-leaflet" style="width: 100%;"></div>');
set_map_height();
}
ajax_url = site_url + '/awards/getGridmasterGridsjs/'+dxcc;
@@ -27,6 +28,7 @@ function gridPlot(form, dxcc) {
success: function (data) {
$('.cohidden').show();
set_map_height();
$(".ld-ext-right-plot").removeClass('running');
$(".ld-ext-right-plot").prop('disabled', false);
$('#plot').prop("disabled", false);
@@ -151,5 +153,8 @@ function spawnGridsquareModal(loc_4char) {
}
$(document).ready(function(){
gridPlot(this.form, dxcc);
gridPlot(this.form, dxcc);
$(window).resize(function () {
set_map_height();
});
})

View File

@@ -273,8 +273,8 @@ function loadMap(data, iconsList) {
container._leaflet_id = null;
container.remove();
$(".coordinates").remove();
$(".qso_manager").append('<div id="advancedmap" class="map-leaflet"></div>');
$(".qso_manager").append('<div class="coordinates d-flex">' +
$("#lba_div").append('<div id="advancedmap" class="map-leaflet"></div>');
$("#lba_div").append('<div class="coordinates d-flex">' +
'<div class="cohidden">' + lang_gen_hamradio_latitude + '&nbsp;</div>' +
'<div class="cohidden col-auto text-success fw-bold" id="latDeg"></div>' +
'<div class="cohidden">' + lang_gen_hamradio_longitude + '&nbsp;</div>' +
@@ -287,6 +287,7 @@ function loadMap(data, iconsList) {
'<div class="cohidden col-auto text-success fw-bold" id="bearing"></div>' +
'</div>');
$('.cohidden').show();
set_advancedmap_height();
}
map = new L.Map('advancedmap', {
@@ -435,204 +436,204 @@ function loadMap(data, iconsList) {
}
}
function createContentMessage(qso) {
var table = '<table><tbody>' +
'<tr>' +
'<td>' +
'Station callsign: ' + qso.mycallsign +
"</td></tr>" +
'<tr>' +
'<td>' +
'Gridsquare: ' + qso.mygridsquare +
"</td></tr>";
return (table += "</tbody></table>");
}
function createContentMessage(qso) {
var table = '<table><tbody>' +
'<tr>' +
'<td>' +
'Station callsign: ' + qso.mycallsign +
"</td></tr>" +
'<tr>' +
'<td>' +
'Gridsquare: ' + qso.mygridsquare +
"</td></tr>";
return (table += "</tbody></table>");
}
function createContentMessageDx(qso) {
var table = '<table><tbody>' +
'<tr>' +
'<td>Callsign</td>' +
'<td>' + qso.callsign + '</td>' +
'</tr>' +
'<tr>' +
'<td>Date/time</td>' +
'<td>' + qso.datetime + '</td>' +
function createContentMessageDx(qso) {
var table = '<table><tbody>' +
'<tr>' +
'<td>Callsign</td>' +
'<td>' + qso.callsign + '</td>' +
'</tr>' +
'<tr>' +
'<td>Date/time</td>' +
'<td>' + qso.datetime + '</td>' +
'</tr>' +
'<tr>';
if (qso.satname != "") {
table += '<td>Band</td>' +
'<td>SAT ' + qso.satname
if (qso.orbit != "") {
table += ' (' + qso.orbit + ') '
}
table += '</td>' +
'</tr>' +
'<tr>';
if (qso.satname != "") {
table += '<td>Band</td>' +
'<td>SAT ' + qso.satname
if (qso.orbit != "") {
table += ' (' + qso.orbit + ') '
} else {
table += '<td>Band</td>' +
'<td>' + qso.band + '</td>' +
'</tr>' +
'<tr>';
}
table += '<td>Mode</td>' +
'<td>' + qso.mode + '</td>' +
'</tr>' +
'<tr>';
if (qso.gridsquare != undefined) {
table += '<td>Gridsquare</td>' +
'<td>' + qso.gridsquare + '</td>' +
'</tr>';
}
if (qso.distance != undefined) {
table += '<td>Distance</td>' +
'<td>' + qso.distance + '</td>' +
'</tr>';
}
if (qso.bearing != undefined) {
table += '<td>Bearing</td>' +
'<td>' + qso.bearing + '</td>' +
'</tr>';
}
return (table += '</tbody></table>');
}
function loadMapOptions(data) {
$.ajax({
url: base_url + 'index.php/user_options/get_map_custom',
type: 'GET',
dataType: 'json',
error: function () {
},
success: function (json_mapinfo) {
if (typeof json_mapinfo.qso !== "undefined") {
iconsList = json_mapinfo;
}
table += '</td>' +
'</tr>' +
'<tr>';
} else {
table += '<td>Band</td>' +
'<td>' + qso.band + '</td>' +
'</tr>' +
'<tr>';
loadMap(data, iconsList)
}
table += '<td>Mode</td>' +
'<td>' + qso.mode + '</td>' +
'</tr>' +
'<tr>';
if (qso.gridsquare != undefined) {
table += '<td>Gridsquare</td>' +
'<td>' + qso.gridsquare + '</td>' +
'</tr>';
}
if (qso.distance != undefined) {
table += '<td>Distance</td>' +
'<td>' + qso.distance + '</td>' +
'</tr>';
}
if (qso.bearing != undefined) {
table += '<td>Bearing</td>' +
'<td>' + qso.bearing + '</td>' +
'</tr>';
}
return (table += '</tbody></table>');
});
}
function mapQsos(form) {
$('#mapButton').prop("disabled", true).addClass("running");
var id_list=[];
var elements = $('#qsoList tbody input:checked');
var nElements = elements.length;
elements.each(function() {
let id = $(this).first().closest('tr').data('qsoID')
id_list.push(id);
unselectQsoID(id);
});
$("#qsoList").attr("Hidden", true);
$("#qsoList_wrapper").attr("Hidden", true);
$("#qsoList_info").attr("Hidden", true);
amap = $('#advancedmap').val();
if (amap == undefined) {
$("#lba_div").append('<div id="advancedmap" class="map-leaflet"></div>');
}
function loadMapOptions(data) {
if (id_list.length > 0) {
$.ajax({
url: base_url + 'index.php/logbookadvanced/mapSelectedQsos',
type: 'post',
data: {
ids: id_list,
de: form.de.value
},
success: function(data) {
loadMapOptions(data);
},
error: function() {
$('#mapButton').prop("disabled", false).removeClass("running");
},
});
} else {
$.ajax({
url: base_url + 'index.php/logbookadvanced/mapQsos',
type: 'post',
data: {
dateFrom: form.dateFrom.value,
dateTo: form.dateTo.value,
de: form.de.value,
dx: form.dx.value,
mode: form.mode.value,
band: form.band.value,
qslSent: form.qslSent.value,
qslReceived: form.qslReceived.value,
qslSentMethod: this.qslSentMethod.value,
qslReceivedMethod: this.qslReceivedMethod.value,
iota: form.iota.value,
dxcc: form.dxcc.value,
propmode: form.propmode.value,
gridsquare: form.gridsquare.value,
state: form.state.value,
qsoresults: form.qsoresults.value,
sats: form.sats.value,
orbits: form.orbits.value,
cqzone: form.cqzone.value,
lotwSent: form.lotwSent.value,
lotwReceived: form.lotwReceived.value,
eqslSent: form.eqslSent.value,
eqslReceived: form.eqslReceived.value,
qslvia: $('[name="qslvia"]').val(),
sota: form.sota.value,
pota: form.pota.value,
operator: form.operator.value,
wwff: form.wwff.value,
qslimages: form.qslimages.value,
},
success: function(data) {
loadMapOptions(data);
},
error: function() {
$('#mapButton').prop("disabled", false).removeClass("running");
},
});
}
};
function mapGlobeQsos(form) {
var container = L.DomUtil.get('advancedmap');
if(container != null){
container._leaflet_id = null;
container.remove();
$(".coordinates").remove();
}
var id_list=[];
var elements = $('#qsoList tbody input:checked');
var nElements = elements.length;
elements.each(function() {
let id = $(this).first().closest('tr').data('qsoID')
id_list.push(id);
unselectQsoID(id);
});
$("#qsoList").attr("Hidden", true);
$("#qsoList_wrapper").attr("Hidden", true);
$("#qsoList_info").attr("Hidden", true);
amap = $('#advancedmap').val();
if (amap == undefined) {
$("#lba_div").append('<div id="advancedmap" class="map-leaflet"></div>');
}
if (id_list.length > 0) {
$.ajax({
url: base_url + 'index.php/user_options/get_map_custom',
type: 'GET',
dataType: 'json',
error: function () {
},
success: function (json_mapinfo) {
if (typeof json_mapinfo.qso !== "undefined") {
iconsList = json_mapinfo;
}
loadMap(data, iconsList)
}
});
}
function mapQsos(form) {
$('#mapButton').prop("disabled", true).addClass("running");
var id_list=[];
var elements = $('#qsoList tbody input:checked');
var nElements = elements.length;
elements.each(function() {
let id = $(this).first().closest('tr').data('qsoID')
id_list.push(id);
unselectQsoID(id);
});
$("#qsoList").attr("Hidden", true);
$("#qsoList_wrapper").attr("Hidden", true);
$("#qsoList_info").attr("Hidden", true);
amap = $('#advancedmap').val();
if (amap == undefined) {
$(".qso_manager").append('<div id="advancedmap" class="map-leaflet"></div>');
}
if (id_list.length > 0) {
$.ajax({
url: base_url + 'index.php/logbookadvanced/mapSelectedQsos',
type: 'post',
data: {
ids: id_list,
de: form.de.value
},
success: function(data) {
loadMapOptions(data);
},
error: function() {
$('#mapButton').prop("disabled", false).removeClass("running");
},
});
} else {
$.ajax({
url: base_url + 'index.php/logbookadvanced/mapQsos',
type: 'post',
data: {
dateFrom: form.dateFrom.value,
dateTo: form.dateTo.value,
de: form.de.value,
dx: form.dx.value,
mode: form.mode.value,
band: form.band.value,
qslSent: form.qslSent.value,
qslReceived: form.qslReceived.value,
qslSentMethod: this.qslSentMethod.value,
qslReceivedMethod: this.qslReceivedMethod.value,
iota: form.iota.value,
dxcc: form.dxcc.value,
propmode: form.propmode.value,
gridsquare: form.gridsquare.value,
state: form.state.value,
qsoresults: form.qsoresults.value,
sats: form.sats.value,
orbits: form.orbits.value,
cqzone: form.cqzone.value,
lotwSent: form.lotwSent.value,
lotwReceived: form.lotwReceived.value,
eqslSent: form.eqslSent.value,
eqslReceived: form.eqslReceived.value,
qslvia: $('[name="qslvia"]').val(),
sota: form.sota.value,
pota: form.pota.value,
operator: form.operator.value,
wwff: form.wwff.value,
qslimages: form.qslimages.value,
},
success: function(data) {
loadMapOptions(data);
},
error: function() {
$('#mapButton').prop("disabled", false).removeClass("running");
},
});
}
};
function mapGlobeQsos(form) {
var container = L.DomUtil.get('advancedmap');
if(container != null){
container._leaflet_id = null;
container.remove();
$(".coordinates").remove();
}
var id_list=[];
var elements = $('#qsoList tbody input:checked');
var nElements = elements.length;
elements.each(function() {
let id = $(this).first().closest('tr').data('qsoID')
id_list.push(id);
unselectQsoID(id);
});
$("#qsoList").attr("Hidden", true);
$("#qsoList_wrapper").attr("Hidden", true);
$("#qsoList_info").attr("Hidden", true);
amap = $('#advancedmap').val();
if (amap == undefined) {
$(".qso_manager").append('<div id="advancedmap" class="map-leaflet"></div>');
}
if (id_list.length > 0) {
$.ajax({
url: base_url + 'index.php/logbookadvanced/mapSelectedQsos',
type: 'post',
data: {
ids: id_list,
de: form.de.value
},
success: function(data) {
globemap(data);
},
error: function() {
url: base_url + 'index.php/logbookadvanced/mapSelectedQsos',
type: 'post',
data: {
ids: id_list,
de: form.de.value
},
success: function(data) {
globemap(data);
},
error: function() {
},
});
@@ -676,51 +677,82 @@ function loadMap(data, iconsList) {
},
error: function() {
},
});
}
};
function globemap(x) {
globePayArc=[];
globePayLab=[];
x.forEach((element) => {
let OneQsoArc={};
OneQsoArc.startLat=element.latlng1[0];
OneQsoArc.startLng=element.latlng1[1];
OneQsoArc.endLat=element.latlng2[0];
OneQsoArc.endLng=element.latlng2[1];
OneQsoArc.name=element.callsign;
if (element.confirmed) {
OneQsoArc.color = 'green';
} else {
OneQsoArc.color = 'red';
}
// OneQsoArc.color = [['red', 'white', 'blue', 'green'][Math.round(Math.random() * 3)], ['red', 'white', 'blue', 'green'][Math.round(Math.random() * 3)]]
OneQsoArc.altitude=0.15;
globePayArc.push(OneQsoArc);
let OneQsoLab={};
OneQsoLab.lat=element.latlng2[0];
OneQsoLab.lng=element.latlng2[1];
OneQsoLab.text=element.callsign;
globePayLab.push(OneQsoLab);
},
});
renderGlobe(globePayArc,globePayLab);
}
};
function renderGlobe(arcsData,labelData) {
Globe()
.globeImageUrl(base_url + '/assets/images/earth-blue-marble.jpg')
.pointOfView({ lat: arcsData[0].startLat, lng: arcsData[0].startLng, altitude:1}, 100)
.labelsData(labelData)
.arcsData(arcsData)
.arcColor('color')
//.arcAltitude('altitude')
.arcAltitudeAutoScale(.3)
.arcStroke(.2)
.arcDashLength(() => .1)
.arcDashGap(() => 0.01)
.arcDashAnimateTime(() => 4000 + 500)
(document.getElementById('advancedmap'))
}
function globemap(x) {
globePayArc=[];
globePayLab=[];
x.forEach((element) => {
let OneQsoArc={};
OneQsoArc.startLat=element.latlng1[0];
OneQsoArc.startLng=element.latlng1[1];
OneQsoArc.endLat=element.latlng2[0];
OneQsoArc.endLng=element.latlng2[1];
OneQsoArc.name=element.callsign;
if (element.confirmed) {
OneQsoArc.color = 'green';
} else {
OneQsoArc.color = 'red';
}
// OneQsoArc.color = [['red', 'white', 'blue', 'green'][Math.round(Math.random() * 3)], ['red', 'white', 'blue', 'green'][Math.round(Math.random() * 3)]]
OneQsoArc.altitude=0.15;
globePayArc.push(OneQsoArc);
let OneQsoLab={};
OneQsoLab.lat=element.latlng2[0];
OneQsoLab.lng=element.latlng2[1];
OneQsoLab.text=element.callsign;
globePayLab.push(OneQsoLab);
});
renderGlobe(globePayArc,globePayLab);
}
function renderGlobe(arcsData,labelData) {
Globe()
.globeImageUrl(base_url + '/assets/images/earth-blue-marble.jpg')
.pointOfView({ lat: arcsData[0].startLat, lng: arcsData[0].startLng, altitude:1}, 100)
.labelsData(labelData)
.arcsData(arcsData)
.arcColor('color')
//.arcAltitude('altitude')
.arcAltitudeAutoScale(.3)
.arcStroke(.2)
.arcDashLength(() => .1)
.arcDashGap(() => 0.01)
.arcDashAnimateTime(() => 4000 + 500)
(document.getElementById('advancedmap'))
}
// auto setting of gridmap height
function set_advancedmap_height() {
//header menu
var headerNavHeight = $('nav').outerHeight();
// console.log('nav: ' + headerNavHeight);
// line with coordinates
var coordinatesHeight = $('.coordinates').outerHeight();
// console.log('.coordinates: ' + coordinatesHeight);
// form for gridsquare map
var qsoManagerHeight = $('.qso_manager').outerHeight();
// console.log('.qso_manager: ' + qsoManagerHeight);
// calculate correct map height
var advancedMapHeight = window.innerHeight - headerNavHeight - coordinatesHeight - qsoManagerHeight;
// and set it
$('#advancedmap').css('height', advancedMapHeight + 'px');
// console.log('#advancedmap: ' + advancedMapHeight);
}
$(document).ready(function() {
$(window).resize(function() {
set_advancedmap_height();
});
$('.lba_buttons').click(function() {
// we need some delay because of the bs collapse menu
setTimeout(set_advancedmap_height, 400);
});
});