Add QRV Menu item, Add hamsat rover check table page
这个提交包含在:
父节点
b687d9759d
当前提交
ad76f58624
共有 6 个文件被更改,包括 386 次插入 和 247 次删除
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
Controller to interact with the Clublog API
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Components extends CI_Controller {
|
||||||
|
|
||||||
|
function __construct() {
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
$this->load->model('user_model');
|
||||||
|
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index() {
|
||||||
|
$url = 'https://oscarwatch.org/scripts/hamsat_json.php';
|
||||||
|
$json = file_get_contents($url);
|
||||||
|
$data['rovedata'] = json_decode($json, true);
|
||||||
|
|
||||||
|
// load view
|
||||||
|
$this->load->view('components/hamsat/table', $data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
Controller to interact with the Clublog API
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Hamsat extends CI_Controller {
|
||||||
|
|
||||||
|
function __construct() {
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
$this->load->model('user_model');
|
||||||
|
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index() {
|
||||||
|
// Load public view
|
||||||
|
$data['page_title'] = "Hamsat - Satellite Roving";
|
||||||
|
$this->load->view('interface_assets/header', $data);
|
||||||
|
$this->load->view('/hamsat/index');
|
||||||
|
$this->load->view('interface_assets/footer');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
<div class="table-responsive">
|
||||||
|
|
||||||
|
<h2>Hamsat - Satellite Rovers</h2>
|
||||||
|
<p>This data is from <a target="_blank" href="https://hams.at/">https://hams.at/</a></p>
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Date / Time</th>
|
||||||
|
<th>Callsign</th>
|
||||||
|
<th>Satellite</th>
|
||||||
|
<th>Gridsquare</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($rovedata as $rove) : ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// Get Date format
|
||||||
|
if ($this->session->userdata('user_date_format')) {
|
||||||
|
// If Logged in and session exists
|
||||||
|
$custom_date_format = $this->session->userdata('user_date_format');
|
||||||
|
} else {
|
||||||
|
// Get Default date format from /config/cloudlog.php
|
||||||
|
$custom_date_format = $this->config->item('qso_date_format');
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php $timestamp = strtotime($rove['date']);
|
||||||
|
echo date($custom_date_format, $timestamp); ?>
|
||||||
|
|
||||||
|
- <?php echo $rove['start_time']; ?> - <?php echo $rove['end_time']; ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td><span data-toggle="tooltip" title="<?php echo $rove['comment']; ?>"><?php echo $rove['callsign']; ?></span></td>
|
||||||
|
<td><span data-toggle="tooltip" title="<?php echo $rove['frequency']; ?> - <?php echo $rove['mode']; ?>"><?= $rove['satellite'] ?></span></td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// Load the logbook model and call check_if_grid_worked_in_logbook
|
||||||
|
$CI = &get_instance();
|
||||||
|
$CI->load->model('logbook_model');
|
||||||
|
$worked = $CI->logbook_model->check_if_grid_worked_in_logbook($rove['gridsquare'], null, "SAT");
|
||||||
|
if ($worked != 0) {
|
||||||
|
echo " <span data-toggle=\"tooltip\" title=\"Worked\" class=\"badge badge-success\">" . $rove['gridsquare'] . "</span>";
|
||||||
|
} else {
|
||||||
|
echo " <span data-toggle=\"tooltip\" title=\"Not Worked\" class=\"badge badge-danger\">" . $rove['gridsquare'] . "</span>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
<div class="container">
|
||||||
|
<div id="hamsat_display" hx-get="<?php echo site_url('components'); ?>" hx-trigger="load, every 60s"></div>
|
||||||
|
</div>
|
||||||
|
|
@ -32,6 +32,12 @@
|
||||||
|
|
||||||
<script src="https://unpkg.com/htmx.org@1.6.1"></script>
|
<script src="https://unpkg.com/htmx.org@1.6.1"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Reinitialize tooltips after new content has been loaded
|
||||||
|
document.addEventListener('htmx:afterSwap', function(event) {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<?php if ($this->uri->segment(1) == "awards" && ($this->uri->segment(2) == "was") ) { ?>
|
<?php if ($this->uri->segment(1) == "awards" && ($this->uri->segment(2) == "was") ) { ?>
|
||||||
<script>
|
<script>
|
||||||
function load_was_map() {
|
function load_was_map() {
|
||||||
|
|
@ -712,6 +718,7 @@ function showActivatorsMap(call, count, grids) {
|
||||||
<?php if ($this->uri->segment(1) == "" || $this->uri->segment(1) == "dashboard" ) { ?>
|
<?php if ($this->uri->segment(1) == "" || $this->uri->segment(1) == "dashboard" ) { ?>
|
||||||
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js"></script>
|
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js"></script>
|
||||||
<script id="leafembed" type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"></script>
|
<script id="leafembed" type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
$('[data-toggle="tooltip"]').tooltip()
|
$('[data-toggle="tooltip"]').tooltip()
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<!-- Required meta tags -->
|
<!-- Required meta tags -->
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
@ -41,12 +42,17 @@
|
||||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/datepicker.css" />
|
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/datepicker.css" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if (file_exists(APPPATH.'../assets/css/custom.css')) { echo '<link rel="stylesheet" href="'.base_url().'assets/css/custom.css">'; } ?>
|
<?php if (file_exists(APPPATH . '../assets/css/custom.css')) {
|
||||||
|
echo '<link rel="stylesheet" href="' . base_url() . 'assets/css/custom.css">';
|
||||||
|
} ?>
|
||||||
|
|
||||||
<link rel="icon" href="<?php echo base_url(); ?>favicon.ico">
|
<link rel="icon" href="<?php echo base_url(); ?>favicon.ico">
|
||||||
|
|
||||||
<title><?php if(isset($page_title)) { echo $page_title; } ?> - Cloudlog</title>
|
<title><?php if (isset($page_title)) {
|
||||||
|
echo $page_title;
|
||||||
|
} ?> - Cloudlog</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<nav class="navbar navbar-expand-lg navbar-light bg-light main-nav">
|
<nav class="navbar navbar-expand-lg navbar-light bg-light main-nav">
|
||||||
|
|
@ -91,6 +97,19 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">QRV</a>
|
||||||
|
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||||
|
<a class="dropdown-item" href="<?php echo site_url('hamsat'); ?>" title="Hams.at"><i class="fas fa-list"></i> Hams.at</a>
|
||||||
|
<?php if ($this->optionslib->get_option('dxcache_url') != '') { ?>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item" href="<?php echo site_url('bandmap/list'); ?>" title="Bandmap"><i class="fa fa-id-card"></i> <?php echo lang('menu_bandmap'); ?></a>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Notes -->
|
<!-- Notes -->
|
||||||
<?php if ($this->session->userdata('user_show_notes') == 1) { ?>
|
<?php if ($this->session->userdata('user_show_notes') == 1) { ?>
|
||||||
<a class="nav-link" href="<?php echo site_url('notes'); ?>"><?php echo lang('menu_notes'); ?></a>
|
<a class="nav-link" href="<?php echo site_url('notes'); ?>"><?php echo lang('menu_notes'); ?></a>
|
||||||
|
|
@ -256,7 +275,9 @@ if ($logbooks_locations_array) {
|
||||||
|
|
||||||
$oqrs_requests = $CI->oqrs_model->oqrs_requests($location_list);
|
$oqrs_requests = $CI->oqrs_model->oqrs_requests($location_list);
|
||||||
?>
|
?>
|
||||||
<a class="dropdown-item" href="<?php echo site_url('oqrs/requests');?>" title="OQRS Requests"><i class="fa fa-id-card"></i> <?php echo lang('menu_oqrs_requests'); ?> <?php if ($oqrs_requests > 0) { echo "<span class=\"badge badge-light\">".$oqrs_requests."</span>"; } ?></a>
|
<a class="dropdown-item" href="<?php echo site_url('oqrs/requests'); ?>" title="OQRS Requests"><i class="fa fa-id-card"></i> <?php echo lang('menu_oqrs_requests'); ?> <?php if ($oqrs_requests > 0) {
|
||||||
|
echo "<span class=\"badge badge-light\">" . $oqrs_requests . "</span>";
|
||||||
|
} ?></a>
|
||||||
|
|
||||||
<a class="dropdown-item" href="<?php echo site_url('qslprint'); ?>" title="Print Requested QSLs"><i class="fas fa-print"></i> <?php echo lang('menu_print_requested_qsls'); ?></a>
|
<a class="dropdown-item" href="<?php echo site_url('qslprint'); ?>" title="Print Requested QSLs"><i class="fas fa-print"></i> <?php echo lang('menu_print_requested_qsls'); ?></a>
|
||||||
|
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用