mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-23 01:59:14 +00:00
[DX Atlas Gridsquare Export] Added a model for the export
This commit is contained in:
parent
2f0cf971c5
commit
d397e35d82
@ -30,7 +30,7 @@ class Dxatlas extends CI_Controller {
|
||||
$this->load->helper('file');
|
||||
|
||||
// Load Database connections
|
||||
$this->load->model('logbook_model');
|
||||
$this->load->model('dxatlas_model');
|
||||
|
||||
// Parameters
|
||||
$band = $this->input->post('band');
|
||||
@ -42,7 +42,7 @@ class Dxatlas extends CI_Controller {
|
||||
$todate = $this->input->post('todate');
|
||||
|
||||
// Get QSOs with Valid QRAs
|
||||
$qsos = $this->logbook_model->kml_get_all_qsos($band, $mode, $dxcc, $cqz, $propagation, $fromdate, $todate);
|
||||
$qsos = $this->dxatlas_model->get_gridsquares($band, $mode, $dxcc, $cqz, $propagation, $fromdate, $todate);
|
||||
|
||||
$output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
|
||||
$output .= "<kml xmlns=\"http://www.opengis.net/kml/2.2\">";
|
||||
|
49
application/models/Dxatlas_model.php
Normal file
49
application/models/Dxatlas_model.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
class Dxatlas_model extends CI_Model
|
||||
{
|
||||
|
||||
public $bandslots = array("160m" => 0,
|
||||
"80m" => 0,
|
||||
"60m" => 0,
|
||||
"40m" => 0,
|
||||
"30m" => 0,
|
||||
"20m" => 0,
|
||||
"17m" => 0,
|
||||
"15m" => 0,
|
||||
"12m" => 0,
|
||||
"10m" => 0,
|
||||
"6m" => 0,
|
||||
"4m" => 0,
|
||||
"2m" => 0,
|
||||
"70cm" => 0,
|
||||
"23cm" => 0,
|
||||
"13cm" => 0,
|
||||
"9cm" => 0,
|
||||
"6cm" => 0,
|
||||
"3cm" => 0,
|
||||
"1.25cm" => 0,
|
||||
"SAT" => 0,
|
||||
);
|
||||
|
||||
function __construct()
|
||||
{
|
||||
// Call the Model constructor
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/*
|
||||
* Fetches worked and confirmed gridsquare on each band and total
|
||||
*/
|
||||
function get_gridsquares($data) {
|
||||
$gridArray = $this->fetchGrids($band, $mode, $dxcc, $cqz, $propagation, $fromdate, $todate);
|
||||
|
||||
if (isset($gridArray)) {
|
||||
return $gridArray;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue
Block a user