From 1e269b18b2d8eac8c139a5c7b8c9dc0e9b8e65ac Mon Sep 17 00:00:00 2001 From: int2001 Date: Tue, 8 Aug 2023 13:47:23 +0000 Subject: [PATCH 01/55] removed a lot of unused (and dangerous) functions --- application/controllers/Api.php | 256 +----------------- application/controllers/Awards.php | 31 --- application/models/Logbook_model.php | 14 +- application/views/interface_assets/footer.php | 34 --- 4 files changed, 2 insertions(+), 333 deletions(-) diff --git a/application/controllers/Api.php b/application/controllers/Api.php index 595f38dd..bf6d3a3c 100644 --- a/application/controllers/Api.php +++ b/application/controllers/Api.php @@ -151,262 +151,8 @@ class API extends CI_Controller { } } - // FUNCTION: search() - // Handle search requests - /* - Okay, so here's how it works in a nutshell... - ******************************************************************* - Because this is effectively just a filter between the query string - and a MySQL statement, if done wrong we're just asking for pain. - - DO NOT alter any of the filtering statements without fully - understanding what you're doing. CodeIgniter provides some - protection against unwanted characters in the query string, but - this should in no way be relied upon for safety. - ******************************************************************* - - Example query:- - .../search/query[Call~M0*(and)(Locator~I*(or)Locator~J*)]/limit[10]/fields[distinct(Call),Locator]/order[Call(asc)] - - There's four parts to this query, separated with forward slashes. It's effectively a heavily-sanitised - MySQL query, hence the hideous search and replace code blocks below. - - FIELDS - ------ - Straightforward - input is sanitised and passed on - in the example, this ends up as "DISTINCT (Call),Locator", - which is then the first argument to 'SELECT' - - QUERY - ----- - This forms the 'WHERE' clause. - - * '(and)' and '(or)' are expanded out to ' AND ' and ' OR ' - * Parentheses are preserved - * '~' is expanded out to ' LIKE ' - * '*' is translated to '%' - * Values are encapsulated in quote marks - - So in the example, this translates to "WHERE Call LIKE 'M0%' AND (Locator LIKE 'I%' OR Locator LIKE 'J%')" - - ORDER - ----- - Sanitised, so our example ends up as "ORDER BY Call ASC". - - LIMIT - ----- - Straightforward - what's between the square brackets is passed as an argument to 'LIMIT' - - Finally, once this has been done, each field name is translated to the MySQL column name. - */ - function search() - { - // Load the API and Logbook models - $this->load->model('api_model'); - $this->load->model('logbook_model'); - $this->load->model('user_model'); - - $arguments = $this->_retrieve(); - print_r($arguments); - return; - - if((!$this->user_model->authorize(3)) && ($this->api_model->authorize($arguments['key']) == 0)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); - } - - $this->api_model->update_last_used($obj['key']); - - // Retrieve the arguments from the query string - $data['data']['format'] = $arguments['format']; - - // Call the parser within the API model to build the query - $query = $this->api_model->select_parse($arguments); - - // Execute the query, and retrieve the results - $s = $this->logbook_model->api_search_query($query); - $a = 0; - - // Print query results using original column names and exit - if ($arguments['format'] == 'original'){ - $results = array(); - foreach($s['results']->result() as $row){ - //print_r($row); - array_push($results, $row); - } - - print json_encode($results); - return; - } - - if(isset($s['results'])) { - $results = $s['results']; - - // Cycle through the results, and translate between MySQL column names - // and more friendly, descriptive names - if($results->num_rows() != 0) - { - foreach ($results->result() as $row) { - $record = (array)$row; - $r[$a]['rid'] = $a; - while (list($key, $val) = each($record)) { - $r[$a][$this->api_model->name($key)] = $val; - } - $a++; - } - // Add the result record to the main results array - $data['data']['search_Result']['results'] = $r; - } - else - { - // We've got no results, so make this empty for completeness - $data['data']['search_Result']['results'] = ""; - } - } else { - $data['data']['error'] = $s['error']; - $data['data']['search_Result']['results'] = ""; - } - - // Add some debugging information to the XML output - $data['data']['queryInfo']['call'] = "search"; - $data['data']['queryInfo']['dbQuery'] = $s['query']; - $data['data']['queryInfo']['numResults'] = $a; - $data['data']['queryInfo']['executionTime'] = $s['time']; - - // Load the XML output view - $this->load->view('api/index', $data); - } - - /* - * version of search that is callable internally - * $arguments is an array of columns to query - */ - function api_search($arguments){ - // Load the API and Logbook models - $this->load->model('api_model'); - $this->load->model('logbook_model'); - $this->load->model('user_model'); - - if((!$this->user_model->authorize(3)) && ($this->api_model->authorize($arguments['key']) == 0)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); - } - - $this->api_model->update_last_used($obj['key']); - - // Retrieve the arguments from the query string - $data['data']['format'] = $arguments['format']; - - // Call the parser within the API model to build the query - $query = $this->api_model->select_parse($arguments); - - // Execute the query, and retrieve the results - $s = $this->logbook_model->api_search_query($query); - return $s; - } - - function validate() - { - // Load the API and Logbook models - $this->load->model('api_model'); - $this->load->model('logbook_model'); - - // Retrieve the arguments from the query string - $arguments = $this->_retrieve(); - - // Add some debugging information to the XML output - $data['data'] = $arguments; - $data['data']['queryInfo']['call'] = "validate"; - $data['data']['queryInfo']['dbQuery'] = ""; - $data['data']['queryInfo']['numResults'] = 1; - $data['data']['queryInfo']['executionTime'] = 0; - - $data['data']['validate_Result']['results'] = array(0 => array('Result' => $this->api_model->authorize($arguments['key']))); - - $this->load->view('api/index', $data); - } - - function add() - { - // Load the API and Logbook models - $this->load->model('api_model'); - $this->load->model('logbook_model'); - $this->load->model('user_model'); - if(!$this->user_model->authorize(3)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } - - // Retrieve the arguments from the query string - $arguments = $this->_retrieve(); - - // Call the parser within the API model to build the query - $query = $this->api_model->insert_parse($arguments); - - # Check for guessable fields - if(!isset($query['COL_TIME_ON'])) - { - $query['COL_TIME_ON'] = date("Y-m-d H:i:s", time()); - } - if(!isset($query['COL_TIME_OFF'])) - { - $query['COL_TIME_OFF'] = date("Y-m-d H:i:s", time()); - } - - $data['data']['queryInfo']['dbQuery'] = ""; - $data['data']['queryInfo']['executionTime'] = 0; - - if(!isset($query['COL_CALL'])) { - $data['data']['add_Result']['results'] = array(0 => array('Result' => 'EMISSINGCALL')); - } else { - $s = $this->logbook_model->api_insert_query($query); - $data['data']['queryInfo']['dbQuery'] = $s['query']; - $data['data']['queryInfo']['executionTime'] = $s['time']; - - $data['data']['add_Result']['results'] = array(0 => array('Result' => $s['result_string'])); - } - - // Add some debugging information to the XML output - $data['data']['queryInfo']['call'] = "add"; - $data['data']['queryInfo']['numResults'] = 0; - - $this->load->view('api/index', $data); - } - - // FUNCTION: _retrieve() - // Pull the search query arguments from the query string - private function _retrieve() - { - // This whole function could probably have been done in one line... if this was Perl. - $arguments = array(); - - // Retrieve each arguments - $query = preg_grep("/^query=(.*)$/", $this->uri->segments); - $limit = preg_grep("/^limit=(.*)$/", $this->uri->segments); - $order = preg_grep("/^order=(.*)$/", $this->uri->segments); - $fields = preg_grep("/^fields=(.*)$/", $this->uri->segments); - $format = preg_grep("/^format=(.*)$/", $this->uri->segments); - $key = preg_grep("/^key=(.*)$/", $this->uri->segments); - - // Strip each argument - $arguments['query'] = substr(array_pop($query), 6); - $arguments['query'] = substr($arguments['query'], 0, strlen($arguments['query'])); - $arguments['limit'] = substr(array_pop($limit), 6); - $arguments['limit'] = substr($arguments['limit'], 0, strlen($arguments['limit'])); - $arguments['order'] = substr(array_pop($order), 6); - $arguments['order'] = substr($arguments['order'], 0, strlen($arguments['order'])); - $arguments['fields'] = substr(array_pop($fields), 7); - $arguments['fields'] = substr($arguments['fields'], 0, strlen($arguments['fields'])); - $arguments['format'] = substr(array_pop($format), 7); - $arguments['format'] = substr($arguments['format'], 0, strlen($arguments['format'])); - $arguments['key'] = substr(array_pop($key), 4); - $arguments['key'] = substr($arguments['key'], 0, strlen($arguments['key'])); - - // By default, assume XML for the format if not otherwise set - if($arguments['format'] == "") { - $arguments['format'] = "xml"; - } - - // Return the arguments - return $arguments; - } - - /* + /* * * Function: QSO * Task: allows passing of ADIF data to Cloudlog diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 9e87ca4e..af1c8a1c 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -97,37 +97,6 @@ class Awards extends CI_Controller { } - public function dok_details_ajax(){ - $a = $this->security->xss_clean($this->input->post()); - $q = ""; - foreach ($a as $key => $value) { - $q .= $key."=".$value.("(and)"); - } - $q = substr($q, 0, strlen($q)-13); - - $arguments["query"] = $q; - $arguments["fields"] = ''; - $arguments["format"] = "json"; - $arguments["limit"] = ''; - $arguments["order"] = ''; - $arguments["join_station_profile"] = true; - - // Load the API and Logbook models - $this->load->model('api_model'); - $this->load->model('logbook_model'); - - // Call the parser within the API model to build the query - $query = $this->api_model->select_parse($arguments); - - // Execute the query, and retrieve the results - $data = $this->logbook_model->api_search_query($query); - - // Render Page - $data['page_title'] = "Log View - DOK"; - $data['filter'] = str_replace("(and)", ", ", $q); - $this->load->view('awards/details', $data); - } - public function dxcc () { $this->load->model('dxcc'); $this->load->model('modes'); diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 6c05d6a8..413e7ca4 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -2629,19 +2629,7 @@ class Logbook_model extends CI_Model { } } - function api_search_query($query) { - $time_start = microtime(true); - $results = $this->db->query($query); - if(!$results) { - return array('query' => $query, 'error' => $this->db->_error_number(), 'time' => 0); - } - $time_end = microtime(true); - $time = round($time_end - $time_start, 4); - - return array('query' => $query, 'results' => $results, 'time' => $time); - } - - function api_insert_query($query) { + function api_insert_query($query) { $time_start = microtime(true); $results = $this->db->insert($this->config->item('table_name'), $query); if(!$results) { diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index def9c498..042544e2 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -1860,40 +1860,6 @@ $(document).ready(function(){ - -uri->segment(2) == "dok") { ?> - - - uri->segment(2) == "iota") { ?> - -config->item('winkey')) { ?> + +optionslib->get_option('dxcache_url') != ''){ ?> From 4d01d806247de81be785cc7ba90be4c80136b5fb Mon Sep 17 00:00:00 2001 From: phl0 Date: Tue, 15 Aug 2023 22:30:58 +0200 Subject: [PATCH 49/55] Only show the spinner for clicked button (HRDlog) --- application/views/hrdlog/export.php | 2 +- assets/js/sections/hrdlog.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application/views/hrdlog/export.php b/application/views/hrdlog/export.php index 85767b58..9b8662b4 100644 --- a/application/views/hrdlog/export.php +++ b/application/views/hrdlog/export.php @@ -46,7 +46,7 @@ echo '' . $station->modcount . ''; echo '' . $station->notcount . ''; echo '' . $station->totcount . ''; - echo ''; + echo ''; echo ''; } echo ''; diff --git a/assets/js/sections/hrdlog.js b/assets/js/sections/hrdlog.js index 9679c50a..59180622 100644 --- a/assets/js/sections/hrdlog.js +++ b/assets/js/sections/hrdlog.js @@ -17,16 +17,16 @@ function ExportHrd(station_id) { if ($(".errormessages").length > 0) { $(".errormessages").remove(); } - $(".ld-ext-right").addClass('running'); - $(".ld-ext-right").prop('disabled', true); + $(".ld-ext-right-"+station_id).addClass('running'); + $(".ld-ext-right-"+station_id).prop('disabled', true); $.ajax({ url: base_url + 'index.php/hrdlog/upload_station', type: 'post', data: {'station_id': station_id}, success: function (data) { - $(".ld-ext-right").removeClass('running'); - $(".ld-ext-right").prop('disabled', false); + $(".ld-ext-right-"+station_id).removeClass('running'); + $(".ld-ext-right-"+station_id).prop('disabled', false); if (data.status == 'OK') { $.each(data.info, function(index, value){ $('#modcount'+value.station_id).html(value.modcount); From df95c6af631701aaba7b856ead26240476d5b961 Mon Sep 17 00:00:00 2001 From: phl0 Date: Tue, 15 Aug 2023 22:32:49 +0200 Subject: [PATCH 50/55] Only show the spinner for clicked button (webadif) --- application/views/webadif/export.php | 2 +- assets/js/sections/webadif.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application/views/webadif/export.php b/application/views/webadif/export.php index f968d582..ccfdb719 100644 --- a/application/views/webadif/export.php +++ b/application/views/webadif/export.php @@ -52,7 +52,7 @@ echo '' . $station->station_callsign . ''; echo '' . $station->notcount . ''; echo '' . $station->totcount . ''; - echo ''; + echo ''; echo ''; } } diff --git a/assets/js/sections/webadif.js b/assets/js/sections/webadif.js index 2687d11d..fb200dd1 100644 --- a/assets/js/sections/webadif.js +++ b/assets/js/sections/webadif.js @@ -29,16 +29,16 @@ function ExportWebADIF(station_id) { if ($(".errormessages").length > 0) { $(".errormessages").remove(); } - $(".ld-ext-right").addClass('running'); - $(".ld-ext-right").prop('disabled', true); + $(".ld-ext-right-"+station_id).addClass('running'); + $(".ld-ext-right-"+station_id).prop('disabled', true); $.ajax({ url: base_url + 'index.php/webadif/upload_station', type: 'post', data: {'station_id': station_id}, success: function (data) { - $(".ld-ext-right").removeClass('running'); - $(".ld-ext-right").prop('disabled', false); + $(".ld-ext-right-"+station_id).removeClass('running'); + $(".ld-ext-right-"+station_id).prop('disabled', false); if (data.status == 'OK') { $.each(data.info, function(index, value){ $('#notcount'+value.station_id).html(value.notcount); From ab5bd8f5b06ae9ad0c78cd08f9af368c50e2115a Mon Sep 17 00:00:00 2001 From: Yuluoxk <59152137+Lingluoluo@users.noreply.github.com> Date: Wed, 16 Aug 2023 12:55:08 +0800 Subject: [PATCH 51/55] Updated Simplified Chinese translation --- .../chinese_simplified/account_lang.php | 87 +++++++++++++++++++ .../chinese_simplified/admin_lang.php | 18 ++++ .../language/chinese_simplified/eqsl_lang.php | 5 ++ .../chinese_simplified/general_words_lang.php | 29 +++++-- .../chinese_simplified/gridsquares_lang.php | 26 ++++++ .../language/chinese_simplified/index.html | 1 + .../language/chinese_simplified/lotw_lang.php | 12 ++- .../language/chinese_simplified/menu_lang.php | 84 ++++++++++++++++++ .../chinese_simplified/options_lang.php | 61 +++++++++++++ .../chinese_simplified/statistics_lang.php | 17 ++++ 10 files changed, 331 insertions(+), 9 deletions(-) create mode 100644 application/language/chinese_simplified/admin_lang.php create mode 100644 application/language/chinese_simplified/eqsl_lang.php create mode 100644 application/language/chinese_simplified/gridsquares_lang.php create mode 100644 application/language/chinese_simplified/menu_lang.php create mode 100644 application/language/chinese_simplified/options_lang.php create mode 100644 application/language/chinese_simplified/statistics_lang.php diff --git a/application/language/chinese_simplified/account_lang.php b/application/language/chinese_simplified/account_lang.php index 98c95c79..2e86d689 100644 --- a/application/language/chinese_simplified/account_lang.php +++ b/application/language/chinese_simplified/account_lang.php @@ -8,3 +8,90 @@ $lang['account_column2_text'] = '选择第2列'; $lang['account_column3_text'] = '选择第3列'; $lang['account_column4_text'] = '选择第4列'; $lang['account_column5_text'] = '选择第5列(仅日志簿)'; + +$lang['account_create_user_account'] = '创建用户账户i'; +$lang['account_edit_account'] = '编辑账户'; + +$lang['account_account_information'] = '账户信息'; +$lang['account_username'] = '用户名'; +$lang['account_email_address'] = '电子邮件'; +$lang['account_password'] = '密码'; + +$lang['account_roles'] = '角色'; +$lang['account_user_role'] = '用户角色'; + +$lang['account_theme'] = '主题'; +$lang['account_stylesheet'] = '样式表'; + +$lang['account_personal_information'] = '个人信息'; +$lang['account_first_name'] = '姓'; +$lang['account_last_name'] = '名'; +$lang['account_callsign'] = '呼号'; +$lang['account_gridsquare'] = '梅登海德网格'; + +$lang['account_cloudlog_preferences'] = '偏好选项'; +$lang['account_timezone'] = '时区'; +$lang['account_date_format'] = '日期格式'; +$lang['account_measurement_preferences'] = '距离单位偏好'; +$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = '选择您登录账户时要显示的日期格式'; +$lang['account_choose_which_unit_distances_will_be_shown_in'] = '选择距离单位'; + +$lang['account_main_menu'] = '主菜单'; +$lang['account_show_notes_in_the_main_menu'] = '在主菜单显示便签栏'; + +$lang['account_gridsquare_and_location_autocomplete'] = '自动填写梅登海德网格和位置'; +$lang['account_location_auto_lookup'] = '自动查找位置'; +$lang['account_if_set_gridsquare_is_fetched_based_on_location_name'] = '如果开启本选项,将根据位置名称获取梅登海德网格。'; +$lang['account_sota_auto_lookup_gridsquare_and_name_for_summit'] = '根据SOTA编号自动查找梅登海德网格和峰名。'; +$lang['account_wwff_auto_lookup_gridsquare_and_name_for_reference'] = '根据WWFF编号自动查找梅登海德网格和名称。'; +$lang['account_pota_auto_lookup_gridsquare_and_name_for_park'] = '根据POTA编号自动查找梅登海德网格和名称。'; +$lang['account_if_set_name_and_gridsquare_is_fetched_from_the_api_and_filled_in_location_and_locator'] = '如果开启此项设置,将从API获取名称和梅登海德网格,并填写位置和定位器。'; + +$lang['account_previous_qsl_type'] = '上一个QSL类型'; +$lang['account_select_the_type_of_qsl_to_show_in_the_previous_qsos_section'] = '选择要在上一个QSO部分中显示的QSL类型。'; + +$lang['account_qrzcom_hamqthcom_images'] = 'qrz.com/hamqth.com Images'; +$lang['account_show_profile_picture_of_qso_partner_from_qrzcom_hamqthcom_profile_in_the_log_qso_section'] = '在日志QSO部分中显示qrz.com/hamqth.com配置文件的QSO合作伙伴的个人资料图片。'; +$lang['account_please_set_your_qrzcom_hamqthcom_credentials_in_the_general_config_file'] = '请在general_config.php文件中设置qrz.com/hamqth.com凭据。'; + +$lang['account_amsat_status_upload'] = '上传到AMSAT'; +$lang['account_upload_status_of_sat_qsos_to'] = '上传卫星QSO到'; + +$lang['account_logbook_of_the_world'] = 'Logbook of the World'; +$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'] = 'Club Log(俱乐部日志)'; +$lang['account_clublog_email_callsign'] = 'Club Log 邮件地址/呼号'; +$lang['account_clublog_password'] = 'Club Log 密码'; +$lang['account_the_email_or_callsign_you_use_to_login_to_club_log'] = '您用于登录Club Log的电子邮件或呼号。'; + +$lang['account_eqsl'] = 'eQSL'; +$lang['account_eqslcc_username'] = 'eQSL.cc 用户名'; +$lang['account_eqslcc_password'] = 'eQSL.cc 密码'; + +$lang['account_save_account_changes'] = '保存账户更改'; +$lang['account_create_account'] = '创建账户'; + +$lang['account_delete_user_account'] = '删除用户账户'; +$lang['account_are_you_sure_you_want_to_delete_the_user_account'] = '您确定要删除用户账户吗?'; +$lang['account_yes_delete_this_user'] = '是的,删除此用户'; +$lang['account_no_do_not_delete_this_user'] = '不,不要删除此用户'; + +$lang['account_forgot_password'] = '忘记密码'; +$lang['account_you_can_reset_your_password_here'] = '您可以在此处重置密码。'; +$lang['account_reset_password'] = '重置密码'; +$lang['account_the_email_field_is_required'] = '电子邮件必填'; +$lang['account_confirm_password'] = '确认密码'; + +$lang['account_forgot_your_password'] = '忘记密码?'; + +$lang['account_login_to_cloudlog'] = '登录Cloudlog'; +$lang['account_login'] = '登录'; + +$lang['account_mastodon'] = 'Mastodon服务器'; +$lang['account_user_mastodon'] = 'Mastodon 地址'; + +$lang['account_gridmap_settings'] = '网格地图设置'; +$lang['account_gridmap_default_band'] = '默认波段'; diff --git a/application/language/chinese_simplified/admin_lang.php b/application/language/chinese_simplified/admin_lang.php new file mode 100644 index 00000000..550c55b8 --- /dev/null +++ b/application/language/chinese_simplified/admin_lang.php @@ -0,0 +1,18 @@ +

