Add WWFF Award infos

pull/1599/head
phl0 2022-09-10 15:04:05 +02:00
rodzic 8b52a8cca9
commit c61bddc67d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
4 zmienionych plików z 85 dodań i 0 usunięć

Wyświetl plik

@ -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');

Wyświetl plik

@ -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'));
}
}
?>

Wyświetl plik

@ -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>

Wyświetl plik

@ -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>