diff --git a/application/controllers/Logbookadvanced.php b/application/controllers/Logbookadvanced.php index 1b781c3e8..d9fa9052a 100644 --- a/application/controllers/Logbookadvanced.php +++ b/application/controllers/Logbookadvanced.php @@ -889,6 +889,10 @@ class Logbookadvanced extends CI_Controller { $this->load->view('logbookadvanced/dbtoolsdialog'); } + public function dbtoolsInfo() { + $this->load->view('logbookadvanced/dbtoolsinformation'); + } + public function checkDb() { if(!clubaccess_check(9)) return; diff --git a/application/libraries/Geojson.php b/application/libraries/Geojson.php index c832fcbe5..814beaaaf 100644 --- a/application/libraries/Geojson.php +++ b/application/libraries/Geojson.php @@ -22,47 +22,47 @@ class Geojson { * Value: Array with 'name' and 'enabled' flag */ const SUPPORTED_STATES = [ - 1 => ['name' => 'Canada', 'enabled' => true], // 13 provinces/territories - 6 => ['name' => 'Alaska', 'enabled' => true], // 1 state - 27 => ['name' => 'Belarus', 'enabled' => true], // 7 subdivisions - 29 => ['name' => 'Canary Islands', 'enabled' => true], // 2 provinces - 32 => ['name' => 'Ceuta & Melilla', 'enabled' => true], // 2 autonomous cities - 50 => ['name' => 'Mexico', 'enabled' => true], // 32 states - 100 => ['name' => 'Argentina', 'enabled' => true], // 24 subdivisions - 108 => ['name' => 'Brazil', 'enabled' => true], // 27 subdivisions - 112 => ['name' => 'Chile', 'enabled' => true], // 16 regions + 1 => ['name' => 'Canada', 'enabled' => true], // 13 provinces/territories + 6 => ['name' => 'Alaska', 'enabled' => true], // 1 state + 27 => ['name' => 'Belarus', 'enabled' => true], // 7 subdivisions + 29 => ['name' => 'Canary Islands', 'enabled' => true], // 2 provinces + 32 => ['name' => 'Ceuta & Melilla', 'enabled' => true], // 2 autonomous cities + 50 => ['name' => 'Mexico', 'enabled' => true], // 32 states + 100 => ['name' => 'Argentina', 'enabled' => true], // 24 subdivisions + 108 => ['name' => 'Brazil', 'enabled' => true], // 27 subdivisions + 110 => ['name' => 'Hawaii', 'enabled' => true], // 1 state + 112 => ['name' => 'Chile', 'enabled' => true], // 16 regions 137 => ['name' => 'Republic of Korea', 'enabled' => true], // 17 subdivisions - 110 => ['name' => 'Hawaii', 'enabled' => true], // 1 state - 144 => ['name' => 'Uruguay', 'enabled' => true], // 19 subdivisions - 148 => ['name' => 'Venezuela', 'enabled' => true], // 24 states - 149 => ['name' => 'Azores', 'enabled' => true], // 1 autonomous region - 150 => ['name' => 'Australia', 'enabled' => true], // 8 subdivisions - 163 => ['name' => 'Papua New Guinea', 'enabled' => true], // 22 provinces - 170 => ['name' => 'New Zealand', 'enabled' => true], // 16 regions - 209 => ['name' => 'Belgium', 'enabled' => true], // 11 subdivisions - 212 => ['name' => 'Bulgaria', 'enabled' => true], // 28 subdivisions - 214 => ['name' => 'Corsica', 'enabled' => true], // 2 departments (2A, 2B) - 225 => ['name' => 'Sardinia', 'enabled' => true], // 5 provinces - 227 => ['name' => 'France', 'enabled' => true], // 96 departments - 230 => ['name' => 'Germany', 'enabled' => true], // 16 federal states - 239 => ['name' => 'Hungary', 'enabled' => true], // 20 subdivisions - 245 => ['name' => 'Ireland', 'enabled' => true], // 27 subdivisions - 248 => ['name' => 'Italy', 'enabled' => true], // 107 provinces - 256 => ['name' => 'Madeira Islands', 'enabled' => true], // 1 autonomous region - 263 => ['name' => 'Netherlands', 'enabled' => true], // 12 provinces - 266 => ['name' => 'Norway', 'enabled' => true], // 11 counties - 269 => ['name' => 'Poland', 'enabled' => true], // 16 voivodeships - 272 => ['name' => 'Portugal', 'enabled' => true], // 18 districts - 275 => ['name' => 'Romania', 'enabled' => true], // 42 counties - 281 => ['name' => 'Spain', 'enabled' => true], // 47 provinces - 284 => ['name' => 'Sweden', 'enabled' => true], // 21 subdivisions - 287 => ['name' => 'Switzerland', 'enabled' => true], // 26 cantons - 291 => ['name' => 'USA', 'enabled' => true], // 52 states/territories - 318 => ['name' => 'China', 'enabled' => true], // 31 provinces - 324 => ['name' => 'India', 'enabled' => true], // 36 states/territories - 339 => ['name' => 'Japan', 'enabled' => true], // 47 prefectures - 386 => ['name' => 'Taiwan', 'enabled' => true], // 22 subdivisions - 497 => ['name' => 'Croatia', 'enabled' => true], // 21 subdivisions + 144 => ['name' => 'Uruguay', 'enabled' => true], // 19 subdivisions + 148 => ['name' => 'Venezuela', 'enabled' => true], // 24 states + 149 => ['name' => 'Azores', 'enabled' => true], // 1 autonomous region + 150 => ['name' => 'Australia', 'enabled' => true], // 8 subdivisions + 163 => ['name' => 'Papua New Guinea', 'enabled' => true], // 22 provinces + 170 => ['name' => 'New Zealand', 'enabled' => true], // 16 regions + 209 => ['name' => 'Belgium', 'enabled' => true], // 11 subdivisions + 212 => ['name' => 'Bulgaria', 'enabled' => true], // 28 subdivisions + 214 => ['name' => 'Corsica', 'enabled' => true], // 2 departments (2A, 2B) + 225 => ['name' => 'Sardinia', 'enabled' => true], // 5 provinces + 227 => ['name' => 'France', 'enabled' => true], // 96 departments + 230 => ['name' => 'Germany', 'enabled' => true], // 16 federal states + 239 => ['name' => 'Hungary', 'enabled' => true], // 20 subdivisions + 245 => ['name' => 'Ireland', 'enabled' => true], // 27 subdivisions + 248 => ['name' => 'Italy', 'enabled' => true], // 107 provinces + 256 => ['name' => 'Madeira Islands', 'enabled' => true], // 1 autonomous region + 263 => ['name' => 'Netherlands', 'enabled' => true], // 12 provinces + 266 => ['name' => 'Norway', 'enabled' => true], // 11 counties + 269 => ['name' => 'Poland', 'enabled' => true], // 16 voivodeships + 272 => ['name' => 'Portugal', 'enabled' => true], // 18 districts + 275 => ['name' => 'Romania', 'enabled' => true], // 42 counties + 281 => ['name' => 'Spain', 'enabled' => true], // 47 provinces + 284 => ['name' => 'Sweden', 'enabled' => true], // 21 subdivisions + 287 => ['name' => 'Switzerland', 'enabled' => true], // 26 cantons + 291 => ['name' => 'USA', 'enabled' => true], // 52 states/territories + 318 => ['name' => 'China', 'enabled' => true], // 31 provinces + 324 => ['name' => 'India', 'enabled' => true], // 36 states/territories + 339 => ['name' => 'Japan', 'enabled' => true], // 47 prefectures + 386 => ['name' => 'Taiwan', 'enabled' => true], // 22 subdivisions + 497 => ['name' => 'Croatia', 'enabled' => true], // 21 subdivisions ]; private $qra; diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php index af5781d44..f069bce58 100644 --- a/application/models/Logbookadvanced_model.php +++ b/application/models/Logbookadvanced_model.php @@ -1580,8 +1580,9 @@ class Logbookadvanced_model extends CI_Model { } function getStateListQsos($dxcc) { - $sql = "SELECT col_call, col_time_on, col_mode, col_submode, col_band, col_state, col_gridsquare FROM " . $this->config->item('table_name') . " qsos + $sql = "SELECT col_call, col_time_on, col_mode, col_submode, col_band, col_state, col_gridsquare, d.name as dxcc_name, station_profile.station_profile_name FROM " . $this->config->item('table_name') . " qsos JOIN station_profile ON qsos.station_id = station_profile.station_id + LEFT JOIN dxcc_entities d ON qsos.COL_DXCC = d.adif WHERE qsos.COL_DXCC = ? AND station_profile.user_id = ? AND (qsos.COL_STATE IS NULL OR qsos.COL_STATE = '') AND LENGTH(COALESCE(qsos.COL_GRIDSQUARE, '')) >= 6 diff --git a/application/views/logbookadvanced/dbtoolsdialog.php b/application/views/logbookadvanced/dbtoolsdialog.php index 69c7398d9..5f1245a8c 100644 --- a/application/views/logbookadvanced/dbtoolsdialog.php +++ b/application/views/logbookadvanced/dbtoolsdialog.php @@ -2,7 +2,7 @@
-
@@ -83,7 +83,7 @@

-

+