diff --git a/README.md b/README.md index 5d59c16e..76ae3117 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,6 @@ Thanks to Andy (VE7CXZ), Gavin (M1BXF), Graham (W5ISP), Robert (M0VFC), Corby (K Cloudlog is supported by Patreon and donations via PayPal, thanks to the following people: -Paul (M0TZO), Tim (G4VXE), Paul (N8HM), Michelle (W5NYV), Mitchell (AD0HJ), Dan (M0TCB), Martin (DK3ML), Juan Carlos (EA5WA), Iain (M0PCB), Charlie (GM1TGY), Ondrej (OK1CDJ), Trystan (G0KAY), Oliver (DL6KBG), Volkmar Schirmer, Jordan (M0PIR), Thomas Ziegler, Mathis (DB9MAT), Ken (VE3HLS), Tyler (WL7T), Jeremy Taylor, Ben Kuhn, Eric Thresher, Michael Cullen, Juuso (OH1JW), Anthony Castiglia, Fernando Ramirez-Ferrer, Robert Dixon, Mark Percival, Julia (KV1V), Timo Tomasini, Ant (NU1U), Christopher Williams, Danny Barnes, Vic, Tom (M0LTE), smurphboy, Lars (SM0TGU) +Paul (M0TZO), Tim (G4VXE), Paul (N8HM), Michelle (W5NYV), Mitchell (AD0HJ), Dan (M0TCB), Martin (DK3ML), Juan Carlos (EA5WA), Iain (M0PCB), Charlie (GM1TGY), Ondrej (OK1CDJ), Trystan (G0KAY), Oliver (DL6KBG), Volkmar Schirmer, Jordan (M0PIR), Thomas Ziegler, Mathis (DB9MAT), Ken (VE3HLS), Tyler (WL7T), Jeremy Taylor, Ben Kuhn, Eric Thresher, Michael Cullen, Juuso (OH1JW), Anthony Castiglia, Fernando Ramirez-Ferrer, Robert Dixon, Mark Percival, Julia (KV1V), Timo Tomasini, Ant (NU1U), Christopher Williams, Danny Barnes, Vic, Tom (M0LTE), smurphboy, Lars (SM0TGU), Theo (PD9DP). If you'd like to donate to Cloudlog to help allow @magicbug spend less time doing commercial work and more time coding Cloudlog then you can donate via [PayPal](https://paypal.me/PGoodhall), [Github Sponsor](https://github.com/sponsors/magicbug) or become a [Patreon](https://www.patreon.com/2m0sql) diff --git a/application/controllers/Contesting.php b/application/controllers/Contesting.php index 6beb4edf..a32765ff 100644 --- a/application/controllers/Contesting.php +++ b/application/controllers/Contesting.php @@ -134,4 +134,40 @@ class Contesting extends CI_Controller { echo json_encode(array('message' => 'OK')); return; } + + public function deactivateall() { + $this->load->model('Contesting_model'); + $this->Contesting_model->deactivateall(); + header('Content-Type: application/json'); + echo json_encode(array('message' => 'OK')); + return; + } + + public function activateall() { + $this->load->model('Contesting_model'); + $this->Contesting_model->activateall(); + header('Content-Type: application/json'); + echo json_encode(array('message' => 'OK')); + return; + } + + /* + * Function is used for dupe-checking in contestinglogging + */ + public function checkIfWorkedBefore() { + $call = $this->input->post('call'); + $band = $this->input->post('band'); + $mode = $this->input->post('mode'); + $contest = $this->input->post('contest'); + $qso = $this->input->post('qso'); + + $this->load->model('Contesting_model'); + $result = $this->Contesting_model->checkIfWorkedBefore($call, $band, $mode, $contest, $qso); + + header('Content-Type: application/json'); + if ($result->num_rows()) { + echo json_encode(array('message' => 'Worked before')); + } + return; + } } diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php index d061d156..56219f83 100644 --- a/application/controllers/Eqsl.php +++ b/application/controllers/Eqsl.php @@ -620,7 +620,7 @@ class eqsl extends CI_Controller { $dom->preserveWhiteSpace = false; $images = $dom->getElementsByTagName('img'); - if(!isset($images)) { + if(!isset($images) || count($images) == 0) { echo "Rate Limited"; exit; } @@ -628,17 +628,21 @@ class eqsl extends CI_Controller { foreach ($images as $image) { header('Content-Type: image/jpg'); - readfile ("https://www.eqsl.cc".$image->getAttribute('src')); $content = file_get_contents("https://www.eqsl.cc".$image->getAttribute('src')); + if ($content === false) { + echo "No response"; + exit; + } + echo $content; $filename = uniqid().'.jpg'; - file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content); - - $this->Eqsl_images->save_image($id, $filename); + if (file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content) !== false) { + $this->Eqsl_images->save_image($id, $filename); + } } } else { header('Content-Type: image/jpg'); $image_url = base_url('images/eqsl_card_images/'.$this->Eqsl_images->get_image($id)); - readfile($image_url); + header('Location: ' . $image_url); } } diff --git a/application/controllers/Kml.php b/application/controllers/Kml.php index 72db490d..b3126fe5 100644 --- a/application/controllers/Kml.php +++ b/application/controllers/Kml.php @@ -9,8 +9,7 @@ class Kml extends CI_Controller { - public function index() - { + public function index() { $this->load->model('user_model'); $this->load->model('modes'); $this->load->model('logbook_model'); @@ -27,12 +26,10 @@ class Kml extends CI_Controller { $this->load->view('interface_assets/header', $data); $this->load->view('kml/index'); $this->load->view('interface_assets/footer'); - } - public function export() - { - // Load Librarys + public function export() { + // Load Libraries $this->load->library('qra'); $this->load->helper('file'); @@ -56,10 +53,7 @@ class Kml extends CI_Controller { $output .= ""; - foreach ($qsos->result() as $row) - { - $output .= ""; - + foreach ($qsos->result() as $row) { if($row->COL_GRIDSQUARE != null) { $stn_loc = $this->qra->qra2latlong($row->COL_GRIDSQUARE); @@ -73,21 +67,24 @@ class Kml extends CI_Controller { ORDER BY LENGTH( prefix ) DESC LIMIT 1 '); - - foreach ($query->result() as $dxcc) { - $lat = $dxcc->lat; - $lng = $dxcc->long; - } + foreach ($query->result() as $dxcc) { + $lat = $dxcc->lat; + $lng = $dxcc->long; + } } - $timestamp = strtotime($row->COL_TIME_ON); + if (isset($lat) && isset($lng)) { + $output .= ""; - $output .= "".$row->COL_CALL.""; - $output .= "Date/Time: ".date('Y-m-d H:i:s', ($timestamp))."
Band: ".$row->COL_BAND."

]]>
"; - $output .= ""; - $output .= "".$lng.",".$lat.",0"; - $output .= ""; - $output .= "
"; + $timestamp = strtotime($row->COL_TIME_ON); + + $output .= "".$row->COL_CALL.""; + $output .= "Date/Time: ".date('Y-m-d H:i:s', ($timestamp))."
Band: ".$row->COL_BAND."

]]>
"; + $output .= ""; + $output .= "".$lng.",".$lat.",0"; + $output .= ""; + $output .= "
"; + } } $output .= "
"; @@ -97,12 +94,10 @@ class Kml extends CI_Controller { mkdir('kml', 0755, true); } - if ( ! write_file('kml/qsos.kml', $output)) - { + if ( ! write_file('kml/qsos.kml', $output)) { echo 'Unable to write the file. Make sure the folder KML has write permissions.'; } - else - { + else { header("Content-Disposition: attachment; filename=\"qsos.kml\""); echo $output; } diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 49be4a47..5dc2328f 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -914,7 +914,8 @@ class Lotw extends CI_Controller { "TO-108" => "CAS-6", "TAURUS" => "TAURUS-1", "AISAT1" => "AISAT-1", - 'UVSQ' => "UVSQ-SAT" + 'UVSQ' => "UVSQ-SAT", + 'CAS-3H' => "LILACSAT-2", ); return array_search(strtoupper($satname),$arr,true); @@ -935,6 +936,15 @@ class Lotw extends CI_Controller { if ($submode == "FT4") { return "FT4"; break; + } elseif ($submode == "JS8") { + return "JS8"; + break; + } elseif ($submode == "FST4") { + return "FST4"; + break; + } elseif ($submode == "Q65") { + return "Q65"; + break; } else { return "MFSK"; break; diff --git a/application/controllers/Mode.php b/application/controllers/Mode.php index 258e1a22..e3eab2e6 100644 --- a/application/controllers/Mode.php +++ b/application/controllers/Mode.php @@ -103,4 +103,20 @@ class Mode extends CI_Controller { echo json_encode(array('message' => 'OK')); return; } + + public function activateall() { + $this->load->model('modes'); + $this->modes->activateall(); + header('Content-Type: application/json'); + echo json_encode(array('message' => 'OK')); + return; + } + + public function deactivateall() { + $this->load->model('modes'); + $this->modes->deactivateall(); + header('Content-Type: application/json'); + echo json_encode(array('message' => 'OK')); + return; + } } \ No newline at end of file diff --git a/application/language/bulgarian/account_lang.php b/application/language/bulgarian/account_lang.php new file mode 100644 index 00000000..a1c8bdbd --- /dev/null +++ b/application/language/bulgarian/account_lang.php @@ -0,0 +1,10 @@ + + + 403 Забранено + + + +

Достъпът до директорията е забранен.

+ + + diff --git a/application/language/bulgarian/lotw_lang.php b/application/language/bulgarian/lotw_lang.php new file mode 100644 index 00000000..e70ba49c --- /dev/null +++ b/application/language/bulgarian/lotw_lang.php @@ -0,0 +1,52 @@ +Download Report Area, to mark QSOs as confirmed on LOTW.'; +$lang['lotw_upload_type_must_be_adi'] = 'Log files must have the file type .adi'; + +$lang['lotw_pull_lotw_data_for_me'] = 'Pull LoTW data for me'; +$lang['lotw_import_missing_qsos_text'] = 'Import missing QSOs into the log. Call and gridsquare will be checked to try to find the correct profile to import the QSO into. If not found, the QSO will be skipped.'; + +$lang['lotw_report_download_overview_helptext'] ='Cloudlog will use the LoTW username and password stored in your user profile to download a report from LoTW for you. The report Cloudlog downloads will have all confirmations since chosen date, or since your last LoTW confirmation (fetched from your log), up until now.'; + +// Buttons +$lang['lotw_btn_lotw_import'] = 'LoTW импорт'; +$lang['lotw_btn_upload_certificate'] = 'Качване на сертификат'; +$lang['lotw_btn_delete'] = 'Изтрий'; +$lang['lotw_btn_manual_sync'] = 'Ръчно синхронизиране'; +$lang['lotw_btn_upload_file'] = 'Качи файлa'; +$lang['lotw_btn_import_matches'] = 'Import LoTW Matches'; + +// P12 Export Text +$lang['lotw_p12_export_step_one'] = 'Отворете TQSL & отидете на раздела Callsign Certificates'; +$lang['lotw_p12_export_step_two'] = 'Щракнете с десния бутон върху желания опознавателен знак'; +$lang['lotw_p12_export_step_three'] = 'Щракнете върху "Save Callsign Certificate File" и не добавяйте парола'; +$lang['lotw_p12_export_step_four'] = 'Качете файла по-долу.'; + +$lang['lotw_confirmed'] = 'Това QSO е потвърдено на LoTW'; diff --git a/application/language/bulgarian/notes_lang.php b/application/language/bulgarian/notes_lang.php new file mode 100644 index 00000000..091f89d7 --- /dev/null +++ b/application/language/bulgarian/notes_lang.php @@ -0,0 +1,23 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/application/language/chinese_simplified/lotw_lang.php b/application/language/chinese_simplified/lotw_lang.php new file mode 100644 index 00000000..c6f2dc83 --- /dev/null +++ b/application/language/chinese_simplified/lotw_lang.php @@ -0,0 +1,52 @@ +Download Report 中导出的 ADIF 文件,以标记这些 QSO 在 LoTW上已得到确认。'; +$lang['lotw_upload_type_must_be_adi'] = '日志文件的类型必须为 .adi'; + +$lang['lotw_pull_lotw_data_for_me'] = '为我拉取 LoTW 数据'; +$lang['lotw_import_missing_qsos_text'] = '从日志中导入缺失的 QSO。为了导入 QSO, 呼号和网格将会被用来查找正确的属性。 如果没有找到,该 QSO 将被跳过。'; + +$lang['lotw_report_download_overview_helptext'] ='Cloudlog 将会使用储存在你个人用户信息当中的 LoTW 用户名和密码从 LoTW 上为你下载报告。Cloudlog 下载的这份报告将会包括自你所选之日以来的或者你最后的 LoTW 确认信息(目前日志当中)以来的所有确认。'; + +// Buttons +$lang['lotw_btn_lotw_import'] = 'LoTW 导入'; +$lang['lotw_btn_upload_certificate'] = '上传证书'; +$lang['lotw_btn_delete'] = '删除'; +$lang['lotw_btn_manual_sync'] = '手动同步'; +$lang['lotw_btn_upload_file'] = '上传文件'; +$lang['lotw_btn_import_matches'] = '导入 LoTW 匹配'; + +// P12 Export Text +$lang['lotw_p12_export_step_one'] = '打开 TQSL & 选择 Callsign Certificates 标签'; +$lang['lotw_p12_export_step_two'] = '右键选择目标呼号'; +$lang['lotw_p12_export_step_three'] = '单击 "Save Callsign Certificate File" 并不要指定密码'; +$lang['lotw_p12_export_step_four'] = '在下方上传文件。'; + +$lang['lotw_confirmed'] = '该 QSO 已在 LoTW 确认'; diff --git a/application/language/chinese_simplified/notes_lang.php b/application/language/chinese_simplified/notes_lang.php new file mode 100644 index 00000000..194a6a26 --- /dev/null +++ b/application/language/chinese_simplified/notes_lang.php @@ -0,0 +1,23 @@ + + + 403 Forbidden + + + +

Dizine erişim yasaktır.

+ + + diff --git a/application/language/turkish/lotw_lang.php b/application/language/turkish/lotw_lang.php new file mode 100644 index 00000000..b28bbaf8 --- /dev/null +++ b/application/language/turkish/lotw_lang.php @@ -0,0 +1,52 @@ +Raporu İndir<\'den yükleyin /a> Alan, QSO\'ları LOTW\'da onaylandı olarak işaretlemek için.'; +$lang['lotw_upload_type_must_be_adi'] = 'Günlük dosyaları .adi dosya tipine sahip olmalıdır'; + +$lang['lotw_pull_lotw_data_for_me'] = 'Benim için LoTW verilerini çek'; +$lang['lotw_import_missing_qsos_text'] = 'Eksik QSO\'ları günlüğe aktarın. QSO\'nun içe aktarılacağı doğru profili bulmaya çalışmak için çağrı ve gridsquare kontrol edilecektir. Bulunamazsa, QSO atlanacaktır.'; + +$lang['lotw_report_download_overview_helptext'] ='Cloudlog, sizin için LoTW\'den bir rapor indirmek için kullanıcı profilinizde kayıtlı LoTW kullanıcı adını ve şifreyi kullanacak. Cloudlog indirmeleri raporu, seçilen tarihten itibaren veya son LoTW onayınızdan (günlüğünüzden alınır) bu yana şimdiye kadarki tüm onaylara sahip olacaktır.'; + +// Düğmeler +$lang['lotw_btn_lotw_import'] = 'LoTW İçe Aktarma'; +$lang['lotw_btn_upload_certificate'] = 'Sertifika Yükle'; +$lang['lotw_btn_delete'] = 'Sil'; +$lang['lotw_btn_manual_sync'] = 'Manuel Senkronizasyon'; +$lang['lotw_btn_upload_file'] = 'Dosya Yükle'; +$lang['lotw_btn_import_matches'] = 'LoTW Eşleşmelerini İçe Aktar'; + +// P12 Metni Dışa Aktar +$lang['lotw_p12_export_step_one'] = 'TQSL & Çağrı İmzası Sertifikaları Sekmesine gidin'; +$lang['lotw_p12_export_step_two'] = 'İstenen Çağrı İşaretine sağ tıklayın'; +$lang['lotw_p12_export_step_3,000'] = '"Çağrı İmzası Sertifika Dosyasını Kaydet"e tıklayın ve şifre eklemeyin'; +$lang['lotw_p12_export_step_four'] = 'Aşağıdaki Dosyayı Yükleyin.'; + +$lang['lotw_confirmed'] = 'Bu QSO LoTW\'de onaylandı'; diff --git a/application/language/turkish/notes_lang.php b/application/language/turkish/notes_lang.php new file mode 100644 index 00000000..9d740c73 --- /dev/null +++ b/application/language/turkish/notes_lang.php @@ -0,0 +1,23 @@ +db->where('id', $id); $this->db->update('contest', $data); } + + function activateall() { + $data = array( + 'active' => '1', + ); + + $this->db->update('contest', $data); + + return true; + } + + function deactivateall() { + $data = array( + 'active' => '0', + ); + + $this->db->update('contest', $data); + + return true; + } + + function checkIfWorkedBefore($call, $band, $mode, $contest, $qso) { + $CI =& get_instance(); + $CI->load->model('Stations'); + $station_id = $CI->Stations->find_active(); + + $qsoarray = explode(',', $qso); + + $date = DateTime::createFromFormat('d-m-Y H:i:s', $qsoarray[0]); + $date = $date->format('Y-m-d H:i:s'); + + $this->db->where('STATION_ID', $station_id); + $this->db->where('COL_CALL', xss_clean($call)); + $this->db->where("COL_BAND", xss_clean($band)); + $this->db->where("COL_CONTEST_ID", xss_clean($contest)); + $this->db->where("COL_TIME_ON >=", $date); + $this->db->group_start(); + $this->db->where("COL_MODE", xss_clean($mode)); + $this->db->or_where("COL_SUBMODE", xss_clean($mode)); + $this->db->group_end(); + $query = $this->db->get($this->config->item('table_name')); + + return $query; + } } diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 3e6c77f6..08701ebd 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -18,15 +18,15 @@ class Logbook_model extends CI_Model { // Contest exchange, need to separate between serial and other type of exchange if($this->input->post('exchangetype')) { - $srx_string = $this->input->post('exch_recv'); - $stx_string = $this->input->post('exch_sent'); - $srx = $this->input->post('exch_serial_r'); - $stx = $this->input->post('exch_serial_s'); + $srx_string = $this->input->post('exch_recv') == '' ? null : $this->input->post('exch_recv'); + $stx_string = $this->input->post('exch_sent') == '' ? null : $this->input->post('exch_sent'); + $srx = $this->input->post('exch_serial_r') == '' ? null : $this->input->post('exch_serial_r'); + $stx = $this->input->post('exch_serial_s') == '' ? null : $this->input->post('exch_serial_s'); } else { - $srx_string = null; - $stx_string = null; - $srx = null; - $stx = null; + $srx_string = null; + $stx_string = null; + $srx = null; + $stx = null; } if($this->input->post('contestname')) { @@ -92,6 +92,12 @@ class Logbook_model extends CI_Model { $clean_county_input = null; } + if($this->input->post('copyexchangetodok')) { + $dark_dok = $this->input->post('exch_recv'); + } else { + $dark_dok = $this->input->post('darc_dok'); + } + // Create array with QSO Data $data = array( 'COL_TIME_ON' => $datetime, @@ -148,7 +154,7 @@ class Logbook_model extends CI_Model { 'COL_SOTA_REF' => trim($this->input->post('sota_ref')), 'COL_SIG' => trim($this->input->post('sig')), 'COL_SIG_INFO' => trim($this->input->post('sig_info')), - 'COL_DARC_DOK' => trim($this->input->post('darc_dok')), + 'COL_DARC_DOK' => trim($dark_dok), 'COL_NOTES' => $this->input->post('notes'), ); @@ -921,7 +927,7 @@ class Logbook_model extends CI_Model { /* Get all QSOs with a valid grid for use in the KML export */ function kml_get_all_qsos($band, $mode, $dxcc, $cqz, $propagation, $fromdate, $todate) { $this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_GRIDSQUARE'); - $this->db->where('COL_GRIDSQUARE != \'null\''); + $this->db->where("coalesce(COL_GRIDSQUARE, '') <> ''"); if ($band != 'All') { if ($band == 'SAT') { @@ -1605,7 +1611,7 @@ class Logbook_model extends CI_Model { $query = $this->db->get($this->config->item('table_name')); $row = $query->row(); - if (isset($row->COL_EQSL_QSLDATE)){ + if (isset($row->COL_EQSL_QSLRDATE)){ return $row->COL_EQSL_QSLRDATE; }else{ // No previous date (first time import has run?), so choose UNIX EPOCH! diff --git a/application/models/Modes.php b/application/models/Modes.php index 6a8d81e7..66f40ac9 100644 --- a/application/models/Modes.php +++ b/application/models/Modes.php @@ -96,6 +96,26 @@ class Modes extends CI_Model { return true; } + function activateall() { + $data = array( + 'active' => '1', + ); + + $this->db->update('adif_modes', $data); + + return true; + } + + function deactivateall() { + $data = array( + 'active' => '0', + ); + + $this->db->update('adif_modes', $data); + + return true; + } + } ?> \ No newline at end of file diff --git a/application/views/contesting/add.php b/application/views/contesting/add.php index 661b6830..e62b9596 100644 --- a/application/views/contesting/add.php +++ b/application/views/contesting/add.php @@ -59,6 +59,10 @@
-

+

+ + + +

diff --git a/application/views/contesting/index.php b/application/views/contesting/index.php index 2519e03a..d875b0d0 100644 --- a/application/views/contesting/index.php +++ b/application/views/contesting/index.php @@ -113,6 +113,7 @@
+
@@ -120,11 +121,11 @@
- - + @@ -213,5 +222,4 @@ diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php index 3f1fa8d7..45bc6f4a 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -1,3 +1,34 @@ +'.$ctx->lang->line('gen_hamradio_mode').''; break; + case 'RSTS': echo ''; break; + case 'RSTR': echo ''; break; + case 'Country': echo ''; break; + case 'IOTA': echo ''; break; + case 'SOTA': echo ''; break; + case 'State': echo ''; break; + case 'Grid': echo ''; break; + case 'Band': echo ''; break; + case 'Operator': echo ''; break; + } +} + +function echo_table_col($row, $name) { + switch($name) { + case 'Mode': echo ''; break; + case 'RSTS': echo ''; break; + case 'RSTR': echo ''; break; + case 'Country': echo ''; break; + case 'IOTA': echo ''; break; + case 'SOTA': echo ''; break; + case 'Grid': echo ''; break; + case 'Band': echo ''; break; + case 'State': echo ''; break; + case 'Operator': echo ''; break; + } +} +?>
config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?> @@ -41,147 +72,48 @@
'; - switch($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) { - case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; - case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; - case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; - case 'Country': echo $this->lang->line('general_word_country'); break; - case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; - case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; - case 'State': echo $this->lang->line('gen_hamradio_state'); break; - case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; - case 'Band': echo $this->lang->line('gen_hamradio_band'); break; - } - echo '' . - '' . - '' . - ''; + echo_table_header_col($this, $this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')); + echo_table_header_col($this, $this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')); + echo_table_header_col($this, $this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')); + echo_table_header_col($this, $this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')); ?> result() as $row) { ?> - '; ?> + foreach ($last_five_qsos->result() as $row) { ?> + '; ?> - 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'); - } + // Get Date format + if($this->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'); + } - ?> + ?> - - config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?> - + + config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?> + - - - session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) { - case 'Mode': echo ''; - - switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) { - case 'Mode': echo ''; - - switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) { - case 'Mode': echo ''; - - switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) { - case 'Mode': echo ''; - ?> - - - + + + session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')); + echo_table_col($row, $this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')); + echo_table_col($row, $this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')); + echo_table_col($row, $this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')); + ?> + +
lang->line('gen_hamradio_rstr'); ?> lang->line('gen_hamradio_exchange_sent_short'); ?> lang->line('gen_hamradio_exchange_recv_short'); ?>Serial (R) Serial (S)Serial (R) Gridsquare Vucc Gridsquare
'.$ctx->lang->line('gen_hamradio_rsts').''.$ctx->lang->line('gen_hamradio_rstr').''.$ctx->lang->line('general_word_country').''.$ctx->lang->line('gen_hamradio_iota').''.$ctx->lang->line('gen_hamradio_sota').''.$ctx->lang->line('gen_hamradio_state').''.$ctx->lang->line('gen_hamradio_gridsquare').''.$ctx->lang->line('gen_hamradio_band').''.$ctx->lang->line('gen_hamradio_operator').''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE . '' . $row->COL_RST_SENT; if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';} echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';} echo '' . ucwords(strtolower(($row->COL_COUNTRY))) . '' . ($row->COL_IOTA) . '' . ($row->COL_SOTA_REF) . ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE . ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); } echo '' . ($row->COL_STATE) . '' . ($row->COL_OPERATOR) . 'lang->line('gen_hamradio_call'); ?> '; - switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) { - case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; - case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; - case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; - case 'Country': echo $this->lang->line('general_word_country'); break; - case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; - case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; - case 'State': echo $this->lang->line('gen_hamradio_state'); break; - case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; - case 'Band': echo $this->lang->line('gen_hamradio_band'); break; - } - echo ''; - switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) { - case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; - case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; - case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; - case 'Country': echo $this->lang->line('general_word_country'); break; - case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; - case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; - case 'State': echo $this->lang->line('gen_hamradio_state'); break; - case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; - case 'Band': echo $this->lang->line('gen_hamradio_band'); break; - } - echo ''; - switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) { - case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; - case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; - case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; - case 'Country': echo $this->lang->line('general_word_country'); break; - case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; - case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; - case 'State': echo $this->lang->line('gen_hamradio_state'); break; - case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; - case 'Band': echo $this->lang->line('gen_hamradio_band'); break; - } - echo '
COL_TIME_ON); echo date($custom_date_format, $timestamp); ?>COL_TIME_ON); echo date('H:i', $timestamp); ?>COL_TIME_ON); echo date($custom_date_format, $timestamp); ?>COL_TIME_ON); echo date('H:i', $timestamp); ?> - COL_CALL)); ?> - '; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; - case 'RSTR': echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; - case 'Country': echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - } - echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; - case 'RSTR': echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; - case 'Country': echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - } - echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; - case 'RSTR': echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; - case 'Country': echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - } - echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; - case 'RSTR': echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; - case 'Country': echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - } - echo '
+ COL_CALL)); ?> +
diff --git a/application/views/eqsl/export.php b/application/views/eqsl/export.php index 6e08311d..39e1b2d9 100644 --- a/application/views/eqsl/export.php +++ b/application/views/eqsl/export.php @@ -50,4 +50,5 @@ ?> - \ No newline at end of file + + diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 1aafb1d7..592930c0 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -156,6 +156,18 @@ function load_was_map() { .done(function(data) { $(".alert").remove(); $(".card-body.main").append('
×Your query has been saved!
'); + if ($("#querydropdown option").length == 0) { + var dropdowninfo = '

' + + '
' + + '' + + '
' + + '' + + '
' + + '' + + '
'; + $("#btn-save").after(dropdowninfo); + } $('#querydropdown').append(new Option(data.description, data.id)); // We add the saved query to the dropdown }); } @@ -237,6 +249,10 @@ function load_was_map() { $(".bootstrap-dialog-message").prepend('
×The stored query has been deleted!
'); $("#query_" + id).remove(); // removes query from table in dialog $("#querydropdown option[value='" + id + "']").remove(); // removes query from dropdown + if ($("#querydropdown option").length == 0) { + $("#btn-edit").remove(); + $('.querydropdownform').remove(); + }; }, error: function() { $(".bootstrap-dialog-message").prepend('
×The stored query could not be deleted. Please try again!
'); @@ -274,7 +290,7 @@ function load_was_map() { }); } - $('#btn-edit').on('click', function() { + function edit_stored_query_dialog() { $(".alert").remove(); $.ajax({ url: base_url + 'index.php/search/get_stored_queries', @@ -295,7 +311,7 @@ function load_was_map() { }); } }); - }); + } $('#btn-get').on('click', function() { $(".alert").remove(); @@ -602,14 +618,15 @@ i=0; function searchButtonPress(){ event.preventDefault() if ($('#callsign').val()) { - $('#partial_view').load("logbook/search_result/" + $('#callsign').val(), function() {}); + let fixedcall = $('#callsign').val(); + $('#partial_view').load("logbook/search_result/" + fixedcall.replace('Ø', '0'), function() {}); } } $(document).ready(function(){ input->post('callsign') != "") { ?> - $('#partial_view').load("logbook/search_result/input->post('callsign'); ?>", function() { + $('#partial_view').load("logbook/search_result/input->post('callsign')); ?>", function() { }); @@ -617,10 +634,10 @@ $(document).on('keypress',function(e) { if(e.which == 13) { if ($('#callsign').val()) { - $('#partial_view').load("logbook/search_result/" + $('#callsign').val(), function() {}); + let fixedcall = $('#callsign').val(); + $('#partial_view').load("logbook/search_result/" + fixedcall.replace('Ø', '0'), function() {}); } - event.preventDefault(); return false; } diff --git a/application/views/mode/index.php b/application/views/mode/index.php index 0cc7f30f..06c4936a 100644 --- a/application/views/mode/index.php +++ b/application/views/mode/index.php @@ -61,6 +61,10 @@
-

+

+ + + +

diff --git a/application/views/qslcard/searchresult.php b/application/views/qslcard/searchresult.php index 20f2e8f1..1217e301 100644 --- a/application/views/qslcard/searchresult.php +++ b/application/views/qslcard/searchresult.php @@ -18,6 +18,7 @@ case 'State': echo $this->lang->line('gen_hamradio_state'); break; case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + case 'Operator': echo $this->lang->line('gen_hamradio_operator'); break; } echo ''; echo ''; echo ''; echo ''; echo ''; @@ -104,6 +109,7 @@ case 'Grid': echo ''; switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) { @@ -116,6 +122,7 @@ case 'Grid': echo ''; @@ -129,6 +136,7 @@ case 'Grid': echo ''; switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) { @@ -141,6 +149,7 @@ case 'Grid': echo ''; switch($this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')) { @@ -153,6 +162,7 @@ case 'Grid': echo ''; diff --git a/application/views/search/filter.php b/application/views/search/filter.php index 9b654175..e4c632df 100644 --- a/application/views/search/filter.php +++ b/application/views/search/filter.php @@ -37,10 +37,10 @@ -

+

-
+
'; echo ''; echo ''; echo ''; @@ -122,6 +127,7 @@ case 'Grid': echo ''; switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) { @@ -134,6 +140,7 @@ case 'Grid': echo ''; @@ -147,6 +154,7 @@ case 'Grid': echo ''; switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) { @@ -159,6 +167,7 @@ case 'Grid': echo ''; switch($this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')) { @@ -171,6 +180,7 @@ case 'Grid': echo ''; if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> diff --git a/application/views/user/add.php b/application/views/user/add.php index 10e6e79a..f4e10858 100644 --- a/application/views/user/add.php +++ b/application/views/user/add.php @@ -158,6 +158,7 @@ + @@ -173,6 +174,7 @@ + @@ -188,6 +190,7 @@ + @@ -203,6 +206,7 @@ + @@ -218,6 +222,7 @@ + diff --git a/application/views/user/edit.php b/application/views/user/edit.php index c1e97a13..75db99dc 100644 --- a/application/views/user/edit.php +++ b/application/views/user/edit.php @@ -342,6 +342,7 @@ + @@ -357,6 +358,7 @@ + @@ -372,6 +374,7 @@ + @@ -387,6 +390,7 @@ +
@@ -401,6 +405,7 @@ +
diff --git a/application/views/view_log/partial/log_ajax.php b/application/views/view_log/partial/log_ajax.php index f7142674..6460ae1b 100644 --- a/application/views/view_log/partial/log_ajax.php +++ b/application/views/view_log/partial/log_ajax.php @@ -1,3 +1,37 @@ +'.$ctx->lang->line('gen_hamradio_mode').''; break; + case 'RSTS': echo ''; break; + case 'RSTR': echo ''; break; + case 'Country': echo ''; break; + case 'IOTA': echo ''; break; + case 'SOTA': echo ''; break; + case 'State': echo ''; break; + case 'Grid': echo ''; break; + case 'Band': echo ''; break; + case 'Operator': echo ''; break; + + } +} + +function echo_table_col($row, $name) { + switch($name) { + case 'Mode': echo ''; break; + case 'RSTS': echo ''; break; + case 'RSTR': echo ''; break; + case 'Country': echo ''; break; + case 'IOTA': echo ''; break; + case 'SOTA': echo ''; break; + case 'Grid': echo ''; break; + case 'Band': echo ''; break; + case 'State': echo ''; break; + case 'Operator':echo ''; break; + } +} +?> + +
'; @@ -31,6 +32,7 @@ case 'State': echo $this->lang->line('gen_hamradio_state'); break; case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + case 'Operator': echo $this->lang->line('gen_hamradio_band'); break; } echo ''; @@ -44,6 +46,7 @@ case 'State': echo $this->lang->line('gen_hamradio_state'); break; case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + case 'Operator': echo $this->lang->line('gen_hamradio_operator'); break; } echo ''; @@ -57,6 +60,7 @@ case 'State': echo $this->lang->line('gen_hamradio_state'); break; case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + case 'Operator': echo $this->lang->line('gen_hamradio_operator'); break; } echo ''; @@ -70,6 +74,7 @@ case 'State': echo $this->lang->line('gen_hamradio_state'); break; case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + case 'Operator': echo $this->lang->line('gen_hamradio_operator'); break; } echo '
'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; case 'State': echo '' . ($row->COL_STATE); break; + case 'Operator': echo '' . ($row->COL_OPERATOR); break; } echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; case 'State': echo '' . ($row->COL_STATE); break; + case 'Operator': echo '' . ($row->COL_OPERATOR); break; } echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; case 'State': echo '' . ($row->COL_STATE); break; + case 'Operator': echo '' . ($row->COL_OPERATOR); break; } echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; case 'State': echo '' . ($row->COL_STATE); break; + case 'Operator': echo '' . ($row->COL_OPERATOR); break; } echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; case 'State': echo '' . ($row->COL_STATE); break; + case 'Operator': echo '' . ($row->COL_OPERATOR); break; } echo ' '; @@ -32,6 +33,7 @@ case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + case 'Operator': echo $this->lang->line('gen_hamradio_operator'); break; } echo ''; @@ -45,6 +47,7 @@ case 'State': echo $this->lang->line('gen_hamradio_state'); break; case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + case 'Operator': echo $this->lang->line('gen_hamradio_operator'); break; } echo ''; @@ -58,6 +61,7 @@ case 'State': echo $this->lang->line('gen_hamradio_state'); break; case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + case 'Operator': echo $this->lang->line('gen_hamradio_operator'); break; } echo ''; @@ -71,6 +75,7 @@ case 'State': echo $this->lang->line('gen_hamradio_state'); break; case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + case 'Operator': echo $this->lang->line('gen_hamradio_operator'); break; } echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; case 'State': echo '' . ($row->COL_STATE); break; + case 'Operator': echo '' . ($row->COL_OPERATOR); break; } echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; case 'State': echo '' . ($row->COL_STATE); break; + case 'Operator': echo '' . ($row->COL_OPERATOR); break; } echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; case 'State': echo '' . ($row->COL_STATE); break; + case 'Operator': echo '' . ($row->COL_OPERATOR); break; } echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; case 'State': echo '' . ($row->COL_STATE); break; + case 'Operator': echo '' . ($row->COL_OPERATOR); break; } echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; case 'State': echo '' . ($row->COL_STATE); break; + case 'Operator': echo '' . ($row->COL_OPERATOR); break; } echo ' '.$ctx->lang->line('gen_hamradio_rsts').''.$ctx->lang->line('gen_hamradio_rstr').''.$ctx->lang->line('general_word_country').''.$ctx->lang->line('gen_hamradio_iota').''.$ctx->lang->line('gen_hamradio_sota').''.$ctx->lang->line('gen_hamradio_state').''.$ctx->lang->line('gen_hamradio_gridsquare').''.$ctx->lang->line('gen_hamradio_band').''.$ctx->lang->line('gen_hamradio_operator').''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE . '' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '' . $row->COL_STX . '';} if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';} echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '' . $row->COL_SRX . '';} if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';} echo '' . ucwords(strtolower(($row->COL_COUNTRY))) . '' . ($row->COL_IOTA) . '' . ($row->COL_SOTA_REF) . ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE . ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); } echo '' . ($row->COL_STATE) . '' . ($row->COL_OPERATOR) . '
@@ -7,71 +41,11 @@ '; - switch($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) { - case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; - case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; - case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; - case 'Country': echo $this->lang->line('general_word_country'); break; - case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; - case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; - case 'State': echo $this->lang->line('gen_hamradio_state'); break; - case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; - case 'Band': echo $this->lang->line('gen_hamradio_band'); break; - } - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; + echo_table_header_col($this, $this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')); + echo_table_header_col($this, $this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')); + echo_table_header_col($this, $this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')); + echo_table_header_col($this, $this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')); + echo_table_header_col($this, $this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')); if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> @@ -109,67 +83,12 @@ session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) { - case 'Mode': echo ''; - switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) { - case 'Mode': echo ''; - - switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) { - case 'Mode': echo ''; - switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) { - case 'Mode': echo ''; - switch($this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')) { - case 'Mode': echo ''; + echo_table_col($row, $this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')); + echo_table_col($row, $this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')); + echo_table_col($row, $this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')); + echo_table_col($row, $this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')); + echo_table_col($row, $this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')); + if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> ' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + ''); }); if (!$.fn.DataTable.isDataTable('.qsotable')) { $('.qsotable').DataTable({ "pageLength": 25, responsive: false, - "scrollY": "400px", + "scrollY": "400px", "scrollCollapse": true, - "paging": false, + "paging": false, "scrollX": true, - "order": [[ 0, "desc" ]] + "order": [[0, "desc"]] }); } } diff --git a/assets/js/sections/contestingnames.js b/assets/js/sections/contestingnames.js index 9e06db28..25f49fe5 100644 --- a/assets/js/sections/contestingnames.js +++ b/assets/js/sections/contestingnames.js @@ -2,9 +2,9 @@ $('.contesttable').DataTable({ "pageLength": 25, responsive: false, ordering: false, - "scrollY": "400px", + "scrollY": "400px", "scrollCollapse": true, - "paging": false, + "paging": false, "scrollX": true, dom: 'Bfrtip', buttons: [ @@ -13,7 +13,7 @@ $('.contesttable').DataTable({ }); // using this to change color of csv-button if dark mode is chosen -var background = $('body').css( "background-color"); +var background = $('body').css("background-color"); if (background != ('rgb(255, 255, 255)')) { $(".buttons-csv").css("color", "white"); @@ -23,7 +23,7 @@ function createContestDialog() { $.ajax({ url: base_url + 'index.php/contesting/create', type: 'post', - success: function(html) { + success: function (html) { BootstrapDialog.show({ title: 'Add Contest', size: BootstrapDialog.SIZE_WIDE, @@ -46,9 +46,11 @@ function createContest(form) { $.ajax({ url: base_url + 'index.php/contesting/create', type: 'post', - data: {'name': form.contestname.value, - 'adifname': form.adifcontestname.value}, - success: function(html) { + data: { + 'name': form.contestname.value, + 'adifname': form.adifcontestname.value + }, + success: function (html) { location.reload(); } }); @@ -59,11 +61,11 @@ function deactivateContest(contestid) { $.ajax({ url: base_url + 'index.php/contesting/deactivate', type: 'post', - data: {'id': contestid }, - success: function(html) { + data: { 'id': contestid }, + success: function (html) { $(".contest_" + contestid).text('not active'); - $('.btn_'+contestid).html('Activate'); - $('.btn_'+contestid).attr('onclick', 'activateContest('+contestid+')') + $('.btn_' + contestid).html('Activate'); + $('.btn_' + contestid).attr('onclick', 'activateContest(' + contestid + ')') } }); } @@ -72,11 +74,11 @@ function activateContest(contestid) { $.ajax({ url: base_url + 'index.php/contesting/activate', type: 'post', - data: {'id': contestid }, - success: function(html) { - $('.contest_'+contestid).text('active'); - $('.btn_'+contestid).html('Deactivate'); - $('.btn_'+contestid).attr('onclick', 'deactivateContest('+contestid+')') + data: { 'id': contestid }, + success: function (html) { + $('.contest_' + contestid).text('active'); + $('.btn_' + contestid).html('Deactivate'); + $('.btn_' + contestid).attr('onclick', 'deactivateContest(' + contestid + ')') } }); } @@ -84,19 +86,20 @@ function activateContest(contestid) { function deleteContest(id, contest) { BootstrapDialog.confirm({ title: 'DANGER', - message: 'Warning! Are you sure you want to delete the following contest: ' + contest + '?' , + message: 'Warning! Are you sure you want to delete the following contest: ' + contest + '?', type: BootstrapDialog.TYPE_DANGER, closable: true, draggable: true, btnOKClass: 'btn-danger', - callback: function(result) { - if(result) { + callback: function (result) { + if (result) { $.ajax({ url: base_url + 'index.php/contesting/delete', type: 'post', - data: {'id': id + data: { + 'id': id }, - success: function(data) { + success: function (data) { $(".contest_" + id).parent("tr:first").remove(); // removes mode from table } }); @@ -104,3 +107,47 @@ function deleteContest(id, contest) { } }); } + +function activateAllContests() { + BootstrapDialog.confirm({ + title: 'DANGER', + message: 'Warning! Are you sure you want to activate all contests?', + type: BootstrapDialog.TYPE_DANGER, + closable: true, + draggable: true, + btnOKClass: 'btn-danger', + callback: function (result) { + if (result) { + $.ajax({ + url: base_url + 'index.php/contesting/activateall', + type: 'post', + success: function (data) { + location.reload(); + } + }); + } + } + }); +} + +function deactivateAllContests() { + BootstrapDialog.confirm({ + title: 'DANGER', + message: 'Warning! Are you sure you want to deactivate all contests?', + type: BootstrapDialog.TYPE_DANGER, + closable: true, + draggable: true, + btnOKClass: 'btn-danger', + callback: function (result) { + if (result) { + $.ajax({ + url: base_url + 'index.php/contesting/deactivateall', + type: 'post', + success: function (data) { + location.reload(); + } + }); + } + } + }); +} \ No newline at end of file diff --git a/assets/js/sections/mode.js b/assets/js/sections/mode.js index 7717736d..c84f5120 100644 --- a/assets/js/sections/mode.js +++ b/assets/js/sections/mode.js @@ -2,9 +2,9 @@ $('.modetable').DataTable({ "pageLength": 25, responsive: false, ordering: false, - "scrollY": "500px", + "scrollY": "500px", "scrollCollapse": true, - "paging": false, + "paging": false, "scrollX": true }); @@ -12,7 +12,7 @@ function createModeDialog() { $.ajax({ url: base_url + 'index.php/mode/create', type: 'post', - success: function(html) { + success: function (html) { BootstrapDialog.show({ title: 'Create mode', size: BootstrapDialog.SIZE_WIDE, @@ -35,11 +35,13 @@ function createMode(form) { $.ajax({ url: base_url + 'index.php/mode/create', type: 'post', - data: {'mode': form.mode.value, + data: { + 'mode': form.mode.value, 'submode': form.submode.value, 'qrgmode': form.qrgmode.value, - 'active': form.active.value}, - success: function(html) { + 'active': form.active.value + }, + success: function (html) { location.reload(); } }); @@ -50,11 +52,11 @@ function deactivateMode(modeid) { $.ajax({ url: base_url + 'index.php/mode/deactivate', type: 'post', - data: {'id': modeid }, - success: function(html) { + data: { 'id': modeid }, + success: function (html) { $(".mode_" + modeid).text('not active'); - $('.btn_'+modeid).html('Activate'); - $('.btn_'+modeid).attr('onclick', 'activateMode('+modeid+')') + $('.btn_' + modeid).html('Activate'); + $('.btn_' + modeid).attr('onclick', 'activateMode(' + modeid + ')') } }); } @@ -63,11 +65,11 @@ function activateMode(modeid) { $.ajax({ url: base_url + 'index.php/mode/activate', type: 'post', - data: {'id': modeid }, - success: function(html) { - $('.mode_'+modeid).text('active'); - $('.btn_'+modeid).html('Deactivate'); - $('.btn_'+modeid).attr('onclick', 'deactivateMode('+modeid+')') + data: { 'id': modeid }, + success: function (html) { + $('.mode_' + modeid).text('active'); + $('.btn_' + modeid).html('Deactivate'); + $('.btn_' + modeid).attr('onclick', 'deactivateMode(' + modeid + ')') } }); } @@ -75,19 +77,20 @@ function activateMode(modeid) { function deleteMode(id, mode) { BootstrapDialog.confirm({ title: 'DANGER', - message: 'Warning! Are you sure you want to delete the following mode: ' + mode + '?' , + message: 'Warning! Are you sure you want to delete the following mode: ' + mode + '?', type: BootstrapDialog.TYPE_DANGER, closable: true, draggable: true, btnOKClass: 'btn-danger', - callback: function(result) { - if(result) { + callback: function (result) { + if (result) { $.ajax({ url: base_url + 'index.php/mode/delete', type: 'post', - data: {'id': id + data: { + 'id': id }, - success: function(data) { + success: function (data) { $(".mode_" + id).parent("tr:first").remove(); // removes mode from table } }); @@ -95,3 +98,47 @@ function deleteMode(id, mode) { } }); } + +function activateAllModes() { + BootstrapDialog.confirm({ + title: 'DANGER', + message: 'Warning! Are you sure you want to activate all modes?', + type: BootstrapDialog.TYPE_DANGER, + closable: true, + draggable: true, + btnOKClass: 'btn-danger', + callback: function (result) { + if (result) { + $.ajax({ + url: base_url + 'index.php/mode/activateall', + type: 'post', + success: function (data) { + location.reload(); + } + }); + } + } + }); +} + +function deactivateAllModes() { + BootstrapDialog.confirm({ + title: 'DANGER', + message: 'Warning! Are you sure you want to deactivate all modes?', + type: BootstrapDialog.TYPE_DANGER, + closable: true, + draggable: true, + btnOKClass: 'btn-danger', + callback: function (result) { + if (result) { + $.ajax({ + url: base_url + 'index.php/mode/deactivateall', + type: 'post', + success: function (data) { + location.reload(); + } + }); + } + } + }); +} \ No newline at end of file diff --git a/system/language/chinese_simplified/calendar_lang.php b/system/language/chinese_simplified/calendar_lang.php new file mode 100644 index 00000000..f542f77c --- /dev/null +++ b/system/language/chinese_simplified/calendar_lang.php @@ -0,0 +1,56 @@ + + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + diff --git a/system/language/chinese_simplified/migration_lang.php b/system/language/chinese_simplified/migration_lang.php new file mode 100644 index 00000000..05e6b747 --- /dev/null +++ b/system/language/chinese_simplified/migration_lang.php @@ -0,0 +1,19 @@ + + + + 403 Forbidden + + + +

