Awards are shown based on the active station profile
这个提交包含在:
		
							父节点
							
								
									f638b82005
								
							
						
					
					
						当前提交
						0a03fa7fbf
					
				
					共有  6 个文件被更改,包括 41 次插入 和 5 次删除
				
			
		|  | @ -9,10 +9,14 @@ class CQ extends CI_Model{ | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     function get_zones(){ |     function get_zones(){ | ||||||
|  |         $CI =& get_instance(); | ||||||
|  |         $CI->load->model('Stations'); | ||||||
|  |         $station_id = $CI->Stations->find_active(); | ||||||
|  | 
 | ||||||
|         $data = $this->db->query( |         $data = $this->db->query( | ||||||
|             "select COL_CQZ, count(COL_CQZ)
 |             "select COL_CQZ, count(COL_CQZ)
 | ||||||
|             from ".$this->config->item('table_name')." |             from ".$this->config->item('table_name')." | ||||||
|             where COL_CQZ is not null |             where COL_CQZ is not null and station_id = ".$station_id."  | ||||||
|             group by COL_CQZ order by COL_CQZ" |             group by COL_CQZ order by COL_CQZ" | ||||||
|         ); |         ); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -30,9 +30,13 @@ class DOK extends CI_Model { | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	function get_worked_bands() { | 	function get_worked_bands() { | ||||||
|  | 		$CI =& get_instance(); | ||||||
|  |       	$CI->load->model('Stations'); | ||||||
|  |       	$station_id = $CI->Stations->find_active(); | ||||||
|  | 
 | ||||||
| 		// get all worked slots from database
 | 		// get all worked slots from database
 | ||||||
| 		$data = $this->db->query( | 		$data = $this->db->query( | ||||||
| 			"SELECT distinct LOWER(`COL_BAND`) as `COL_BAND` FROM `".$this->config->item('table_name')."` WHERE COL_DARC_DOK IS NOT NULL AND COL_DARC_DOK != ''  AND COL_DXCC = 230 " | 			"SELECT distinct LOWER(`COL_BAND`) as `COL_BAND` FROM `".$this->config->item('table_name')."` WHERE station_id = ".$station_id." AND COL_DARC_DOK IS NOT NULL AND COL_DARC_DOK != ''  AND COL_DXCC = 230 " | ||||||
| 		); | 		); | ||||||
| 		$worked_slots = array(); | 		$worked_slots = array(); | ||||||
| 		foreach($data->result() as $row){ | 		foreach($data->result() as $row){ | ||||||
|  | @ -51,10 +55,13 @@ class DOK extends CI_Model { | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	function show_stats(){ | 	function show_stats(){ | ||||||
|  | 		$CI =& get_instance(); | ||||||
|  |       	$CI->load->model('Stations'); | ||||||
|  |       	$station_id = $CI->Stations->find_active(); | ||||||
| 
 | 
 | ||||||
|         $data = $this->db->query( |         $data = $this->db->query( | ||||||
|             "select upper(COL_DARC_DOK) as COL_DARC_DOK, COL_MODE, lcase(COL_BAND) as COL_BAND, count(COL_DARC_DOK) as cnt
 |             "select upper(COL_DARC_DOK) as COL_DARC_DOK, COL_MODE, lcase(COL_BAND) as COL_BAND, count(COL_DARC_DOK) as cnt
 | ||||||
|             from ".$this->config->item('table_name')." WHERE COL_DARC_DOK IS NOT NULL AND COL_DARC_DOK != '' AND COL_DXCC = 230 |             from ".$this->config->item('table_name')." WHERE station_id = ".$station_id." AND COL_DARC_DOK IS NOT NULL AND COL_DARC_DOK != '' AND COL_DXCC = 230 | ||||||
|             group by COL_DARC_DOK, COL_MODE, COL_BAND" |             group by COL_DARC_DOK, COL_MODE, COL_BAND" | ||||||
|             ); |             ); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -27,12 +27,17 @@ class DXCC extends CI_Model { | ||||||
| 	{ | 	{ | ||||||
| 		// Call the Model constructor
 | 		// Call the Model constructor
 | ||||||
| 		parent::__construct(); | 		parent::__construct(); | ||||||
|  | 
 | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	function get_worked_bands() { | 	function get_worked_bands() { | ||||||
|  | 		$CI =& get_instance(); | ||||||
|  |       	$CI->load->model('Stations'); | ||||||
|  |       	$station_id = $CI->Stations->find_active(); | ||||||
|  | 
 | ||||||
| 		// get all worked slots from database
 | 		// get all worked slots from database
 | ||||||
| 		$data = $this->db->query( | 		$data = $this->db->query( | ||||||
| 			"SELECT distinct LOWER(`COL_BAND`) as `COL_BAND` FROM `".$this->config->item('table_name')."`" | 			"SELECT distinct LOWER(`COL_BAND`) as `COL_BAND` FROM `".$this->config->item('table_name')."` WHERE station_id = ".$station_id."" | ||||||
| 		); | 		); | ||||||
| 		$worked_slots = array(); | 		$worked_slots = array(); | ||||||
| 		foreach($data->result() as $row){ | 		foreach($data->result() as $row){ | ||||||
|  | @ -51,10 +56,14 @@ class DXCC extends CI_Model { | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	function show_stats(){ | 	function show_stats(){ | ||||||
|  | 		$CI =& get_instance(); | ||||||
|  |       	$CI->load->model('Stations'); | ||||||
|  |       	$station_id = $CI->Stations->find_active(); | ||||||
| 
 | 
 | ||||||
|         $data = $this->db->query( |         $data = $this->db->query( | ||||||
|             "select COL_COUNTRY, COL_MODE, lcase(COL_BAND) as COL_BAND, count(COL_COUNTRY) as cnt
 |             "select COL_COUNTRY, COL_MODE, lcase(COL_BAND) as COL_BAND, count(COL_COUNTRY) as cnt
 | ||||||
|             from ".$this->config->item('table_name')." |             from ".$this->config->item('table_name')." | ||||||
|  |             where station_id = ".$station_id." | ||||||
|             group by COL_COUNTRY, COL_MODE, COL_BAND" |             group by COL_COUNTRY, COL_MODE, COL_BAND" | ||||||
|             ); |             ); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -8,6 +8,11 @@ class Sota extends CI_Model { | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	function get_all() { | 	function get_all() { | ||||||
|  | 		$CI =& get_instance(); | ||||||
|  |       	$CI->load->model('Stations'); | ||||||
|  |       	$station_id = $CI->Stations->find_active(); | ||||||
|  | 
 | ||||||
|  | 		$this->db->where("station_id", $station_id); | ||||||
| 		$this->db->order_by("COL_SOTA_REF", "ASC");  | 		$this->db->order_by("COL_SOTA_REF", "ASC");  | ||||||
| 		$this->db->where('COL_SOTA_REF !=', ''); | 		$this->db->where('COL_SOTA_REF !=', ''); | ||||||
| 		 | 		 | ||||||
|  |  | ||||||
|  | @ -5,9 +5,15 @@ class Wab extends CI_Model { | ||||||
| 	function __construct() | 	function __construct() | ||||||
| 	{ | 	{ | ||||||
| 		parent::__construct(); | 		parent::__construct(); | ||||||
|  | 
 | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	function get_all() { | 	function get_all() { | ||||||
|  | 		$CI =& get_instance(); | ||||||
|  |       	$CI->load->model('Stations'); | ||||||
|  |       	$station_id = $CI->Stations->find_active(); | ||||||
|  | 
 | ||||||
|  | 		$this->db->where("station_id", $station_id); | ||||||
| 		$this->db->order_by("COL_COMMENT", "ASC");  | 		$this->db->order_by("COL_COMMENT", "ASC");  | ||||||
| 		$this->db->like('COL_COMMENT', 'WAB:'); | 		$this->db->like('COL_COMMENT', 'WAB:'); | ||||||
| 		 | 		 | ||||||
|  |  | ||||||
|  | @ -13,6 +13,11 @@ class Wacral extends CI_Model { | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	function get_all() { | 	function get_all() { | ||||||
|  | 		$CI =& get_instance(); | ||||||
|  |       	$CI->load->model('Stations'); | ||||||
|  |       	$station_id = $CI->Stations->find_active(); | ||||||
|  | 
 | ||||||
|  | 		$this->db->where("station_id", $station_id); | ||||||
| 		$this->db->order_by("COL_COMMENT", "ASC");  | 		$this->db->order_by("COL_COMMENT", "ASC");  | ||||||
| 		$this->db->like('COL_COMMENT', 'WACRAL:'); | 		$this->db->like('COL_COMMENT', 'WACRAL:'); | ||||||
| 		 | 		 | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用