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/controllers/Api.php b/application/controllers/Api.php index 595f38dd..7a1e9634 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 @@ -482,11 +228,19 @@ class API extends CI_Controller { $obj = json_decode(file_get_contents("php://input"), true); if ($obj === NULL) { echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]); + return; } if(!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) { http_response_code(401); echo json_encode(['status' => 'failed', 'reason' => "missing api key"]); + return; + } + + if(!isset($obj['logbook_public_slug']) || !isset($obj['callsign'])) { + http_response_code(401); + echo json_encode(['status' => 'failed', 'reason' => "missing fields"]); + return; } if($obj['logbook_public_slug'] != "" && $obj['callsign'] != "") { @@ -562,6 +316,12 @@ class API extends CI_Controller { echo json_encode(['status' => 'failed', 'reason' => "missing api key"]); } + if(!isset($obj['logbook_public_slug']) || !isset($obj['grid'])) { + http_response_code(401); + echo json_encode(['status' => 'failed', 'reason' => "missing fields"]); + return; + } + if($obj['logbook_public_slug'] != "" && $obj['grid'] != "") { $logbook_slug = $obj['logbook_public_slug']; diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 9e87ca4e..d11f7b86 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'); @@ -252,7 +221,6 @@ class Awards extends CI_Controller { $mode = str_replace('"', "", $this->security->xss_clean($this->input->post("Mode"))); $type = $this->security->xss_clean($this->input->post('Type')); $qsl = $this->input->post('QSL') == null ? '' : $this->security->xss_clean($this->input->post('QSL')); - $data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type, $qsl); // This is done because we have two different ways to get dxcc info in Cloudlog. Once is using the name (in awards), and the other one is using the ADIF DXCC. diff --git a/application/controllers/Csv.php b/application/controllers/Csv.php index af1b1402..de02ce43 100644 --- a/application/controllers/Csv.php +++ b/application/controllers/Csv.php @@ -5,7 +5,7 @@ class Csv extends CI_Controller { public function index() { $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } $this->load->model('modes'); $this->load->model('logbook_model'); @@ -26,8 +26,11 @@ class Csv extends CI_Controller { } public function export() { - $this->load->model('csv_model'); + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + + $this->load->model('csv_model'); // Parameters $station_id = $this->security->xss_clean($this->input->post('station_profile')); $band = $this->security->xss_clean($this->input->post('band')); diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php index b7b3b969..8c5ae246 100644 --- a/application/controllers/Dashboard.php +++ b/application/controllers/Dashboard.php @@ -87,12 +87,19 @@ class Dashboard extends CI_Controller { $data['total_qsl_sent'] = $QSLStatsBreakdownArray['QSL_Sent']; $data['total_qsl_rcvd'] = $QSLStatsBreakdownArray['QSL_Received']; $data['total_qsl_requested'] = $QSLStatsBreakdownArray['QSL_Requested']; + $data['qsl_sent_today'] = $QSLStatsBreakdownArray['QSL_Sent_today']; + $data['qsl_rcvd_today'] = $QSLStatsBreakdownArray['QSL_Received_today']; + $data['qsl_requested_today'] = $QSLStatsBreakdownArray['QSL_Requested_today']; $data['total_eqsl_sent'] = $QSLStatsBreakdownArray['eQSL_Sent']; $data['total_eqsl_rcvd'] = $QSLStatsBreakdownArray['eQSL_Received']; + $data['eqsl_sent_today'] = $QSLStatsBreakdownArray['eQSL_Sent_today']; + $data['eqsl_rcvd_today'] = $QSLStatsBreakdownArray['eQSL_Received_today']; $data['total_lotw_sent'] = $QSLStatsBreakdownArray['LoTW_Sent']; $data['total_lotw_rcvd'] = $QSLStatsBreakdownArray['LoTW_Received']; + $data['lotw_sent_today'] = $QSLStatsBreakdownArray['LoTW_Sent_today']; + $data['lotw_rcvd_today'] = $QSLStatsBreakdownArray['LoTW_Received_today']; $data['last_five_qsos'] = $this->logbook_model->get_last_qsos('18', $logbooks_locations_array); @@ -210,6 +217,6 @@ class Dashboard extends CI_Controller { echo "}"; } - + } diff --git a/application/controllers/Dxatlas.php b/application/controllers/Dxatlas.php index ad86ba4a..79dbf9db 100644 --- a/application/controllers/Dxatlas.php +++ b/application/controllers/Dxatlas.php @@ -4,8 +4,7 @@ class Dxatlas extends CI_Controller { public function index() { $this->load->model('user_model'); - - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } $this->load->model('modes'); $this->load->model('logbook_model'); @@ -26,6 +25,9 @@ class Dxatlas extends CI_Controller { } public function export() { + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + $this->load->model('dxatlas_model'); // Parameters @@ -45,6 +47,8 @@ class Dxatlas extends CI_Controller { } function generateFiles($wkdArray, $cfmArray, $band) { + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } $gridCfmArray = []; $gridWkdArray = []; @@ -100,9 +104,11 @@ class Dxatlas extends CI_Controller { } function makeZip($gridWkdString, $gridCfmString, $band) { + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } $zipFileName = 'dxatlas_gridsquares_'. $band . '.zip'; // Prepare File - $file = tempnam("tmp", "zip"); + $file = tempnam(".", "zip"); $zip = new ZipArchive(); $zip->open($file, ZipArchive::OVERWRITE); diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php index e0458ca9..8bb72380 100644 --- a/application/controllers/Eqsl.php +++ b/application/controllers/Eqsl.php @@ -463,7 +463,7 @@ class eqsl extends CI_Controller { } function writeEqslNotSent($qslsnotsent, $custom_date_format) { - $table = '
Date | "; $table .= "Time | "; diff --git a/application/controllers/Export.php b/application/controllers/Export.php deleted file mode 100644 index 9d2c4bf4..00000000 --- a/application/controllers/Export.php +++ /dev/null @@ -1,21 +0,0 @@ -load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } - - $data['page_title'] = "Data Export"; - - $this->load->view('interface_assets/header', $data); - $this->load->view('export/index'); - $this->load->view('interface_assets/footer'); - - } -} - -/* End of file welcome.php */ -/* Location: ./application/controllers/welcome.php */ \ No newline at end of file diff --git a/application/controllers/Kmlexport.php b/application/controllers/Kmlexport.php index 711ebc68..f76327b5 100644 --- a/application/controllers/Kmlexport.php +++ b/application/controllers/Kmlexport.php @@ -13,9 +13,9 @@ class Kmlexport extends CI_Controller { $this->load->model('user_model'); $this->load->model('modes'); $this->load->model('logbook_model'); - $this->load->model('bands'); + $this->load->model('bands'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } $data['worked_bands'] = $this->bands->get_worked_bands(); // Used in the view for band select $data['modes'] = $this->modes->active(); // Used in the view for mode select @@ -29,6 +29,8 @@ class Kmlexport extends CI_Controller { } public function export() { + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } // Load Libraries $this->load->library('qra'); $this->load->helper('file'); diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index 9ad45f30..fcd10061 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -127,7 +127,6 @@ class Logbook extends CI_Controller { "callsign_us_county" => "", "qsl_manager" => "", "bearing" => "", - "latlng" => "", "workedBefore" => false, "lotw_member" => $lotw_member, "lotw_days" => $lotw_days, @@ -145,14 +144,14 @@ class Logbook extends CI_Controller { $measurement_base = $this->session->userdata('user_measurement_base'); } - $return['callsign_name'] = $this->nval($callbook['name'], $this->logbook_model->call_name($callsign)); - $return['callsign_qra'] = $this->nval($callbook['gridsquare'], $this->logbook_model->call_qra($callsign)); + $return['callsign_name'] = $this->nval($callbook['name'] ?? '', $this->logbook_model->call_name($callsign)); + $return['callsign_qra'] = $this->nval($callbook['gridsquare'] ?? '', $this->logbook_model->call_qra($callsign)); $return['callsign_distance'] = $this->distance($return['callsign_qra']); - $return['callsign_qth'] = $this->nval($callbook['city'], $this->logbook_model->call_qth($callsign)); - $return['callsign_iota'] = $this->nval($callbook['iota'], $this->logbook_model->call_iota($callsign)); - $return['qsl_manager'] = $this->nval($callbook['qslmgr'], $this->logbook_model->call_qslvia($callsign)); - $return['callsign_state'] = $this->nval($callbook['state'], $this->logbook_model->call_state($callsign)); - $return['callsign_us_county'] = $this->nval($callbook['us_county'], $this->logbook_model->call_us_county($callsign)); + $return['callsign_qth'] = $this->nval($callbook['city'] ?? '', $this->logbook_model->call_qth($callsign)); + $return['callsign_iota'] = $this->nval($callbook['iota'] ?? '', $this->logbook_model->call_iota($callsign)); + $return['qsl_manager'] = $this->nval($callbook['qslmgr'] ?? '', $this->logbook_model->call_qslvia($callsign)); + $return['callsign_state'] = $this->nval($callbook['state'] ?? '', $this->logbook_model->call_state($callsign)); + $return['callsign_us_county'] = $this->nval($callbook['us_county'] ?? '', $this->logbook_model->call_us_county($callsign)); $return['workedBefore'] = $this->worked_grid_before($return['callsign_qra'], $type, $band, $mode); if ($this->session->userdata('user_show_profile_image')) { diff --git a/application/controllers/Logbookadvanced.php b/application/controllers/Logbookadvanced.php index 8b7f0cf8..f25fe68f 100644 --- a/application/controllers/Logbookadvanced.php +++ b/application/controllers/Logbookadvanced.php @@ -115,6 +115,7 @@ class Logbookadvanced extends CI_Controller { 'sota' => xss_clean($this->input->post('sota')), 'pota' => xss_clean($this->input->post('pota')), 'wwff' => xss_clean($this->input->post('wwff')), + 'qslimages' => xss_clean($this->input->post('qslimages')), ); $qsos = []; @@ -140,7 +141,7 @@ class Logbookadvanced extends CI_Controller { $callbook = $this->logbook_model->loadCallBook($qso['COL_CALL'], $this->config->item('use_fullname')); - if ($callbook['callsign'] !== "") { + if ($callbook['callsign'] ?? "" !== "") { $this->logbookadvanced_model->updateQsoWithCallbookInfo($qsoID, $qso, $callbook); $qso['COL_NAME'] = trim($callbook['name']); if (isset($callbook['qslmgr'])) { @@ -225,4 +226,11 @@ class Logbookadvanced extends CI_Controller { public function startAtLabel() { $this->load->view('logbookadvanced/startatform'); } + + public function qslSlideshow() { + $cleanids = $this->security->xss_clean($this->input->post('ids')); + $this->load->model('logbookadvanced_model'); + $data['qslimages'] = $this->logbookadvanced_model->getQslsForQsoIds($cleanids); + $this->load->view('logbookadvanced/qslcarousel', $data); + } } 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/controllers/Uncfmd_Entity_Slots.php b/application/controllers/Uncfmd_Entity_Slots.php deleted file mode 100644 index e197f96a..00000000 --- a/application/controllers/Uncfmd_Entity_Slots.php +++ /dev/null @@ -1,114 +0,0 @@ -load->helper(array('form', 'url')); - - $this->load->model('user_model'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } - } - - public function index() - { - $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } - - $data['page_title'] = "Showing unconfirmed Entities with Slots"; - - $this->load->view('interface_assets/header', $data); - $this->load->view('uncfmd_entity_slots/index'); - $this->load->view('interface_assets/footer'); - - } - - public function exportadif() - { - // Set memory limit to unlimited to allow heavy usage - ini_set('memory_limit', '-1'); - - $this->load->model('adif_data'); - - $data['qsos'] = $this->adif_data->export_printrequested(); - - $this->load->view('adif/data/exportall', $data); - } - - public function exportcsv() - { - // Set memory limit to unlimited to allow heavy usage - ini_set('memory_limit', '-1'); - - $this->load->model('logbook_model'); - - $myData = $this->logbook_model->get_qsos_for_printing(); - - // file name - $filename = 'qsl_export.csv'; - header("Content-Description: File Transfer"); - header("Content-Disposition: attachment; filename=$filename"); - header("Content-Type: application/csv;charset=iso-8859-1"); - - // file creation - $file = fopen('php://output', 'w'); - - $header = array("STATION_CALLSIGN", - "COL_CALL", - "COL_QSL_VIA", - "COL_TIME_ON", - "COL_MODE", - "COL_FREQ", - "COL_BAND", - "COL_RST_SENT", - "COL_SAT_NAME", - "COL_SAT_MODE", - "COL_QSL_RCVD", - "COL_COMMENT", - "COL_ROUTING", - "ADIF", - "ENTITY"); - - fputcsv($file, $header); - - foreach ($myData->result() as $qso) { - fputcsv($file, - array($qso->STATION_CALLSIGN, - str_replace("0", "Ø", $qso->COL_CALL), - $qso->COL_QSL_VIA!=""?"Via ".str_replace("0", "Ø", $qso->COL_QSL_VIA):"", - $qso->COL_TIME_ON, - $qso->COL_MODE, - $qso->COL_FREQ, - $qso->COL_BAND, - $qso->COL_RST_SENT, - $qso->COL_SAT_NAME, - $qso->COL_SAT_MODE, - $qso->COL_QSL_RCVD =='Y'?'TNX QSL':'PSE QSL', - $qso->COL_COMMENT, - $qso->COL_ROUTING, - $qso->ADIF, - $qso->ENTITY)); - } - - fclose($file); - exit; - } - - function qsl_printed() { - $this->load->model('qslprint_model'); - $this->load->model('user_model'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } - - // Update Logbook to Mark Paper Card Received - - $this->qslprint_model->mark_qsos_printed(); - - $this->session->set_flashdata('notice', 'QSOs are marked as sent via buro'); - - redirect('logbook'); - } -} - -/* End of file Qslprint.php */ -/* Location: ./application/controllers/Qslprint.php */ \ No newline at end of file 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 @@ +
---|