Merge branch 'master' into IOTA_award_added
这个提交包含在:
当前提交
9250eb816d
共有 23 个文件被更改,包括 830 次插入 和 22 次删除
|
|
@ -152,6 +152,48 @@ class Awards extends CI_Controller {
|
|||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
public function vucc() {
|
||||
$this->load->model('vucc');
|
||||
$data['worked_bands'] = $this->vucc->get_worked_bands();
|
||||
|
||||
$data['vucc_array'] = $this->vucc->get_vucc_array($data);
|
||||
|
||||
// Render Page
|
||||
$data['page_title'] = "Awards - VUCC";
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('awards/vucc/index');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
public function vucc_band(){
|
||||
$this->load->model('vucc');
|
||||
$band = str_replace('"', "", $this->input->get("Band"));
|
||||
$data['vucc_array'] = $this->vucc->vucc_details($band);
|
||||
|
||||
// Render Page
|
||||
$data['page_title'] = "VUCC - band";
|
||||
$data['filter'] = "band ".$band;
|
||||
$data['band'] = $band;
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('awards/vucc/band');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
public function vucc_details(){
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
$gridsquare = str_replace('"', "", $this->input->get("Gridsquare"));
|
||||
$band = str_replace('"', "", $this->input->get("Band"));
|
||||
$data['results'] = $this->logbook_model->vucc_qso_details($gridsquare, $band);
|
||||
|
||||
// Render Page
|
||||
$data['page_title'] = "Log View - VUCC";
|
||||
$data['filter'] = "vucc " . $gridsquare . " and band ".$band;
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('awards/vucc/details');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
/*
|
||||
Handles Displaying of WAB Squares worked.
|
||||
Comment field - WAB:#
|
||||
|
|
|
|||
|
|
@ -261,5 +261,21 @@ class Gridsquares extends CI_Controller {
|
|||
$this->load->view('gridsquares/index.php');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
function search_band($band, $gridsquare){
|
||||
$this->load->model('gridsquares_model');
|
||||
header('Content-Type: application/json');
|
||||
$result = $this->gridsquares_model->search_band($band, $gridsquare);
|
||||
|
||||
echo $result;
|
||||
}
|
||||
|
||||
function search_sat($gridsquare){
|
||||
$this->load->model('gridsquares_model');
|
||||
header('Content-Type: application/json');
|
||||
$result = $this->gridsquares_model->search_sat($gridsquare);
|
||||
|
||||
echo $result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -71,6 +71,8 @@ class Logbook extends CI_Controller {
|
|||
"callsign_qra" => "",
|
||||
"callsign_qth" => "",
|
||||
"callsign_iota" => "",
|
||||
"callsign_state" => "",
|
||||
"callsign_us_county" => "",
|
||||
"qsl_manager" => "",
|
||||
"bearing" => "",
|
||||
"workedBefore" => false,
|
||||
|
|
@ -139,6 +141,9 @@ class Logbook extends CI_Controller {
|
|||
$return['callsign_qra'] = $callbook['gridsquare'];
|
||||
$return['callsign_qth'] = $callbook['city'];
|
||||
$return['callsign_iota'] = $callbook['iota'];
|
||||
$return['callsign_state'] = $callbook['state'];
|
||||
$return['callsign_us_county'] = $callbook['us_county'];
|
||||
|
||||
if(isset($callbook['qslmgr'])) {
|
||||
$return['qsl_manager'] = $callbook['qslmgr'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,8 +79,18 @@ class Hamqth {
|
|||
$data['lat'] = (string) $xml->search->latitude;
|
||||
$data['long'] = (string) $xml->search->longitude;
|
||||
$data['iota'] = (string) $xml->search->iota;
|
||||
$data['us_state'] = (string) $xml->search->us_state;
|
||||
$data['us_county'] = (string) $xml->search->us_county;
|
||||
$data['error'] = (string) $xml->session->error;
|
||||
|
||||
if($xml->search->country == "United States") {
|
||||
$data['state'] = (string) $xml->search->us_state;
|
||||
$data['us_county'] = (string) $xml->search->us_county;
|
||||
} else {
|
||||
$data['state'] = null;
|
||||
$data['us_county'] = null;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,15 @@ class Qrz {
|
|||
$data['long'] = (string) $xml->Callsign->lon;
|
||||
$data['iota'] = (string) $xml->Callsign->iota;
|
||||
$data['qslmgr'] = (string) $xml->Callsign->qslmgr;
|
||||
|
||||
if($xml->Callsign->country == "United States") {
|
||||
$data['state'] = (string) $xml->Callsign->state;
|
||||
$data['us_county'] = (string) $xml->Callsign->county;
|
||||
} else {
|
||||
$data['state'] = null;
|
||||
$data['us_county'] = null;
|
||||
}
|
||||
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_update_lotw_url extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$sql = "UPDATE config SET lotw_download_url = 'https://lotw.arrl.org/lotwuser/lotwreport.adi' WHERE id=1";
|
||||
$this->db->query($sql);
|
||||
|
||||
$sql = "UPDATE config SET lotw_upload_url = 'https://lotw.arrl.org/lotwuser/upload' WHERE id=1";
|
||||
$this->db->query($sql);
|
||||
|
||||
$sql = "UPDATE config SET lotw_login_url = 'https://lotw.arrl.org/lotwuser/default' WHERE id=1";
|
||||
$this->db->query($sql);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -14,6 +14,7 @@ class Distances_model extends CI_Model
|
|||
$CI =& get_instance();
|
||||
$CI->load->model('Stations');
|
||||
$station_id = $CI->Stations->find_active();
|
||||
|
||||
$station_gridsquare = $CI->Stations->find_gridsquare();
|
||||
$gridsquare = explode(',', $station_gridsquare); // We need to convert to an array, since a user can enter several gridsquares
|
||||
|
||||
|
|
@ -26,7 +27,7 @@ class Distances_model extends CI_Model
|
|||
else {
|
||||
$this->db->where('col_band', $postdata['band']);
|
||||
}
|
||||
|
||||
$this->db->where('station_id', $station_id);
|
||||
$dataarrayata = $this->db->get($this->config->item('table_name'));
|
||||
$this->plot($dataarrayata->result_array(), $gridsquare);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ class DXCC extends CI_Model {
|
|||
if ($postdata['worked'] != NULL) {
|
||||
$workedDXCC = $this->getDxccBandWorked($station_id, $band, $postdata);
|
||||
foreach ($workedDXCC as $wdxcc) {
|
||||
$dxccMatrix[$wdxcc->dxcc][$band] = '<div class="alert-danger"><a href=\'dxcc_details?Country="'.$wdxcc->name.'"&Band="'. $band . '"\'>W</a></div>';;
|
||||
$dxccMatrix[$wdxcc->dxcc][$band] = '<div class="alert-danger"><a href=\'dxcc_details?Country="'.str_replace("&", "%26", $wdxcc->name).'"&Band="'. $band . '"\'>W</a></div>';;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -199,7 +199,7 @@ class DXCC extends CI_Model {
|
|||
if ($postdata['confirmed'] != NULL) {
|
||||
$confirmedDXCC = $this->getDxccBandConfirmed($station_id, $band, $postdata);
|
||||
foreach ($confirmedDXCC as $cdxcc) {
|
||||
$dxccMatrix[$cdxcc->dxcc][$band] = '<div class="alert-success"><a href=\'dxcc_details?Country="'.$cdxcc->name.'"&Band="'. $band . '"\'>C</a></div>';;
|
||||
$dxccMatrix[$cdxcc->dxcc][$band] = '<div class="alert-success"><a href=\'dxcc_details?Country="'.str_replace("&", "%26", $cdxcc->name).'"&Band="'. $band . '"\'>C</a></div>';;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,4 +76,32 @@ class Gridsquares_model extends CI_Model {
|
|||
AND (COL_LOTW_QSL_RCVD = "Y" OR COL_QSL_RCVD = "Y")
|
||||
');
|
||||
}
|
||||
|
||||
function search_band($band, $gridsquare) {
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('Stations');
|
||||
$station_id = $CI->Stations->find_active();
|
||||
|
||||
$result = $this->db->query('SELECT COL_CALL, COL_TIME_ON, COL_BAND, COL_MODE FROM '.$this->config->item('table_name').' WHERE station_id = "'.$station_id.'" AND COL_GRIDSQUARE LIKE "%'.$gridsquare.'%" AND COL_BAND = "'.$band.'"
|
||||
AND COL_PROP_MODE != "SAT"
|
||||
AND COL_PROP_MODE != "INTERNET"
|
||||
AND COL_PROP_MODE != "ECH"
|
||||
AND COL_PROP_MODE != "RPT"
|
||||
AND COL_SAT_NAME = ""
|
||||
');
|
||||
|
||||
//print_r($result);
|
||||
return json_encode($result->result());
|
||||
}
|
||||
|
||||
function search_sat($gridsquare) {
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('Stations');
|
||||
$station_id = $CI->Stations->find_active();
|
||||
|
||||
$result = $this->db->query('SELECT COL_CALL, COL_TIME_ON, COL_BAND, COL_MODE, COL_SAT_NAME FROM '.$this->config->item('table_name').' WHERE station_id = "'.$station_id.'" AND COL_GRIDSQUARE LIKE "%'.$gridsquare.'%" AND COL_PROP_MODE = "SAT"');
|
||||
|
||||
//print_r($result);
|
||||
return json_encode($result->result());
|
||||
}
|
||||
}
|
||||
|
|
@ -106,6 +106,7 @@ class Logbook_model extends CI_Model {
|
|||
'COL_LON' => null,
|
||||
'COL_DXCC' => $dxcc_id,
|
||||
'COL_CQZ' => $cqz,
|
||||
'COL_STATE' => trim($this->input->post('usa_state')),
|
||||
'COL_SOTA_REF' => trim($this->input->post('sota_ref')),
|
||||
'COL_DARC_DOK' => trim($this->input->post('darc_dok')),
|
||||
);
|
||||
|
|
@ -206,6 +207,36 @@ class Logbook_model extends CI_Model {
|
|||
|
||||
return $this->db->get($this->config->item('table_name'));
|
||||
}
|
||||
|
||||
public function vucc_qso_details($gridsquare, $band) {
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('Stations');
|
||||
$station_id = $CI->Stations->find_active();
|
||||
$sql = "select * from " . $this->config->item('table_name') . " where station_id =" . $station_id . " and col_gridsquare like '" . $gridsquare. "%'";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
$sql .= " and col_prop_mode ='" . $band . "'";
|
||||
} else {
|
||||
$sql .= " and col_prop_mode !='SAT'";
|
||||
$sql .= " and col_band ='" . $band . "'";
|
||||
}
|
||||
}
|
||||
|
||||
$sql .= " union ";
|
||||
$sql .= "select * from " . $this->config->item('table_name') . " where station_id =" . $station_id . " and col_vucc_grids like '%" . $gridsquare. "%'";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
$sql .= " and col_prop_mode ='" . $band . "'";
|
||||
} else {
|
||||
$sql .= " and col_prop_mode !='SAT'";
|
||||
$sql .= " and col_band ='" . $band . "'";
|
||||
}
|
||||
}
|
||||
|
||||
return $this->db->query($sql);
|
||||
}
|
||||
|
||||
public function cq_qso_details($cqzone){
|
||||
$CI =& get_instance();
|
||||
|
|
@ -298,6 +329,7 @@ class Logbook_model extends CI_Model {
|
|||
'COL_QSL_VIA' => $this->input->post('qsl_via_callsign'),
|
||||
'station_id' => $this->input->post('station_profile'),
|
||||
'COL_OPERATOR' => $this->input->post('operator_callsign'),
|
||||
'COL_STATE' =>$this->input->post('usa_state')
|
||||
);
|
||||
|
||||
$this->db->where('COL_PRIMARY_KEY', $this->input->post('id'));
|
||||
|
|
|
|||
303
application/models/Vucc.php
普通文件
303
application/models/Vucc.php
普通文件
|
|
@ -0,0 +1,303 @@
|
|||
<?php
|
||||
|
||||
class VUCC extends CI_Model
|
||||
{
|
||||
|
||||
public $bandslots = array("160m" => 0,
|
||||
"80m" => 0,
|
||||
"60m" => 0,
|
||||
"40m" => 0,
|
||||
"30m" => 0,
|
||||
"20m" => 0,
|
||||
"17m" => 0,
|
||||
"15m" => 0,
|
||||
"12m" => 0,
|
||||
"10m" => 0,
|
||||
"6m" => 0,
|
||||
"4m" => 0,
|
||||
"2m" => 0,
|
||||
"70cm" => 0,
|
||||
"23cm" => 0,
|
||||
"13cm" => 0,
|
||||
"9cm" => 0,
|
||||
"6cm" => 0,
|
||||
"3cm" => 0,
|
||||
"1.25cm" => 0,
|
||||
"SAT" => 0,
|
||||
);
|
||||
|
||||
function __construct()
|
||||
{
|
||||
// Call the Model constructor
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function get_worked_bands()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('Stations');
|
||||
$station_id = $CI->Stations->find_active();
|
||||
|
||||
// get all worked slots from database
|
||||
$data = $this->db->query(
|
||||
"SELECT distinct LOWER(`COL_BAND`) as `COL_BAND` FROM `" . $this->config->item('table_name') . "` WHERE station_id = " . $station_id . " AND COL_PROP_MODE != \"SAT\""
|
||||
);
|
||||
$worked_slots = array();
|
||||
foreach ($data->result() as $row) {
|
||||
array_push($worked_slots, $row->COL_BAND);
|
||||
}
|
||||
|
||||
$SAT_data = $this->db->query(
|
||||
"SELECT distinct LOWER(`COL_PROP_MODE`) as `COL_PROP_MODE` FROM `" . $this->config->item('table_name') . "` WHERE station_id = " . $station_id . " AND COL_PROP_MODE = \"SAT\""
|
||||
);
|
||||
|
||||
foreach ($SAT_data->result() as $row) {
|
||||
array_push($worked_slots, strtoupper($row->COL_PROP_MODE));
|
||||
}
|
||||
|
||||
// bring worked-slots in order of defined $bandslots
|
||||
$results = array();
|
||||
foreach (array_keys($this->bandslots) as $slot) {
|
||||
if (in_array($slot, $worked_slots)) {
|
||||
array_push($results, $slot);
|
||||
}
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
/*
|
||||
* Fetches worked and confirmed gridsquare on each band and total
|
||||
*/
|
||||
function get_vucc_array($data) {
|
||||
$vuccArray = $this->fetchVucc($data);
|
||||
|
||||
if (isset($vuccArray)) {
|
||||
return $vuccArray;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Builds the array to display worked/confirmed vucc on awward page
|
||||
*/
|
||||
function fetchVucc($data) {
|
||||
$totalGridConfirmed = array();
|
||||
$totalGridWorked = array();
|
||||
|
||||
foreach($data['worked_bands'] as $band) {
|
||||
|
||||
// Getting all the worked grids
|
||||
$col_gridsquare_worked = $this->get_vucc_summary($band, 'none');
|
||||
|
||||
$workedGridArray = array();
|
||||
foreach ($col_gridsquare_worked as $workedgrid) {
|
||||
array_push($workedGridArray, $workedgrid['gridsquare']);
|
||||
if(!in_array($workedgrid['gridsquare'], $totalGridWorked)){
|
||||
array_push($totalGridWorked, $workedgrid['gridsquare']);
|
||||
}
|
||||
}
|
||||
|
||||
$col_vucc_grids_worked = $this->get_vucc_summary_col_vucc($band, 'none');
|
||||
|
||||
foreach ($col_vucc_grids_worked as $gridSplit) {
|
||||
$grids = explode(",", $gridSplit['col_vucc_grids']);
|
||||
foreach($grids as $key) {
|
||||
$grid_four = strtoupper(substr(trim($key),0,4));
|
||||
|
||||
if(!in_array($grid_four, $workedGridArray)){
|
||||
array_push($workedGridArray, $grid_four);
|
||||
}
|
||||
|
||||
if(!in_array($grid_four, $totalGridWorked)){
|
||||
array_push($totalGridWorked, $grid_four);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Getting all the confirmed grids
|
||||
$col_gridsquare_confirmed = $this->get_vucc_summary($band, 'both');
|
||||
|
||||
$confirmedGridArray = array();
|
||||
foreach ($col_gridsquare_confirmed as $confirmedgrid) {
|
||||
array_push($confirmedGridArray, $confirmedgrid['gridsquare']);
|
||||
if(!in_array($confirmedgrid['gridsquare'], $totalGridConfirmed)){
|
||||
array_push($totalGridConfirmed, $confirmedgrid['gridsquare']);
|
||||
}
|
||||
}
|
||||
|
||||
$col_vucc_grids_confirmed = $this->get_vucc_summary_col_vucc($band, 'both');
|
||||
|
||||
foreach ($col_vucc_grids_confirmed as $gridSplit) {
|
||||
$grids = explode(",", $gridSplit['col_vucc_grids']);
|
||||
foreach($grids as $key) {
|
||||
$grid_four = strtoupper(substr(trim($key),0,4));
|
||||
|
||||
if(!in_array($grid_four, $confirmedGridArray)){
|
||||
array_push($confirmedGridArray, $grid_four);
|
||||
}
|
||||
|
||||
if(!in_array($grid_four, $totalGridConfirmed)){
|
||||
array_push($totalGridConfirmed, $grid_four);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$vuccArray[$band]['worked'] = count($workedGridArray);
|
||||
$vuccArray[$band]['confirmed'] = count($confirmedGridArray);
|
||||
}
|
||||
|
||||
$vuccArray['All']['worked'] = count($totalGridWorked);
|
||||
$vuccArray['All']['confirmed'] = count($totalGridConfirmed);
|
||||
|
||||
return $vuccArray;
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets the grid from col_vucc_grids
|
||||
* $band = the band chosen
|
||||
* $confirmationMethod - qsl, lotw or both, use anything else to skip confirmed
|
||||
*/
|
||||
function get_vucc_summary_col_vucc($band, $confirmationMethod) {
|
||||
$station_id = $this->get_station_id();
|
||||
|
||||
$sql = "select col_vucc_grids
|
||||
from " . $this->config->item('table_name') .
|
||||
" where station_id =" . $station_id .
|
||||
" and (LENGTH(col_vucc_grids) > 0) ";
|
||||
|
||||
if ($confirmationMethod == 'both') {
|
||||
$sql .= " and (col_qsl_rcvd='Y' or col_lotw_qsl_rcvd='Y')";
|
||||
}
|
||||
else if ($confirmationMethod == 'qsl') {
|
||||
$sql .= " and col_qsl_rcvd='Y'";
|
||||
}
|
||||
else if ($confirmationMethod == 'lotw') {
|
||||
$sql .= " and col_lotw_qsl_rcvd='Y'";
|
||||
}
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
$sql .= " and col_prop_mode ='" . $band . "'";
|
||||
} else {
|
||||
$sql .= " and col_prop_mode !='SAT'";
|
||||
$sql .= " and col_band ='" . $band . "'";
|
||||
}
|
||||
}
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets the grid from col_gridsquare
|
||||
* $band = the band chosen
|
||||
* $confirmationMethod - qsl, lotw or both, use anything else to skip confirmed
|
||||
*/
|
||||
function get_vucc_summary($band, $confirmationMethod) {
|
||||
$station_id = $this->get_station_id();
|
||||
$sql = "select distinct upper(substring(col_gridsquare, 1, 4)) gridsquare
|
||||
from " . $this->config->item('table_name') .
|
||||
" where station_id =" . $station_id .
|
||||
" and (LENGTH(col_gridsquare) > 0)";
|
||||
|
||||
if ($confirmationMethod == 'both') {
|
||||
$sql .= " and (col_qsl_rcvd='Y' or col_lotw_qsl_rcvd='Y')";
|
||||
}
|
||||
else if ($confirmationMethod == 'qsl') {
|
||||
$sql .= " and col_qsl_rcvd='Y'";
|
||||
}
|
||||
else if ($confirmationMethod == 'lotw') {
|
||||
$sql .= " and col_lotw_qsl_rcvd='Y'";
|
||||
}
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
$sql .= " and col_prop_mode ='" . $band . "'";
|
||||
} else {
|
||||
$sql .= " and col_prop_mode !='SAT'";
|
||||
$sql .= " and col_band ='" . $band . "'";
|
||||
}
|
||||
}
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
/*
|
||||
* Makes a list of all gridsquares on chosen band with info about lotw and qsl
|
||||
*/
|
||||
function vucc_details($band) {
|
||||
$col_gridsquare_worked = $this->get_vucc_summary($band, 'none');
|
||||
|
||||
$workedGridArray = array();
|
||||
foreach ($col_gridsquare_worked as $workedgrid) {
|
||||
array_push($workedGridArray, $workedgrid['gridsquare']);
|
||||
}
|
||||
|
||||
$col_vucc_grids_worked = $this->get_vucc_summary_col_vucc($band, 'none');
|
||||
|
||||
foreach ($col_vucc_grids_worked as $gridSplit) {
|
||||
$grids = explode(",", $gridSplit['col_vucc_grids']);
|
||||
foreach($grids as $key) {
|
||||
$grid_four = strtoupper(substr(trim($key),0,4));
|
||||
|
||||
if(!in_array($grid_four, $workedGridArray)){
|
||||
array_push($workedGridArray, $grid_four);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($workedGridArray as $grid) {
|
||||
$vuccBand[$grid]['qsl'] = '';
|
||||
$vuccBand[$grid]['lotw'] = '';
|
||||
}
|
||||
|
||||
$vuccDataQsl = $this->get_vucc_summary($band, 'qsl');
|
||||
|
||||
foreach ($vuccDataQsl as $grid) {
|
||||
$vuccBand[$grid['gridsquare']]['qsl'] = 'Y';
|
||||
}
|
||||
|
||||
$vuccDataLotw = $this->get_vucc_summary($band, 'lotw');
|
||||
|
||||
foreach ($vuccDataLotw as $grid) {
|
||||
$vuccBand[$grid['gridsquare']]['lotw'] = 'Y';
|
||||
}
|
||||
|
||||
$col_vucc_grids_confirmed_qsl = $this->get_vucc_summary_col_vucc($band, 'lotw');
|
||||
|
||||
foreach ($col_vucc_grids_confirmed_qsl as $gridSplit) {
|
||||
$grids = explode(",", $gridSplit['col_vucc_grids']);
|
||||
foreach($grids as $key) {
|
||||
$grid_four = strtoupper(substr(trim($key),0,4));
|
||||
$vuccBand[$grid_four]['lotw'] = 'Y';
|
||||
}
|
||||
}
|
||||
|
||||
$col_vucc_grids_confirmed_lotw = $this->get_vucc_summary_col_vucc($band, 'qsl');
|
||||
|
||||
foreach ($col_vucc_grids_confirmed_lotw as $gridSplit) {
|
||||
$grids = explode(",", $gridSplit['col_vucc_grids']);
|
||||
foreach($grids as $key) {
|
||||
$grid_four = strtoupper(substr(trim($key),0,4));
|
||||
$vuccBand[$grid_four]['qsl'] = 'Y';
|
||||
}
|
||||
}
|
||||
|
||||
if (count($vuccBand) == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
ksort($vuccBand);
|
||||
return $vuccBand;
|
||||
}
|
||||
}
|
||||
|
||||
function get_station_id() {
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('Stations');
|
||||
return $CI->Stations->find_active();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,10 +1,33 @@
|
|||
<ul class="nav nav-underline">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('awards/dxcc'); ?>">DXCC</a>
|
||||
</li>
|
||||
|
||||
<nav class="nav">
|
||||
<a class="nav-link" href="<?php echo site_url('awards/dxcc'); ?>">DXCC</a>
|
||||
<a class="nav-link" href="<?php echo site_url('awards/wab'); ?>">WAB</a>
|
||||
<a class="nav-link" href="<?php echo site_url('awards/was'); ?>">WAS</a>
|
||||
<a class="nav-link" href="<?php echo site_url('awards/sota'); ?>">SOTA</a>
|
||||
<a class="nav-link" href="<?php echo site_url('awards/cq'); ?>">CQ</a>
|
||||
<a class="nav-link" href="<?php echo site_url('awards/dok'); ?>">DOK</a>
|
||||
<a class="nav-link" href="<?php echo site_url('awards/iota'); ?>">IOTA</a>
|
||||
</nav>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('awards/vucc'); ?>">VUCC</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('awards/was'); ?>">WAS</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('awards/cq'); ?>">CQ</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('awards/iota'); ?>">iota</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('awards/wab'); ?>">WAB</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('awards/sota'); ?>">SOTA</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('awards/dok'); ?>">DOK</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<div class="container">
|
||||
<h1><?php echo $page_title; ?></h1>
|
||||
|
||||
<h3>Filtering on <?php echo $filter ?></h3>
|
||||
<?php
|
||||
$i = 1;
|
||||
if ($vucc_array) {
|
||||
echo '<table class="table table-bordered table-hover table-striped table-condensed text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>#</td>
|
||||
<td>Gridsquare</td>
|
||||
<td>QSL</td>
|
||||
<td>LoTW</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
foreach ($vucc_array as $vucc => $value) { // Fills the table with the data
|
||||
echo '<tr>
|
||||
<td>'. $i++ .'</td>
|
||||
<td><a href=\'vucc_details?Gridsquare="'. $vucc .'"&Band="'. $band . '"\'>'. $vucc .'</td>
|
||||
<td>'. $value['qsl'] . '</td>
|
||||
<td>'. $value['lotw'] .'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '</tfoot></table></div>';
|
||||
|
||||
}
|
||||
else {
|
||||
echo '<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>Nothing found!</div>';
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<div class="container">
|
||||
|
||||
<h2>Logbook</h2>
|
||||
|
||||
<h3>Filtering on <?php echo $filter ?></h3>
|
||||
|
||||
<?php $this->load->view('view_log/partial/log') ?>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<div class="container">
|
||||
<h1><?php echo $page_title; ?></h1>
|
||||
|
||||
<!-- Sub Nav for Awards -->
|
||||
|
||||
<?php $this->load->view("awards/nav_bar")?>
|
||||
<table class="table table-bordered table-hover table-striped table-condensed text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Band</td>
|
||||
<td>Grids worked</td>
|
||||
<td>Grids confirmed</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($vucc_array as $band => $vucc) {
|
||||
echo '<tr>';
|
||||
echo '<td><a href=\'vucc_band?Band="'. $band . '"\'>'. $band .'</td>';
|
||||
echo '<td>' . $vucc['worked'] . '</td>';
|
||||
echo '<td>' . $vucc['confirmed'] . '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -35,4 +35,34 @@
|
|||
[This grid square map is publically viewable for sharing]
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">QSOs in Square: <span id="square_number"></span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table id="grid_results" class="table table-sm">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th scope="col">Date/Time</th>
|
||||
<th scope="col">Callsign</th>
|
||||
<th scope="col">Mode</th>
|
||||
<th scope="col">Band</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -357,12 +357,12 @@ $(document).on('keypress',function(e) {
|
|||
$("#locator").removeClass("newGrid");
|
||||
$("#callsign").removeClass("workedGrid");
|
||||
$("#callsign").removeClass("newGrid");
|
||||
$('#callsign_info').removeClass("badge-secondary");
|
||||
$('#callsign_info').removeClass("badge-success");
|
||||
$('#callsign_info').removeClass("badge-danger");
|
||||
|
||||
$('#callsign_info').removeClass("badge-secondary");
|
||||
$('#callsign_info').removeClass("badge-success");
|
||||
$('#callsign_info').removeClass("badge-danger");
|
||||
$('#qsl_via').val("");
|
||||
$('#callsign_info').text("");
|
||||
$('#input_usa_state').val("");
|
||||
|
||||
mymap.setView([51.505, -0.09], 13);
|
||||
mymap.removeLayer(markers);
|
||||
|
|
@ -564,7 +564,7 @@ $(document).on('keypress',function(e) {
|
|||
$('#qsl_via').val(result.qsl_manager);
|
||||
}
|
||||
|
||||
/* Find Operators Name */
|
||||
/* Find Operators Name */
|
||||
if($('#name').val() == "") {
|
||||
$('#name').val(result.callsign_name);
|
||||
}
|
||||
|
|
@ -573,6 +573,14 @@ $(document).on('keypress',function(e) {
|
|||
$('#qth').val(result.callsign_qth);
|
||||
}
|
||||
|
||||
/*
|
||||
* Update state with returned value
|
||||
*/
|
||||
if($("#input_usa_state").val() == "") {
|
||||
$("#input_usa_state").val(result.callsign_state).trigger('change');
|
||||
}
|
||||
|
||||
|
||||
if($('#iota_ref').val() == "") {
|
||||
$('#iota_ref').val(result.callsign_iota);
|
||||
}
|
||||
|
|
@ -595,9 +603,10 @@ $(document).on('keypress',function(e) {
|
|||
$("#locator").removeClass("newGrid");
|
||||
$("#callsign").removeClass("workedGrid");
|
||||
$("#callsign").removeClass("newGrid");
|
||||
$('#callsign_info').removeClass("badge-secondary");
|
||||
$('#callsign_info').removeClass("badge-success");
|
||||
$('#callsign_info').removeClass("badge-danger");
|
||||
$('#callsign_info').removeClass("badge-secondary");
|
||||
$('#callsign_info').removeClass("badge-success");
|
||||
$('#callsign_info').removeClass("badge-danger");
|
||||
$('#input_usa_state').val("");
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -870,6 +879,49 @@ $(document).ready(function(){
|
|||
|
||||
var maidenhead = L.maidenhead().addTo(map);
|
||||
|
||||
map.on('click', onMapClick);
|
||||
|
||||
function onMapClick(event) {
|
||||
var LatLng = event.latlng;
|
||||
var lat = LatLng.lat;
|
||||
var lng = LatLng.lng;
|
||||
var locator = LatLng2Loc(lat,lng, 10);
|
||||
var loc_4char = locator.substring(0, 4);
|
||||
console.log(loc_4char);
|
||||
console.log(map.getZoom());
|
||||
|
||||
if(map.getZoom() > 5) {
|
||||
var search_type = "<?php echo $this->uri->segment(2); ?>";
|
||||
if(search_type == "satellites") {
|
||||
console.log("satellites search");
|
||||
var search_tags = "search_sat/" + loc_4char;
|
||||
} else {
|
||||
var band = "<?php echo $this->uri->segment(3); ?>";
|
||||
console.log(band);
|
||||
var search_tags = "search_band/" + band + "/" + loc_4char;
|
||||
}
|
||||
|
||||
$.getJSON( "<?php echo site_url('gridsquares/');?>" + search_tags, function( data ) {
|
||||
var items = [];
|
||||
$.each( data, function( i, item ) {
|
||||
console.log(item.COL_CALL + item.COL_SAT_NAME);
|
||||
if(item.COL_SAT_NAME != undefined) {
|
||||
items.push( "<tr><td>" + item.COL_TIME_ON + "</td><td>" + item.COL_CALL + "</td><td>" + item.COL_MODE + "</td><td>" + item.COL_SAT_NAME + "</td></tr>" );
|
||||
} else {
|
||||
items.push( "<tr><td>" + item.COL_TIME_ON + "</td><td>" + item.COL_CALL + "</td><td>" + item.COL_MODE + "</td><td>" + item.COL_BAND + "</td></tr>" );
|
||||
}
|
||||
});
|
||||
|
||||
$("#grid_results tbody").empty();
|
||||
$("#grid_results tbody").append(items.join( "" ));
|
||||
|
||||
});
|
||||
|
||||
$('#square_number').text(loc_4char);
|
||||
$('#exampleModal').modal('show');
|
||||
}
|
||||
};
|
||||
|
||||
<?php if ($this->uri->segment(1) == "gridsquares" && $this->uri->segment(2) == "band") { ?>
|
||||
|
||||
var bands_available = <?php echo $bands_available; ?>;
|
||||
|
|
|
|||
|
|
@ -155,6 +155,11 @@
|
|||
|
||||
<!-- Awards Panel Contents -->
|
||||
<div class="tab-pane fade" id="nav-awards" role="tabpanel" aria-labelledby="nav-awards-tab">
|
||||
<div class="form-group">
|
||||
<label for="usa_state">USA State</label>
|
||||
<input type="text" class="form-control" id="usa_state" name="usa_state" value="<?php echo $COL_STATE; ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iota_ref">IOTA</label>
|
||||
<input type="text" class="form-control" id="iota_ref" name="iota_ref" value="<?php echo $COL_IOTA; ?>">
|
||||
|
|
|
|||
|
|
@ -215,6 +215,64 @@
|
|||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="usa_state">USA State</label>
|
||||
<select class="custom-select" id="input_usa_state" name="usa_state">
|
||||
<option value=""></option>
|
||||
<option value="AL">Alabama (AL)</option>
|
||||
<option value="AK">Alaska (AK)</option>
|
||||
<option value="AZ">Arizona (AZ)</option>
|
||||
<option value="AR">Arkansas (AR)</option>
|
||||
<option value="CA">California (CA)</option>
|
||||
<option value="CO">Colorado (CO)</option>
|
||||
<option value="CT">Connecticut (CT)</option>
|
||||
<option value="DE">Delaware (DE)</option>
|
||||
<option value="DC">District Of Columbia (DC)</option>
|
||||
<option value="FL">Florida (FL)</option>
|
||||
<option value="GA">Georgia (GA)</option>
|
||||
<option value="HI">Hawaii (HI)</option>
|
||||
<option value="ID">Idaho (ID)</option>
|
||||
<option value="IL">Illinois (IL)</option>
|
||||
<option value="IN">Indiana (IN)</option>
|
||||
<option value="IA">Iowa (IA)</option>
|
||||
<option value="KS">Kansas (KS)</option>
|
||||
<option value="KY">Kentucky (KY)</option>
|
||||
<option value="LA">Louisiana (LA)</option>
|
||||
<option value="ME">Maine (ME)</option>
|
||||
<option value="MD">Maryland (MD)</option>
|
||||
<option value="MA">Massachusetts (MA)</option>
|
||||
<option value="MI">Michigan (MI)</option>
|
||||
<option value="MN">Minnesota (MN)</option>
|
||||
<option value="MS">Mississippi (MS)</option>
|
||||
<option value="MO">Missouri (MO)</option>
|
||||
<option value="MT">Montana (MT)</option>
|
||||
<option value="NE">Nebraska (NE)</option>
|
||||
<option value="NV">Nevada (NV)</option>
|
||||
<option value="NH">New Hampshire (NH)</option>
|
||||
<option value="NJ">New Jersey (NJ)</option>
|
||||
<option value="NM">New Mexico (NM)</option>
|
||||
<option value="NY">New York (NY)</option>
|
||||
<option value="NC">North Carolina (NC)</option>
|
||||
<option value="ND">North Dakota (ND)</option>
|
||||
<option value="OH">Ohio (OH)</option>
|
||||
<option value="OK">Oklahoma (OK)</option>
|
||||
<option value="OR">Oregon (OR)</option>
|
||||
<option value="PA">Pennsylvania (PA)</option>
|
||||
<option value="RI">Rhode Island (RI)</option>
|
||||
<option value="SC">South Carolina (SC)</option>
|
||||
<option value="SD">South Dakota (SD)</option>
|
||||
<option value="TN">Tennessee (TN)</option>
|
||||
<option value="TX">Texas (TX)</option>
|
||||
<option value="UT">Utah (UT)</option>
|
||||
<option value="VT">Vermont (VT)</option>
|
||||
<option value="VA">Virginia (VA)</option>
|
||||
<option value="WA">Washington (WA)</option>
|
||||
<option value="WV">West Virginia (WV)</option>
|
||||
<option value="WI">Wisconsin (WI)</option>
|
||||
<option value="WY">Wyoming (WY)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iota_ref">IOTA Reference</label>
|
||||
<input class="form-control" id="iota_ref" type="text" name="iota_ref" value="" /> e.g: EU-005
|
||||
|
|
|
|||
|
|
@ -73,6 +73,13 @@
|
|||
<td><?php echo $row->COL_VUCC_GRIDS; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($row->COL_STATE != null) { ?>
|
||||
<tr>
|
||||
<td>USA State:</td>
|
||||
<td><?php echo $row->COL_STATE; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if($row->COL_NAME != null) { ?>
|
||||
|
|
|
|||
|
|
@ -55,4 +55,36 @@ function frequencyToBand(frequency) {
|
|||
else if(result >= 10125000000 && result <= 10525000000) {
|
||||
return '3cm';
|
||||
}
|
||||
}
|
||||
|
||||
function LatLng2Loc(y, x, num) {
|
||||
if (x<-180) {x=x+360;}
|
||||
if (x>180) {x=x-360;}
|
||||
var yqth, yi, yk, ydiv, yres, ylp, y;
|
||||
var ycalc = new Array(0,0,0);
|
||||
var yn = new Array(0,0,0,0,0,0,0);
|
||||
|
||||
var ydiv_arr=new Array(10, 1, 1/24, 1/240, 1/240/24);
|
||||
ycalc[0] = (x + 180)/2;
|
||||
ycalc[1] = y + 90;
|
||||
|
||||
for (yi = 0; yi < 2; yi++) {
|
||||
for (yk = 0; yk < 5; yk++) {
|
||||
ydiv = ydiv_arr[yk];
|
||||
yres = ycalc[yi] / ydiv;
|
||||
ycalc[yi] = yres;
|
||||
if (ycalc[yi] > 0) ylp = Math.floor(yres); else ylp = Math.ceil(yres);
|
||||
ycalc[yi] = (ycalc[yi] - ylp) * ydiv;
|
||||
yn[2*yk + yi] = ylp;
|
||||
}
|
||||
}
|
||||
|
||||
var qthloc="";
|
||||
if (num >= 2) qthloc+=String.fromCharCode(yn[0] + 0x41) + String.fromCharCode(yn[1] + 0x41);
|
||||
if (num >= 4) qthloc+=String.fromCharCode(yn[2] + 0x30) + String.fromCharCode(yn[3] + 0x30);
|
||||
if (num >= 6) qthloc+=String.fromCharCode(yn[4] + 0x41) + String.fromCharCode(yn[5] + 0x41);
|
||||
if (num >= 8) qthloc+=' ' + String.fromCharCode(yn[6] + 0x30) + String.fromCharCode(yn[7] + 0x30);
|
||||
if (num >= 10) qthloc+=String.fromCharCode(yn[8] + 0x61) + String.fromCharCode(yn[9] + 0x61);
|
||||
return qthloc;
|
||||
|
||||
}
|
||||
68
assets/json/satellite_data.json
普通文件
68
assets/json/satellite_data.json
普通文件
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"QO-100": {
|
||||
"Modes": ["S/X"]
|
||||
},
|
||||
"AO-7": {
|
||||
"Modes": ["U/V", "V/A"]
|
||||
},
|
||||
"AO-73": {
|
||||
"Modes": ["U/V"]
|
||||
},
|
||||
"FO-29": {
|
||||
"Modes": ["V/U"]
|
||||
},
|
||||
"XW-2A": {
|
||||
"Modes": ["U/V"]
|
||||
},
|
||||
"XW-2B": {
|
||||
"Modes": ["U/V"]
|
||||
},
|
||||
"XW-2C": {
|
||||
"Modes": ["U/V"]
|
||||
},
|
||||
"XW-2D": {
|
||||
"Modes": ["U/V"]
|
||||
},
|
||||
"XW-2E": {
|
||||
"Modes": ["U/V"]
|
||||
},
|
||||
"CAS-4A": {
|
||||
"Modes": ["U/V"]
|
||||
},
|
||||
"CAS-4B": {
|
||||
"Modes": ["U/V"]
|
||||
},
|
||||
"EO-88": {
|
||||
"Modes": ["U/V"]
|
||||
},
|
||||
"FO-99": {
|
||||
"Modes": ["V/U"]
|
||||
},
|
||||
"AO-91": {
|
||||
"Modes": ["U/V"]
|
||||
},
|
||||
"AO-92": {
|
||||
"Modes": ["U/V", "L/V"]
|
||||
},
|
||||
"SO-50": {
|
||||
"Modes": ["V/U"]
|
||||
},
|
||||
"Lilacsat-1": {
|
||||
"Modes": ["V/U"]
|
||||
},
|
||||
"PO-101": {
|
||||
"Modes": ["U/v"]
|
||||
},
|
||||
"AISAT-1": {
|
||||
"Modes": ["V"]
|
||||
},
|
||||
"NO-84": {
|
||||
"Modes": ["A/U", "V"]
|
||||
},
|
||||
"NO-104": {
|
||||
"Modes": ["A/U", "V"]
|
||||
},
|
||||
"ARISS": {
|
||||
"Modes": ["V"]
|
||||
}
|
||||
}
|
||||
|
|
@ -57,7 +57,7 @@ CREATE TABLE `config` (
|
|||
-- ----------------------------
|
||||
-- Records of config
|
||||
-- ----------------------------
|
||||
INSERT INTO `config` VALUES ('1', 'https://p1k.arrl.org/lotwuser/lotwreport.adi', 'https://p1k.arrl.org/lotwuser/upload', 'Y', 'https://p1k.arrl.org/lotwuser/default', 'http://www.eqsl.cc/qslcard/DownloadInBox.cfm', 'Y');
|
||||
INSERT INTO `config` VALUES ('1', 'https://lotw.arrl.org/lotwuser/lotwreport.adi', 'https://lotw.arrl.org/lotwuser/upload', 'Y', 'https://lotw.arrl.org/lotwuser/default', 'http://www.eqsl.cc/qslcard/DownloadInBox.cfm', 'Y');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for migrations
|
||||
|
|
@ -476,4 +476,4 @@ ALTER TABLE `dxcc_exceptions`
|
|||
-- Indexes for table `dxcc_prefixes`
|
||||
--
|
||||
ALTER TABLE `dxcc_prefixes`
|
||||
ADD PRIMARY KEY (`record`);
|
||||
ADD PRIMARY KEY (`record`);
|
||||
|
|
|
|||
正在加载…
在新工单中引用