Directory access is forbidden.

+1 \ No newline at end of file diff --git a/application/language/chinese_simplified/lotw_lang.php b/application/language/chinese_simplified/lotw_lang.php index b1b25958..6426ca40 100644 --- a/application/language/chinese_simplified/lotw_lang.php +++ b/application/language/chinese_simplified/lotw_lang.php @@ -11,7 +11,7 @@ $lang['lotw_title_export_p12_file_instruction'] = '导出 .p12 文件流程'; $lang['lotw_title_adif_import'] = 'ADIF 导入'; $lang['lotw_title_adif_import_options'] = '导入选项'; -$lang['lotw_beta_warning'] = '请明确 LoTW 同步处于 BETA 测试阶段, 查看 wiki 寻求帮助。'; +$lang['lotw_beta_warning'] = '请明确 LoTW 同步处于 BETA 测试阶段, 请查看 wiki 寻求帮助。'; $lang['lotw_no_certs_uploaded'] = '你需要上传 LoTW p12 证书以使用该功能。'; $lang['lotw_date_created'] = '创建日期'; @@ -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'; @@ -29,7 +30,7 @@ $lang['lotw_certificate_dxcc_help_text'] = '证书的 DXCC 实体。例如: Scot $lang['lotw_input_a_file'] = '上传文件'; -$lang['lotw_upload_exported_adif_file_from_lotw'] = '下载从 LoTW Download Report 中导出的 ADIF 文件,以标记这些 QSO 在 LoTW上已得到确认。'; +$lang['lotw_upload_exported_adif_file_from_lotw'] = '下载从 LoTW Download Report 中导出的 ADIF 文件,并且标记在 LoTW上已得到确认的QSO。'; $lang['lotw_upload_type_must_be_adi'] = '日志文件的类型必须为 .adi'; $lang['lotw_pull_lotw_data_for_me'] = '为我拉取 LoTW 数据'; @@ -51,3 +52,10 @@ $lang['lotw_p12_export_step_three'] = '单击 "Save Callsign Certificate File" $lang['lotw_p12_export_step_four'] = '在下方上传文件。'; $lang['lotw_confirmed'] = '该 QSO 已在 LoTW 确认'; + +// LoTW Expiry +$lang['lotw_cert_expiring'] = '至少有一个LoTW证书即将过期!'; +$lang['lotw_cert_expired'] = '至少有一个LoTW证书已经过期!'; + +// Lotw User +$lang['lotw_user'] = '这个电台使用 LOTW。最后一次上传是'; diff --git a/application/language/chinese_simplified/menu_lang.php b/application/language/chinese_simplified/menu_lang.php new file mode 100644 index 00000000..49791713 --- /dev/null +++ b/application/language/chinese_simplified/menu_lang.php @@ -0,0 +1,84 @@ + Date: Wed, 16 Aug 2023 07:39:48 +0200 Subject: [PATCH 52/55] Buttons in (e)QSL listings be white in dark mode themes --- application/views/interface_assets/footer.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 09a15064..27ecf041 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -2223,6 +2223,10 @@ $(document).ready(function(){ } ] }); + // change color of csv-button if dark mode is chosen + if (isDarkModeTheme()) { + $('[class*="buttons"]').css("color", "white"); + } From af6eb36eca5706480f44735caf5cd856b148fec9 Mon Sep 17 00:00:00 2001 From: int2001 Date: Thu, 17 Aug 2023 03:19:28 +0000 Subject: [PATCH 53/55] Fix Also Update STATION_CALLSIGN when updating location --- application/models/Logbook_model.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index b7328d54..f0e54c2e 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -901,9 +901,12 @@ class Logbook_model extends CI_Model { $CI =& get_instance(); $CI->load->model('stations'); if (!$CI->stations->check_station_is_accessible($stationId)) { - return; + return; } + $station_profile=$CI->stations->profile_clean($stationId); + $stationCallsign=$station_profile->station_callsign; + $mode = $this->get_main_mode_if_submode($this->input->post('mode')); if ($mode == null) { $mode = $this->input->post('mode'); @@ -930,7 +933,7 @@ class Logbook_model extends CI_Model { $srx_string = null; } - if (stristr($this->input->post('usa_county'), ',')) { + if (stristr($this->input->post('usa_county') ?? '', ',')) { $uscounty = $this->input->post('usa_county'); } else { $uscounty = $this->input->post('usa_state') .",".$this->input->post('usa_county'); @@ -1076,6 +1079,7 @@ class Logbook_model extends CI_Model { 'COL_CONTEST_ID' => $this->input->post('contest_name'), 'COL_QSL_VIA' => $this->input->post('qsl_via_callsign'), 'station_id' => $stationId, + 'COL_STATION_CALLSIGN' => $stationCallsign, 'COL_OPERATOR' => $this->input->post('operator_callsign'), 'COL_STATE' =>$this->input->post('usa_state'), 'COL_CNTY' => $uscounty From 473532c6b3c9e9e3996b8598c09aeac052f90a09 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 17 Aug 2023 13:59:18 +0100 Subject: [PATCH 54/55] [QSO] Reloads previous contacts table every 5s this means that any incoming QSOs from API or a different browser is shown --- application/controllers/Qso.php | 11 ++++ .../qso/components/previous_contacts.php | 65 +++++++++++++++++++ application/views/qso/index.php | 2 +- 3 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 application/views/qso/components/previous_contacts.php diff --git a/application/controllers/Qso.php b/application/controllers/Qso.php index a5053c5c..1df36bae 100755 --- a/application/controllers/Qso.php +++ b/application/controllers/Qso.php @@ -571,6 +571,17 @@ class QSO extends CI_Controller { echo json_encode($data); } + // Return Previous QSOs Made in the active logbook + public function component_past_contacts() { + $this->load->model('logbook_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + + $data['query'] = $this->logbook_model->last_custom('5'); + + // Load view + $this->load->view('qso/components/previous_contacts', $data); + } + function check_locator($grid) { $grid = $this->input->post('locator'); // Allow empty locator diff --git a/application/views/qso/components/previous_contacts.php b/application/views/qso/components/previous_contacts.php new file mode 100644 index 00000000..7c13761c --- /dev/null +++ b/application/views/qso/components/previous_contacts.php @@ -0,0 +1,65 @@ +
+ +
+ + + + + + + + session->userdata('user_column1')=='Frequency' || $this->session->userdata('user_column2')=='Frequency' || $this->session->userdata('user_column3')=='Frequency' || $this->session->userdata('user_column4')=='Frequency' || $this->session->userdata('user_column5')=='Frequency') { + echo ''; + } else { + echo ''; + } + ?> + + + session->userdata('user_date_format')) { + // If Logged in and session exists + $custom_date_format = $this->session->userdata('user_date_format'); + } else { + // Get Default date format from /config/cloudlog.php + $custom_date_format = $this->config->item('qso_date_format'); + } + + $i = 0; + if($query != false) { + foreach ($query->result() as $row) { + echo ''; + echo ' + + + + + COL_SAT_NAME != null) { ?> + + session->userdata('user_column1')=='Frequency' || $this->session->userdata('user_column2')=='Frequency' || $this->session->userdata('user_column3')=='Frequency' || $this->session->userdata('user_column4')=='Frequency' || $this->session->userdata('user_column5')=='Frequency') { + echo ''; + } else { + echo ''; + } + } ?> + + +
/'.lang('gen_hamradio_frequency').''.lang('gen_hamradio_band').'
'; + $timestamp = strtotime($row->COL_TIME_ON); + echo date($custom_date_format, $timestamp); + echo date(' H:i',strtotime($row->COL_TIME_ON)); + ?> + + COL_CALL)); ?> + COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; ?>COL_RST_SENT; ?>COL_RST_RCVD; ?>COL_SAT_NAME; ?>'; + if ($row->COL_FREQ != null) { + echo $this->frequency->hz_to_mhz($row->COL_FREQ); + } else { + echo $row->COL_BAND; + } + echo ''.$row->COL_BAND.'
+
+
\ No newline at end of file diff --git a/application/views/qso/index.php b/application/views/qso/index.php index 39dfc123..93ccd14d 100755 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -581,7 +581,7 @@
-
+
From 59a80efc17aeb1c111178d91569e395a35611b8c Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 17 Aug 2023 14:01:20 +0100 Subject: [PATCH 55/55] [Migration] Sets version to 2.4.7 --- application/config/migration.php | 2 +- application/migrations/137_tag_2_4_7.php | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 application/migrations/137_tag_2_4_7.php diff --git a/application/config/migration.php b/application/config/migration.php index 6c26998f..70bc112e 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE; | */ -$config['migration_version'] = 136; +$config['migration_version'] = 137; /* |-------------------------------------------------------------------------- diff --git a/application/migrations/137_tag_2_4_7.php b/application/migrations/137_tag_2_4_7.php new file mode 100644 index 00000000..ebfd269c --- /dev/null +++ b/application/migrations/137_tag_2_4_7.php @@ -0,0 +1,24 @@ +db->where('option_name', 'version'); + $this->db->update('options', array('option_value' => '2.4.7')); + } + + public function down() + { + $this->db->where('option_name', 'version'); + $this->db->update('options', array('option_value' => '2.4.6')); + } +} \ No newline at end of file