Dizine erişim yasaktır.

+ + + diff --git a/system/language/turkish/migration_lang.php b/system/language/turkish/migration_lang.php new file mode 100644 index 00000000..e48d81e4 --- /dev/null +++ b/system/language/turkish/migration_lang.php @@ -0,0 +1,47 @@ +
lang->line('gen_hamradio_call'); ?> '; - switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) { - case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; - case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; - case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; - case 'Country': echo $this->lang->line('general_word_country'); break; - case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; - case 'State': echo $this->lang->line('gen_hamradio_state'); break; - case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; - case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; - case 'Band': echo $this->lang->line('gen_hamradio_band'); break; - } - echo ''; - switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) { - case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; - case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; - case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; - case 'Country': echo $this->lang->line('general_word_country'); break; - case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; - case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; - case 'State': echo $this->lang->line('gen_hamradio_state'); break; - case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; - case 'Band': echo $this->lang->line('gen_hamradio_band'); break; - } - echo ''; - switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) { - case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; - case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; - case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; - case 'Country': echo $this->lang->line('general_word_country'); break; - case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; - case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; - case 'State': echo $this->lang->line('gen_hamradio_state'); break; - case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; - case 'Band': echo $this->lang->line('gen_hamradio_band'); break; - } - echo ''; - switch($this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')) { - case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; - case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; - case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; - case 'Country': echo $this->lang->line('general_word_country'); break; - case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; - case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; - case 'State': echo $this->lang->line('gen_hamradio_state'); break; - case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; - case 'Band': echo $this->lang->line('gen_hamradio_band'); break; - } - echo 'QSL '; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '' . $row->COL_STX . '';}if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; - case 'RSTR': echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '' . $row->COL_SRX . '';}if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; - case 'Country': echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - } - echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '' . $row->COL_STX . '';}if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; - case 'RSTR': echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '' . $row->COL_SRX . '';}if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; - case 'Country': echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - } - echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '' . $row->COL_STX . '';}if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; - case 'RSTR': echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '' . $row->COL_SRX . '';}if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; - case 'Country': echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - } - echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '' . $row->COL_STX . '';}if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; - case 'RSTR': echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '' . $row->COL_SRX . '';}if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; - case 'Country': echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - } - echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '' . $row->COL_STX . '';}if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; - case 'RSTR': echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '' . $row->COL_SRX . '';}if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; - case 'Country': echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - } - echo ' = 3) { - $.get('lookup/scp/' + call.toUpperCase(), function(result) { - $('.callsign-suggestions').text(result); - highlight(call.toUpperCase()); - }); - } - else if (call.length <= 2) { - $('.callsign-suggestions').text(""); - } +$("#callsign").keyup(function () { + var call = $(this).val(); + if (call.length >= 3) { + $.get('lookup/scp/' + call.toUpperCase(), function (result) { + $('.callsign-suggestions').text(result); + highlight(call.toUpperCase()); + }); + checkIfWorkedBefore(); + } + else if (call.length <= 2) { + $('.callsign-suggestions').text(""); + } }); -function reset_log_fields() { - $('#name').val(""); - $('.callsign-suggestions').text(""); - $('#callsign').val(""); - $('#comment').val(""); - $('#exch_recv').val(""); - $('#exch_serial_r').val(""); - $('#exch_gridsquare_r').val(""); - $("#callsign").focus(); - setRst($("#mode").val()); +function checkIfWorkedBefore() { + $('#callsign_info').text(""); + $.ajax({ + url: base_url + 'index.php/contesting/checkIfWorkedBefore', + type: 'post', + data: { + 'call': $("#callsign").val(), + 'mode': $("#mode").val(), + 'band': $("#band").val(), + 'contest': $("#contestname").val(), + 'qso': localStorage.getItem("qso") + }, + success: function (result) { + if (result.message == 'Worked before') { + $('#callsign_info').text("Worked before!"); + } + } + }); } -RegExp.escape = function(text) { - return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); +function reset_log_fields() { + $('#name').val(""); + $('.callsign-suggestions').text(""); + $('#callsign').val(""); + $('#comment').val(""); + $('#exch_recv').val(""); + $('#exch_serial_r').val(""); + $('#exch_gridsquare_r').val(""); + $("#callsign").focus(); + setRst($("#mode").val()); + $('#callsign_info').text(""); +} + +RegExp.escape = function (text) { + return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } function highlight(term, base) { - if (!term) return; - base = base || document.body; - var re = new RegExp("(" + RegExp.escape(term) + ")", "gi"); - var replacement = "" + term + ""; - $(".callsign-suggestions", base).contents().each( function(i, el) { - if (el.nodeType === 3) { - var data = el.data; - if (data = data.replace(re, replacement)) { - var wrapper = $("").html(data); - $(el).before(wrapper.contents()).remove(); - } - } - }); + if (!term) return; + base = base || document.body; + var re = new RegExp("(" + RegExp.escape(term) + ")", "gi"); + var replacement = "" + term + ""; + $(".callsign-suggestions", base).contents().each(function (i, el) { + if (el.nodeType === 3) { + var data = el.data; + if (data = data.replace(re, replacement)) { + var wrapper = $("").html(data); + $(el).before(wrapper.contents()).remove(); + } + } + }); } // Only set the frequency when not set by userdata/PHP. -if ($('#frequency').val() == "") -{ - $.get('qso/band_to_freq/' + $('#band').val() + '/' + $('.mode').val(), function(result) { - $('#frequency').val(result); - $('#frequency_rx').val(""); - }); +if ($('#frequency').val() == "") { + $.get('qso/band_to_freq/' + $('#band').val() + '/' + $('.mode').val(), function (result) { + $('#frequency').val(result); + $('#frequency_rx').val(""); + }); } /* on mode change */ -$('#mode').change(function() { - $.get('qso/band_to_freq/' + $('#band').val() + '/' + $('.mode').val(), function(result) { - $('#frequency').val(result); - $('#frequency_rx').val(""); - }); +$('#mode').change(function () { + $.get('qso/band_to_freq/' + $('#band').val() + '/' + $('.mode').val(), function (result) { + $('#frequency').val(result); + $('#frequency_rx').val(""); + }); setRst($("#mode").val()); + checkIfWorkedBefore(); }); /* Calculate Frequency */ /* on band change */ -$('#band').change(function() { - $.get('qso/band_to_freq/' + $(this).val() + '/' + $('.mode').val(), function(result) { - $('#frequency').val(result); - $('#frequency_rx').val(""); - }); +$('#band').change(function () { + $.get('qso/band_to_freq/' + $(this).val() + '/' + $('.mode').val(), function (result) { + $('#frequency').val(result); + $('#frequency_rx').val(""); + }); + checkIfWorkedBefore(); }); -$('#exchangetype').change(function(){ +$('#exchangetype').change(function () { var exchangetype = $("#exchangetype").val(); setExchangetype(exchangetype); }); function setExchangetype(exchangetype) { - if (exchangetype == 'None') { - $(".exchanger").hide(); - $(".exchanges").hide(); - $(".serials").hide(); - $(".serialr").hide(); - $(".gridsquarer").hide(); - $(".gridsquares").hide(); + // Perhaps a better approach is to hide everything, then just enable the things you need + $(".exchanger").hide(); + $(".exchanges").hide(); + $(".serials").hide(); + $(".serialr").hide(); + $(".gridsquarer").hide(); + $(".gridsquares").hide(); + $("#exch_serial_s").val(""); + + var serialsent = localStorage.getItem("serialsent"); + if (serialsent == null) { + serialsent = 1; } - else if (exchangetype == 'Exchange') { + + if (exchangetype == 'Exchange') { $(".exchanger").show(); $(".exchanges").show(); - $(".serials").hide(); - $(".serialr").hide(); - $(".gridsquarer").hide(); - $(".gridsquares").hide(); } else if (exchangetype == 'Serial') { - $(".exchanger").hide(); - $(".exchanges").hide(); + $("#exch_serial_s").val(serialsent); $(".serials").show(); $(".serialr").show(); - $(".gridsquarer").hide(); - $(".gridsquares").hide(); } else if (exchangetype == 'Serialexchange') { + $("#exch_serial_s").val(serialsent); $(".exchanger").show(); $(".exchanges").show(); $(".serials").show(); $(".serialr").show(); - $(".gridsquarer").hide(); - $(".gridsquares").hide(); } else if (exchangetype == 'Serialgridsquare') { - $(".exchanger").hide(); - $(".exchanges").hide(); + $("#exch_serial_s").val(serialsent); $(".serials").show(); $(".serialr").show(); $(".gridsquarer").show(); $(".gridsquares").show(); } else if (exchangetype == 'Gridsquare') { - $(".exchanger").hide(); - $(".exchanges").hide(); - $(".serials").hide(); - $(".serialr").hide(); $(".gridsquarer").show(); $(".gridsquares").show(); } @@ -305,7 +321,7 @@ function logQso() { } var data = [[ - $("#start_date").val()+ ' ' + $("#start_time").val(), + $("#start_date").val() + ' ' + $("#start_time").val(), $("#callsign").val().toUpperCase(), $("#band").val(), $("#mode").val(), @@ -331,7 +347,7 @@ function logQso() { enctype: 'multipart/form-data', success: function (html) { if (localStorage.getItem("qso") == null) { - localStorage.setItem("qso", $("#start_date").val()+ ' ' + $("#start_time").val() + ',' + $("#callsign").val().toUpperCase() + ',' + $("#contestname").val()); + localStorage.setItem("qso", $("#start_date").val() + ' ' + $("#start_time").val() + ',' + $("#callsign").val().toUpperCase() + ',' + $("#contestname").val()); } $('#name').val(""); @@ -356,6 +372,7 @@ function logQso() { localStorage.setItem("serialsent", $("#exch_serial_s").val()); localStorage.setItem("gridsquarereceived", $("#exch_gridsquare_r").val()); localStorage.setItem("gridsquaresent", $("#exch_gridsquare_s").val()); + localStorage.setItem("copytodok", $('#copyexchangetodok').is(":checked")); } }); } @@ -363,14 +380,17 @@ function logQso() { // We are restoring the settings in the contest logging form here function restoreContestSession() { - var contestname = localStorage.getItem("contestid"); + var dokcopy = localStorage.getItem("copytodok"); + if (dokcopy != null) { + $('#copyexchangetodok').prop('checked', true); + } + var contestname = localStorage.getItem("contestid"); if (contestname != null) { $("#contestname").val(contestname); } var exchangetype = localStorage.getItem("exchangetype"); - if (exchangetype != null) { $("#exchangetype").val(exchangetype); setExchangetype(exchangetype); @@ -411,11 +431,11 @@ function restoreContestSession() { $.ajax({ url: base_url + 'index.php/contesting/getSessionQsos', type: 'post', - data: {'qso': qsodata,}, + data: { 'qso': qsodata, }, success: function (html) { var mode = ''; - $.each(html, function(){ + $.each(html, function () { if (this.col_submode == null || this.col_submode == '') { mode = this.col_mode; } else { @@ -423,29 +443,29 @@ function restoreContestSession() { } $(".qsotable tbody").prepend('
'+ this.col_time_on + ''+ this.col_call + ''+ this.col_band + ''+ mode + ''+ this.col_rst_sent + ''+ this.col_rst_rcvd + ''+ this.col_stx_string + ''+ this.col_srx_string + ''+ this.col_stx + ''+ this.col_srx + ''+ this.col_gridsquare + ''+ this.col_vucc_grids + '' + this.col_time_on + '' + this.col_call + '' + this.col_band + '' + mode + '' + this.col_rst_sent + '' + this.col_rst_rcvd + '' + this.col_stx_string + '' + this.col_srx_string + '' + this.col_stx + '' + this.col_srx + '' + this.col_gridsquare + '' + this.col_vucc_grids + '