PROP_MODE is set to SAT if QSO is a satellite one;
这个提交包含在:
		
							父节点
							
								
									17d7834455
								
							
						
					
					
						当前提交
						2823e8ada1
					
				
					共有  4 个文件被更改,包括 17 次插入 和 7 次删除
				
			
		|  | @ -49,7 +49,7 @@ class Dashboard extends CI_Controller { | ||||||
| 	 | 	 | ||||||
| 		$this->load->model('logbook_model'); | 		$this->load->model('logbook_model'); | ||||||
| 		// TODO: Auth
 | 		// TODO: Auth
 | ||||||
| 		$qsos = $this->logbook_model->get_this_weeks_qsos(''); | 		$qsos = $this->logbook_model->get_todays_qsos(''); | ||||||
| 
 | 
 | ||||||
| 	 | 	 | ||||||
| 		echo "{\"markers\": ["; | 		echo "{\"markers\": ["; | ||||||
|  |  | ||||||
|  | @ -13,6 +13,13 @@ class Logbook_model extends CI_Model { | ||||||
| 		// Join date+time
 | 		// Join date+time
 | ||||||
| 		$datetime = date('Y-m-d') ." ". $this->input->post('start_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
 | 		// Create array with QSO Data
 | ||||||
| 		$data = array( | 		$data = array( | ||||||
| 		   'COL_TIME_ON' => $datetime, | 		   '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_SENT_VIA' => $this->input->post('qsl_sent_method'), | ||||||
|            'COL_QSL_RCVD_VIA' => $this->input->post('qsl_recv_method'), |            'COL_QSL_RCVD_VIA' => $this->input->post('qsl_recv_method'), | ||||||
|            'COL_OPERATOR' => $this->session->userdata('user_callsign'), |            'COL_OPERATOR' => $this->session->userdata('user_callsign'), | ||||||
|  |            'COL_PROP_MODE' => $prop_mode, | ||||||
| 		); | 		); | ||||||
| 
 | 
 | ||||||
| 		// Add QSO to database
 | 		// Add QSO to database
 | ||||||
|  | @ -192,7 +200,7 @@ class Logbook_model extends CI_Model { | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     function get_this_weeks_qsos() { |     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); |         $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.'\''); |         $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() { |     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) |         if ($query->num_rows() > 0) | ||||||
|         { |         { | ||||||
|  | @ -275,7 +283,7 @@ class Logbook_model extends CI_Model { | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     function total_digi() { |     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) |         if ($query->num_rows() > 0) | ||||||
|         { |         { | ||||||
|  |  | ||||||
|  | @ -115,7 +115,7 @@ | ||||||
| </table> | </table> | ||||||
| 
 | 
 | ||||||
| 	 | 	 | ||||||
| 	<h3>This Weeks QSOs</h3> | 	<h3>Todays QSOs</h3> | ||||||
| 			   <div id="map" style="width: 420px; height: 300px"></div>  | 			   <div id="map" style="width: 420px; height: 300px"></div>  | ||||||
| 
 | 
 | ||||||
| 		<noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b>  | 		<noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b>  | ||||||
|  | @ -184,7 +184,7 @@ | ||||||
| 
 | 
 | ||||||
| 	  // ================================================================
 | 	  // ================================================================
 | ||||||
| 	  // === Fetch the JSON data file ====    
 | 	  // === Fetch the JSON data file ====    
 | ||||||
| 	  GDownloadUrl("/logger/index.php/dashboard/todays_map", process_it); | 	  GDownloadUrl("<?php echo site_url('/dashboard/todays_map'); ?>", process_it); | ||||||
| 	  // ================================================================
 | 	  // ================================================================
 | ||||||
| 
 | 
 | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -282,6 +282,8 @@ $(document).ready(function(){ | ||||||
| 		$.get('logbook/callsign_qra/' + $(this).val(), function(result) { | 		$.get('logbook/callsign_qra/' + $(this).val(), function(result) { | ||||||
| 			$('#locator').val(result); | 			$('#locator').val(result); | ||||||
| 		}); | 		}); | ||||||
|  | 		 | ||||||
|  | 		$('#locator_info').load("logbook/bearing/" + $(this).val()).fadeIn("slow"); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	$.get('logbook/callsign_name/' + $(this).val(), function(result) { | 	$.get('logbook/callsign_name/' + $(this).val(), function(result) { | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用