diff --git a/CloudLog_logo.png b/CloudLog_logo.png new file mode 100644 index 00000000..0b2fcf0c Binary files /dev/null and b/CloudLog_logo.png differ diff --git a/application/config/config.sample.php b/application/config/config.sample.php index c783c0de..1d5feb3e 100644 --- a/application/config/config.sample.php +++ b/application/config/config.sample.php @@ -14,7 +14,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); */ $config['app_name'] = "Cloudlog"; -$config['app_version'] = "2.1"; +$config['app_version'] = "2.3.3"; $config['directory'] = "logbook"; $config['callbook'] = "hamqth"; // Options are hamqth or qrz diff --git a/application/config/migration.php b/application/config/migration.php index da1ea557..1c0ef7a1 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE; | be upgraded / downgraded to. | */ -$config['migration_version'] = 112; +$config['migration_version'] = 114; /* |-------------------------------------------------------------------------- diff --git a/application/controllers/Calltester.php b/application/controllers/Calltester.php new file mode 100644 index 00000000..b8c99114 --- /dev/null +++ b/application/controllers/Calltester.php @@ -0,0 +1,491 @@ +load->model('logbook_model'); + + $sql = 'select distinct col_country, col_call, col_dxcc, date(col_time_on) date from ' . $this->config->item('table_name'); + $query = $this->db->query($sql); + + $callarray = $query->result(); + + $result = array(); + + $i = 0; + + foreach ($callarray as $call) { + $i++; + $dxcc = $this->logbook_model->dxcc_lookup($call->col_call, $call->date); + + $dxcc['adif'] = (isset($dxcc['adif'])) ? $dxcc['adif'] : 0; + $dxcc['entity'] = (isset($dxcc['entity'])) ? $dxcc['entity'] : 0; + + if ($call->col_dxcc != $dxcc['adif']) { + $result[] = array( + 'Callsign' => $call->col_call, + 'Expected country' => $call->col_country, + 'Expected adif' => $call->col_dxcc, + 'Result country' => ucwords(strtolower($dxcc['entity']), "- (/"), + 'Result adif' => $dxcc['adif'], + ); + } + } + + // End clock time in seconds + $end_time = microtime(true); + + // Calculate script execution time + $execution_time = ($end_time - $start_time); + + echo " Execution time of script = ".$execution_time." sec
"; + echo $i . " calls tested.
"; + $count = 0; + + if ($result) { + $this->array_to_table($result); + } + + } + + + function array_to_table($table) { + echo ' '; + + echo ''; + + // Table header + foreach ($table[0] as $key=>$value) { + echo ""; + } + + // Table body + foreach ($table as $value) { + echo ""; + foreach ($value as $val) { + echo ""; + } + echo ""; + } + echo "
".$key."
".$val."
"; + } + + function csv() { + set_time_limit(3600); + + // Starting clock time in seconds + $start_time = microtime(true); + + $this->load->model('logbook_model'); + + $file = 'uploads/calls.csv'; + $handle = fopen($file,"r"); + + $data = fgetcsv($handle,1000,","); // Skips firsts line, usually that is the header + $data = fgetcsv($handle,1000,","); + + $result = array(); + + $i = 0; + + do { + if ($data[0]) { + // COL_CALL,COL_DXCC,COL_TIME_ON + $i++; + + $dxcc = $this->logbook_model->dxcc_lookup($data[0], $data[2]); + + $dxcc['adif'] = (isset($dxcc['adif'])) ? $dxcc['adif'] : 0; + $dxcc['entity'] = (isset($dxcc['entity'])) ? $dxcc['entity'] : 0; + + $data[1] = $data[1] == "NULL" ? 0 : $data[1]; + + if ($data[1] != $dxcc['adif']) { + $result[] = array( + 'Callsign' => $data[0], + 'Expected country' => '', + 'Expected adif' => $data[1], + 'Result country' => ucwords(strtolower($dxcc['entity']), "- (/"), + 'Result adif' => $dxcc['adif'], + ); + } + } + } while ($data = fgetcsv($handle,1000,",")); + + // End clock time in seconds + $end_time = microtime(true); + + // Calculate script execution time + $execution_time = ($end_time - $start_time); + + echo " Execution time of script = ".$execution_time." sec
"; + echo $i . " calls tested.
"; + $count = 0; + + if ($result) { + $this->array_to_table($result); + } + } + + /* + * Uses check_dxcc_table - written to check if that function works + */ + function csv2() { + set_time_limit(3600); + + // Starting clock time in seconds + $start_time = microtime(true); + + $this->load->model('logbook_model'); + + $file = 'uploads/calls.csv'; + $handle = fopen($file,"r"); + + $data = fgetcsv($handle,1000,","); // Skips firsts line, usually that is the header + $data = fgetcsv($handle,1000,","); + + $result = array(); + + $i = 0; + + do { + if ($data[0]) { + // COL_CALL,COL_DXCC,COL_TIME_ON + $i++; + + $dxcc = $this->logbook_model->check_dxcc_table($data[0], $data[2]); + + $data[1] = $data[1] == "NULL" ? 0 : $data[1]; + + if ($data[1] != $dxcc[0]) { + $result[] = array( + 'Callsign' => $data[0], + 'Expected country' => '', + 'Expected adif' => $data[1], + 'Result country' => ucwords(strtolower($dxcc[1]), "- (/"), + 'Result adif' => $dxcc[0], + ); + } + } + } while ($data = fgetcsv($handle,1000,",")); + + // End clock time in seconds + $end_time = microtime(true); + + // Calculate script execution time + $execution_time = ($end_time - $start_time); + + echo " Execution time of script = ".$execution_time." sec
"; + echo $i . " calls tested.
"; + $count = 0; + + if ($result) { + $this->array_to_table($result); + } + } + + function call() { + $testarray = array(); + + $testarray[] = array( + 'Callsign' => 'VE3EY/VP9', + 'Country' => 'Bermuda', + 'Adif' => 64, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'VP2MDG', + 'Country' => 'Montserrat', + 'Adif' => 96, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'VP2EY', + 'Country' => 'Anguilla', + 'Adif' => 12, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'VP2VI', + 'Country' => 'British Virgin Islands.', + 'Adif' => 65, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'VP2V/AA7V', + 'Country' => 'British Virgin Islands', + 'Adif' => 65, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'W8LR/R', + 'Country' => 'United States Of America', + 'Adif' => 291, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'SO1FH', + 'Country' => 'Poland', + 'Adif' => 269, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'KZ1H/PP', + 'Country' => 'Brazil', + 'Adif' => 108, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'K1KW/AM', + 'Country' => 'None', + 'Adif' => 0, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'K1KW/MM', + 'Country' => 'None', + 'Adif' => 0, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'TF/DL2NWK/P', + 'Country' => 'Iceland', + 'Adif' => 242, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'OZ1ALS/A', + 'Country' => 'Denmark', + 'Adif' => 221, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'LA1K', + 'Country' => 'Norway', + 'Adif' => 266, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'K1KW/M', + 'Country' => 'United States Of America', + 'Adif' => 291, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'TF/DL2NWK/M', + 'Country' => 'Iceland', + 'Adif' => 242, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'TF/DL2NWK/MM', + 'Country' => 'None', + 'Adif' => 0, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'TF/DL2NWK/P', + 'Country' => 'Iceland', + 'Adif' => 242, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => '2M0SQL/P', + 'Country' => 'Scotland', + 'Adif' => 279, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'FT8WW', + 'Country' => 'Crozet Island', + 'Adif' => 41, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'RV0AL/0/P', + 'Country' => 'Asiatic Russia', + 'Adif' => 15, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'OH/DJ1YFK', + 'Country' => 'Finland', + 'Adif' => 224, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'N6TR/7', + 'Country' => 'United States Of America', + 'Adif' => 291, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'KH0CW', + 'Country' => 'United States Of America', + 'Adif' => 291, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'R2FM/P', + 'Country' => 'kaliningrad', + 'Adif' => 126, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'R2FM', + 'Country' => 'kaliningrad', + 'Adif' => 126, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'FT5XO', + 'Country' => 'Kerguelen Island', + 'Adif' => 131, + 'Date' => 20050320 + ); + + $testarray[] = array( + 'Callsign' => 'VP8CTR', + 'Country' => 'Antarctica', + 'Adif' => 13, + 'Date' => 19970207 + ); + + $testarray[] = array( + 'Callsign' => 'FO0AAA', + 'Country' => 'Clipperton', + 'Adif' => 36, + 'Date' => '20000302' + ); + + $testarray[] = array( + 'Callsign' => 'CX/PR8KW', + 'Country' => 'Uruguay', + 'Adif' => 144, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'IQ3MV/LH', + 'Country' => 'Italy', + 'Adif' => 248, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'LA1K/QRP', + 'Country' => 'Norway', + 'Adif' => 266, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'LA1K/LGT', + 'Country' => 'Norway', + 'Adif' => 266, + 'Date' => $date = date('Ymd', time()) + ); + + $testarray[] = array( + 'Callsign' => 'SM1K/LH', + 'Country' => 'Sweden', + 'Adif' => 284, + 'Date' => $date = date('Ymd', time()) + ); + + set_time_limit(3600); + + // Starting clock time in seconds + $start_time = microtime(true); + + $this->load->model('logbook_model'); + + $result = array(); + + $i = 0; + + foreach ($testarray as $call) { + $i++; + $dxcc = $this->logbook_model->dxcc_lookup($call['Callsign'], $call['Date']); + + $dxcc['adif'] = (isset($dxcc['adif'])) ? $dxcc['adif'] : 0; + $dxcc['entity'] = (isset($dxcc['entity'])) ? $dxcc['entity'] : 0; + + if ($call['Adif'] != $dxcc['adif']) { + $result[] = array( + 'Callsign' => $call['Callsign'], + 'Expected country' => $call['Country'], + 'Expected adif' => $call['Adif'], + 'Result country' => ucwords(strtolower($dxcc['entity']), "- (/"), + 'Result adif' => $dxcc['adif'], + ); + } + } + + // End clock time in seconds + $end_time = microtime(true); + + // Calculate script execution time + $execution_time = ($end_time - $start_time); + + echo " Execution time of script = ".$execution_time." sec
"; + echo $i . " calls tested.
"; + $count = 0; + + if ($result) { + $this->array_to_table($result); + } + } +} \ No newline at end of file diff --git a/application/controllers/Continents.php b/application/controllers/Continents.php new file mode 100644 index 00000000..5858652d --- /dev/null +++ b/application/controllers/Continents.php @@ -0,0 +1,59 @@ +load->model('user_model'); + $this->load->model('bands'); + $this->load->model('logbookadvanced_model'); + + $data['bands'] = $this->bands->get_worked_bands(); + $data['modes'] = $this->logbookadvanced_model->get_modes(); + + if(!$this->user_model->authorize($this->config->item('auth_mode'))) { + if($this->user_model->validate_session()) { + $this->user_model->clear_session(); + show_error('Access denied

Click here to log in as another user', 403); + } else { + redirect('user/login'); + } + } + // Render User Interface + + // Set Page Title + $data['page_title'] = "Continents"; + + // Load Views + $this->load->view('interface_assets/header', $data); + $this->load->view('continents/index'); + $this->load->view('interface_assets/footer'); + } + + + public function get_continents() { + + $searchCriteria = array( + 'mode' => xss_clean($this->input->post('mode')), + 'band' => xss_clean($this->input->post('band')), + ); + + $this->load->model('logbook_model'); + + $continentsstats = array(); + + $total_continents = $this->logbook_model->total_continents($searchCriteria); + $i = 0; + + if ($total_continents) { + foreach($total_continents->result() as $qso_numbers) { + $continentsstats[$i]['cont'] = $qso_numbers->COL_CONT; + $continentsstats[$i++]['count'] = $qso_numbers->count; + } + } + + header('Content-Type: application/json'); + echo json_encode($continentsstats); + } + +} diff --git a/application/controllers/Lookup.php b/application/controllers/Lookup.php index f2e0dfa8..04c2ebcd 100644 --- a/application/controllers/Lookup.php +++ b/application/controllers/Lookup.php @@ -36,7 +36,7 @@ class Lookup extends CI_Controller { $this->load->model('lookup_model'); $this->load->model('bands'); - $data['bands'] = $this->bands->get_worked_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')); diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 37e5553c..33eee1ee 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -873,15 +873,15 @@ class Lotw extends CI_Controller { $contents = file_get_contents('https://lotw.arrl.org/lotw-user-activity.csv', true); if($contents === FALSE) { - echo "something went wrong"; + echo "Something went wrong with fetching the LoTW users file."; } else { $file = './updates/lotw_users.csv'; - if(!is_file($file)){ // Some simple example content. - file_put_contents($file, $contents); // Save our content to the file. + if (file_put_contents($file, $contents) !== FALSE) { // Save our content to the file. + echo "LoTW User Data Saved."; + } else { + echo "FAILED: Could not write to LoTW users file"; } - - echo "LoTW User Data Saved."; } } diff --git a/application/controllers/Statistics.php b/application/controllers/Statistics.php index 9d187b13..e34801ef 100644 --- a/application/controllers/Statistics.php +++ b/application/controllers/Statistics.php @@ -104,6 +104,7 @@ class Statistics extends CI_Controller { $modestats[$i++]['total'] = $this->logbook_model->total_fm(); $modestats[$i]['mode'] = 'digi'; $modestats[$i]['total'] = $this->logbook_model->total_digi(); + usort($modestats, fn($a, $b) => $b['total'] <=> $a['total']); header('Content-Type: application/json'); diff --git a/application/controllers/Timeline.php b/application/controllers/Timeline.php index 29ee5416..61a3fb2e 100644 --- a/application/controllers/Timeline.php +++ b/application/controllers/Timeline.php @@ -32,8 +32,8 @@ class Timeline extends CI_Controller { $mode = 'All'; } - if ($this->input->post('awardradio') != NULL) { - $award = $this->input->post('awardradio'); + if ($this->input->post('award') != NULL) { + $award = $this->input->post('award'); } else { $award = 'dxcc'; @@ -76,14 +76,14 @@ class Timeline extends CI_Controller { } public function details() { - $this->load->model('logbook_model'); + $this->load->model('timeline_model'); $querystring = str_replace('"', "", $this->input->post("Querystring")); $band = str_replace('"', "", $this->input->post("Band")); $mode = str_replace('"', "", $this->input->post("Mode")); $type = str_replace('"', "", $this->input->post("Type")); - $data['results'] = $this->logbook_model->timeline_qso_details($querystring, $band, $mode, $type); + $data['results'] = $this->timeline_model->timeline_qso_details($querystring, $band, $mode, $type); switch($type) { @@ -100,6 +100,9 @@ class Timeline extends CI_Controller { case 'waz' : $data['page_title'] = "Log View - WAZ"; $data['filter'] = "CQ zone ". $querystring; break; + case 'vucc' : $data['page_title'] = "Log View - VUCC"; + $data['filter'] = "Gridsquare ". $querystring; + break; } if ($band != "All") { diff --git a/application/controllers/Update.php b/application/controllers/Update.php index 243ff104..12f53678 100644 --- a/application/controllers/Update.php +++ b/application/controllers/Update.php @@ -165,7 +165,7 @@ class Update extends CI_Controller { public function dxcc() { $this->update_status("Downloading file"); - // give it 5 minutes... + // give it 10 minutes... set_time_limit(600); // Load Migration data if any. @@ -177,13 +177,21 @@ class Update extends CI_Controller { $url = "https://cdn.clublog.org/cty.php?api=a11c3235cd74b88212ce726857056939d52372bd"; $gz = gzopen($url, 'r'); + if ($gz === FALSE) { + $this->update_status("Something went wrong with fetching the cty.xml file."); + return; + } + $data = ""; while (!gzeof($gz)) { $data .= gzgetc($gz); } gzclose($gz); - file_put_contents($this->make_update_path("cty.xml"), $data); + if (file_put_contents($this->make_update_path("cty.xml"), $data) === FALSE) { + $this->update_status("FAILED: Could not write to LoTW users file"); + return; + } // Clear the tables, ready for new data $this->db->empty_table("dxcc_entities"); @@ -238,6 +246,11 @@ class Update extends CI_Controller { } + public function check_missing_continent() { + $this->load->model('logbook_model'); + $this->logbook_model->check_missing_continent(); + } + public function check_missing_grid($all = false){ $this->load->model('logbook_model'); $this->logbook_model->check_missing_grid_id($all); @@ -247,7 +260,7 @@ class Update extends CI_Controller { $strFile = $this->make_update_path("clublog_scp.txt"); $url = "https://cdn.clublog.org/clublog.scp.gz"; set_time_limit(300); - $this->update_status("Downloading Club Log SCP file"); + echo "Downloading Club Log SCP file...
"; $gz = gzopen($url, 'r'); if ($gz) { @@ -256,21 +269,20 @@ class Update extends CI_Controller { $data .= gzgetc($gz); } gzclose($gz); - file_put_contents($strFile, $data); - if (file_exists($strFile)) + if (file_put_contents($strFile, $data) !== FALSE) { $nCount = count(file($strFile)); if ($nCount > 0) { - $this->update_status("DONE: " . number_format($nCount) . " callsigns loaded" ); + echo "DONE: " . number_format($nCount) . " callsigns loaded"; } else { - $this->update_status("FAILED: Empty file"); + echo "FAILED: Empty file"; } } else { - $this->update_status("FAILED: Could not create Club Log SCP file locally"); + echo "FAILED: Could not write to Club Log SCP file"; } } else { - $this->update_status("FAILED: Could not connect to Club Log"); + echo "FAILED: Could not connect to Club Log"; } } @@ -281,15 +293,15 @@ class Update extends CI_Controller { $contents = file_get_contents('https://lotw.arrl.org/lotw-user-activity.csv', true); if($contents === FALSE) { - echo "something went wrong"; + echo "Something went wrong with fetching the LoTW users file."; } else { $file = './updates/lotw_users.csv'; - if(!is_file($file)){ // Some simple example content. - file_put_contents($file, $contents); // Save our content to the file. + if (file_put_contents($file, $contents) !== FALSE) { // Save our content to the file. + echo "LoTW User Data Saved."; + } else { + echo "FAILED: Could not write to LoTW users file"; } - - echo "LoTW User Data Saved."; } } @@ -318,10 +330,7 @@ class Update extends CI_Controller { } else { $file = './assets/json/dok.txt'; - file_put_contents($file, $contents); // Save our content to the file. - - if (file_exists($file)) - { + if (file_put_contents($file, $contents) !== FALSE) { // Save our content to the file. $nCount = count(file($file)); if ($nCount > 0) { @@ -330,7 +339,7 @@ class Update extends CI_Controller { echo"FAILED: Empty file"; } } else { - echo"FAILED: Could not create dok.txt file locally"; + echo"FAILED: Could not write to dok.txt file"; } } } @@ -343,36 +352,38 @@ class Update extends CI_Controller { $sotafile = './assets/json/sota.txt'; - if($csvfile === FALSE) { + $csvhandle = fopen($csvfile,"r"); + if ($csvhandle === FALSE) { echo "Something went wrong with fetching the SOTA file"; - } else { - $csvhandle = fopen($csvfile,"r"); + 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'); + $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'); - do { - if ($data[0]) { - fwrite($sotafilehandle, $data[0].PHP_EOL); - } - } while ($data = fgetcsv($csvhandle,1000,",")); + if ($sotafilehandle === FALSE) { + echo"FAILED: Could not write to sota.txt file"; + return; + } - fclose($csvhandle); - fclose($sotafilehandle); - if (file_exists($sotafile)) - { - $nCount = count(file($sotafile)); - if ($nCount > 0) - { - echo "DONE: " . number_format($nCount) . " SOTA's saved"; - } else { - echo"FAILED: Empty file"; - } - } else { - echo"FAILED: Could not create sota.txt file locally"; + $$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"; } } @@ -391,29 +402,35 @@ class Update extends CI_Controller { 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 (file_exists($wwfffile)) + + if ($nCount > 0) { - $nCount = count(file($wwfffile)); - if ($nCount > 0) - { - echo "DONE: " . number_format($nCount) . " WWFF's saved"; - } else { - echo"FAILED: Empty file"; - } + echo "DONE: " . number_format($nCount) . " WWFF's saved"; } else { - echo"FAILED: Could not create wwff.txt file locally"; + echo"FAILED: Empty file"; } } @@ -429,29 +446,34 @@ class Update extends CI_Controller { 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 (file_exists($potafile)) + + if ($nCount > 0) { - $nCount = count(file($potafile)); - if ($nCount > 0) - { - echo "DONE: " . number_format($nCount) . " POTA's saved"; - } else { - echo"FAILED: Empty file"; - } + echo "DONE: " . number_format($nCount) . " POTA's saved"; } else { - echo"FAILED: Could not create pota.txt file locally"; + echo"FAILED: Empty file"; } } diff --git a/application/controllers/User.php b/application/controllers/User.php index c323bdb9..fecca221 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -81,6 +81,7 @@ class User extends CI_Controller { $data['user_column5'] = $this->input->post('user_column5'); $data['user_show_profile_image'] = $this->input->post('user_show_profile_image'); $data['user_previous_qsl_type'] = $this->input->post('user_previous_qsl_type'); + $data['user_amsat_status_upload'] = $this->input->post('user_amsat_status_upload'); $this->load->view('user/add', $data); } else { $this->load->view('user/add', $data); @@ -111,7 +112,8 @@ class User extends CI_Controller { $this->input->post('user_column4'), $this->input->post('user_column5'), $this->input->post('user_show_profile_image'), - $this->input->post('user_previous_qsl_type'))) { + $this->input->post('user_previous_qsl_type'), + $this->input->post('user_amsat_status_upload'))) { // Check for errors case EUSERNAMEEXISTS: $data['username_error'] = 'Username '.$this->input->post('user_name').' already in use!'; @@ -152,6 +154,7 @@ class User extends CI_Controller { $data['user_column5'] = $this->input->post('user_column5'); $data['user_show_profile_image'] = $this->input->post('user_show_profile_image'); $data['user_previous_qsl_type'] = $this->input->post('user_previous_qsl_type'); + $data['user_amsat_status_upload'] = $this->input->post('user_amsat_status_upload'); $this->load->view('user/add', $data); $this->load->view('interface_assets/footer'); } @@ -347,6 +350,12 @@ class User extends CI_Controller { $data['user_previous_qsl_type'] = $q->user_previous_qsl_type; } + if($this->input->post('user_amsat_status_upload')) { + $data['user_amsat_status_upload'] = $this->input->post('user_amsat_status_upload', false); + } else { + $data['user_amsat_status_upload'] = $q->user_amsat_status_upload; + } + if($this->input->post('user_column1')) { $data['user_column1'] = $this->input->post('user_column1', true); } else { @@ -430,6 +439,7 @@ class User extends CI_Controller { $data['user_column5'] = $this->input->post('user_column5'); $data['user_show_profile_image'] = $this->input->post('user_show_profile_image'); $data['user_previous_qsl_type'] = $this->input->post('user_previous_qsl_type'); + $data['user_amsat_status_upload'] = $this->input->post('user_amsat_status_upload'); $this->load->view('user/edit'); $this->load->view('interface_assets/footer'); } diff --git a/application/language/english/general_words_lang.php b/application/language/english/general_words_lang.php index e5dc1512..92aad195 100644 --- a/application/language/english/general_words_lang.php +++ b/application/language/english/general_words_lang.php @@ -94,6 +94,7 @@ $lang['gen_hamradio_logbook'] = 'Logbook'; $lang['gen_hamradio_cq_zone'] = 'CQ Zone'; $lang['gen_hamradio_dxcc'] = 'DXCC'; +$lang['gen_hamradio_continent'] = 'Continent'; $lang['gen_hamradio_usa_state'] = 'USA State'; $lang['gen_hamradio_county_reference'] = 'USA County'; $lang['gen_hamradio_iota_reference'] = 'IOTA Reference'; @@ -125,3 +126,11 @@ $lang['gen_this_qso_was_confirmed_on'] = 'This QSO was confirmed on'; $lang['error_no_logbook_found'] = 'No logbooks were found. You need to define a logbook under Station Logbooks! Do it here:'; $lang['copy_to_clipboard'] = 'Copy to clipboard'; + +$lang['africa'] = 'Africa'; +$lang['antarctica'] = 'Antarctica'; +$lang['asia'] = 'Asia'; +$lang['europe'] = 'Europe'; +$lang['northamerica'] = 'North America'; +$lang['oceania'] = 'Oceania'; +$lang['southamerica'] = 'South America'; diff --git a/application/language/german/general_words_lang.php b/application/language/german/general_words_lang.php index caf948f7..98e1138f 100644 --- a/application/language/german/general_words_lang.php +++ b/application/language/german/general_words_lang.php @@ -94,6 +94,7 @@ $lang['gen_hamradio_logbook'] = 'Logbuch'; $lang['gen_hamradio_cq_zone'] = 'CQ Zone'; $lang['gen_hamradio_dxcc'] = 'DXCC'; +$lang['gen_hamradio_continent'] = 'Kontinent'; $lang['gen_hamradio_usa_state'] = 'USA-Staat'; $lang['gen_hamradio_county_reference'] = 'USA County'; $lang['gen_hamradio_iota_reference'] = 'IOTA Referenznummer'; @@ -124,3 +125,11 @@ $lang['gen_from_date'] = 'Ab Datum'; $lang['gen_this_qso_was_confirmed_on'] = 'Dieses QSO wurde bestätigt am'; $lang['copy_to_clipboard'] = 'In die Zwischenablage kopieren'; + +$lang['africa'] = 'Afrika'; +$lang['antarctica'] = 'Antarktis'; +$lang['asia'] = 'Asien'; +$lang['europe'] = 'Europa'; +$lang['northamerica'] = 'Nord-Amerika'; +$lang['oceania'] = 'Ozeanien'; +$lang['southamerica'] = 'Süd-Amerika'; diff --git a/application/language/russian/general_words_lang.php b/application/language/russian/general_words_lang.php index 966425ba..624340e9 100644 --- a/application/language/russian/general_words_lang.php +++ b/application/language/russian/general_words_lang.php @@ -16,7 +16,7 @@ $lang['general_word_datetime'] = 'Дата/Время'; $lang['general_word_none'] = '-'; $lang['general_word_name'] = 'Имя'; $lang['general_word_location'] = 'QTH'; -$lang['general_word_comment'] = 'Коммент.'; +$lang['general_word_comment'] = 'Комментарий'; $lang['general_word_general'] = 'Общее'; $lang['general_word_satellite'] = 'Спутник'; $lang['general_word_satellite_short'] = 'Спутн.'; @@ -97,15 +97,18 @@ $lang['gen_hamradio_logbook'] = 'Журнал'; $lang['gen_hamradio_cq_zone'] = 'CQ Zone'; $lang['gen_hamradio_dxcc'] = 'DXCC'; +$lang['gen_hamradio_continent'] = 'Континент'; $lang['gen_hamradio_usa_state'] = 'Штат США'; $lang['gen_hamradio_county_reference'] = 'Графство США'; $lang['gen_hamradio_iota_reference'] = 'IOTA справочник'; $lang['gen_hamradio_sota_reference'] = 'SOTA Справочник'; $lang['gen_hamradio_wwff_reference'] = 'WWFF справочник'; +$lang['gen_hamradio_pota_reference'] = 'POTA справочник'; $lang['gen_hamradio_dok'] = 'DOK'; $lang['gen_hamradio_state'] = 'Штат'; $lang['gen_hamradio_iota'] = 'IOTA'; $lang['gen_hamradio_sota'] = 'SOTA'; +$lang['gen_hamradio_pota'] = 'POTA'; $lang['gen_hamradio_gridsquare'] = 'Квадрат'; $lang['gen_hamradio_operator'] = 'Оператор'; @@ -125,3 +128,11 @@ $lang['gen_this_qso_was_confirmed_on'] = 'Это QSO было подтвержд $lang['error_no_logbook_found'] = 'Журнал не найден. Вам необходимо опрелелить журнал в разделе Журналы станций! Тут:'; $lang['copy_to_clipboard'] = 'Скопировать в буфер обмена'; + +$lang['africa'] = 'Африка'; +$lang['antarctica'] = 'Антарктика'; +$lang['asia'] = 'Азия'; +$lang['europe'] = 'Европа'; +$lang['northamerica'] = 'Северная Америка'; +$lang['oceania'] = 'Океания'; +$lang['southamerica'] = 'Южная Америка'; diff --git a/application/language/russian/lotw_lang.php b/application/language/russian/lotw_lang.php index 0ff5a6d1..6003e2fd 100644 --- a/application/language/russian/lotw_lang.php +++ b/application/language/russian/lotw_lang.php @@ -4,15 +4,15 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['lotw_short'] = 'LoTW'; $lang['lotw_title'] = 'Logbook of the World'; -$lang['lotw_title_available_cert'] = 'Available Certificates'; -$lang['lotw_title_information'] = 'Information'; -$lang['lotw_title_upload_p12_cert'] = 'Upload Logbook of the World .p12 Certificate'; -$lang['lotw_title_export_p12_file_instruction'] = 'Export .p12 File Instructions'; -$lang['lotw_title_adif_import'] = 'ADIF Import'; -$lang['lotw_title_adif_import_options'] = 'Import Options'; +$lang['lotw_title_available_cert'] = 'Имеющиеся сертификаты'; +$lang['lotw_title_information'] = 'Информация'; +$lang['lotw_title_upload_p12_cert'] = 'Загрузка Logbook of the World .p12 сертификата'; +$lang['lotw_title_export_p12_file_instruction'] = 'Инструкции по экспорту .p12 файла'; +$lang['lotw_title_adif_import'] = 'Импорт ADIF'; +$lang['lotw_title_adif_import_options'] = 'Опции импорта'; -$lang['lotw_beta_warning'] = 'Please be aware that LoTW Sync is BETA, see wiki for help.'; -$lang['lotw_no_certs_uploaded'] = 'Вам необходимо загрузить сертификат LoTW в формате p12 для использования этих функций.'; +$lang['lotw_beta_warning'] = 'Обратите внимание, что синхронизация с LoTW пока в статусе бета, подробнее в wiki.'; +$lang['lotw_no_certs_uploaded'] = 'Вам необходимо загрузить сертификат LoTW в формате p12 для использования этих функций.'; $lang['lotw_date_created'] = 'Дата создания'; $lang['lotw_date_expires'] = 'Дата окончания срока действия'; @@ -22,6 +22,7 @@ $lang['lotw_status'] = 'Статус'; $lang['lotw_options'] = 'Опции'; $lang['lotw_valid'] = 'Действует'; $lang['lotw_expired'] = 'Истёк'; +$lang['lotw_expiring'] = 'Истекает'; $lang['lotw_not_synced'] = 'Не синхронизирован'; $lang['lotw_certificate_dxcc'] = 'Сертификат DXCC'; @@ -51,3 +52,7 @@ $lang['lotw_p12_export_step_three'] = 'Кликните "Сохранить Се $lang['lotw_p12_export_step_four'] = 'Загрузите полученный файл ниже.'; $lang['lotw_confirmed'] = 'Это QSO подтверждено на LoTW'; + +// LotW Expiry +$lang['lotw_cert_expiring'] = 'Как минимум, один из ваших сертификатов LoTW скоро истечёт!'; +$lang['lotw_cert_expired'] = 'Один из ваших сертификатов LoTW истёк!'; diff --git a/application/migrations/096_add_wwff_columns.php b/application/migrations/096_add_wwff_columns.php index 85c85eb9..b21d01db 100644 --- a/application/migrations/096_add_wwff_columns.php +++ b/application/migrations/096_add_wwff_columns.php @@ -14,12 +14,12 @@ class Migration_add_wwff_columns extends CI_Migration { public function up() { - if (!$this->db->field_exists('COL_WWFF_REF', 'TABLE_HRD_CONTACTS_V01')) { + if (!$this->db->field_exists('COL_WWFF_REF', $this->config->item('table_name'))) { $fields = array( 'COL_WWFF_REF VARCHAR(30) DEFAULT NULL', 'COL_MY_WWFF_REF VARCHAR(50) DEFAULT NULL', ); - $this->dbforge->add_column('TABLE_HRD_CONTACTS_V01', $fields, 'COL_VUCC_GRIDS'); + $this->dbforge->add_column($this->config->item('table_name'), $fields, 'COL_VUCC_GRIDS'); // Now copy over data from SIG_INFO fields and remove COL_SIG and COL_SIG_INFO only if COL_SIG is WWFF // This cannot be reverted on downgrade to prevent overwriting of other COL_SIG information @@ -27,7 +27,7 @@ class Migration_add_wwff_columns extends CI_Migration { $this->db->set('COL_SIG_INFO', ''); $this->db->set('COL_SIG', ''); $this->db->where('COL_SIG', 'WWFF'); - $this->db->update('TABLE_HRD_CONTACTS_V01'); + $this->db->update($this->config->item('table_name')); // Add MY_WWFF_REF to station profile $fields = array( @@ -39,8 +39,8 @@ class Migration_add_wwff_columns extends CI_Migration { public function down() { - $this->dbforge->drop_column('TABLE_HRD_CONTACTS_V01', 'COL_WWFF_REF'); - $this->dbforge->drop_column('TABLE_HRD_CONTACTS_V01', 'COL_MY_WWFF_REF'); + $this->dbforge->drop_column($this->config->item('table_name'), 'COL_WWFF_REF'); + $this->dbforge->drop_column($this->config->item('table_name'), 'COL_MY_WWFF_REF'); $this->dbforge->drop_column('station_profile', 'station_wwff'); } } diff --git a/application/migrations/108_add_pota_columns.php b/application/migrations/108_add_pota_columns.php index 2242fc7a..18a1ffe4 100644 --- a/application/migrations/108_add_pota_columns.php +++ b/application/migrations/108_add_pota_columns.php @@ -14,12 +14,12 @@ class Migration_add_pota_columns extends CI_Migration { public function up() { - if (!$this->db->field_exists('COL_POTA_REF', 'TABLE_HRD_CONTACTS_V01')) { + if (!$this->db->field_exists('COL_POTA_REF', $this->config->item('table_name'))) { $fields = array( 'COL_POTA_REF VARCHAR(30) DEFAULT NULL', 'COL_MY_POTA_REF VARCHAR(50) DEFAULT NULL', ); - $this->dbforge->add_column('TABLE_HRD_CONTACTS_V01', $fields, 'COL_VUCC_GRIDS'); + $this->dbforge->add_column($this->config->item('table_name'), $fields, 'COL_VUCC_GRIDS'); // Now copy over data from SIG_INFO fields and remove COL_SIG and COL_SIG_INFO only if COL_SIG is POTA // This cannot be reverted on downgrade to prevent overwriting of other COL_SIG information @@ -27,7 +27,7 @@ class Migration_add_pota_columns extends CI_Migration { $this->db->set('COL_SIG_INFO', ''); $this->db->set('COL_SIG', ''); $this->db->where('COL_SIG', 'POTA'); - $this->db->update('TABLE_HRD_CONTACTS_V01'); + $this->db->update($this->config->item('table_name')); } if (!$this->db->field_exists('station_pota', 'station_profile')) { @@ -52,11 +52,11 @@ class Migration_add_pota_columns extends CI_Migration { public function down() { - if ($this->db->field_exists('COL_POTA_REF', 'TABLE_HRD_CONTACTS_V01')) { - $this->dbforge->drop_column('TABLE_HRD_CONTACTS_V01', 'COL_POTA_REF'); + if ($this->db->field_exists('COL_POTA_REF', $this->config->item('table_name'))) { + $this->dbforge->drop_column($this->config->item('table_name'), 'COL_POTA_REF'); } - if ($this->db->field_exists('COL_MY_POTA_REF', 'TABLE_HRD_CONTACTS_V01')) { - $this->dbforge->drop_column('TABLE_HRD_CONTACTS_V01', 'COL_MY_POTA_REF'); + if ($this->db->field_exists('COL_MY_POTA_REF', $this->config->item('table_name'))) { + $this->dbforge->drop_column($this->config->item('table_name'), 'COL_MY_POTA_REF'); } if ($this->db->field_exists('station_pota', 'station_profile')) { $this->dbforge->drop_column('station_profile', 'station_pota'); diff --git a/application/migrations/113_amsat_status_upload_option.php b/application/migrations/113_amsat_status_upload_option.php new file mode 100644 index 00000000..47fd767e --- /dev/null +++ b/application/migrations/113_amsat_status_upload_option.php @@ -0,0 +1,28 @@ +db->field_exists('user_amsat_status_upload', 'users')) { + $fields = array( + 'user_amsat_status_upload BOOLEAN DEFAULT FALSE', + ); + $this->dbforge->add_column('users', $fields, 'user_column5'); + } + } + + public function down() + { + $this->dbforge->drop_column('users', 'user_amsat_status_upload'); + } +} diff --git a/application/migrations/114_create_index_for_colsubmode.php b/application/migrations/114_create_index_for_colsubmode.php new file mode 100644 index 00000000..e69a25a4 --- /dev/null +++ b/application/migrations/114_create_index_for_colsubmode.php @@ -0,0 +1,15 @@ +db->query("ALTER TABLE `".$this->config->item('table_name')."` ADD INDEX (`COL_SUBMODE`)"); + } + + public function down() { + $this->db->query("ALTER TABLE `".$this->config->item('table_name')."` DROP INDEX (`COL_SUBMODE`)"); + } +} + +?> \ No newline at end of file diff --git a/application/models/Activators_model.php b/application/models/Activators_model.php index 981691e5..687fb6aa 100644 --- a/application/models/Activators_model.php +++ b/application/models/Activators_model.php @@ -105,7 +105,7 @@ class Activators_model extends CI_Model // Get max no of activated grids of single operator $data = $this->db->query( - "select COUNT(DISTINCT(SUBSTR(COL_GRIDSQUARE,1,4))) AS `count` from TABLE_HRD_CONTACTS_V01 WHERE station_id in (" . $location_list . ") AND `COL_GRIDSQUARE` != '' GROUP BY `COL_CALL` ORDER BY `count` DESC LIMIT 1" + "select COUNT(DISTINCT(SUBSTR(COL_GRIDSQUARE,1,4))) AS `count` from " . $this->config->item('table_name') . " WHERE station_id in (" . $location_list . ") AND `COL_GRIDSQUARE` != '' GROUP BY `COL_CALL` ORDER BY `count` DESC LIMIT 1" ); foreach($data->result() as $row){ $max = $row->count; diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 6c7aa411..14fdc063 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -78,6 +78,19 @@ class Logbook_model extends CI_Model { $dxcc_id = $this->input->post('dxcc_id'); } + if($this->input->post('continent') == "") { + + $dxcc = $this->check_dxcc_table(strtoupper(trim($this->input->post('callsign'))), $datetime); + if (empty($dxcc[3])) { + $continent = null; + } else { + $continent = $dxcc[3]; + } + + } else { + $continent = $this->input->post('continent'); + } + $mode = $this->get_main_mode_if_submode($this->input->post('mode')); if ($mode == null) { $mode = $this->input->post('mode'); @@ -139,6 +152,7 @@ class Logbook_model extends CI_Model { 'COL_SAT_NAME' => strtoupper($this->input->post('sat_name')), 'COL_SAT_MODE' => strtoupper($this->input->post('sat_mode')), 'COL_COUNTRY' => $country, + 'COL_CONT' => $continent, 'COL_QSLSDATE' => $qslsdate, 'COL_QSLRDATE' => $qslrdate, 'COL_QSL_SENT' => $qsl_sent, @@ -161,8 +175,8 @@ class Logbook_model extends CI_Model { 'COL_TX_PWR' => $tx_power, 'COL_STX' => $stx, 'COL_SRX' => $srx, - 'COL_STX_STRING' => $stx_string, - 'COL_SRX_STRING' => $srx_string, + 'COL_STX_STRING' => $stx_string == null ? '' : strtoupper(trim($stx_string)), + 'COL_SRX_STRING' => $srx_string == null ? '' : strtoupper(trim($srx_string)), 'COL_CONTEST_ID' => $contestid, 'COL_NR_BURSTS' => null, 'COL_NR_PINGS' => null, @@ -385,38 +399,6 @@ class Logbook_model extends CI_Model { return $this->db->query($sql); } - public function timeline_qso_details($querystring, $band, $mode, $type){ - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); - - $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); - - if ($band != 'All') { - if ($band == 'SAT') { - $this->db->where('col_prop_mode', $band); - } else { - $this->db->where('COL_PROP_MODE !=', 'SAT'); - $this->db->where('col_band', $band); - } - } - - if ($mode != 'All') { - $this->db->where('col_mode', $mode); - } - - $this->db->where_in('station_profile.station_id', $logbooks_locations_array); - - switch($type) { - case 'dxcc': $this->db->where('COL_DXCC', $querystring); break; - case 'was': $this->db->where('COL_STATE', $querystring); break; - case 'iota': $this->db->where('COL_IOTA', $querystring); break; - case 'waz': $this->db->where('COL_CQZ', $querystring); break; - } - - return $this->db->get($this->config->item('table_name')); - } - public function activator_details($call, $band, $leogeo){ $CI =& get_instance(); $CI->load->model('logbooks_model'); @@ -478,6 +460,10 @@ class Logbook_model extends CI_Model { $last_id = $this->db->insert_id(); + if ($this->session->userdata('user_amsat_status_upload') && $data['COL_PROP_MODE'] == "SAT") { + $this->upload_amsat_status($data); + } + // No point in fetching qrz api key and qrzrealtime setting if we're skipping the export if (!$skipexport) { @@ -576,6 +562,64 @@ class Logbook_model extends CI_Model { return true; } + function upload_amsat_status($data) { + $sat_name = ''; + if ($data['COL_SAT_NAME'] == 'AO-7') { + if ($data['COL_BAND'] == '2m' && $data['COL_BAND_RX'] == '10m') { + $sat_name = '[A]_AO-7'; + } + if ($data['COL_BAND'] == '70cm' && $data['COL_BAND_RX'] == '2m') { + $sat_name = '[B]_AO-7'; + } + } else if ($data['COL_SAT_NAME'] == 'QO-100') { + $sat_name = 'QO-100_NB'; + } else if ($data['COL_SAT_NAME'] == 'AO-92') { + if ($data['COL_BAND'] == '70cm' && $data['COL_BAND_RX'] == '2m') { + $sat_name = 'AO-92_U/v'; + } + if ($data['COL_BAND'] == '23cm' && $data['COL_BAND_RX'] == '2m') { + $sat_name = 'AO-92_L/v'; + } + } else if ($data['COL_SAT_NAME'] == 'AO-95') { + if ($data['COL_BAND'] == '70cm' && $data['COL_BAND_RX'] == '2m') { + $sat_name = 'AO-95_U/v'; + } + if ($data['COL_BAND'] == '23cm' && $data['COL_BAND_RX'] == '2m') { + $sat_name = 'AO-95_L/v'; + } + } else if ($data['COL_SAT_NAME'] == 'PO-101') { + if ($data['COL_MODE'] == 'PKT') { + $sat_name = 'PO-101[APRS]'; + } else { + $sat_name = 'PO-101[FM]'; + } + } else if ($data['COL_SAT_NAME'] == 'FO-118') { + if ($data['COL_BAND'] == '2m') { + if ($data['COL_MODE'] == 'FM') { + $sat_name = 'FO-118[V/u FM]'; + } else if ($data['COL_MODE'] == 'SSB') { + $sat_name = 'FO-118[V/u]'; + } + } else if ($data['COL_BAND'] == '15m') { + $sat_name = 'FO-118[H/u]'; + } + } else if ($data['COL_SAT_NAME'] == 'ARISS' || $data['COL_SAT_NAME'] == 'ISS') { + if ($data['COL_MODE'] == 'FM') { + $sat_name = 'ISS-FM'; + } else if ($data['COL_MODE'] == 'PKT') { + $sat_name = 'ISS-DATA'; + } + } else { + $sat_name = $data['COL_SAT_NAME']; + } + $datearray = date_parse_from_format("Y-m-d H:i:s", $data['COL_TIME_ON']); + $url='https://amsat.org/status/submit.php?SatSubmit=yes&Confirm=yes&SatName='.$sat_name.'&SatYear='.$datearray['year'].'&SatMonth='.str_pad($datearray['month'], 2, '0', STR_PAD_LEFT).'&SatDay='.str_pad($datearray['day'], 2, '0', STR_PAD_LEFT).'&SatHour='.str_pad($datearray['hour'], 2, '0', STR_PAD_LEFT).'&SatPeriod='.(intdiv(($datearray['minute']-1), 15)).'&SatCall='.$data['COL_STATION_CALLSIGN'].'&SatReport=Heard&SatGridSquare='.$data['COL_MY_GRIDSQUARE']; + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_exec($ch); + } + /* Edit QSO */ function edit() { $qso = $this->get_qso($this->input->post('id'))->row(); @@ -723,6 +767,7 @@ class Logbook_model extends CI_Model { 'COL_COMMENT' => $this->input->post('comment'), 'COL_NAME' => $this->input->post('name'), 'COL_COUNTRY' => $country, + 'COL_CONT' => $this->input->post('continent'), 'COL_DXCC'=> $this->input->post('dxcc_id'), 'COL_CQZ' => $this->input->post('cqz'), 'COL_SAT_NAME' => $this->input->post('sat_name'), @@ -754,8 +799,8 @@ class Logbook_model extends CI_Model { 'COL_QTH' => $this->input->post('qth'), 'COL_PROP_MODE' => $this->input->post('prop_mode'), 'COL_FREQ_RX' => $this->parse_frequency($this->input->post('freq_display_rx')), - 'COL_STX_STRING' => $this->input->post('stx_string'), - 'COL_SRX_STRING' => $this->input->post('srx_string'), + 'COL_STX_STRING' => strtoupper(trim($this->input->post('stx_string'))), + 'COL_SRX_STRING' => strtoupper(trim($this->input->post('srx_string'))), 'COL_STX' => $stx_string, 'COL_SRX' => $srx_string, 'COL_CONTEST_ID' => $this->input->post('contest_name'), @@ -1547,12 +1592,52 @@ class Logbook_model extends CI_Model { $this->db->where_in('station_id', $logbooks_locations_array); $this->db->where('COL_SAT_NAME is not null'); $this->db->where('COL_SAT_NAME !=', ''); + $this->db->order_by('count DESC'); $this->db->group_by('COL_SAT_NAME'); $query = $this->db->get($this->config->item('table_name')); return $query; } + /* Return total number of QSOs per continent */ + function total_continents($searchCriteria) { + + $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 null; + } + + $this->db->select('COL_CONT, COUNT( * ) as count', FALSE); + $this->db->where_in('station_id', $logbooks_locations_array); + $this->db->where('COL_CONT is not null'); + $this->db->where('COL_CONT !=', ''); + + if ($searchCriteria['mode'] !== '') { + $this->db->group_start(); + $this->db->where('COL_MODE', $searchCriteria['mode']); + $this->db->or_where('COL_SUBMODE', $searchCriteria['mode']); + $this->db->group_end(); + } + + if ($searchCriteria['band'] !== '') { + if($searchCriteria['band'] != "SAT") { + $this->db->where('COL_BAND', $searchCriteria['band']); + $this->db->where('COL_PROP_MODE != "SAT"'); + } else { + $this->db->where('COL_PROP_MODE', 'SAT'); + } + } + + $this->db->order_by('count DESC'); + $this->db->group_by('COL_CONT'); + $query = $this->db->get($this->config->item('table_name')); + + return $query; + } + /* Return total number of CW QSOs */ function total_cw() { @@ -2845,7 +2930,9 @@ class Logbook_model extends CI_Model { */ public function check_dxcc_table($call, $date){ - $dxcc_exceptions = $this->db->select('`entity`, `adif`, `cqz`') + $csadditions = '/^P$|^R$|^A$|^M$/'; + + $dxcc_exceptions = $this->db->select('`entity`, `adif`, `cqz`, `cont`') ->where('call', $call) ->where('(start <= ', $date) ->or_where('start is null)', NULL, false) @@ -2855,12 +2942,14 @@ class Logbook_model extends CI_Model { if ($dxcc_exceptions->num_rows() > 0){ $row = $dxcc_exceptions->row_array(); - return array($row['adif'], $row['entity'], $row['cqz']); + return array($row['adif'], $row['entity'], $row['cqz'], $row['cont']); } if (preg_match('/(^KG4)[A-Z09]{3}/', $call)) { // KG4/ and KG4 5 char calls are Guantanamo Bay. If 4 or 6 char, it is USA $call = "K"; } elseif (preg_match('/(^OH\/)|(\/OH[1-9]?$)/', $call)) { # non-Aland prefix! $call = "OH"; # make callsign OH = finland + } elseif (preg_match('/(^CX\/)|(\/CX[1-9]?$)/', $call)) { # non-Antarctica prefix! + $call = "CX"; # make callsign CX = Uruguay } elseif (preg_match('/(^3D2R)|(^3D2.+\/R)/', $call)) { # seems to be from Rotuma $call = "3D2/R"; # will match with Rotuma } elseif (preg_match('/^3D2C/', $call)) { # seems to be from Conway Reef @@ -2872,23 +2961,43 @@ class Logbook_model extends CI_Model { } elseif (preg_match('/(^KG4)[A-Z09]{1}/', $call)) { $call = "K"; } elseif (preg_match('/\w\/\w/', $call)) { + if (preg_match_all('/^((\d|[A-Z])+\/)?((\d|[A-Z]){3,})(\/(\d|[A-Z])+)?(\/(\d|[A-Z])+)?$/', $call, $matches)) { + $prefix = $matches[1][0]; + $callsign = $matches[3][0]; + $suffix = $matches[5][0]; + if ($prefix) { + $prefix = substr($prefix, 0, -1); # Remove the / at the end + } + if ($suffix) { + $suffix = substr($suffix, 1); # Remove the / at the beginning + }; + if (preg_match($csadditions, $suffix)) { + if ($prefix) { + $call = $prefix; + } else { + $call = $callsign; + } + } else { $result = $this->wpx($call, 1); # use the wpx prefix instead if ($result == '') { $row['adif'] = 0; $row['entity'] = 'None'; $row['cqz'] = 0; - return array($row['adif'], $row['entity'], $row['cqz']); + $row['cont'] = ''; + return array($row['adif'], $row['entity'], $row['cqz'], $row['cont']); } else { $call = $result . "AA"; } + } } + } $len = strlen($call); // query the table, removing a character from the right until a match for ($i = $len; $i > 0; $i--){ //printf("searching for %s\n", substr($call, 0, $i)); - $dxcc_result = $this->db->select('`call`, `entity`, `adif`, `cqz`') + $dxcc_result = $this->db->select('`call`, `entity`, `adif`, `cqz`, `cont`') ->where('call', substr($call, 0, $i)) ->where('(start <= ', $date) ->or_where("start is null)", NULL, false) @@ -2901,24 +3010,26 @@ class Logbook_model extends CI_Model { if ($dxcc_result->num_rows() > 0){ $row = $dxcc_result->row_array(); - return array($row['adif'], $row['entity'], $row['cqz']); + return array($row['adif'], $row['entity'], $row['cqz'], $row['cont']); } } return array("Not Found", "Not Found"); - } + + } public function dxcc_lookup($call, $date){ + $csadditions = '/^P$|^R$|^A$|^M$/'; + $dxcc_exceptions = $this->db->select('`entity`, `adif`, `cqz`') ->where('call', $call) - ->where('(start <= CURDATE()') + ->where('(start <= ', $date) ->or_where('start is null)', NULL, false) - ->where('(end >= CURDATE()') + ->where('(end >= ', $date) ->or_where('end is null)', NULL, false) ->get('dxcc_exceptions'); - if ($dxcc_exceptions->num_rows() > 0){ $row = $dxcc_exceptions->row_array(); return $row; @@ -2928,6 +3039,8 @@ class Logbook_model extends CI_Model { $call = "K"; } elseif (preg_match('/(^OH\/)|(\/OH[1-9]?$)/', $call)) { # non-Aland prefix! $call = "OH"; # make callsign OH = finland + } elseif (preg_match('/(^CX\/)|(\/CX[1-9]?$)/', $call)) { # non-Antarctica prefix! + $call = "CX"; # make callsign CX = Uruguay } elseif (preg_match('/(^3D2R)|(^3D2.+\/R)/', $call)) { # seems to be from Rotuma $call = "3D2/R"; # will match with Rotuma } elseif (preg_match('/^3D2C/', $call)) { # seems to be from Conway Reef @@ -2939,18 +3052,37 @@ class Logbook_model extends CI_Model { } elseif (preg_match('/(^KG4)[A-Z09]{1}/', $call)) { $call = "K"; } elseif (preg_match('/\w\/\w/', $call)) { - $result = $this->wpx($call, 1); # use the wpx prefix instead - if ($result == '') { - $row['adif'] = 0; - $row['entity'] = 'None'; - $row['cqz'] = 0; - $row['long'] = '0'; - $row['lat'] = '0'; - return $row; - } else { - $call = $result . "AA"; + if (preg_match_all('/^((\d|[A-Z])+\/)?((\d|[A-Z]){3,})(\/(\d|[A-Z])+)?(\/(\d|[A-Z])+)?$/', $call, $matches)) { + $prefix = $matches[1][0]; + $callsign = $matches[3][0]; + $suffix = $matches[5][0]; + if ($prefix) { + $prefix = substr($prefix, 0, -1); # Remove the / at the end } + if ($suffix) { + $suffix = substr($suffix, 1); # Remove the / at the beginning + }; + if (preg_match($csadditions, $suffix)) { + if ($prefix) { + $call = $prefix; + } else { + $call = $callsign; + } + } else { + $result = $this->wpx($call, 1); # use the wpx prefix instead + if ($result == '') { + $row['adif'] = 0; + $row['entity'] = 'None'; + $row['cqz'] = 0; + $row['long'] = '0'; + $row['lat'] = '0'; + return $row; + } else { + $call = $result . "AA"; + } + } } + } $len = strlen($call); @@ -2984,8 +3116,8 @@ class Logbook_model extends CI_Model { $b = ''; $c = ''; - $lidadditions = '/^QRP|^LGT/'; - $csadditions = '/^P$|^R$|^A$|^M$/'; + $lidadditions = '/^QRP$|^LGT$/'; + $csadditions = '/^P$|^R$|^A$|^M$|^LH$/'; $noneadditions = '/^MM$|^AM$/'; # First check if the call is in the proper format, A/B/C where A and C @@ -3180,6 +3312,16 @@ class Logbook_model extends CI_Model { print("$count updated\n"); } + public function check_missing_continent(){ + // get all records with no COL_CONT + $this->db->trans_start(); + $sql = "UPDATE ".$this->config->item('table_name')." JOIN dxcc_entities ON ".$this->config->item('table_name').".col_dxcc = dxcc_entities.adif SET col_cont = dxcc_entities.cont WHERE COALESCE(".$this->config->item('table_name').".col_cont, '') = ''"; + + $query = $this->db->query($sql); + print($this->db->affected_rows()." updated\n"); + $this->db->trans_complete(); + } + public function check_missing_grid_id($all){ // get all records with no COL_GRIDSQUARE $this->db->select("COL_PRIMARY_KEY, COL_CALL, COL_TIME_ON, COL_TIME_OFF"); diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php index 30be8f8d..a5e4a240 100644 --- a/application/models/Logbookadvanced_model.php +++ b/application/models/Logbookadvanced_model.php @@ -211,7 +211,10 @@ class Logbookadvanced_model extends CI_Model { if ($mode->col_submode == null || $mode->col_submode == "") { array_push($modes, $mode->col_mode); } else { - array_push($modes, $mode->col_submode); + // Make sure we don't add LSB or USB as submodes in the array list + if ($mode->col_mode != "SSB") { + array_push($modes, $mode->col_submode); + } } } diff --git a/application/models/Lookup_model.php b/application/models/Lookup_model.php index d87747a8..fce00f5a 100644 --- a/application/models/Lookup_model.php +++ b/application/models/Lookup_model.php @@ -19,13 +19,17 @@ class Lookup_model extends CI_Model{ // Populating array with worked band/mode combinations $worked = $this->getQueryData($queryinfo, 'worked'); foreach ($worked as $w) { - $resultArray[$w->col_mode][$w->col_band] = 'W'; + if(in_array($w->col_band, $queryinfo['bands'])) { + $resultArray[$w->col_mode][$w->col_band] = 'W'; + } } // Populating array with confirmed band/mode combinations $confirmed = $this->getQueryData($queryinfo, 'confirmed'); foreach ($confirmed as $c) { - $resultArray[$c->col_mode][$c->col_band] = 'C'; + if(in_array($c->col_band, $queryinfo['bands'])) { + $resultArray[$c->col_mode][$c->col_band] = 'C'; + } } return $resultArray; @@ -48,8 +52,8 @@ class Lookup_model extends CI_Model{ switch ($queryinfo['type']) { case 'dxcc': $sqlquerytypestring .= " and col_dxcc = " . $queryinfo['dxcc']; break; case 'iota': $sqlquerytypestring .= " and col_iota = '" . $queryinfo['iota'] . "'"; break; - case 'grid': $sqlquerytypestring .= " and (col_gridsquare like '%" . $fixedgrid . "%' or col_vucc_grids like '%" . $fixedgrid . "%')" ; break; - case 'cqz': $sqlquerytypestring .= " and col_cqz = " . $queryinfo['cqz']; break; + case 'vucc': $sqlquerytypestring .= " and (col_gridsquare like '%" . $fixedgrid . "%' or col_vucc_grids like '%" . $fixedgrid . "%')" ; break; + case 'cq': $sqlquerytypestring .= " and col_cqz = " . $queryinfo['cqz']; break; case 'was': $sqlquerytypestring .= " and col_state = '" . $queryinfo['was'] . "' and COL_DXCC in ('291', '6', '110')";; break; case 'sota': $sqlquerytypestring .= " and col_sota_ref = '" . $queryinfo['sota'] . "'"; break; case 'wwff': $sqlquerytypestring .= " and col_sig = 'WWFF' and col_sig_info = '" . $queryinfo['wwff'] . "'"; break; diff --git a/application/models/Timeline_model.php b/application/models/Timeline_model.php index 684bd732..c3520e4d 100644 --- a/application/models/Timeline_model.php +++ b/application/models/Timeline_model.php @@ -19,6 +19,7 @@ class Timeline_model extends CI_Model case 'was': $result = $this->get_timeline_was($band, $mode, $location_list, $qsl, $lotw, $eqsl); break; case 'iota': $result = $this->get_timeline_iota($band, $mode, $location_list, $qsl, $lotw, $eqsl); break; case 'waz': $result = $this->get_timeline_waz($band, $mode, $location_list, $qsl, $lotw, $eqsl); break; + case 'vucc': $result = $this->get_timeline_vucc($band, $mode, $location_list, $qsl, $lotw, $eqsl); break; } return $result; @@ -178,5 +179,159 @@ class Timeline_model extends CI_Model } return $sql; } + + public function get_timeline_vucc3($band, $mode, $location_list, $qsl, $lotw, $eqsl) { + // $sql = "select min(date(COL_TIME_ON)) date, col_gridsquare from " + $sql = "select min(date(COL_TIME_ON)) date, upper(substring(col_gridsquare, 1, 4)) gridsquare from " + .$this->config->item('table_name'). " thcv + where station_id in (" . $location_list . ")"; + + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + } + else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + + if ($mode != 'All') { + $sql .= " and col_mode ='" . $mode . "'"; + } + + $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl); + + $sql .= " and col_gridsquare <> '' group by upper(substring(col_gridsquare, 1, 4)) + order by date desc"; + + $query = $this->db->query($sql); + $this->vucc_shit($band, $mode, $location_list, $qsl, $lotw, $eqsl); + + return $query->result(); + } + + public function timeline_qso_details($querystring, $band, $mode, $type){ + $CI =& get_instance(); + $CI->load->model('logbooks_model'); + $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); + + if ($band != 'All') { + if ($band == 'SAT') { + $this->db->where('col_prop_mode', $band); + } else { + $this->db->where('COL_PROP_MODE !=', 'SAT'); + $this->db->where('col_band', $band); + } + } + + if ($mode != 'All') { + $this->db->where('col_mode', $mode); + } + + $this->db->where_in('station_profile.station_id', $logbooks_locations_array); + + switch($type) { + case 'dxcc': $this->db->where('COL_DXCC', $querystring); break; + case 'was': $this->db->where('COL_STATE', $querystring); break; + case 'iota': $this->db->where('COL_IOTA', $querystring); break; + case 'waz': $this->db->where('COL_CQZ', $querystring); break; + case 'vucc': $this->db->group_start(); $this->db->like('COL_GRIDSQUARE', $querystring); $this->db->or_like('COL_VUCC_GRIDS',$querystring); $this->db->group_end();break; + } + + return $this->db->get($this->config->item('table_name')); + } + + public function get_timeline_vucc($band, $mode, $location_list, $qsl, $lotw, $eqsl) { + $timeline = array(); + + $col_gridsquare = $this->get_gridsquare($band, $mode, $location_list, $qsl, $lotw, $eqsl); + + foreach ($col_gridsquare as $grid) { + $timeline[] = array( + 'gridsquare' => $grid->gridsquare, + 'date' => $grid->date); + } + + $col_vucc_grids = $this->get_vucc_grids($band, $mode, $location_list, $qsl, $lotw, $eqsl); + + foreach ($col_vucc_grids as $gridSplit) { + $grids = explode(",", $gridSplit->gridsquare); + foreach($grids as $key) { + $grid_four = strtoupper(substr(trim($key),0,4)); + if (!array_search($grid_four, array_column($timeline, 'gridsquare'))) { + $timeline[] = array( + 'gridsquare' => $grid_four, + 'date' => $gridSplit->date); + } + } + } + usort($timeline, function($a, $b) { + return $b['date'] <=> $a['date']; + }); + + return $timeline; + } + + public function get_gridsquare($band, $mode, $location_list, $qsl, $lotw, $eqsl) { + // $sql = "select min(date(COL_TIME_ON)) date, col_gridsquare from " + $sql = "select min(date(COL_TIME_ON)) date, upper(substring(col_gridsquare, 1, 4)) gridsquare from " + .$this->config->item('table_name'). " thcv + where station_id in (" . $location_list . ")"; + + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + } + else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + + if ($mode != 'All') { + $sql .= " and col_mode ='" . $mode . "'"; + } + + $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl); + + $sql .= " and col_gridsquare <> '' group by upper(substring(col_gridsquare, 1, 4)) + order by date desc"; + + $query = $this->db->query($sql); + + return $query->result(); + } + + public function get_vucc_grids($band, $mode, $location_list, $qsl, $lotw, $eqsl) { + // $sql = "select min(date(COL_TIME_ON)) date, col_gridsquare from " + $sql = "select date(COL_TIME_ON) date, upper(col_vucc_grids) gridsquare from " + .$this->config->item('table_name'). " thcv + where station_id in (" . $location_list . ")"; + + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + } + else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + + if ($mode != 'All') { + $sql .= " and col_mode ='" . $mode . "'"; + } + + $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl); + + $sql .= " and col_vucc_grids <> ''"; + + $query = $this->db->query($sql); + + return $query->result(); + } } diff --git a/application/models/User_model.php b/application/models/User_model.php index 801ab136..c4a24fb5 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -122,7 +122,7 @@ class User_Model extends CI_Model { function add($username, $password, $email, $type, $firstname, $lastname, $callsign, $locator, $timezone, $measurement, $user_date_format, $user_stylesheet, $user_qth_lookup, $user_sota_lookup, $user_wwff_lookup, $user_show_notes, $user_column1, $user_column2, $user_column3, $user_column4, $user_column5, - $user_show_profile_image, $user_previous_qsl_type) { + $user_show_profile_image, $user_previous_qsl_type, $user_amsat_status_upload) { // Check that the user isn't already used if(!$this->exists($username)) { $data = array( @@ -149,6 +149,7 @@ class User_Model extends CI_Model { 'user_column5' => xss_clean($user_column5), 'user_show_profile_image' => xss_clean($user_show_profile_image), 'user_previous_qsl_type' => xss_clean($user_previous_qsl_type), + 'user_amsat_status_upload' => xss_clean($user_amsat_status_upload), ); // Check the password is valid @@ -203,6 +204,7 @@ class User_Model extends CI_Model { 'user_column5' => xss_clean($fields['user_column5']), 'user_show_profile_image' => xss_clean($fields['user_show_profile_image']), 'user_previous_qsl_type' => xss_clean($fields['user_previous_qsl_type']), + 'user_amsat_status_upload' => xss_clean($fields['user_amsat_status_upload']), ); // Check to see if the user is allowed to change user levels @@ -321,6 +323,7 @@ class User_Model extends CI_Model { 'user_column4' => isset($u->row()->user_column4) ? $u->row()->user_column4: 'Band', 'user_column5' => isset($u->row()->user_column5) ? $u->row()->user_column5: 'Country', 'user_previous_qsl_type' => isset($u->row()->user_previous_qsl_type) ? $u->row()->user_previous_qsl_type: 0, + 'user_amsat_status_upload' => isset($u->row()->user_amsat_status_upload) ? $u->row()->user_amsat_status_upload: 0, 'active_station_logbook' => $u->row()->active_station_logbook, ); diff --git a/application/views/adif/import.php b/application/views/adif/import.php index 6b42c7fb..779bd48d 100644 --- a/application/views/adif/import.php +++ b/application/views/adif/import.php @@ -34,7 +34,7 @@ @@ -100,7 +100,7 @@

From date:

diff --git a/application/views/continents/index.php b/application/views/continents/index.php new file mode 100644 index 00000000..a03b8d3f --- /dev/null +++ b/application/views/continents/index.php @@ -0,0 +1,70 @@ + +
+ +

+ +

+ +
+ + +
+ +
+
+
" method="post"> +
+ +
+ + +
+
+ + +
+
+
+ + +
+
+
+
+
+
+ + + + + + + + + + +
#Continent# of QSO's worked
+
+
+
\ No newline at end of file diff --git a/application/views/debug/main.php b/application/views/debug/main.php index 3aecd461..2567611d 100644 --- a/application/views/debug/main.php +++ b/application/views/debug/main.php @@ -5,6 +5,26 @@
+
+
Cloudlog Information
+
+ + + + + + + + + + + + + +
Versionconfig->item('app_version')."\n"; ?>
Languageconfig->item('language'))."\n"; ?>
Base URLconfig->item('base_url'); ?> ")'>
+
+
+
Server Information
@@ -139,13 +159,32 @@
-
+ + +
Git Information
@@ -153,7 +192,13 @@
Branch - + + + + + + + n/a @@ -185,7 +230,8 @@ + - \ No newline at end of file + diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 8b5b716a..c66bc8ad 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -64,6 +64,12 @@ function load_was_map() { +uri->segment(1) == "continents") { ?> + + + + + uri->segment(1) == "adif" || $this->uri->segment(1) == "qrz") { ?> @@ -122,6 +128,24 @@ function load_was_map() { +uri->segment(1) == "debug") { ?> + + + uri->segment(1) == "api" && $this->uri->segment(2) == "help") { ?>