Started SOTA tracking comments field - SOTA:# then awards/sota
这个提交包含在:
父节点
ee2eb20fef
当前提交
2a03c6af15
共有 3 个文件被更改,包括 85 次插入 和 0 次删除
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Handles Displaying of information for awards.
|
Handles Displaying of information for awards.
|
||||||
|
|
||||||
|
These are taken from comments fields or ADIF fields
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Awards extends CI_Controller {
|
class Awards extends CI_Controller {
|
||||||
|
|
@ -13,15 +15,36 @@ class Awards extends CI_Controller {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Handles Displaying of WAB Squares worked.
|
Handles Displaying of WAB Squares worked.
|
||||||
|
Comment field - WAB:#
|
||||||
*/
|
*/
|
||||||
public function wab() {
|
public function wab() {
|
||||||
|
|
||||||
|
// Grab all worked WABs
|
||||||
$this->load->model('wab');
|
$this->load->model('wab');
|
||||||
$data['wab_all'] = $this->wab->get_all();
|
$data['wab_all'] = $this->wab->get_all();
|
||||||
|
|
||||||
|
// Render Page
|
||||||
$data['page_title'] = "Awards - WAB";
|
$data['page_title'] = "Awards - WAB";
|
||||||
$this->load->view('layout/header', $data);
|
$this->load->view('layout/header', $data);
|
||||||
$this->load->view('awards/wab/index');
|
$this->load->view('awards/wab/index');
|
||||||
$this->load->view('layout/footer');
|
$this->load->view('layout/footer');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Handles showing worked SOTAs
|
||||||
|
Comment field - SOTA:#
|
||||||
|
*/
|
||||||
|
public function sota() {
|
||||||
|
|
||||||
|
// Grab all worked sota stations
|
||||||
|
$this->load->model('sota');
|
||||||
|
$data['sota_all'] = $this->sota->get_all();
|
||||||
|
|
||||||
|
// Render page
|
||||||
|
$data['page_title'] = "Awards - SOTA";
|
||||||
|
$this->load->view('layout/header', $data);
|
||||||
|
$this->load->view('awards/sota/index');
|
||||||
|
$this->load->view('layout/footer');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
18
application/models/sota.php
普通文件
18
application/models/sota.php
普通文件
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class Sota extends CI_Model {
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_all() {
|
||||||
|
$this->db->order_by("COL_COMMENT", "ASC");
|
||||||
|
$this->db->like('COL_COMMENT', 'SOTA:');
|
||||||
|
|
||||||
|
return $this->db->get($this->config->item('table_name'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<div id="container">
|
||||||
|
<h1><?php echo $page_title; ?></h1>
|
||||||
|
|
||||||
|
<table width="100%" class="zebra-striped">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>Reference</td>
|
||||||
|
<td>Date/Time</td>
|
||||||
|
<td>Callsign</td>
|
||||||
|
<td>Band</td>
|
||||||
|
<td>RST Sent</td>
|
||||||
|
<td>RST Recvd</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($sota_all->num_rows() > 0) {
|
||||||
|
foreach ($sota_all->result() as $row) {
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
$pieces = explode(" ", $row->COL_COMMENT);
|
||||||
|
foreach($pieces as $val) {
|
||||||
|
if (strpos($val,'SOTA:') !== false) {
|
||||||
|
//echo $val;
|
||||||
|
echo $rest = substr($val, 5); // returns "cde"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); ?> - <?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
||||||
|
<td><?php echo $row->COL_CALL; ?></td>
|
||||||
|
<td><?php echo $row->COL_BAND; ?></td>
|
||||||
|
<td><?php echo $row->COL_RST_SENT; ?></td>
|
||||||
|
<td><?php echo $row->COL_RST_RCVD; ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
正在加载…
在新工单中引用