[DX Atlas Gridsquare Export] Added a model for the export
这个提交包含在:
父节点
2f0cf971c5
当前提交
d397e35d82
共有 2 个文件被更改,包括 51 次插入 和 2 次删除
|
|
@ -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\">";
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
正在加载…
在新工单中引用