2020-10-18 00:00:01 +02:00
|
|
|
<?php
|
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
|
|
|
|
|
|
class Timeplotter extends CI_Controller {
|
|
|
|
|
|
|
|
|
|
function __construct()
|
|
|
|
|
{
|
|
|
|
|
parent::__construct();
|
|
|
|
|
|
2024-08-16 10:08:44 +02:00
|
|
|
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); }
|
2020-10-18 00:00:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function index()
|
|
|
|
|
{
|
|
|
|
|
// Render Page
|
2024-06-08 11:01:59 +02:00
|
|
|
$data['page_title'] = __("Timeplotter");
|
2020-10-18 00:00:01 +02:00
|
|
|
|
2021-11-13 15:55:17 +01:00
|
|
|
$this->load->model('bands');
|
2020-10-18 00:00:01 +02:00
|
|
|
|
2021-11-13 15:55:17 +01:00
|
|
|
$data['worked_bands'] = $this->bands->get_worked_bands();
|
2020-10-18 00:00:01 +02:00
|
|
|
|
|
|
|
|
$this->load->model('dxcc');
|
2026-03-25 12:41:18 +01:00
|
|
|
$data['dxcc_list'] = $this->dxcc->list_current('prefix');
|
2020-10-18 00:00:01 +02:00
|
|
|
|
2026-03-25 12:41:18 +01:00
|
|
|
$this->load->model('Timeplotter_model');
|
2020-10-18 00:00:01 +02:00
|
|
|
|
2026-03-25 12:41:18 +01:00
|
|
|
$data['modes'] = $this->Timeplotter_model->get_worked_modes();
|
2020-10-18 00:00:01 +02:00
|
|
|
|
|
|
|
|
$this->load->view('interface_assets/header', $data);
|
|
|
|
|
$this->load->view('timeplotter/index');
|
|
|
|
|
$this->load->view('interface_assets/footer');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getTimes() {
|
|
|
|
|
// POST data
|
|
|
|
|
$postData = $this->input->post();
|
|
|
|
|
|
|
|
|
|
//load model
|
|
|
|
|
$this->load->model('Timeplotter_model');
|
|
|
|
|
|
|
|
|
|
// get data
|
|
|
|
|
$data = $this->Timeplotter_model->getTimes($postData);
|
|
|
|
|
|
|
|
|
|
return json_encode($data);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-25 12:41:18 +01:00
|
|
|
}
|