mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
formatted code
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class Activators extends CI_Controller {
|
||||
class Activators 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'); }
|
||||
if (!$this->user_model->authorize(2)) {
|
||||
$this->session->set_flashdata('notice', 'You\'re not allowed to do that!');
|
||||
redirect('dashboard');
|
||||
}
|
||||
}
|
||||
|
||||
public function index()
|
||||
@@ -20,8 +24,7 @@ class Activators extends CI_Controller {
|
||||
|
||||
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
|
||||
$band = $this->input->post('band');
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$band = 'All';
|
||||
}
|
||||
|
||||
@@ -38,38 +41,44 @@ class Activators extends CI_Controller {
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
public function details() {
|
||||
public function details()
|
||||
{
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
$call = str_replace('"', "", $this->input->post("Callsign"));
|
||||
$band = str_replace('"', "", $this->input->post("Band"));
|
||||
$leogeo = str_replace('"', "", $this->input->post("LeoGeo"));
|
||||
$data['results'] = $this->logbook_model->activator_details($call, $band, $leogeo);
|
||||
$data['filter'] = "Call ".$call;
|
||||
switch($band) {
|
||||
case 'All': $data['page_title'] = "Log View All Bands";
|
||||
$data['filter'] .= " and Band All";
|
||||
break;
|
||||
case 'SAT': $data['page_title'] = "Log View SAT";
|
||||
$data['filter'] .= " and Band SAT";
|
||||
break;
|
||||
default: $data['page_title'] = "Log View Band";
|
||||
$data['filter'] .= " and Band ".$band;
|
||||
break;
|
||||
$data['filter'] = "Call " . $call;
|
||||
switch ($band) {
|
||||
case 'All':
|
||||
$data['page_title'] = "Log View All Bands";
|
||||
$data['filter'] .= " and Band All";
|
||||
break;
|
||||
case 'SAT':
|
||||
$data['page_title'] = "Log View SAT";
|
||||
$data['filter'] .= " and Band SAT";
|
||||
break;
|
||||
default:
|
||||
$data['page_title'] = "Log View Band";
|
||||
$data['filter'] .= " and Band " . $band;
|
||||
break;
|
||||
}
|
||||
if ($band == "SAT") {
|
||||
switch($leogeo) {
|
||||
case 'both': $data['filter'] .= " and GEO/LEO";
|
||||
break;
|
||||
case 'leo': $data['filter'] .= " and LEO";
|
||||
break;
|
||||
case 'geo': $data['filter'] .= " and GEO";
|
||||
break;
|
||||
switch ($leogeo) {
|
||||
case 'both':
|
||||
$data['filter'] .= " and GEO/LEO";
|
||||
break;
|
||||
case 'leo':
|
||||
$data['filter'] .= " and LEO";
|
||||
break;
|
||||
case 'geo':
|
||||
$data['filter'] .= " and GEO";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->load->view('activators/details', $data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user