Merge pull request #1599 from phl0/WWFFawards

Add WWFF Award infos
这个提交包含在:
Andreas Kristiansen 2022-09-10 15:47:36 +02:00 提交者 GitHub
当前提交 3c63a5e715
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有 4 个文件被更改,包括 85 次插入0 次删除

查看文件

@ -240,6 +240,23 @@ class Awards extends CI_Controller {
$this->load->view('interface_assets/footer');
}
/*
Handles showing worked WWFFs
Comment field - WWFF:#
*/
public function wwff() {
// Grab all worked wwff stations
$this->load->model('wwff');
$data['wwff_all'] = $this->wwff->get_all();
// Render page
$data['page_title'] = "Awards - WWFF";
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/wwff/index');
$this->load->view('interface_assets/footer');
}
public function cq() {
$CI =& get_instance();
$CI->load->model('logbooks_model');

22
application/models/Wwff.php 普通文件
查看文件

@ -0,0 +1,22 @@
<?php
class Wwff extends CI_Model {
function get_all() {
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
return null;
}
$this->db->where_in("station_id", $logbooks_locations_array);
$this->db->order_by("COL_WWFF_REF", "ASC");
$this->db->where('COL_WWFF_REF !=', '');
return $this->db->get($this->config->item('table_name'));
}
}
?>

查看文件

@ -0,0 +1,44 @@
<div class="container">
<h2><?php echo $page_title; ?></h2>
<?php
if ($wwff_all) {
?>
<table class="table table-sm table-striped table-hover">
<tr>
<td>Reference</td>
<td>Date/Time</td>
<td>Callsign</td>
<td>Band</td>
<td>RST Sent</td>
<td>RST Received</td>
</tr>
<?php
if ($wwff_all->num_rows() > 0) {
foreach ($wwff_all->result() as $row) {
?>
<tr>
<td>
<?php echo $row->COL_WWFF_REF; ?>
</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>
<?php } else {
echo '<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>Nothing found!</div>';
}?>
</div>

查看文件

@ -126,6 +126,8 @@
<a class="dropdown-item" href="<?php echo site_url('awards/vucc');?>">VUCC</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="<?php echo site_url('awards/was');?>">WAS</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="<?php echo site_url('awards/wwff');?>">WWFF</a>
</div>
</li>