Cloudlog/application/controllers/Bandmap.php

76 wiersze
2.6 KiB
PHP
Czysty Zwykły widok Historia

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Bandmap 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'); }
2023-07-21 09:16:19 +00:00
$this->load->model('bands');
}
function index() {
2023-07-21 11:27:13 +00:00
$this->load->model('cat');
$this->load->model('bands');
$data['radios'] = $this->cat->radios();
$data['bands'] = $this->bands->get_user_bands_for_qso_entry();
$footerData = [];
$footerData['scripts'] = [
2023-07-26 13:38:50 +00:00
'assets/js/highcharts/highcharts.js',
'assets/js/highcharts/timeline.js',
'assets/js/highcharts/exporting.js',
'assets/js/highcharts/accessibility.js',
'assets/js/sections/bandmap.js',
];
2023-07-23 11:59:37 +00:00
$data['page_title'] = "DXCluster";
$this->load->view('interface_assets/header', $data);
$this->load->view('bandmap/index');
$this->load->view('interface_assets/footer', $footerData);
}
2023-07-22 16:23:10 +00:00
function list() {
$this->load->model('cat');
$this->load->model('bands');
$data['radios'] = $this->cat->radios();
$data['bands'] = $this->bands->get_user_bands_for_qso_entry();
$footerData = [];
2023-07-22 16:23:10 +00:00
$footerData['scripts'] = [
'assets/js/moment.min.js',
2023-07-23 08:55:45 +00:00
'assets/js/datetime-moment.js',
'assets/js/sections/bandmap_list.js'
2023-07-22 16:23:10 +00:00
];
$CI =& get_instance();
// Get Date format
if($CI->session->userdata('user_date_format')) {
// If Logged in and session exists
$pageData['custom_date_format'] = $CI->session->userdata('user_date_format');
} else {
// Get Default date format from /config/cloudlog.php
$pageData['custom_date_format'] = $CI->config->item('qso_date_format');
}
switch ($pageData['custom_date_format']) {
case "d/m/y": $pageData['custom_date_format'] = 'DD/MM/YY'; break;
case "d/m/Y": $pageData['custom_date_format'] = 'DD/MM/YYYY'; break;
case "m/d/y": $pageData['custom_date_format'] = 'MM/DD/YY'; break;
case "m/d/Y": $pageData['custom_date_format'] = 'MM/DD/YYYY'; break;
case "d.m.Y": $pageData['custom_date_format'] = 'DD.MM.YYYY'; break;
case "y/m/d": $pageData['custom_date_format'] = 'YY/MM/DD'; break;
case "Y-m-d": $pageData['custom_date_format'] = 'YYYY-MM-DD'; break;
case "M d, Y": $pageData['custom_date_format'] = 'MMM DD, YYYY'; break;
case "M d, y": $pageData['custom_date_format'] = 'MMM DD, YY'; break;
default: $pageData['custom_date_format'] = 'DD/MM/YYYY';
}
2023-07-22 16:23:10 +00:00
$data['page_title'] = "DXCluster";
$this->load->view('interface_assets/header', $data);
$this->load->view('bandmap/list',$pageData);
2023-07-22 16:23:10 +00:00
$this->load->view('interface_assets/footer', $footerData);
}
}