Went through logbook and logbook model changing things to logbook linked profiles
这个提交包含在:
父节点
f765a1c169
当前提交
5f10c52323
共有 2 个文件被更改,包括 18 次插入 和 18 次删除
|
|
@ -266,8 +266,8 @@ class Logbook extends CI_Controller {
|
||||||
];
|
];
|
||||||
|
|
||||||
$CI =& get_instance();
|
$CI =& get_instance();
|
||||||
$CI->load->model('Stations');
|
$CI->load->model('logbooks_model');
|
||||||
$station_id = $CI->Stations->find_active();
|
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||||
|
|
||||||
if($type == "SAT") {
|
if($type == "SAT") {
|
||||||
$this->db->where('COL_PROP_MODE', 'SAT');
|
$this->db->where('COL_PROP_MODE', 'SAT');
|
||||||
|
|
@ -278,7 +278,7 @@ class Logbook extends CI_Controller {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->where('station_id', $station_id);
|
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||||
|
|
||||||
$this->db->like('SUBSTRING(COL_GRIDSQUARE, 1, 4)', substr($gridsquare, 0, 4));
|
$this->db->like('SUBSTRING(COL_GRIDSQUARE, 1, 4)', substr($gridsquare, 0, 4));
|
||||||
$query = $this->db->get($this->config->item('table_name'), 1, 0);
|
$query = $this->db->get($this->config->item('table_name'), 1, 0);
|
||||||
|
|
@ -300,8 +300,8 @@ class Logbook extends CI_Controller {
|
||||||
];
|
];
|
||||||
|
|
||||||
$CI =& get_instance();
|
$CI =& get_instance();
|
||||||
$CI->load->model('Stations');
|
$CI->load->model('logbooks_model');
|
||||||
$station_id = $CI->Stations->find_active();
|
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||||
|
|
||||||
if($type == "SAT") {
|
if($type == "SAT") {
|
||||||
$this->db->where('COL_PROP_MODE', 'SAT');
|
$this->db->where('COL_PROP_MODE', 'SAT');
|
||||||
|
|
@ -312,7 +312,7 @@ class Logbook extends CI_Controller {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->where('station_id', $station_id);
|
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||||
$this->db->where('COL_COUNTRY', urldecode($country));
|
$this->db->where('COL_COUNTRY', urldecode($country));
|
||||||
|
|
||||||
$query = $this->db->get($this->config->item('table_name'), 1, 0);
|
$query = $this->db->get($this->config->item('table_name'), 1, 0);
|
||||||
|
|
@ -337,8 +337,8 @@ class Logbook extends CI_Controller {
|
||||||
];
|
];
|
||||||
|
|
||||||
$CI =& get_instance();
|
$CI =& get_instance();
|
||||||
$CI->load->model('Stations');
|
$CI->load->model('logbooks_model');
|
||||||
$station_id = $CI->Stations->find_active();
|
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||||
|
|
||||||
if($type == "SAT") {
|
if($type == "SAT") {
|
||||||
$this->db->where('COL_PROP_MODE', 'SAT');
|
$this->db->where('COL_PROP_MODE', 'SAT');
|
||||||
|
|
@ -349,7 +349,7 @@ class Logbook extends CI_Controller {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->where('station_id', $station_id);
|
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||||
$this->db->where('COL_CALL', strtoupper($callsign));
|
$this->db->where('COL_CALL', strtoupper($callsign));
|
||||||
|
|
||||||
$query = $this->db->get($this->config->item('table_name'), 1, 0);
|
$query = $this->db->get($this->config->item('table_name'), 1, 0);
|
||||||
|
|
|
||||||
|
|
@ -897,11 +897,11 @@ class Logbook_model extends CI_Model {
|
||||||
function get_last_qsos($num) {
|
function get_last_qsos($num) {
|
||||||
|
|
||||||
$CI =& get_instance();
|
$CI =& get_instance();
|
||||||
$CI->load->model('Stations');
|
$CI->load->model('logbooks_model');
|
||||||
$station_id = $CI->Stations->find_active();
|
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||||
|
|
||||||
//$this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_STX_STRING, COL_SRX_STRING, COL_IOTA, COL_STATE, COL_GRIDSQUARE');
|
//$this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_STX_STRING, COL_SRX_STRING, COL_IOTA, COL_STATE, COL_GRIDSQUARE');
|
||||||
$this->db->where("station_id", $station_id);
|
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||||
$this->db->order_by("COL_TIME_ON", "desc");
|
$this->db->order_by("COL_TIME_ON", "desc");
|
||||||
$this->db->limit($num);
|
$this->db->limit($num);
|
||||||
$query = $this->db->get($this->config->item('table_name'));
|
$query = $this->db->get($this->config->item('table_name'));
|
||||||
|
|
@ -1041,11 +1041,11 @@ class Logbook_model extends CI_Model {
|
||||||
/* Return QSOs over a period of days */
|
/* Return QSOs over a period of days */
|
||||||
function map_week_qsos($start, $end) {
|
function map_week_qsos($start, $end) {
|
||||||
$CI =& get_instance();
|
$CI =& get_instance();
|
||||||
$CI->load->model('Stations');
|
$CI->load->model('logbooks_model');
|
||||||
$station_id = $CI->Stations->find_active();
|
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||||
|
|
||||||
$this->db->where("COL_TIME_ON BETWEEN '".$start."' AND '".$end."'");
|
$this->db->where("COL_TIME_ON BETWEEN '".$start."' AND '".$end."'");
|
||||||
$this->db->where("station_id", $station_id);
|
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||||
$this->db->order_by("COL_TIME_ON", "ASC");
|
$this->db->order_by("COL_TIME_ON", "ASC");
|
||||||
$query = $this->db->get($this->config->item('table_name'));
|
$query = $this->db->get($this->config->item('table_name'));
|
||||||
|
|
||||||
|
|
@ -1078,14 +1078,14 @@ class Logbook_model extends CI_Model {
|
||||||
/* Returns QSOs for the date sent eg 2011-09-30 */
|
/* Returns QSOs for the date sent eg 2011-09-30 */
|
||||||
function map_day($date) {
|
function map_day($date) {
|
||||||
$CI =& get_instance();
|
$CI =& get_instance();
|
||||||
$CI->load->model('Stations');
|
$CI->load->model('logbooks_model');
|
||||||
$station_id = $CI->Stations->find_active();
|
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||||
|
|
||||||
$start = $date." 00:00:00";
|
$start = $date." 00:00:00";
|
||||||
$end = $date." 23:59:59";
|
$end = $date." 23:59:59";
|
||||||
|
|
||||||
$this->db->where("COL_TIME_ON BETWEEN '".$start."' AND '".$end."'");
|
$this->db->where("COL_TIME_ON BETWEEN '".$start."' AND '".$end."'");
|
||||||
$this->db->where("station_id", $station_id);
|
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||||
$this->db->order_by("COL_TIME_ON", "ASC");
|
$this->db->order_by("COL_TIME_ON", "ASC");
|
||||||
$query = $this->db->get($this->config->item('table_name'));
|
$query = $this->db->get($this->config->item('table_name'));
|
||||||
|
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用