kopia lustrzana https://github.com/magicbug/Cloudlog
Add WWFF Award infos
rodzic
8b52a8cca9
commit
c61bddc67d
|
@ -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');
|
||||
|
|
|
@ -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">×</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>
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue