diff --git a/application/controllers/Components.php b/application/controllers/Components.php index 942dcbc3..7fc0e27a 100644 --- a/application/controllers/Components.php +++ b/application/controllers/Components.php @@ -14,11 +14,13 @@ class Components extends CI_Controller { } public function index() { + $this->load->model('stations'); $url = 'https://oscarwatch.org/scripts/hamsat_json.php'; $json = file_get_contents($url); $data['rovedata'] = json_decode($json, true); + $data['gridsquare'] = strtoupper($this->stations->find_gridsquare()); // load view $this->load->view('components/hamsat/table', $data); } -} \ No newline at end of file +} diff --git a/application/views/components/hamsat/table.php b/application/views/components/hamsat/table.php index e218916f..0792824d 100644 --- a/application/views/components/hamsat/table.php +++ b/application/views/components/hamsat/table.php @@ -17,6 +17,7 @@