[Awards][Wacral] Removes WACRAL view will be handled by SIG

This was legacy code when tracking WACRAL members use the SIG field and awards views system
pull/957/head
Peter Goodhall 2021-03-20 15:49:40 +00:00
rodzic 023766063e
commit cb922cfd02
4 zmienionych plików z 0 dodań i 91 usunięć

Wyświetl plik

@ -229,23 +229,6 @@ class Awards extends CI_Controller {
$this->load->view('interface_assets/footer'); $this->load->view('interface_assets/footer');
} }
/*
Handles showing worked WACRAL members (wacral.org)
Comment field - WACRAL:#
*/
public function wacral() {
// Grab all worked wacral members
$this->load->model('wacral');
$data['wacral_all'] = $this->wacral->get_all();
// Render page
$data['page_title'] = "Awards - WACRAL Members";
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/wacral/index');
$this->load->view('interface_assets/footer');
}
public function cq(){ public function cq(){
$this->load->model('cq'); $this->load->model('cq');
$zones = array(); $zones = array();

Wyświetl plik

@ -1,28 +0,0 @@
<?php
/*
Handles retrieving QSOs that have a Wacral (www.wacral.org) membership number stored in the comment field
eg WACRAL:1245
*/
class Wacral extends CI_Model {
function __construct()
{
parent::__construct();
}
function get_all() {
$CI =& get_instance();
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
$this->db->where("station_id", $station_id);
$this->db->order_by("COL_COMMENT", "ASC");
$this->db->like('COL_COMMENT', 'WACRAL:');
return $this->db->get($this->config->item('table_name'));
}
}
?>

Wyświetl plik

@ -5,7 +5,6 @@
<nav class="nav"> <nav class="nav">
<a class="nav-link" href="<?php echo site_url('awards/dxcc'); ?>">DXCC</a> <a class="nav-link" href="<?php echo site_url('awards/dxcc'); ?>">DXCC</a>
<a class="nav-link" href="<?php echo site_url('awards/wab'); ?>">WAB</a>
<a class="nav-link" href="<?php echo site_url('awards/sota'); ?>">SOTA</a> <a class="nav-link" href="<?php echo site_url('awards/sota'); ?>">SOTA</a>
<a class="nav-link" href="<?php echo site_url('awards/cq'); ?>">CQ</a> <a class="nav-link" href="<?php echo site_url('awards/cq'); ?>">CQ</a>
</nav> </nav>

Wyświetl plik

@ -1,45 +0,0 @@
<div id="container">
<h1><?php echo $page_title; ?></h1>
<?php if ($wacral_all->num_rows() > 0) { ?>
<table width="100%" class="zebra-striped">
<tr>
<td>Membership #</td>
<td>Date/Time</td>
<td>Callsign</td>
<td>Band</td>
<td>RST Sent</td>
<td>RST Received</td>
</tr>
<?php
foreach ($wacral_all->result() as $row) {
?>
<tr>
<td>
<?php
$pieces = explode(" ", $row->COL_COMMENT);
foreach($pieces as $val) {
if (strpos($val,'WACRAL:') !== false) {
//echo $val;
echo $rest = substr($val,7); // 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>
<?php } else { ?>
<p>You have lot logged any <a href="http://www.wacral.org" target="_blank">WACRAL</a></p>
<?php } ?>
</div>