| 
									
										
										
										
											2023-10-30 19:15:08 +08:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Setup_model extends CI_Model { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	function getCountryCount() { | 
					
						
							| 
									
										
										
										
											2023-10-31 15:29:12 +08:00
										 |  |  | 		$sql = 'select count(*) as count from dxcc_entities'; | 
					
						
							|  |  |  | 		$query = $this->db->query($sql); | 
					
						
							| 
									
										
										
										
											2023-10-30 19:15:08 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-31 15:29:12 +08:00
										 |  |  | 		return $query->row()->count; | 
					
						
							| 
									
										
										
										
											2023-10-30 19:15:08 +08:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	function getLogbookCount() { | 
					
						
							|  |  |  | 		$userid = xss_clean($this->session->userdata('user_id')); | 
					
						
							| 
									
										
										
										
											2023-10-31 15:29:12 +08:00
										 |  |  | 		$sql = 'select count(*) as count from station_logbooks where user_id =' . $userid; | 
					
						
							|  |  |  | 		$query = $this->db->query($sql); | 
					
						
							| 
									
										
										
										
											2023-10-30 19:15:08 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-31 15:29:12 +08:00
										 |  |  | 		return $query->row()->count; | 
					
						
							| 
									
										
										
										
											2023-10-30 19:15:08 +08:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	function getLocationCount() { | 
					
						
							|  |  |  | 		$userid = xss_clean($this->session->userdata('user_id')); | 
					
						
							| 
									
										
										
										
											2023-10-31 15:29:12 +08:00
										 |  |  | 		$sql = 'select count(*) as count from station_profile where user_id =' . $userid; | 
					
						
							|  |  |  | 		$query = $this->db->query($sql); | 
					
						
							| 
									
										
										
										
											2023-10-30 19:15:08 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-31 15:29:12 +08:00
										 |  |  | 		return $query->row()->count; | 
					
						
							| 
									
										
										
										
											2023-10-30 19:15:08 +08:00
										 |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ?>
 |