mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-23 10:08:38 +00:00
[QRB Link] Fixed correct home locator. Now uses the one logged.
This commit is contained in:
parent
33130201f6
commit
7a7b1996d4
@ -1008,7 +1008,8 @@ class Logbook_model extends CI_Model {
|
||||
|
||||
if ($logbooks_locations_array) {
|
||||
//$this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_STX_STRING, COL_SRX_STRING, COL_IOTA, COL_STATE, COL_GRIDSQUARE');
|
||||
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||
$this->db->where_in($this->config->item('table_name').'.station_id', $logbooks_locations_array);
|
||||
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
|
||||
$this->db->order_by("COL_TIME_ON", "desc");
|
||||
$this->db->limit($num);
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
|
@ -22,18 +22,18 @@ function echo_table_col($row, $name) {
|
||||
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY))) . '</td>'; break;
|
||||
case 'IOTA': echo '<td>' . ($row->COL_IOTA) . '</td>'; break;
|
||||
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF) . '</td>'; break;
|
||||
case 'Grid': echo '<td>'; echoQrbCalcLink($row->COL_VUCC_GRIDS, $row->COL_GRIDSQUARE); echo '</td>'; break;
|
||||
case 'Grid': echo '<td>'; echoQrbCalcLink($row->station_gridsquare, $row->COL_VUCC_GRIDS, $row->COL_GRIDSQUARE); echo '</td>'; break;
|
||||
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); } echo '</td>'; break;
|
||||
case 'State': echo '<td>' . ($row->COL_STATE) . '</td>'; break;
|
||||
case 'Operator': echo '<td>' . ($row->COL_OPERATOR) . '</td>'; break;
|
||||
}
|
||||
}
|
||||
|
||||
function echoQrbCalcLink($grid, $vucc) {
|
||||
function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
||||
if (strlen($grid) != 0) {
|
||||
echo $grid . ' <a href="javascript:spawnQrbCalculator(\'' . $grid . '\')"><i class="fas fa-globe"></i></a>';
|
||||
echo $grid . ' <a href="javascript:spawnQrbCalculator(\'' . $mygrid . '\',\'' . $grid . '\')"><i class="fas fa-globe"></i></a>';
|
||||
} else if (strlen($vucc) != 0) {
|
||||
echo $vucc .' <a href="javascript:spawnQrbCalculator(\'' . $vucc . '\')"><i class="fas fa-globe"></i></a>';
|
||||
echo $vucc .' <a href="javascript:spawnQrbCalculator(\'' . $mygrid . '\',\'' . $vucc . '\')"><i class="fas fa-globe"></i></a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -430,7 +430,7 @@ document.onkeyup = function(e) {
|
||||
}
|
||||
};
|
||||
|
||||
function spawnQrbCalculator(locator2) {
|
||||
function spawnQrbCalculator(locator1, locator2) {
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/qrbcalc',
|
||||
type: 'post',
|
||||
@ -442,6 +442,9 @@ function spawnQrbCalculator(locator2) {
|
||||
nl2br: false,
|
||||
message: html,
|
||||
onshown: function(dialog) {
|
||||
if (locator1 !== undefined) {
|
||||
$("#qrbcalc_locator1").val(locator1);
|
||||
}
|
||||
if (locator2 !== undefined) {
|
||||
$("#qrbcalc_locator2").val(locator2);
|
||||
calculateQrb();
|
||||
|
@ -23,18 +23,18 @@ function echo_table_col($row, $name) {
|
||||
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY))) . '</td>'; break;
|
||||
case 'IOTA': echo '<td>' . ($row->COL_IOTA) . '</td>'; break;
|
||||
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF) . '</td>'; break;
|
||||
case 'Grid': echo '<td>'; echoQrbCalcLink($row->COL_VUCC_GRIDS, $row->COL_GRIDSQUARE); echo '</td>'; break;
|
||||
case 'Grid': echo '<td>'; echoQrbCalcLink($row->station_gridsquare, $row->COL_VUCC_GRIDS, $row->COL_GRIDSQUARE); echo '</td>'; break;
|
||||
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); } echo '</td>'; break;
|
||||
case 'State': echo '<td>' . ($row->COL_STATE) . '</td>'; break;
|
||||
case 'Operator':echo '<td>' . ($row->COL_OPERATOR) . '</td>'; break;
|
||||
}
|
||||
}
|
||||
|
||||
function echoQrbCalcLink($grid, $vucc) {
|
||||
function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
||||
if (strlen($grid) != 0) {
|
||||
echo $grid . ' <a href="javascript:spawnQrbCalculator(\'' . $grid . '\')"><i class="fas fa-globe"></i></a>';
|
||||
echo $grid . ' <a href="javascript:spawnQrbCalculator(\'' . $mygrid . '\',\'' . $grid . '\')"><i class="fas fa-globe"></i></a>';
|
||||
} else if (strlen($vucc) != 0) {
|
||||
echo $vucc .' <a href="javascript:spawnQrbCalculator(\'' . $vucc . '\')"><i class="fas fa-globe"></i></a>';
|
||||
echo $vucc .' <a href="javascript:spawnQrbCalculator(\'' . $mygrid . '\',\'' . $vucc . '\')"><i class="fas fa-globe"></i></a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -97,7 +97,7 @@
|
||||
<?php if($row->COL_GRIDSQUARE != null) { ?>
|
||||
<tr>
|
||||
<td>Gridsquare:</td>
|
||||
<td><?php echo $row->COL_GRIDSQUARE; ?> <a href="javascript:spawnQrbCalculator('<?php echo $row->COL_GRIDSQUARE; ?>')"><i class="fas fa-globe"></i></a></td>
|
||||
<td><?php echo $row->COL_GRIDSQUARE; ?> <a href="javascript:spawnQrbCalculator('<?php echo $row->station_gridsquare . '\',\'' . $row->COL_GRIDSQUARE; ?>')"><i class="fas fa-globe"></i></a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
<?php if($row->COL_VUCC_GRIDS != null) { ?>
|
||||
<tr>
|
||||
<td>Gridsquare (Multi):</td>
|
||||
<td><?php echo $row->COL_VUCC_GRIDS; ?> <a href="javascript:spawnQrbCalculator('<?php echo $row->COL_VUCC_GRIDS; ?>')"><i class="fas fa-globe"></i></a></td>
|
||||
<td><?php echo $row->COL_VUCC_GRIDS; ?> <a href="javascript:spawnQrbCalculator('<?php echo $row->station_gridsquare . '\',\'' . $row->COL_VUCC_GRIDS; ?>')"><i class="fas fa-globe"></i></a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user