fixed bugs

这个提交包含在:
Peter Goodhall 2023-05-28 15:21:13 +01:00
父节点 a51edb4873
当前提交 8aa45acc04
共有 2 个文件被更改,包括 14 次插入30 次删除

查看文件

@ -14,6 +14,9 @@ class Visitor extends CI_Controller {
elseif($method == "map") { elseif($method == "map") {
$this->map($method); $this->map($method);
} }
elseif($method == "radio_display_component") {
$this->radio_display_component($method);
}
elseif($method == "satellites") { elseif($method == "satellites") {
$this->satellites($method); $this->satellites($method);
} }
@ -74,6 +77,8 @@ class Visitor extends CI_Controller {
$this->load->model('cat'); $this->load->model('cat');
$data['radio_status'] = $this->cat->recent_status();
// Store info // Store info
$data['todays_qsos'] = $this->logbook_model->todays_qsos($logbooks_locations_array); $data['todays_qsos'] = $this->logbook_model->todays_qsos($logbooks_locations_array);
$data['total_qsos'] = $this->logbook_model->total_qsos($logbooks_locations_array); $data['total_qsos'] = $this->logbook_model->total_qsos($logbooks_locations_array);
@ -124,6 +129,13 @@ class Visitor extends CI_Controller {
} }
} }
public function radio_display_component() {
$this->load->model('cat');
$data['radio_status'] = $this->cat->recent_status();
$this->load->view('components/radio_display_table', $data);
}
public function map() { public function map() {
$this->load->model('logbook_model'); $this->load->model('logbook_model');
@ -440,11 +452,4 @@ class Visitor extends CI_Controller {
return false; return false;
} }
} }
public function radio_display_component() {
$this->load->model('cat');
$data['radio_status'] = $this->cat->recent_status();
$this->load->view('components/radio_display_table', $data);
}
} }

查看文件

@ -116,29 +116,8 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
<div class="col-sm-4"> <div class="col-sm-4">
<div class="table-responsive"> <div class="table-responsive">
<?php if($radio_status->num_rows()) { ?> <div id="radio_display" hx-get="<?php echo site_url('visitor/radio_display_component'); ?>" hx-trigger="load, every 5s"></div>
<table class="table table-striped">
<tr class="titles">
<td colspan="2"><i class="fas fa-broadcast-tower"></i> Radio Status</td>
</tr>
<?php foreach ($radio_status->result_array() as $row) { ?>
<tr>
<td><?php echo $row['radio']; ?></td>
<td>
<?php if($row['radio'] == "SatPC32" || $row['radio'] == "CloudLogCATQt") { ?>
<?php echo $row['sat_name']; ?>
<?php } else { ?>
<?php echo $this->frequency->hz_to_mhz($row['frequency']); ?> (<?php echo $row['mode']; ?>)
<?php } ?>
</td>
</tr>
<?php } ?>
</table>
<?php } ?>
<table class="table table-striped"> <table class="table table-striped">
<tr class="titles"> <tr class="titles">