-
-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Awards][Sigs] Creation of the Sig area within the Awards dropdown wi…
…th data grids and ADIF export Creation of the Sig area within the Awards dropdown that shows each unique SIG option in the database and the ability to see the references along with exporting them as ADIF.
- Loading branch information
Showing
6 changed files
with
191 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
class Sig extends CI_Model { | ||
|
||
function __construct() | ||
{ | ||
parent::__construct(); | ||
} | ||
|
||
function get_all($type) { | ||
$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_SIG_INFO", "ASC"); | ||
$this->db->where('COL_SIG =', $type); | ||
|
||
return $this->db->get($this->config->item('table_name')); | ||
} | ||
|
||
function get_all_sig_types() { | ||
$CI =& get_instance(); | ||
$CI->load->model('Stations'); | ||
$station_id = $CI->Stations->find_active(); | ||
|
||
$sql = "select col_sig, count(*) qsos, count(distinct col_sig_info) refs from " . $this->config->item('table_name') . | ||
" where col_sig <> ''" . | ||
" and station_id = " . $station_id . | ||
" group by col_sig"; | ||
|
||
$query = $this->db->query($sql); | ||
|
||
return $query->result(); | ||
} | ||
|
||
|
||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<div class="container"> | ||
<h2><?php echo $page_title; ?></h2> | ||
|
||
<?php if ($sig_types) { ?> | ||
<table style="width:100%" class="table-sm table tabledxcc table-bordered table-hover table-striped table-condensed text-center"> | ||
|
||
<tr> | ||
<td>Award Type</td> | ||
<td># QSOs</td> | ||
<td># Refs</td> | ||
</tr> | ||
|
||
<?php | ||
foreach ($sig_types as $row) { | ||
?> | ||
|
||
<tr> | ||
<td> | ||
<?php echo $row->col_sig; ?> | ||
</td> | ||
<td> | ||
<a href='sig_details?type="<?php echo $row->col_sig; ?>"'><?php echo $row->qsos; ?></a> | ||
</td> | ||
<td> | ||
<a href='sig_details?type="<?php echo $row->col_sig; ?>"'><?php echo $row->refs; ?></a> | ||
</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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<div class="container"> | ||
<h2><?php echo $page_title; ?></h2> | ||
|
||
<?php if ($sig_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 foreach ($sig_all->result() as $row) { ?> | ||
<tr> | ||
<td> | ||
<?php echo $row->COL_SIG_INFO; ?> | ||
</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 } ?> | ||
<p><a href="<?php echo site_url('/awards/sigexportadif/' . $type); ?>" title="Export QSOs to ADIF" target="_blank" class="btn btn-primary">Export QSOs to ADIF</a></p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters