added logbook filter to logbook main list
这个提交包含在:
父节点
53e825d885
当前提交
f510bc314b
共有 2 个文件被更改,包括 8 次插入 和 2 次删除
|
|
@ -27,9 +27,11 @@ class Logbook extends CI_Controller {
|
|||
}
|
||||
}
|
||||
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
$this->load->library('pagination');
|
||||
$config['base_url'] = base_url().'index.php/logbook/index/';
|
||||
$config['total_rows'] = $this->db->count_all($this->config->item('table_name'));
|
||||
$config['total_rows'] = $this->logbook_model->total_qsos();
|
||||
$config['per_page'] = '25';
|
||||
$config['num_links'] = 6;
|
||||
$config['full_tag_open'] = '';
|
||||
|
|
@ -40,7 +42,6 @@ class Logbook extends CI_Controller {
|
|||
$this->pagination->initialize($config);
|
||||
|
||||
//load the model and get results
|
||||
$this->load->model('logbook_model');
|
||||
$data['results'] = $this->logbook_model->get_qsos($config['per_page'],$this->uri->segment(3));
|
||||
|
||||
// Calculate Lat/Lng from Locator to use on Maps
|
||||
|
|
|
|||
|
|
@ -822,10 +822,15 @@ class Logbook_model extends CI_Model {
|
|||
}
|
||||
|
||||
function get_qsos($num, $offset) {
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
//$this->db->select(''.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_RST_RCVD, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_NAME, '.$this->config->item('table_name').'.COL_COUNTRY, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_GRIDSQUARE, '.$this->config->item('table_name').'.COL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_SENT, '.$this->config->item('table_name').'.COL_QSL_SENT, '.$this->config->item('table_name').'.COL_STX, '.$this->config->item('table_name').'.COL_STX_STRING, '.$this->config->item('table_name').'.COL_SRX, '.$this->config->item('table_name').'.COL_SRX_STRING, '.$this->config->item('table_name').'.COL_LOTW_QSL_SENT, '.$this->config->item('table_name').'.COL_LOTW_QSL_RCVD, '.$this->config->item('table_name').'.COL_VUCC_GRIDS, station_profile.*');
|
||||
$this->db->from($this->config->item('table_name'));
|
||||
|
||||
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
|
||||
$this->db->where_in('station_profile.station_id', $logbooks_locations_array);
|
||||
$this->db->order_by(''.$this->config->item('table_name').'.COL_TIME_ON', "desc");
|
||||
|
||||
$this->db->limit($num);
|
||||
|
|
|
|||
正在加载…
在新工单中引用