PROP_MODE is set to SAT if QSO is a satellite one;

pull/106/merge
Peter Goodhall 2011-09-12 17:39:06 +01:00
rodzic 17d7834455
commit 2823e8ada1
4 zmienionych plików z 17 dodań i 7 usunięć

Wyświetl plik

@ -49,7 +49,7 @@ class Dashboard extends CI_Controller {
$this->load->model('logbook_model');
// TODO: Auth
$qsos = $this->logbook_model->get_this_weeks_qsos('');
$qsos = $this->logbook_model->get_todays_qsos('');
echo "{\"markers\": [";

Wyświetl plik

@ -13,6 +13,13 @@ class Logbook_model extends CI_Model {
// Join date+time
$datetime = date('Y-m-d') ." ". $this->input->post('start_time');
if($this->input->post('sat_name')) {
$prop_mode = "SAT";
} else {
$prop_mode = "";
}
// Create array with QSO Data
$data = array(
'COL_TIME_ON' => $datetime,
@ -37,6 +44,7 @@ class Logbook_model extends CI_Model {
'COL_QSL_SENT_VIA' => $this->input->post('qsl_sent_method'),
'COL_QSL_RCVD_VIA' => $this->input->post('qsl_recv_method'),
'COL_OPERATOR' => $this->session->userdata('user_callsign'),
'COL_PROP_MODE' => $prop_mode,
);
// Add QSO to database
@ -192,7 +200,7 @@ class Logbook_model extends CI_Model {
}
function get_this_weeks_qsos() {
$morning = date('Y/m/d',time()+(1 - date('w'))*24*3600);
$morning = date('Y/m/d',time()+(date('w'))*24*3600);
$night = date('Y/m/d',time()+( 7 - date('w'))*24*3600);
$query = $this->db->query('SELECT * FROM '.$this->config->item('table_name').' WHERE COL_TIME_ON between \''.$morning.'\' AND \''.$night.'\'');
@ -232,7 +240,7 @@ class Logbook_model extends CI_Model {
function total_ssb() {
$query = $this->db->query('SELECT COUNT( * ) as count FROM '.$this->config->item('table_name').' WHERE COL_MODE = \'SSB\' or COL_MODE = \'LSB\' or COL_MODE = \'USB\'');
$query = $this->db->query('SELECT COUNT( * ) as count FROM '.$this->config->item('table_name').' WHERE COL_MODE = \'SSB\' OR COL_MODE = \'LSB\' OR COL_MODE = \'USB\'');
if ($query->num_rows() > 0)
{
@ -275,7 +283,7 @@ class Logbook_model extends CI_Model {
}
function total_digi() {
$query = $this->db->query('SELECT COUNT( * ) as count FROM '.$this->config->item('table_name').' WHERE COL_MODE != \'SSB\' or COL_MODE != \'LSB\' or COL_MODE = \'USB\' or COL_MODE = \'CW\' or COL_MODE = \'FM\'');
$query = $this->db->query('SELECT COUNT( * ) as count FROM '.$this->config->item('table_name').' WHERE COL_MODE != \'SSB\' AND (COL_MODE != \'LSB\' or COL_MODE != \'USB\' or COL_MODE != \'CW\' or COL_MODE != \'FM\')');
if ($query->num_rows() > 0)
{

Wyświetl plik

@ -115,7 +115,7 @@
</table>
<h3>This Weeks QSOs</h3>
<h3>Todays QSOs</h3>
<div id="map" style="width: 420px; height: 300px"></div>
<noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b>
@ -184,7 +184,7 @@
// ================================================================
// === Fetch the JSON data file ====
GDownloadUrl("/logger/index.php/dashboard/todays_map", process_it);
GDownloadUrl("<?php echo site_url('/dashboard/todays_map'); ?>", process_it);
// ================================================================
}

Wyświetl plik

@ -282,6 +282,8 @@ $(document).ready(function(){
$.get('logbook/callsign_qra/' + $(this).val(), function(result) {
$('#locator').val(result);
});
$('#locator_info').load("logbook/bearing/" + $(this).val()).fadeIn("slow");
}
$.get('logbook/callsign_name/' + $(this).val(), function(result) {