diff --git a/application/config/migration.php b/application/config/migration.php index 769923a3..ba2ca6cf 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE; | */ -$config['migration_version'] = 143; +$config['migration_version'] = 144; /* |-------------------------------------------------------------------------- diff --git a/application/controllers/Activated_gridmap.php b/application/controllers/Activated_gridmap.php new file mode 100644 index 00000000..a91edd90 --- /dev/null +++ b/application/controllers/Activated_gridmap.php @@ -0,0 +1,191 @@ +load->model('bands'); + $this->load->model('activated_gridmap_model'); + $this->load->model('stations'); + + $data['homegrid'] = explode(',', $this->stations->find_gridsquare()); + + $data['modes'] = $this->activated_gridmap_model->get_worked_modes(); + $data['bands'] = $this->bands->get_worked_bands(); + $data['sats_available'] = $this->bands->get_worked_sats(); + + $data['user_gridmap_default_band'] = $this->session->userdata('user_gridmap_default_band'); + $data['user_gridmap_confirmation'] = $this->session->userdata('user_gridmap_confirmation'); + + $data['layer'] = $this->optionslib->get_option('option_map_tile_server'); + + $data['attribution'] = $this->optionslib->get_option('option_map_tile_server_copyright'); + + $data['gridsquares_gridsquares'] = lang('gridsquares_gridsquares'); + $data['gridsquares_gridsquares_confirmed'] = lang('gridsquares_gridsquares_confirmed'); + $data['gridsquares_gridsquares_not_confirmed'] = lang('gridsquares_gridsquares_not_confirmed'); + $data['gridsquares_gridsquares_total_activated'] = lang('gridsquares_gridsquares_total_activated'); + + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/leaflet/geocoding.js', + 'assets/js/leaflet/L.MaidenheadColouredGridMap.js', + 'assets/js/sections/gridmap.js?' + ]; + + $this->load->view('interface_assets/header', $data); + $this->load->view('activated_gridmap/index'); + $this->load->view('interface_assets/footer', $footerData); + } + + public function getGridsjs() { + $band = $this->security->xss_clean($this->input->post('band')); + $mode = $this->security->xss_clean($this->input->post('mode')); + $qsl = $this->security->xss_clean($this->input->post('qsl')); + $lotw = $this->security->xss_clean($this->input->post('lotw')); + $eqsl = $this->security->xss_clean($this->input->post('eqsl')); + $sat = $this->security->xss_clean($this->input->post('sat')); + $this->load->model('activated_gridmap_model'); + + $array_grid_2char = array(); + $array_grid_4char = array(); + $array_grid_6char = array(); + + $array_grid_2char_confirmed = array(); + $array_grid_4char_confirmed = array(); + $array_grid_6char_confirmed = array(); + + $grid_2char = ""; + $grid_4char = ""; + $grid_6char = ""; + + $grid_2char_confirmed = ""; + $grid_4char_confirmed = ""; + $grid_6char_confirmed = ""; + + $query = $this->activated_gridmap_model->get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $sat); + + if ($query && $query->num_rows() > 0) { + foreach ($query->result() as $row) { + $gridlist = explode(',', $row->GRID_SQUARES); + foreach ($gridlist as $grid) { + $grid_2char_confirmed = strtoupper(substr($grid,0,2)); + $grid_4char_confirmed = strtoupper(substr($grid,0,4)); + if ($this->config->item('map_6digit_grids')) { + $grid_6char_confirmed = strtoupper(substr($grid,0,6)); + } + + // Check if 2 Char is in array + if(!in_array($grid_2char_confirmed, $array_grid_2char_confirmed)){ + array_push($array_grid_2char_confirmed, $grid_2char_confirmed); + } + + if(!in_array($grid_4char_confirmed, $array_grid_4char_confirmed)){ + array_push($array_grid_4char_confirmed, $grid_4char_confirmed); + } + + if ($this->config->item('map_6digit_grids')) { + if(!in_array($grid_6char_confirmed, $array_grid_6char_confirmed)){ + array_push($array_grid_6char_confirmed, $grid_6char_confirmed); + } + } + } + } + } + + $query = $this->activated_gridmap_model->get_band($band, $mode, $qsl, $lotw, $eqsl, $sat); + + if ($query && $query->num_rows() > 0) { + foreach ($query->result() as $row) { + + $gridlist = explode(',', $row->GRID_SQUARES); + foreach ($gridlist as $grid) { + $grid_two = strtoupper(substr($grid,0,2)); + $grid_four = strtoupper(substr($grid,0,4)); + if ($this->config->item('map_6digit_grids')) { + $grid_six = strtoupper(substr($grid,0,6)); + } + + // Check if 2 Char is in array + if(!in_array($grid_two, $array_grid_2char)){ + array_push($array_grid_2char, $grid_two); + } + + if(!in_array($grid_four, $array_grid_4char)){ + array_push($array_grid_4char, $grid_four); + } + + if ($this->config->item('map_6digit_grids')) { + if(!in_array($grid_six, $array_grid_6char)){ + array_push($array_grid_6char, $grid_six); + } + } + } + } + } + $query_vucc = $this->activated_gridmap_model->get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $sat); + + if ($query_vucc && $query_vucc->num_rows() > 0) { + foreach ($query_vucc->result() as $row) { + + $grids = explode(",", $row->COL_VUCC_GRIDS); + + foreach($grids as $key) { + $grid_two = strtoupper(substr($key,0,2)); + $grid_four = strtoupper(substr($key,0,4)); + + // Check if 2 Char is in array + if(!in_array($grid_two, $array_grid_2char)){ + array_push($array_grid_2char, $grid_two); + } + + + if(!in_array($grid_four, $array_grid_4char)){ + array_push($array_grid_4char, $grid_four); + } + } + } + } + + // // Confirmed Squares + $query_vucc = $this->activated_gridmap_model->get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $sat); + + if ($query_vucc && $query_vucc->num_rows() > 0) { + foreach ($query_vucc->result() as $row) { + + $grids = explode(",", $row->COL_VUCC_GRIDS); + + foreach($grids as $key) { + $grid_2char_confirmed = strtoupper(substr($key,0,2)); + $grid_4char_confirmed = strtoupper(substr($key,0,4)); + + // Check if 2 Char is in array + if(!in_array($grid_2char_confirmed, $array_grid_2char_confirmed)){ + array_push($array_grid_2char_confirmed, $grid_2char_confirmed); + } + + + if(!in_array($grid_4char_confirmed, $array_grid_4char_confirmed)){ + array_push($array_grid_4char_confirmed, $grid_4char_confirmed); + } + } + } + } + + $data['grid_2char_confirmed'] = ($array_grid_2char_confirmed); + $data['grid_4char_confirmed'] = ($array_grid_4char_confirmed); + $data['grid_6char_confirmed'] = ($array_grid_6char_confirmed); + + $data['grid_2char'] = ($array_grid_2char); + $data['grid_4char'] = ($array_grid_4char); + $data['grid_6char'] = ($array_grid_6char); + + header('Content-Type: application/json'); + echo json_encode($data); + } +} diff --git a/application/controllers/Adif.php b/application/controllers/Adif.php index e464d9e7..5adbcbde 100644 --- a/application/controllers/Adif.php +++ b/application/controllers/Adif.php @@ -200,7 +200,7 @@ class adif extends CI_Controller { break; }; - $one_error = $this->logbook_model->import($record, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName')); + $one_error = $this->logbook_model->import($record, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName'), false, $this->input->post('skipStationCheck')); if ($one_error != '') { $custom_errors.=$one_error."
"; } diff --git a/application/controllers/Api.php b/application/controllers/Api.php index 1230ff20..b9ebe0e5 100644 --- a/application/controllers/Api.php +++ b/application/controllers/Api.php @@ -164,6 +164,9 @@ class API extends CI_Controller { $this->load->model('stations'); + $return_msg = array(); + $return_count = 0; + // Decode JSON and store $obj = json_decode(file_get_contents("php://input"), true); if ($obj === NULL) { @@ -213,12 +216,18 @@ class API extends CI_Controller { $this->api_model->update_last_used($obj['key']); - $this->logbook_model->import($record, $obj['station_profile_id'], NULL, NULL, NULL, NULL, NULL, NULL, false, false, true); + $msg = $this->logbook_model->import($record, $obj['station_profile_id'], NULL, NULL, NULL, NULL, NULL, NULL, false, false, true); + + if ( $msg == "" ) { + $return_count++; + } else { + $return_msg[] = $msg; + } } }; http_response_code(201); - echo json_encode(['status' => 'created', 'type' => $obj['type'], 'string' => $obj['string']]); + echo json_encode(['status' => 'created', 'type' => $obj['type'], 'string' => $obj['string'], 'imported_count' => $return_count, 'messages' => $return_msg ]); } diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index d11f7b86..663518e4 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -221,7 +221,8 @@ 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); + $searchmode = $this->input->post('searchmode') == null ? '' : $this->security->xss_clean($this->input->post('searchmode')); + $data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type, $qsl, $searchmode); // 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. // We replace the values to make it look a bit nicer diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php index f6a29e6b..d5d52e9c 100644 --- a/application/controllers/Eqsl.php +++ b/application/controllers/Eqsl.php @@ -69,6 +69,7 @@ class eqsl extends CI_Controller { redirect('eqsl/import'); } + $eqsl_force_from_date = (!$this->input->post('eqsl_force_from_date')=="")?$this->input->post('eqsl_force_from_date'):""; foreach ($eqsl_locations->result_array() as $eqsl_location) { $this->eqslimporter->from_callsign_and_QTH( $eqsl_location['station_callsign'], @@ -76,7 +77,7 @@ class eqsl extends CI_Controller { $config['upload_path'] ); - $eqsl_results[] = $this->eqslimporter->fetch($eqsl_password); + $eqsl_results[] = $this->eqslimporter->fetch($eqsl_password,$eqsl_force_from_date); } } elseif ($this->input->post('eqslimport') == 'upload') { $station_id4upload=$this->input->post('station_profile'); @@ -755,7 +756,7 @@ class eqsl extends CI_Controller { foreach($dir_array as $key=>$filename){ if($filename!=".." && $filename!="."){ if(is_dir($dir."/".$filename)){ - $new_foldersize = foldersize($dir."/".$filename); + $new_foldersize = $this->foldersize($dir."/".$filename); $count_size = $count_size+ $new_foldersize; }else if(is_file($dir."/".$filename)){ $count_size = $count_size + filesize($dir."/".$filename); diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index 801fafc0..5b0f42f0 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -103,6 +103,7 @@ class Logbook extends CI_Controller { // Convert - in Callsign to / Used for URL processing $callsign = str_replace("-","/",$callsign); + $callsign = str_replace("Ø","0",$callsign); // Check if callsign is an LoTW User // Check Database for all other data @@ -204,7 +205,7 @@ class Logbook extends CI_Controller { } if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'E') !== false) { if ($extrawhere!='') { - $extrawherei.=" OR"; + $extrawhere.=" OR"; } $extrawhere.=" COL_EQSL_QSL_RCVD='Y'"; } @@ -329,7 +330,7 @@ function worked_grid_before($gridsquare, $type, $band, $mode) } if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'E') !== false) { if ($extrawhere!='') { - $extrawherei.=" OR"; + $extrawhere.=" OR"; } $extrawhere.=" COL_EQSL_QSL_RCVD='Y'"; } @@ -411,7 +412,7 @@ function worked_grid_before($gridsquare, $type, $band, $mode) } if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'E') !== false) { if ($extrawhere!='') { - $extrawherei.=" OR"; + $extrawhere.=" OR"; } $extrawhere.=" COL_EQSL_QSL_RCVD='Y'"; } @@ -506,7 +507,7 @@ function worked_grid_before($gridsquare, $type, $band, $mode) } if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'E') !== false) { if ($extrawhere!='') { - $extrawherei.=" OR"; + $extrawhere.=" OR"; } $extrawhere.=" COL_EQSL_QSL_RCVD='Y'"; } diff --git a/application/controllers/Lookup.php b/application/controllers/Lookup.php index 5e74dfed..4b722892 100644 --- a/application/controllers/Lookup.php +++ b/application/controllers/Lookup.php @@ -69,7 +69,7 @@ class Lookup extends CI_Controller { { if (in_array($row->COL_CALL, $arCalls) == false) { - $arCalls[] = $row->COL_CALL; + $arCalls[] = str_replace('0', 'Ø', $row->COL_CALL); } } @@ -83,7 +83,7 @@ class Lookup extends CI_Controller { foreach ($result as &$value) { if (in_array($value, $arCalls) == false) { - $arCalls[] = $value; + $arCalls[] = str_replace('0', 'Ø', $value); } } } @@ -97,7 +97,7 @@ class Lookup extends CI_Controller { foreach ($result as &$value) { if (in_array($value, $arCalls) == false) { - $arCalls[] = $value; + $arCalls[] = str_replace('0', 'Ø', $value); } } } diff --git a/application/controllers/Options.php b/application/controllers/Options.php index 6ab72ab9..f22eee3e 100644 --- a/application/controllers/Options.php +++ b/application/controllers/Options.php @@ -111,7 +111,7 @@ class Options extends CI_Controller { $dashboard_map_update_status = $this->optionslib->update('dashboard_map', $this->input->post('dashboardMap'), 'yes'); // If dashboard map update is complete set a flashsession with a success note - if($ldashboard_map_update_status == TRUE) { + if($dashboard_map_update_status == TRUE) { $this->session->set_flashdata('success', $this->lang->line('options_dashboard_map_changed_to').$this->input->post('dashboardMap')); } diff --git a/application/controllers/Sattimers.php b/application/controllers/Sattimers.php new file mode 100644 index 00000000..a89a5148 --- /dev/null +++ b/application/controllers/Sattimers.php @@ -0,0 +1,26 @@ +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() { + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/sattimers.js?' + ]; + $url = 'https://www.df2et.de/tevel/api.php'; + $json = file_get_contents($url); + $data['activations'] = json_decode($json, true)['data']; + + $data['page_title'] = "Satellite Timers"; + $this->load->view('interface_assets/header', $data); + $this->load->view('/sattimers/index', $data); + $this->load->view('interface_assets/footer', $footerData); + } +} diff --git a/application/controllers/Search.php b/application/controllers/Search.php index f503d059..5e9bd6a3 100644 --- a/application/controllers/Search.php +++ b/application/controllers/Search.php @@ -306,12 +306,15 @@ class Search extends CI_Controller { function fetchQueryResult($json, $returnquery) { $search_items = json_decode($json, true); + $this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.name as station_country'); + $this->db->group_start(); $this->buildWhere($search_items); $this->db->group_end(); $this->db->order_by('COL_TIME_ON', 'DESC'); $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); + $this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left'); $this->db->where('station_profile.user_id', $this->session->userdata('user_id')); if ($returnquery) { diff --git a/application/language/english/admin_lang.php b/application/language/english/admin_lang.php index 5b3568c8..1bc61a14 100644 --- a/application/language/english/admin_lang.php +++ b/application/language/english/admin_lang.php @@ -16,3 +16,5 @@ $lang['admin_options'] = 'Options'; $lang['admin_create_user'] = 'Create user'; $lang['admin_delete'] = 'Delete'; $lang['admin_edit'] = 'Edit'; +$lang['admin_user_accounts'] = 'User Accounts'; + diff --git a/application/language/english/gridsquares_lang.php b/application/language/english/gridsquares_lang.php index ac6c15c3..6832be44 100644 --- a/application/language/english/gridsquares_lang.php +++ b/application/language/english/gridsquares_lang.php @@ -23,4 +23,5 @@ $lang['gridsquares_button_plot'] = 'Plot'; $lang['gridsquares_gridsquares'] = 'Gridsquares'; $lang['gridsquares_gridsquares_confirmed'] = 'Gridsquares confirmed'; $lang['gridsquares_gridsquares_not_confirmed'] = 'Gridsquares not confirmed'; -$lang['gridsquares_gridsquares_total_worked'] = 'Total gridsquares worked'; \ No newline at end of file +$lang['gridsquares_gridsquares_total_worked'] = 'Total gridsquares worked'; +$lang['gridsquares_gridsquares_total_activated'] = 'Total gridsquares activated'; diff --git a/application/language/french/account_lang.php b/application/language/french/account_lang.php index aa0d7298..597bd011 100644 --- a/application/language/french/account_lang.php +++ b/application/language/french/account_lang.php @@ -8,3 +8,84 @@ $lang['account_colonne2_text'] = 'Choisir colonne 2'; $lang['account_colonne3_text'] = 'Choisir colonne 3'; $lang['account_colonne4_text'] = 'Choisir colonne 4'; $lang['account_colonne5_text'] = 'Choisir colonne 5 (uniquement pour logbook)'; + +$lang['account_create_user_account'] = 'Creer un compte'; +$lang['account_edit_account'] = 'Editer un compte'; + +$lang['account_account_information'] = 'Informations du compte'; +$lang['account_username'] = 'Utilisateur'; +$lang['account_email_address'] = 'Email'; +$lang['account_password'] = 'Mot de passe'; + +$lang['account_roles'] = 'Rôles'; +$lang['account_user_role'] = 'Rôle de l\'utilisateur'; + +$lang['account_theme'] = 'Thème'; +$lang['account_stylesheet'] = 'Nom du thème'; + +$lang['account_personal_information'] = 'Informations personnelles'; +$lang['account_first_name'] = 'Nom'; +$lang['account_last_name'] = 'Prénom'; +$lang['account_callsign'] = 'Indicatif'; +$lang['account_gridsquare'] = 'Locator'; + +$lang['account_cloudlog_preferences'] = 'Préférences Cloudlog'; +$lang['account_timezone'] = 'Timezone'; +$lang['account_date_format'] = 'Format de la date'; +$lang['account_measurement_preferences'] = 'Unité de mesure'; +$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = '(Sélectionnez le format de date à afficher)'; +$lang['account_choose_which_unit_distances_will_be_shown_in'] = '(Choisiez l\'unité de mesure à afficher)'; + +$lang['account_main_menu'] = 'Menu principal'; +$lang['account_show_notes_in_the_main_menu'] = 'Voir les notes dans le main principal.'; + +$lang['account_gridsquare_and_location_autocomplete'] = 'Renseignement automatique du lieu et du Locator'; +$lang['account_location_auto_lookup'] = 'Recherche automatique de lieu.'; +$lang['account_if_set_gridsquare_is_fetched_based_on_location_name'] = '(Si activé, le Locator est récupéré en fonction du nom du lieu.)'; +$lang['account_sota_auto_lookup_gridsquare_and_name_for_summit'] = 'SOTA : Renseigner automatiquement le Locator et le nom du sommet.'; +$lang['account_wwff_auto_lookup_gridsquare_and_name_for_reference'] = 'WWFF : Renseigner automatiquement le Locator et le nom de la référence.'; +$lang['account_pota_auto_lookup_gridsquare_and_name_for_park'] = 'POTA : Renseigner automatiquement le Locateur et le nom du parc.'; +$lang['account_if_set_name_and_gridsquare_is_fetched_from_the_api_and_filled_in_location_and_locator'] = '(Si activé, le nom et le Locator seront récupérés depuis l\'API et renseignés.)'; + +$lang['account_previous_qsl_type'] = 'Type de QSL pour le statut'; +$lang['account_select_the_type_of_qsl_to_show_in_the_previous_qsos_section'] = 'Selectionner le type de QSL à afficher (statut) dans la session précédents QSOs.'; + +$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'] = 'Affiche l\'image de profil du contact (depuis qrz.com/hamqth.com) dans la session QSO.'; +$lang['account_please_set_your_qrzcom_hamqthcom_credentials_in_the_general_config_file'] = 'Indiquer les éléments d\'authentification pour qrz.com/hamqth.com credentials dans le fichier de configuration (config.php).'; + +$lang['account_amsat_status_upload'] = 'Envoi du statut AMSAT'; +$lang['account_upload_status_of_sat_qsos_to'] = 'Envoi des statuts des QSOs Satellites sur'; + +$lang['account_logbook_of_the_world'] = 'Logbook of the World'; +$lang['account_logbook_of_the_world_lotw_username'] = 'Utilisateur'; +$lang['account_logbook_of_the_world_lotw_password'] = 'Mot de passe'; +$lang['account_leave_blank_to_keep_existing_password'] = '(Laisser vide pour conserver le mot de passe existant)'; + +$lang['account_clublog'] = 'Club Log'; +$lang['account_clublog_email_callsign'] = 'Email/Callsign'; +$lang['account_clublog_password'] = 'Mot de passe'; +$lang['account_the_email_or_callsign_you_use_to_login_to_club_log'] = '(Renseigner l\'email ou l\'indicatif pour se connecter à Club Log)'; + +$lang['account_eqsl'] = 'eQSL'; +$lang['account_eqslcc_username'] = 'Utilisateur'; +$lang['account_eqslcc_password'] = 'Mot de passe'; + +$lang['account_save_account_changes'] = 'Sauvegarder les changements'; +$lang['account_create_account'] = 'Creation du compte'; + +$lang['account_delete_user_account'] = 'Supprimer l\'utilisateur'; +$lang['account_are_you_sure_you_want_to_delete_the_user_account'] = 'Etes-vous certain de supprimer le compte de l\'utilisateur ?'; +$lang['account_yes_delete_this_user'] = 'Oui, supprimer l\'utilisateur'; +$lang['account_no_do_not_delete_this_user'] = 'Non, ne pas supprimer l\'utilisateur'; + +$lang['account_forgot_password'] = 'Mot de passe oublié ?'; +$lang['account_you_can_reset_your_password_here'] = 'Vous pouvez réinitialiser votre mot de passe ici.'; +$lang['account_reset_password'] = 'Mot de passe réinitialisé'; +$lang['account_the_email_field_is_required'] = 'Le champs Email est obligatoire'; +$lang['account_confirm_password'] = 'Mot de passe confirmé'; + +$lang['account_forgot_your_password'] = 'Mot de passe oublié ?'; + +$lang['account_login_to_cloudlog'] = 'Connexion à Cloudlog'; +$lang['account_login'] = 'Login'; diff --git a/application/language/french/admin_lang.php b/application/language/french/admin_lang.php new file mode 100644 index 00000000..d1a632fa --- /dev/null +++ b/application/language/french/admin_lang.php @@ -0,0 +1,18 @@ +callsign)) { return $this->result('Missing username and/or password'); } @@ -63,8 +63,8 @@ class EqslImporter $q = $query->row(); $eqsl_url = $q->eqsl_download_url; - // Query the logbook to determine when the last eQSL confirmation was - $eqsl_last_qsl_date = $this->CI->eqslmethods_model->eqsl_last_qsl_rcvd_date($this->callsign, $this->qth_nickname); + // Query the logbook to determine when the last eQSL confirmation was / Or use date input from form // + $eqsl_last_qsl_date = (strtotime($eqsl_force_from_date)!==false)?date("Ymd",strtotime($eqsl_force_from_date)):$this->CI->eqslmethods_model->eqsl_last_qsl_rcvd_date($this->callsign, $this->qth_nickname); // Build parameters for eQSL inbox file $eqsl_params = http_build_query(array( diff --git a/application/migrations/144_tag_2_4_10.php b/application/migrations/144_tag_2_4_10.php new file mode 100644 index 00000000..413bfd9c --- /dev/null +++ b/application/migrations/144_tag_2_4_10.php @@ -0,0 +1,24 @@ +db->where('option_name', 'version'); + $this->db->update('options', array('option_value' => '2.4.10')); + } + + public function down() + { + $this->db->where('option_name', 'version'); + $this->db->update('options', array('option_value' => '2.4.9')); + } +} \ No newline at end of file diff --git a/application/models/Activated_gridmap_model.php b/application/models/Activated_gridmap_model.php new file mode 100644 index 00000000..e2af78d3 --- /dev/null +++ b/application/models/Activated_gridmap_model.php @@ -0,0 +1,226 @@ +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; + } + + $location_list = "'".implode("','",$logbooks_locations_array)."'"; + + $sql = 'SELECT DISTINCT station_gridsquare AS GRID_SQUARES, COL_BAND FROM ' + . 'station_profile JOIN '.$this->config->item('table_name').' on '.$this->config->item('table_name').'.station_id = station_profile.station_id ' + . 'WHERE station_profile.station_gridsquare != "" '; + + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + if ($sat != 'All') { + $sql .= " and col_sat_name ='" . $sat . "'"; + } + } + else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } + + $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl); + + return $this->db->query($sql); + } + + function get_band($band, $mode, $qsl, $lotw, $eqsl, $sat) { + $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; + } + + $location_list = "'".implode("','",$logbooks_locations_array)."'"; + + $sql = 'SELECT DISTINCT station_gridsquare AS GRID_SQUARES, COL_BAND FROM ' + . 'station_profile JOIN '.$this->config->item('table_name').' on '.$this->config->item('table_name').'.station_id = station_profile.station_id ' + . 'WHERE station_profile.station_gridsquare != "" '; + + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + if ($sat != 'All') { + $sql .= " and col_sat_name ='" . $sat . "'"; + } + } + else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } + + return $this->db->query($sql); + } + + function get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $sat) { + $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; + } + + $location_list = "'".implode("','",$logbooks_locations_array)."'"; + + $sql = 'SELECT distinct COL_VUCC_GRIDS, COL_BAND FROM ' + .$this->config->item('table_name') + .' WHERE station_id in (' + .$location_list.') AND COL_VUCC_GRIDS != ""'; + + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + if ($sat != 'All') { + $sql .= " and col_sat_name ='" . $sat . "'"; + } + } + else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } + + return null; + return $this->db->query($sql); + } + + function get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $sat) { + $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; + } + + $location_list = "'".implode("','",$logbooks_locations_array)."'"; + + $sql = 'SELECT distinct COL_VUCC_GRIDS, COL_BAND FROM ' + .$this->config->item('table_name') + .' WHERE station_id in (' + .$location_list.') AND COL_VUCC_GRIDS != ""'; + + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + if ($sat != 'All') { + $sql .= " and col_sat_name ='" . $sat . "'"; + } + } + else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } + + $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl); + + return null; + return $this->db->query($sql); + } + + // Adds confirmation to query + function addQslToQuery($qsl, $lotw, $eqsl) { + $sql = ''; + if ($lotw == "true" && $qsl == "false" && $eqsl == "false") { + $sql .= " and col_lotw_qsl_sent = 'Y'"; + } + + if ($qsl == "true" && $lotw == "false" && $eqsl == "false") { + $sql .= " and col_qsl_true = 'Y'"; + } + + if ($eqsl == "true" && $lotw == "false" && $qsl == "false") { + $sql .= " and col_eqsl_qsl_sent = 'Y'"; + } + + if ($lotw == "true" && $qsl == "true" && $eqsl == "false") { + $sql .= " and (col_lotw_qsl_sent = 'Y' or col_qsl_sent = 'Y')"; + } + + if ($qsl == "true" && $lotw == "false" && $eqsl == "true") { + $sql .= " and (col_qsl_sent = 'Y' or col_eqsl_qsl_sent = 'Y')"; + } + + if ($eqsl == "true" && $lotw == "true" && $qsl == "false") { + $sql .= " and (col_eqsl_qsl_sent = 'Y' or col_lotw_qsl_sent = 'Y')"; + } + + if ($qsl == "true" && $lotw == "true" && $eqsl == "true") { + $sql .= " and (col_qsl_sent = 'Y' or col_lotw_qsl_sent = 'Y' or col_eqsl_qsl_sent = 'Y')"; + } + + if ($qsl == "false" && $lotw == "false" && $eqsl == "false") { + $sql .= " and (col_qsl_sent != 'Y' and col_lotw_qsl_sent != 'Y' and col_eqsl_qsl_sent != 'Y')"; + } + return $sql; + } + + /* + * Get's the worked modes from the log + */ + function get_worked_modes() { + $CI =& get_instance(); + $CI->load->model('logbooks_model'); + $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + if (!$logbooks_locations_array) { + return null; + } + + $location_list = "'".implode("','",$logbooks_locations_array)."'"; + + // get all worked modes from database + $data = $this->db->query( + "SELECT distinct LOWER(`COL_MODE`) as `COL_MODE` FROM `" . $this->config->item('table_name') . "` WHERE station_id in (" . $location_list . ") order by COL_MODE ASC" + ); + $results = array(); + foreach ($data->result() as $row) { + array_push($results, $row->COL_MODE); + } + + $data = $this->db->query( + "SELECT distinct LOWER(`COL_SUBMODE`) as `COL_SUBMODE` FROM `" . $this->config->item('table_name') . "` WHERE station_id in (" . $location_list . ") and coalesce(COL_SUBMODE, '') <> '' order by COL_SUBMODE ASC" + ); + foreach ($data->result() as $row) { + if (!in_array($row, $results)) { + array_push($results, $row->COL_SUBMODE); + } + } + + asort($results); + + return $results; + } +} diff --git a/application/models/Activated_grids_model.php b/application/models/Activated_grids_model.php index 9cabf1da..72d89ce5 100644 --- a/application/models/Activated_grids_model.php +++ b/application/models/Activated_grids_model.php @@ -10,10 +10,11 @@ class Activated_grids_model extends CI_Model { if (!$logbooks_locations_array) { return null; } - + $location_list = "'".implode("','",$logbooks_locations_array)."'"; $sql = 'SELECT DISTINCT station_gridsquare AS SAT_SQUARE FROM ' . 'station_profile JOIN '.$this->config->item('table_name').' on '.$this->config->item('table_name').'.station_id = station_profile.station_id ' - . 'WHERE station_profile.station_gridsquare != "" AND '.$this->config->item('table_name').'.COL_SAT_NAME != ""'; + . 'WHERE station_profile.station_gridsquare != "" AND '.$this->config->item('table_name').'.COL_SAT_NAME != ""' + . ' AND station_profile.station_id in ('.$location_list.')'; return $this->db->query($sql); } @@ -32,7 +33,8 @@ class Activated_grids_model extends CI_Model { $sql = 'SELECT DISTINCT station_gridsquare AS SAT_SQUARE FROM ' . 'station_profile JOIN '.$this->config->item('table_name').' on '.$this->config->item('table_name').'.station_id = station_profile.station_id ' . 'WHERE station_profile.station_gridsquare != "" AND '.$this->config->item('table_name').'.COL_SAT_NAME != "" ' - . 'AND (COL_LOTW_QSL_SENT = "Y" OR COL_QSL_SENT = "Y");'; + . 'AND (COL_LOTW_QSL_SENT = "Y" OR COL_QSL_SENT = "Y")' + . ' AND station_profile.station_id in ('.$location_list.')'; return $this->db->query($sql); } @@ -50,7 +52,8 @@ class Activated_grids_model extends CI_Model { $sql = 'SELECT DISTINCT station_gridsquare AS GRID_SQUARES, COL_BAND FROM ' . 'station_profile JOIN '.$this->config->item('table_name').' on '.$this->config->item('table_name').'.station_id = station_profile.station_id ' - . 'WHERE station_profile.station_gridsquare != "" '; + . 'WHERE station_profile.station_gridsquare != "" ' + . ' AND station_profile.station_id in ('.$location_list.')'; if ($band != 'All') { $sql .= 'AND COL_BAND = "'.$band.'" ' @@ -77,7 +80,8 @@ class Activated_grids_model extends CI_Model { $sql = 'SELECT DISTINCT station_gridsquare AS GRID_SQUARES, COL_BAND FROM ' . 'station_profile JOIN '.$this->config->item('table_name').' on '.$this->config->item('table_name').'.station_id = station_profile.station_id ' - . 'WHERE station_profile.station_gridsquare != "" '; + . 'WHERE station_profile.station_gridsquare != "" ' + . ' AND station_profile.station_id in ('.$location_list.')'; if ($band != 'All') { $sql .= 'AND COL_BAND = "'.$band.'" ' diff --git a/application/models/Eqslmethods_model.php b/application/models/Eqslmethods_model.php index 5972bd5d..da183d0c 100644 --- a/application/models/Eqslmethods_model.php +++ b/application/models/Eqslmethods_model.php @@ -149,7 +149,7 @@ class Eqslmethods_model extends CI_Model { } else { // No previous date (first time import has run?), so choose UNIX EPOCH! // Note: date is yyyy/mm/dd format - return '1970/01/01'; + return '19700101'; } } diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 3c6bb0bc..bc9d68d9 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -4,6 +4,8 @@ class Logbook_model extends CI_Model { /* Add QSO to Logbook */ function create_qso() { + + $callsign = str_replace('Ø', '0', $this->input->post('callsign')); // Join date+time $datetime = date("Y-m-d",strtotime($this->input->post('start_date')))." ". $this->input->post('start_time'); if ($this->input->post('prop_mode') != null) { @@ -82,14 +84,14 @@ class Logbook_model extends CI_Model { } if($this->input->post('country') == "") { - $dxcc = $this->check_dxcc_table(strtoupper(trim($this->input->post('callsign'))), $datetime); + $dxcc = $this->check_dxcc_table(strtoupper(trim($callsign)), $datetime); $country = ucwords(strtolower($dxcc[1]), "- (/"); } else { $country = $this->input->post('country'); } if($this->input->post('cqz') == "") { - $dxcc = $this->check_dxcc_table(strtoupper(trim($this->input->post('callsign'))), $datetime); + $dxcc = $this->check_dxcc_table(strtoupper(trim($callsign)), $datetime); if (empty($dxcc[2])) { $cqz = null; } else { @@ -101,7 +103,7 @@ class Logbook_model extends CI_Model { if($this->input->post('dxcc_id') == "") { - $dxcc = $this->check_dxcc_table(strtoupper(trim($this->input->post('callsign'))), $datetime); + $dxcc = $this->check_dxcc_table(strtoupper(trim($callsign)), $datetime); if (empty($dxcc[0])) { $dxcc_id = null; } else { @@ -114,7 +116,7 @@ class Logbook_model extends CI_Model { if($this->input->post('continent') == "") { - $dxcc = $this->check_dxcc_table(strtoupper(trim($this->input->post('callsign'))), $datetime); + $dxcc = $this->check_dxcc_table(strtoupper(trim($callsign)), $datetime); if (empty($dxcc[3])) { $continent = null; } else { @@ -173,7 +175,7 @@ class Logbook_model extends CI_Model { $data = array( 'COL_TIME_ON' => $datetime, 'COL_TIME_OFF' => $datetime, - 'COL_CALL' => strtoupper(trim($this->input->post('callsign'))), + 'COL_CALL' => strtoupper(trim($callsign)), 'COL_BAND' => $this->input->post('band'), 'COL_BAND_RX' => $this->input->post('band_rx'), 'COL_FREQ' => $this->parse_frequency($this->input->post('freq_display')), @@ -328,7 +330,7 @@ class Logbook_model extends CI_Model { /* * Used to fetch QSOs from the logbook in the awards */ - public function qso_details($searchphrase, $band, $mode, $type, $qsl){ + public function qso_details($searchphrase, $band, $mode, $type, $qsl, $searchmode = null){ $CI =& get_instance(); $CI->load->model('logbooks_model'); $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); @@ -347,7 +349,11 @@ class Logbook_model extends CI_Model { $this->db->where('COL_IOTA', $searchphrase); break; case 'VUCC': - $this->db->where("(COL_GRIDSQUARE like '%" . $searchphrase . "%' OR COL_VUCC_GRIDS like'%" . $searchphrase ."%')"); + if ($searchmode == 'activated') { + $this->db->where("station_gridsquare like '%" . $searchphrase . "%'"); + } else { + $this->db->where("(COL_GRIDSQUARE like '" . $searchphrase . "%' OR COL_VUCC_GRIDS like '%" . $searchphrase ."%')"); + } break; case 'CQZone': $this->db->where('COL_CQZ', $searchphrase); @@ -419,6 +425,8 @@ class Logbook_model extends CI_Model { } $this->db->order_by("COL_TIME_ON", "desc"); + $this->db->limit(500); + return $this->db->get($this->config->item('table_name')); } @@ -878,6 +886,8 @@ class Logbook_model extends CI_Model { } else if ($data['COL_MODE'] == 'PKT') { $sat_name = 'ISS-DATA'; } + } else if ($data['COL_SAT_NAME'] == 'CAS-3H') { + $sat_name = 'LilacSat-2'; } else { $sat_name = $data['COL_SAT_NAME']; } @@ -933,11 +943,11 @@ class Logbook_model extends CI_Model { $srx_string = null; } - 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'); - } + if ($this->input->post('usa_county') && $this->input->post('usa_state')) { + $uscounty = trim($this->input->post('usa_state') . "," . $this->input->post('usa_county')); + } else { + $uscounty = null; + } if ($this->input->post('qsl_sent')) { $qsl_sent = $this->input->post('qsl_sent'); @@ -1132,7 +1142,8 @@ class Logbook_model extends CI_Model { $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); if(!empty($logbooks_locations_array)) { - $this->db->select('COL_CALL, COL_BAND, COL_FREQ, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_SRX, COL_SRX_STRING, COL_STX, COL_STX_STRING, COL_VUCC_GRIDS, COL_GRIDSQUARE, COL_MY_GRIDSQUARE, COL_OPERATOR, COL_IOTA, COL_WWFF_REF, COL_POTA_REF, COL_STATE, COL_CNTY, COL_DISTANCE, COL_SOTA_REF, COL_CONTEST_ID'); + $this->db->select('COL_CALL, COL_BAND, COL_FREQ, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_NAME, COL_COUNTRY, COL_DXCC, COL_PRIMARY_KEY, COL_SAT_NAME, COL_SRX, COL_SRX_STRING, COL_STX, COL_STX_STRING, COL_VUCC_GRIDS, COL_GRIDSQUARE, COL_MY_GRIDSQUARE, COL_OPERATOR, COL_IOTA, COL_WWFF_REF, COL_POTA_REF, COL_STATE, COL_CNTY, COL_DISTANCE, COL_SOTA_REF, COL_CONTEST_ID, dxcc_entities.end AS end'); + $this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left outer'); $this->db->where_in('station_id', $logbooks_locations_array); $this->db->order_by("COL_TIME_ON", "desc"); $this->db->limit($num); @@ -1699,7 +1710,7 @@ class Logbook_model extends CI_Model { } if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'E') !== false) { if ($extrawhere!='') { - $extrawherei.=" OR"; + $extrawhere.=" OR"; } $extrawhere.=" COL_EQSL_QSL_RCVD='Y'"; } @@ -2864,7 +2875,7 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray = * $markHrd - used in ADIF import to mark QSOs as exported to HRDLog.net Logbook when importing QSOs * $skipexport - used in ADIF import to skip the realtime upload to QRZ Logbook when importing QSOs from ADIF */ - function import($record, $station_id = "0", $skipDuplicate = false, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false) { + function import($record, $station_id = "0", $skipDuplicate = false, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false) { // be sure that station belongs to user $CI =& get_instance(); $CI->load->model('stations'); @@ -2879,6 +2890,11 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray = $record['station_callsign']=$station_profile_call; } + if ((!$skipStationCheck) && ($station_id != 0) && (strtoupper($record['station_callsign']) != strtoupper($station_profile_call))) { // Check if station_call from import matches profile ONLY when submitting via GUI. + return "Wrong station callsign \"".htmlentities($record['station_callsign'])."\" while importing QSO with ".$record['call']." for ".$station_profile_call." : SKIPPED" . + "
See the Cloudlog Wiki for hints about errors in ADIF files."; + } + $CI =& get_instance(); $CI->load->library('frequency'); $my_error = ""; @@ -3939,7 +3955,7 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray = public function update_distances(){ $this->db->select("COL_PRIMARY_KEY, COL_GRIDSQUARE, station_gridsquare"); $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); - $this->db->where("COL_DISTANCE is NULL"); + $this->db->where("((COL_DISTANCE is NULL) or (COL_DISTANCE = 0))"); $this->db->where("COL_GRIDSQUARE is NOT NULL"); $this->db->where("COL_GRIDSQUARE != ''"); $this->db->trans_start(); diff --git a/application/views/activated_gridmap/index.php b/application/views/activated_gridmap/index.php new file mode 100644 index 00000000..8a21a551 --- /dev/null +++ b/application/views/activated_gridmap/index.php @@ -0,0 +1,150 @@ + + + +
+ +
+ +

+ +
+ + + + + + + + + + + +
+
+ '; ?> + +
+
+ '; ?> + +
+
+ '; ?> + +
+
+ + + +
+ + session->flashdata('message')) { ?> + +
+

session->flashdata('message'); ?>

+
+ +
+ +
+
+
+
+
Latitude:
+
+
Longitude:
+
+
Gridsquare:
+
+
Distance:
+
+
Bearing:
+
+
+ diff --git a/application/views/adif/import.php b/application/views/adif/import.php index 90b45ed4..05385346 100644 --- a/application/views/adif/import.php +++ b/application/views/adif/import.php @@ -108,6 +108,16 @@ +
+
+
+ + +
+
If selected, Cloudlog will try to import all QSOs of the ADIF, regardless if they match to the chosen station-location.
+
+
+ diff --git a/application/views/components/hamsat/table.php b/application/views/components/hamsat/table.php index 8753058d..ebda28b7 100644 --- a/application/views/components/hamsat/table.php +++ b/application/views/components/hamsat/table.php @@ -5,10 +5,11 @@ - + + - + @@ -30,11 +31,12 @@ ?> - - - - + echo date($custom_date_format, $timestamp); ?> + - + - + diff --git a/application/views/eqsl/import.php b/application/views/eqsl/import.php index f0167906..764f0d0e 100644 --- a/application/views/eqsl/import.php +++ b/application/views/eqsl/import.php @@ -29,7 +29,7 @@ -

+

Upload the Exported ADIF file from eQSL from the Download Inbox page, to mark QSOs as confirmed on eQSL.

Important Log files must have the file type .adi

@@ -47,14 +47,21 @@
- +

Cloudlog will use the eQSL credentials from your Cloudlog user profile to connect to eQSL and download confirmations.

+
+
+
+ +
+
+
+
+
- - +
+
diff --git a/application/views/gridmap/index.php b/application/views/gridmap/index.php index cd6f79fe..baa60b77 100644 --- a/application/views/gridmap/index.php +++ b/application/views/gridmap/index.php @@ -136,6 +136,7 @@
diff --git a/application/views/interface_assets/header.php b/application/views/interface_assets/header.php index f4c3e046..9099c71a 100644 --- a/application/views/interface_assets/header.php +++ b/application/views/interface_assets/header.php @@ -42,6 +42,10 @@ + uri->segment(1) == "sattimers") { ?> + + + '; } ?> @@ -101,6 +105,8 @@ + + SAT Timers @@ -117,7 +123,7 @@ - + @@ -348,4 +354,4 @@ - \ No newline at end of file + diff --git a/application/views/sattimers/index.php b/application/views/sattimers/index.php new file mode 100644 index 00000000..633e843b --- /dev/null +++ b/application/views/sattimers/index.php @@ -0,0 +1,57 @@ +
+
+ +

Satellite Timers

+

This data is from https://www.df2et.de/tevel/

+ +
Date / TimeDateTime Callsign SatelliteGridsquareGridsquare(s)
+ + logbook_model->check_if_grid_worked_in_logbook($rove['gridsquare'], null, "SAT"); - if ($worked != 0) { - echo " " . $rove['gridsquare'] . ""; + if (strpos($rove['gridsquare'], '/') !== false) { + $grids = explode('/', $rove['gridsquare']); + foreach ($grids as $grid) { + $worked = $CI->logbook_model->check_if_grid_worked_in_logbook($grid, null, "SAT"); + if ($worked != 0) { + echo " " . $grid . ""; + } else { + echo " " . $grid . ""; + } + } } else { - echo " " . $rove['gridsquare'] . ""; + $worked = $CI->logbook_model->check_if_grid_worked_in_logbook($rove['gridsquare'], null, "SAT"); + if ($worked != 0) { + echo " " . $rove['gridsquare'] . ""; + } else { + echo " " . $rove['gridsquare'] . ""; + } } ?> diff --git a/application/views/csv/data/export.php b/application/views/csv/data/export.php index f068d16b..d6b1df2f 100644 --- a/application/views/csv/data/export.php +++ b/application/views/csv/data/export.php @@ -35,6 +35,16 @@ $bands = array( ); foreach ($qsos as $qso) { $timestamp = strtotime($qso['COL_TIME_ON']); - print "V2,".$qso['station_callsign'].",".$qso['COL_MY_SOTA_REF'].",".date('d/m/y', $timestamp).",".date('Hi', $timestamp).",".$bands[$qso['COL_BAND']].",".$qso['COL_MODE'].",".$qso['COL_CALL'].",".$qso['COL_SOTA_REF'].",".$qso['COL_COMMENT']."\n"; + printf("V2,%s,%s,%s,%s,%s,%s,%s,%s,\"%s\"\n", + $qso['station_callsign'], + $qso['COL_MY_SOTA_REF'], + date('d/m/y', $timestamp), + date('Hi', $timestamp), + $bands[$qso['COL_BAND']], + $qso['COL_MODE'], + $qso['COL_CALL'], + $qso['COL_SOTA_REF'], + $qso['COL_COMMENT'] + ); } ?> diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php index 16243236..38ad16c9 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -288,12 +288,12 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
Worked
Confirmed
+ + + + + + + + + + + + + + + + + + + + +
SatelliteStatusTime-Out +
n/a... + Info"; + } else if (strpos($activation['sat'], 'UVSQ') !== false) { + echo "Info"; + } else if (strpos($activation['sat'], 'PO-101') !== false) { + echo "Info"; + } else if (strpos($activation['sat'], 'CAS-3H') !== false) { + echo "Info"; + } + ?> +
+ + diff --git a/application/views/user/edit.php b/application/views/user/edit.php index 179288b5..f6bde2da 100644 --- a/application/views/user/edit.php +++ b/application/views/user/edit.php @@ -473,7 +473,7 @@
- +