2020-09-16 04:20:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								<!--  General  JS  Files  used  across  Cloudlog  -->  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  src = " <?php echo base_url(); ?>assets/js/jquery-3.3.1.min.js " ></ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  src = " https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js "  integrity = " sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49 "  crossorigin = " anonymous " ></ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  src = " <?php echo base_url(); ?>assets/js/jquery.fancybox.min.js " ></ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  src = " <?php echo base_url(); ?>assets/js/bootstrap.bundle.js " ></ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  src = " <?php echo base_url(); ?>assets/js/jquery.jclock.js " ></ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  type = " text/javascript "  src = " <?php echo base_url(); ?>assets/js/leaflet/leaflet.js " ></ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  type = " text/javascript "  src = " <?php echo base_url() ;?>assets/js/radiohelpers.js " ></ script >  
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script  src = " <?php echo base_url(); ?>assets/js/bootstrapdialog/js/bootstrap-dialog.min.js " ></ script >  
						 
					
						
							
								
									
										
										
										
											2020-06-15 23:59:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script  type = " text/javascript " >  
						 
					
						
							
								
									
										
										
										
											2020-09-16 04:02:33 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  /* 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  *  Define  global  javascript  variables 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  base_url  =  " <?php echo base_url(); ?> " ;  // Base URL
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  site_url  =  " <?php echo site_url(); ?> " ;  // Site URL
 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-15 23:59:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  var  icon_dot_url  =  " <?php echo base_url();?>assets/images/dot.png " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-16 04:09:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " adif " )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-09-16 04:20:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    <!--  Javascript  used  for  ADIF  Import  and  Export  Areas  --> 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-16 04:09:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/js/tempusdominus-bootstrap-4.min.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url() ;?>assets/js/sections/adif.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-02-07 21:17:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-10-06 05:14:52 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " notes "  &&  ( $this -> uri -> segment ( 2 )  ==  " add "  ||  $this -> uri -> segment ( 2 )  ==  " edit " )  )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-09-16 04:20:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    <!--  Javascript  used  for  Notes  Area  --> 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-06 04:57:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url() ;?>assets/plugins/quill/quill.min.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-16 04:09:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url() ;?>assets/js/sections/notes.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-06 04:57:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " awards " )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-09-25 00:55:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " <?php echo base_url(); ?>assets/js/datatables.min.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-09-12 07:53:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " search "  &&  $this -> uri -> segment ( 2 )  ==  " filter " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  type = " text/javascript "  src = " <?php echo base_url() ;?>assets/js/query-builder.standalone.min.js " ></ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  type = " text/javascript " >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( " .search-results-box " ) . hide ();  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( '#builder' ) . queryBuilder ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    filters :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < ? php  foreach  ( $get_table_names -> result ()  as  $row )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $value_name  =  str_replace ( " COL_ " ,  " " ,  $row -> Field ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-25 07:50:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        if  ( $value_name  !=  " PRIMARY_KEY "  &&  strpos ( $value_name ,  'MY_' )  ===  false  &&  strpos ( $value_name ,  '_INTL' )  ==  false )  {  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-12 07:53:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          id :  '<?php echo $row->Field; ?>' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          label :  '<?php echo $value_name; ?>' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-15 00:42:20 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          < ? php  if  ( strpos ( $row -> Type ,  'int(' )  !==  false )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          type :  'integer' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          operators :  [ 'equal' ,  'not_equal' ,  'less' ,  'less_or_equal' ,  'greater' ,  'greater_or_equal' ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          < ? php  }  elseif ( strpos ( $row -> Type ,  'double' )  !==  false )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          type :  'double' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          operators :  [ 'equal' ,  'not_equal' ,  'less' ,  'less_or_equal' ,  'greater' ,  'greater_or_equal' ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          < ? php  }  elseif ( strpos ( $row -> Type ,  'datetime' )  !==  false )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          type :  'datetime' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          operators :  [ 'equal' ,  'not_equal' ,  'less' ,  'less_or_equal' ,  'greater' ,  'greater_or_equal' ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          < ? php  }  else  {  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-12 07:53:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          type :  'string' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-10 00:57:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          operators :  [ 'equal' ,  'not_equal' ,  'begins_with' ,  'contains' ,  'ends_with' ,  'is_empty' ,  'is_not_empty' ,  'is_null' ,  'is_not_null' ] 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-15 00:42:20 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          < ? php  }  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-12 07:53:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $ ( '#btn-get' ) . on ( 'click' ,  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  result  =  $ ( '#builder' ) . queryBuilder ( 'getRules' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( ! $ . isEmptyObject ( result ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      //alert(JSON.stringify(result, null, 2));
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ . post (  " <?php echo site_url('search/json_result');?> " ,  {  search :  JSON . stringify ( result ,  null ,  2 ),  temp :  " testvar "  }) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      . done ( function (  data  )  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-15 03:41:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        //console.log(data)
 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-12 07:53:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        //alert( "Data Loaded: " + data );
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '.qso' ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( " .search-results-box " ) . show (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ . each ( JSON . parse ( data ),  function ( i ,  item )  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-15 03:40:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          var  band  =  " " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          if ( item . COL_SAT_NAME  !=  " " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            band  =  item . COL_SAT_NAME ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            band  =  item . COL_BAND ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-25 03:40:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          var  callsign  =  '<a href="javascript:displayQso('  +  item . COL_PRIMARY_KEY  +  ');" >'  +  item . COL_CALL  +  '</a>' ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-05 04:14:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          if  ( item . COL_SUBMODE  ==  ''  ||  item . COL_SUBMODE  ==  null )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-24 14:51:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( '#results' ) . append ( '<tr class="qso"><td>'  +  item . COL_TIME_ON  +  '</td><td>'  +  callsign  +  '</td><td>'  +  item . COL_MODE  +  '</td><td>'  +  item . COL_RST_SENT  +  '</td><td>'  +  item . COL_RST_RCVD  +  '</td><td>'  +  band  +  '</td><td>'  +  item . COL_COUNTRY  +  '</td><td></td></tr>' ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-22 00:09:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          else  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-24 14:51:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( '#results' ) . append ( '<tr class="qso"><td>'  +  item . COL_TIME_ON  +  '</td><td>'  +  callsign  +  '</td><td>'  +  item . COL_SUBMODE  +  '</td><td>'  +  item . COL_RST_SENT  +  '</td><td>'  +  item . COL_RST_RCVD  +  '</td><td>'  +  band  +  '</td><td>'  +  item . COL_COUNTRY  +  '</td><td></td></tr>' ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-22 00:09:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-12 07:53:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    else { 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-15 03:40:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      //console.log("invalid object :");
 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-12 07:53:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $ ( '#btn-set' ) . on ( 'click' ,  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    //$('#builder').queryBuilder('setRules', rules_basic);
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  result  =  $ ( '#builder' ) . queryBuilder ( 'getRules' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( ! $ . isEmptyObject ( result ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      rules_basic  =  result ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  //When rules changed :
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $ ( '#builder' ) . on ( 'getRules.queryBuilder.filter' ,  function ( e )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    //$log.info(e.value);
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-01-09 23:18:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( document ) . ready ( function ()  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#create_station_profile #country' ) . val ( $ ( " #dxcc_select option:selected " ) . text ()); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( " #create_station_profile #dxcc_select "  ) . change ( function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									  $ ( '#country' ) . val ( $ ( " #dxcc_select option:selected " ) . text ()); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
									
										
										
										
											2019-01-13 23:59:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-03-21 01:47:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
									
										
										
										
											2019-10-06 23:38:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								$ ( '[data-fancybox]' ) . fancybox ({  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  toolbar   :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  smallBtn  :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  iframe  :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    preload  :  false 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-09 04:11:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-03-21 01:47:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
									
										
										
										
											2019-04-08 22:36:23 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-06 18:06:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " "  ||  $this -> uri -> segment ( 1 )  ==  " dashboard "  )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2019-06-25 00:32:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " <?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " <?php echo base_url();?>assets/js/leaflet/leafembed.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2019-03-21 00:58:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  type = " text/javascript " > 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-28 06:17:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $ ( function  ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '[data-toggle="tooltip"]' ) . tooltip () 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-28 06:18:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-03-21 00:58:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        < ? php  if ( $qra  ==  " set " )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lat  =  < ? php  echo  $qra_lat ;  ?> ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lng  =  < ? php  echo  $qra_lng ;  ?> ;    
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < ? php  }  else  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lat  =  40.313043 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lng  =  - 32.695312 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  qso_loc  =  '<?php echo site_url(' dashboard / map ');?>' ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-23 06:34:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        var  q_zoom  =  3 ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-03-21 00:58:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( document ) . ready ( function (){ 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-25 00:32:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            < ? php  if  ( $this -> config -> item ( 'map_gridsquares' )  !=  FALSE )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  grid  =  " Yes " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            < ? php  }  else  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  grid  =  " No " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            initmap ( grid ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-03-21 00:58:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ script > 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-08 22:36:23 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
									
										
										
										
											2019-03-21 00:58:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-01-13 23:59:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " radio " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								<!--  If  this  is  the  admin / radio  page  run  the  JS  -->  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  type = " text/javascript " >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( document ) . ready ( function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        setInterval ( function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            // Get Mode
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . get ( 'radio/status/' ,  function ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    //$('.status').append(result);
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '.status' ) . html ( result ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        },  2000 ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-01-13 23:59:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								 }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-14 18:52:11 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " search " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  type = " text/javascript " >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								i = 0 ;  
						 
					
						
							
								
									
										
										
										
											2019-09-05 05:11:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  searchButtonPress (){  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    event . preventDefault () 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( $ ( '#callsign' ) . val ())  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '#partial_view' ) . load ( " logbook/search_result/ "  +  $ ( '#callsign' ) . val (),  function ()  {}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-14 18:52:11 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								$ ( document ) . ready ( function (){  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-09-05 05:11:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < ? php  if ( $this -> input -> post ( 'callsign' )  !=  " " )  {  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-14 18:52:11 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $ ( '#partial_view' ) . load ( " logbook/search_result/<?php echo  $this->input ->post('callsign'); ?> " ,  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-05 05:11:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( document ) . on ( 'keypress' , function ( e )  {   
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  if ( e . which  ==  13 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-14 18:52:11 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-09-05 05:11:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( $ ( '#callsign' ) . val ())  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '#partial_view' ) . load ( " logbook/search_result/ "  +  $ ( '#callsign' ) . val (),  function ()  {}); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-14 18:52:11 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-09-05 05:11:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     event . preventDefault (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-14 18:52:11 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-26 01:43:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " logbook "  &&  $this -> uri -> segment ( 2 )  !=  " view " )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2019-06-25 01:21:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " <?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 23:47:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " <?php echo base_url();?>assets/js/leaflet/leafembed.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-14 23:46:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  type = " text/javascript " > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < ? php  if ( $qra  ==  " set " )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lat  =  < ? php  echo  $qra_lat ;  ?> ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lng  =  < ? php  echo  $qra_lng ;  ?> ;    
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < ? php  }  else  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lat  =  40.313043 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lng  =  - 32.695312 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  qso_loc  =  '<?php echo site_url(' logbook / qso_map / 25 / '.$this->uri->segment(3)); ?>' ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-23 23:42:23 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        var  q_zoom  =  3 ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-14 23:46:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-25 01:21:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        < ? php  if  ( $this -> config -> item ( 'map_gridsquares' )  !=  FALSE )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  grid  =  " Yes " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < ? php  }  else  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  grid  =  " No " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            initmap ( grid ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-14 23:46:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ script > 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " qso " )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2019-06-14 07:14:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-22 04:01:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script  type = " text/javascript " >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ (  document  ) . ready ( function ()  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  /* 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    Populate  the  Satellite  Names  Field  on  the  QSO  Panel 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $ . getJSON (  " <?php echo base_url();?>assets/json/satellite_data.json " ,  function (  data  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Build the options array
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  items  =  []; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ . each (  data ,  function (  key ,  val  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      items . push ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        '<option value="'  +  key  +  '">'  +  key  +  '</option>' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Add to the datalist
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( '.satellite_names_list' ) . append ( items . join (  " "  )); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								var  selected_sat ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								var  selected_sat_mode ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( document ) . on ( 'change' ,  'input' ,  function (){  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  optionslist  =  $ ( '.satellite_names_list' )[ 0 ] . options ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  value  =  $ ( this ) . val (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    for  ( var  x = 0 ; x < optionslist . length ; x ++ ){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								       if  ( optionslist [ x ] . value  ===  value )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ ( " #sat_mode " ) . val ( " " );  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ ( '.satellite_modes_list' ) . find ( 'option' ) . remove () . end (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          selected_sat  =  value ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          // get Json file
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ . getJSON (  " <?php echo base_url();?>assets/json/satellite_data.json " ,  function (  data  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          // Build the options array
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          var  sat_modes  =  []; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ . each (  data ,  function (  key ,  val  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( key  ==  value )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              $ . each (  val . Modes ,  function (  key1 ,  val2  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  //console.log (key1);
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  sat_modes . push ( '<option value="'  +  key1  +  '">'  +  key1  +  '</option>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          // Add to the datalist
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ ( '.satellite_modes_list' ) . append ( sat_modes . join (  " "  )); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								       } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( document ) . on ( 'change' ,  'input' ,  function (){  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  optionslist  =  $ ( '.satellite_modes_list' )[ 0 ] . options ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  value  =  $ ( this ) . val (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    for  ( var  x = 0 ; x < optionslist . length ; x ++ ){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								       if  ( optionslist [ x ] . value  ===  value )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          // Store selected sat mode
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          selected_sat_mode  =  value ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          // get Json file
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ . getJSON (  " <?php echo base_url();?>assets/json/satellite_data.json " ,  function (  data  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          // Build the options array
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          var  sat_modes  =  []; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ . each (  data ,  function (  key ,  val  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( key  ==  selected_sat )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              $ . each (  val . Modes ,  function (  key1 ,  val2  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  if ( key1  ==  selected_sat_mode )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    if  ( val2 [ 0 ] . Uplink_Mode  ==  " LSB "  ||  val2 [ 0 ] . Uplink_Mode  ==  " USB " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      $ ( " #mode " ) . val ( " SSB " );   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      $ ( " #mode " ) . val ( val2 [ 0 ] . Uplink_Mode );   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( " #band " ) . val ( frequencyToBand ( val2 [ 0 ] . Uplink_Freq )); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( " #frequency " ) . val ( val2 [ 0 ] . Uplink_Freq );   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( " #frequency_rx " ) . val ( val2 [ 0 ] . Downlink_Freq );  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( " #selectPropagation " ) . val ( 'SAT' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								       } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-14 07:14:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  markers  =  L . layerGroup (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  mymap  =  L . map ( 'qsomap' ) . setView ([ 51.505 ,  - 0.09 ],  13 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  L . tileLayer ( 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    maxZoom :  18 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    attribution :  'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, '  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      '<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, '  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      'Created by Cloudlog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    id :  'mapbox.streets' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }) . addTo ( mymap ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < script  type = " text/javascript " > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  manual  =  < ? php  echo  $_GET [ 'manual' ];  ?> ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( document ) . ready ( function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-25 14:09:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $ ( '.callsign-suggest' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    setRst ( $ ( " .mode " ) . val ()); 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-15 19:03:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    /* On Page Load */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  catcher  =  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      var  changed  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( 'form' ) . each ( function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( $ ( this ) . data ( 'initialForm' )  !=  $ ( this ) . serialize ())  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          changed  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ ( this ) . addClass ( 'changed' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ ( this ) . removeClass ( 'changed' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if  ( changed )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  'Unsaved QSO!' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( 'form' ) . each ( function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( this ) . data ( 'initialForm' ,  $ ( this ) . serialize ()); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }) . submit ( function ( e )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  formEl  =  this ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  changed  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( 'form' ) . each ( function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          if  ( this  !=  formEl  &&  $ ( this ) . data ( 'initialForm' )  !=  $ ( this ) . serialize ())  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            changed  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( this ) . addClass ( 'changed' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( this ) . removeClass ( 'changed' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( changed  &&  ! confirm ( 'You have an unsaved QSO. Continue with QSO?' ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          e . preventDefault (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ ( window ) . unbind ( 'beforeunload' ,  catcher ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( window ) . bind ( 'beforeunload' ,  catcher ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     // Callsign always has focus on load
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( " #callsign " ) . focus ();   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if  (  !  manual  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( function ( $ )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          var  options  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            utc :  true , 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-06 23:38:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            format :  '%H:%M:%S' 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-26 05:11:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          $ ( '.input_time' ) . jclock ( options ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-26 05:17:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( function ( $ )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          var  options  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            utc :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            format :  '%d-%m-%Y' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ ( '.input_date' ) . jclock ( options ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-24 23:18:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  /* Function: reset_fields is used to reset the fields on the QSO page */ 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-24 23:13:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  function  reset_fields ()  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-07-25 21:16:09 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $ ( '#locator_info' ) . text ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '#country' ) . val ( " " ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-16 23:37:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $ ( '#lotw_info' ) . text ( " " ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $ ( '#dxcc_id' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '#cqz' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '#name' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '#qth' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '#locator' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '#iota_ref' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( " #locator " ) . removeClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( " #locator " ) . removeClass ( " newGrid " ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-14 05:07:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $ ( " #callsign " ) . removeClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( " #callsign " ) . removeClass ( " newGrid " ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-08 00:36:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $ ( '#callsign_info' ) . removeClass ( " badge-secondary " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '#callsign_info' ) . removeClass ( " badge-success " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '#callsign_info' ) . removeClass ( " badge-danger " ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-17 01:13:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $ ( '#qsl_via' ) . val ( " " ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-07-25 21:16:09 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $ ( '#callsign_info' ) . text ( " " ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-08 00:36:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $ ( '#input_usa_state' ) . val ( " " ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-07 05:03:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $ ( '#qso-last-table' ) . show (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '#partial_view' ) . hide (); 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-17 01:13:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-14 07:14:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      mymap . setView ([ 51.505 ,  - 0.09 ],  13 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      mymap . removeLayer ( markers ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-15 19:06:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $ ( '.callsign-suggest' ) . hide (); 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-24 23:13:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  jQuery ( function ( $ )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  input  =  $ ( '#callsign' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  input . on ( 'keydown' ,  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  key  =  event . keyCode  ||  event . charCode ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if (  key  ==  8  ||  key  ==  46  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      reset_fields (); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
									
										
										
										
											2019-12-23 04:15:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $ ( document ) . keyup ( function ( e )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     if  ( e . key  ===  " Escape " )  {  // escape key maps to keycode `27`
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								       reset_fields (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									   $ ( '#callsign' ) . val ( " " ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-20 04:08:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									   $ ( " #callsign " ) . focus (); 
							 
						 
					
						
							
								
									
										
										
										
											2019-12-23 04:15:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-08-14 05:02:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    // On Key up check and suggest callsigns
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( " #callsign " ) . keyup ( function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( $ ( this ) . val () . length  >=  3 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '.callsign-suggest' ) . show (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ . get ( 'lookup/scp/'  +  $ ( this ) . val () . toUpperCase (),  function ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '.callsign-suggestions' ) . text ( result ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-13 16:34:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $ ( '#dxcc_id' ) . on ( 'change' ,  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ . getJSON ( 'logbook/jsonentity/'  +  $ ( this ) . val (),  function  ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( result . dxcc . name  !=  undefined )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#country' ) . val ( convert_case ( result . dxcc . name )); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#cqz' ) . val ( convert_case ( result . dxcc . cqz )); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . removeClass ( " badge-secondary " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . removeClass ( " badge-success " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . removeClass ( " badge-danger " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . attr ( 'title' ,  '' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . text ( convert_case ( result . dxcc . name )); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-14 01:23:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                changebadge ( result . dxcc . name ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-13 22:57:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                // Set Map to Lat/Long it locator is not empty
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                if ( $ ( '#locator' ) . val ()  ==  " " )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 21:49:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    var  redIcon  =  L . icon ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        iconUrl :  icon_dot_url , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        iconSize :      [ 18 ,  18 ],  // size of the icon
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-13 22:57:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    markers . clearLayers (); 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 21:49:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    var  marker  =  L . marker ([ result . dxcc . lat ,  result . dxcc . long ],  { icon :  redIcon }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													          mymap . setZoom ( 8 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													          mymap . panTo ([ result . dxcc . lat ,  result . dxcc . long ]); 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-13 22:57:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    markers . addLayer ( marker ) . addTo ( mymap ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-13 16:34:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-14 01:23:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    function  changebadge ( entityname )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if ( $ ( " #sat_name "  ) . val ()  !=  " " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . getJSON ( 'logbook/jsonlookupdxcc/'  +  convert_case ( entityname )  +  '/SAT/0/0' ,  function ( result ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . removeClass ( " badge-secondary " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . removeClass ( " badge-success " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . removeClass ( " badge-danger " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . attr ( 'title' ,  '' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#callsign_info' ) . addClass ( " badge-success " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#callsign_info' ) . attr ( 'title' ,  'DXCC was already worked in the past on this band and mode!' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#callsign_info' ) . addClass ( " badge-danger " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#callsign_info' ) . attr ( 'title' ,  'New DXCC, not worked on this band and mode!' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . getJSON ( 'logbook/jsonlookupdxcc/'  +  convert_case ( entityname )  +  '/0/'  +  $ ( " #band " ) . val ()  + '/'  +  $ ( " #mode " ) . val (),  function ( result ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                // Reset CSS values before updating
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . removeClass ( " badge-secondary " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . removeClass ( " badge-success " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . removeClass ( " badge-danger " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . attr ( 'title' ,  '' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#callsign_info' ) . addClass ( " badge-success " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#callsign_info' ) . attr ( 'title' ,  'DXCC was already worked in the past on this band and mode!' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#callsign_info' ) . addClass ( " badge-danger " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#callsign_info' ) . attr ( 'title' ,  'New DXCC, not worked on this band and mode!' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-08 19:52:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> config -> item ( 'qso_auto_qth' ))  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-05-08 15:45:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $ ( '#qth' ) . focusout ( function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    	if  ( $ ( '#locator' ) . val ()  ===  '' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											var  lat  =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											var  lon  =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												async :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												type :  'GET' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												dataType :  " json " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												url :  " https://nominatim.openstreetmap.org/search/?city= "  +  $ ( this ) . val ()  +  " &format=json&addressdetails=1&limit=1 " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												data :  {}, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												success :  function  ( data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													if  ( typeof  data [ 0 ] . lat  !==  'undefined' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														lat  =  parseFloat ( data [ 0 ] . lat ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													if  ( typeof  data [ 0 ] . lon  !==  'undefined' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														lon  =  parseFloat ( data [ 0 ] . lon ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( lat  !==  0  &&  lon  !==  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												var  qthloc  =  LatLng2Loc ( lat ,  lon ,  10 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if  ( qthloc . length  >  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#locator' ) . val ( qthloc . substr ( 0 ,  6 )) . trigger ( 'focusout' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									LatLng2Loc  =  function ( y ,  x ,  num )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( x  <  - 180 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											x  =  x  +  360 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( x  >  180 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											x  =  x  -  360 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  yqth ,  yi ,  yk ,  ydiv ,  yres ,  ylp ,  y ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  ycalc  =  new  Array ( 0 ,  0 ,  0 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  yn  =  new  Array ( 0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  ydiv_arr  =  new  Array ( 10 ,  1 ,  1  /  24 ,  1  /  240 ,  1  /  240  /  24 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										ycalc [ 0 ]  =  ( x  +  180 )  /  2 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										ycalc [ 1 ]  =  y  +  90 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										for  ( yi  =  0 ;  yi  <  2 ;  yi ++ )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											for  ( yk  =  0 ;  yk  <  5 ;  yk ++ )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												ydiv  =  ydiv_arr [ yk ]; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												yres  =  ycalc [ yi ]  /  ydiv ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												ycalc [ yi ]  =  yres ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if  ( ycalc [ yi ]  >  0 )  ylp  =  Math . floor ( yres );  else  ylp  =  Math . ceil ( yres ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												ycalc [ yi ]  =  ( ycalc [ yi ]  -  ylp )  *  ydiv ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												yn [ 2  *  yk  +  yi ]  =  ylp ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  qthloc  =  " " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( num  >=  2 )  qthloc  +=  String . fromCharCode ( yn [ 0 ]  +  0x41 )  +  String . fromCharCode ( yn [ 1 ]  +  0x41 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( num  >=  4 )  qthloc  +=  String . fromCharCode ( yn [ 2 ]  +  0x30 )  +  String . fromCharCode ( yn [ 3 ]  +  0x30 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( num  >=  6 )  qthloc  +=  String . fromCharCode ( yn [ 4 ]  +  0x41 )  +  String . fromCharCode ( yn [ 5 ]  +  0x41 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( num  >=  8 )  qthloc  +=  ' '  +  String . fromCharCode ( yn [ 6 ]  +  0x30 )  +  String . fromCharCode ( yn [ 7 ]  +  0x30 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( num  >=  10 )  qthloc  +=  String . fromCharCode ( yn [ 8 ]  +  0x61 )  +  String . fromCharCode ( yn [ 9 ]  +  0x61 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  qthloc ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-08 19:52:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									< ? php  }  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-14 01:23:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $ ( " #callsign " ) . focusout ( function ()  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-14 05:02:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-07-25 21:16:09 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        if  ( $ ( this ) . val () . length  >=  3 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            /* Find and populate DXCC */ 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-14 05:02:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( '.callsign-suggest' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-08-16 19:25:31 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            if ( $ ( " #sat_name " ) . val ()  !=  " " ){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  sat_type  =  " SAT " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  json_band  =  " 0 " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  json_mode  =  " 0 " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  sat_type  =  " 0 " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  json_band  =  $ ( " #band " ) . val (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  json_mode  =  $ ( " #mode " ) . val (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . getJSON ( 'logbook/json/'  +  $ ( this ) . val () . toUpperCase ()  +  '/'  +  sat_type  +  '/'  +  json_band  +  '/'  +  json_mode ,  function ( result ) 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            { 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-16 23:37:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              //$('#country').val(result); lotw_info
 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-13 23:11:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              if ( result . dxcc . entity  !=  undefined )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#country' ) . val ( convert_case ( result . dxcc . entity )); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#callsign_info' ) . text ( convert_case ( result . dxcc . entity )); 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-14 04:42:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if ( $ ( " #sat_name "  ) . val ()  !=  " " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													//logbook/jsonlookupgrid/io77/SAT/0/0
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ . getJSON ( 'logbook/jsonlookupcallsign/'  +  $ ( " #callsign " ) . val () . toUpperCase ()  +  '/SAT/0/0' ,  function ( result ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  // Reset CSS values before updating
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  $ ( '#callsign' ) . removeClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  $ ( '#callsign' ) . removeClass ( " newGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  $ ( '#callsign' ) . attr ( 'title' ,  '' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#callsign' ) . addClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#callsign' ) . attr ( 'title' ,  'Callsign was already worked in the past on this band and mode!' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#callsign' ) . addClass ( " newGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#callsign' ) . attr ( 'title' ,  'New Callsign!' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ . getJSON ( 'logbook/jsonlookupcallsign/'  +  $ ( " #callsign " ) . val () . toUpperCase ()  +  '/0/'  +  $ ( " #band " ) . val ()  + '/'  +  $ ( " #mode " ) . val (),  function ( result ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  // Reset CSS values before updating
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  $ ( '#callsign' ) . removeClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  $ ( '#callsign' ) . removeClass ( " newGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  $ ( '#callsign' ) . attr ( 'title' ,  '' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#callsign' ) . addClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#callsign' ) . attr ( 'title' ,  'Callsign was already worked in the past on this band and mode!' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#callsign' ) . addClass ( " newGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#callsign' ) . attr ( 'title' ,  'New Callsign!' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-14 01:23:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                  changebadge ( result . dxcc . entity ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-13 23:11:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              } 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-16 23:37:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              if ( result . lotw_member  ==  " active " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#lotw_info' ) . text ( " LoTW " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              } 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-13 23:11:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-14 07:14:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              $ ( '#dxcc_id' ) . val ( result . dxcc . adif ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              $ ( '#cqz' ) . val ( result . dxcc . cqz ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-13 16:34:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              $ ( '#ituz' ) . val ( result . dxcc . ituz ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-14 07:14:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 21:49:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              var  redIcon  =  L . icon ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                iconUrl :  icon_dot_url , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                iconSize :      [ 18 ,  18 ],  // size of the icon
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              }); 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-14 07:14:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              // Set Map to Lat/Long
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              markers . clearLayers (); 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 21:49:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												      mymap . setZoom ( 8 ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-07-25 15:11:11 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              if  ( typeof  result . latlng  !==  " undefined "  &&  result . latlng  !==  false )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 21:49:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                var  marker  =  L . marker ([ result . latlng [ 0 ],  result . latlng [ 1 ]],  { icon :  redIcon }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-08 15:45:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                mymap . panTo ([ result . latlng [ 0 ],  result . latlng [ 1 ]]); 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-14 07:14:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              }  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 21:49:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                var  marker  =  L . marker ([ result . dxcc . lat ,  result . dxcc . long ],  { icon :  redIcon }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-08 15:45:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                mymap . panTo ([ result . dxcc . lat ,  result . dxcc . long ]); 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-14 07:14:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              markers . addLayer ( marker ) . addTo ( mymap ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-17 00:49:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            /* Find Locator if the field is empty */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if ( $ ( '#locator' ) . val ()  ==  " " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#locator' ) . val ( result . callsign_qra ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#locator_info' ) . html ( result . bearing ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                if  ( result . callsign_qra  !=  " " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#locator' ) . addClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#locator' ) . attr ( 'title' ,  'Grid was already worked in the past' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#locator' ) . addClass ( " newGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#locator' ) . attr ( 'title' ,  'New grid!' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  $ ( '#locator' ) . removeClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  $ ( '#locator' ) . removeClass ( " newGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  $ ( '#locator' ) . attr ( 'title' ,  '' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            /* Find Operators Name */ 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-17 00:49:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            if ( $ ( '#qsl_via' ) . val ()  ==  " " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#qsl_via' ) . val ( result . qsl_manager ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-03-08 00:36:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            /* Find Operators Name */ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            if ( $ ( '#name' ) . val ()  ==  " " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#name' ) . val ( result . callsign_name ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if ( $ ( '#qth' ) . val ()  ==  " " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#qth' ) . val ( result . callsign_qth ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-03-08 00:36:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            /* 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            *  Update  state  with  returned  value 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if ( $ ( " #input_usa_state " ) . val ()  ==  " " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              $ ( " #input_usa_state " ) . val ( result . callsign_state ) . trigger ( 'change' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-17 01:13:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            if ( $ ( '#iota_ref' ) . val ()  ==  " " )  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                $ ( '#iota_ref' ) . val ( result . callsign_iota ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-07 05:03:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            // Hide the last QSO table
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#qso-last-table' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#partial_view' ) . show (); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            /* display past QSOs */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#partial_view' ) . html ( result . partial ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            /* Reset fields ... */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#callsign_info' ) . text ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#locator_info' ) . text ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#country' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#dxcc_id' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#cqz' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#name' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#qth' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#locator' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#iota_ref' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( " #locator " ) . removeClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( " #locator " ) . removeClass ( " newGrid " ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-14 05:07:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( " #callsign " ) . removeClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( " #callsign " ) . removeClass ( " newGrid " ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-08 00:36:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											      $ ( '#callsign_info' ) . removeClass ( " badge-secondary " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      $ ( '#callsign_info' ) . removeClass ( " badge-success " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      $ ( '#callsign_info' ) . removeClass ( " badge-danger " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#input_usa_state' ) . val ( " " ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        }   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Only set the frequency when not set by userdata/PHP.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( $ ( '#frequency' ) . val ()  ==  " " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ . get ( 'qso/band_to_freq/'  +  $ ( '#band' ) . val ()  +  '/'  +  $ ( '.mode' ) . val (),  function ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#frequency' ) . val ( result ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#frequency_rx' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    /* on mode change */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( '.mode' ) . change ( function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ . get ( 'qso/band_to_freq/'  +  $ ( '#band' ) . val ()  +  '/'  +  $ ( '.mode' ) . val (),  function ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#frequency' ) . val ( result ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#frequency_rx' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          });   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      });   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    /* Calculate Frequency */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      /* on band change */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '#band' ) . change ( function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ . get ( 'qso/band_to_freq/'  +  $ ( this ) . val ()  +  '/'  +  $ ( '.mode' ) . val (),  function ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#frequency' ) . val ( result ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#frequency_rx' ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          });   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      /* On Key up Calculate Bearing and Distance */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( " #locator " ) . keyup ( function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if  ( $ ( this ) . val ())  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-24 23:02:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        var  qra_input  =  $ ( this ) . val (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-08-16 19:06:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        var  qra_lookup  =  qra_input . substring ( 0 ,  4 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if ( qra_lookup . length  >=  4 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          // Check Log if satname is provided
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          if ( $ ( " #sat_name "  ) . val ()  !=  " " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            //logbook/jsonlookupgrid/io77/SAT/0/0
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . getJSON ( 'logbook/jsonlookupgrid/'  +  qra_lookup . toUpperCase ()  +  '/SAT/0/0' ,  function ( result ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              // Reset CSS values before updating
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              $ ( '#locator' ) . removeClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              $ ( '#locator' ) . removeClass ( " newGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              $ ( '#locator' ) . attr ( 'title' ,  '' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#locator' ) . addClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#locator' ) . attr ( 'title' ,  'Grid was already worked in the past' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#locator' ) . addClass ( " newGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#locator' ) . attr ( 'title' ,  'New grid!' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . getJSON ( 'logbook/jsonlookupgrid/'  +  qra_lookup . toUpperCase ()  +  '/0/'  +  $ ( " #band " ) . val ()  + '/'  +  $ ( " #mode " ) . val (),  function ( result ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              // Reset CSS values before updating
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              $ ( '#locator' ) . removeClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              $ ( '#locator' ) . removeClass ( " newGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              $ ( '#locator' ) . attr ( 'title' ,  '' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#locator' ) . addClass ( " workedGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#locator' ) . attr ( 'title' ,  'Grid was already worked in the past' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#locator' ) . addClass ( " newGrid " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#locator' ) . attr ( 'title' ,  'New grid!' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-08 15:45:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        if ( qra_input . length  >=  4  &&  $ ( this ) . val () . length  >  0 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-24 23:02:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          $ . getJSON ( 'logbook/qralatlngjson/'  +  $ ( this ) . val (),  function ( result ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            // Set Map to Lat/Long
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            markers . clearLayers (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( typeof  result  !==  " undefined " )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 21:49:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              var  redIcon  =  L . icon ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        iconUrl :  icon_dot_url , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        iconSize :      [ 18 ,  18 ],  // size of the icon
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  marker  =  L . marker ([ result [ 0 ],  result [ 1 ]],  { icon :  redIcon }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-08 15:45:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              mymap . setZoom ( 8 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              mymap . panTo ([ result [ 0 ],  result [ 1 ]]); 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-24 23:02:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            markers . addLayer ( marker ) . addTo ( mymap ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          }) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ ( '#locator_info' ) . load ( " logbook/searchbearing/ "  +  $ ( this ) . val ()) . fadeIn ( " slow " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Change report based on mode
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( '.mode' ) . change ( function (){ 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-25 14:09:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      setRst ( $ ( '.mode' )  . val ()); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-25 14:09:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    function  setRst ( mode )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-09 02:54:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        if ( mode  ==  'JT65'  ||  mode  ==  'JT65B'  ||  mode  ==  'JT6C'  ||  mode  ==  'JTMS'  ||  mode  ==  'ISCAT'  ||  mode  ==  'MSK144'  ||  mode  ==  'JTMSK'  ||  mode  ==  'QRA64'  ||  mode  ==  'FT8'  ||  mode  ==  'FT4'  ||  mode  ==  'JS8'  ||  mode  ==  'JT9'  ||  mode  ==  'JT9-1'  ||  mode  ==  'ROS' ){ 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-25 14:09:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( '#rst_sent' ) . val ( '-5' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#rst_recv' ) . val ( '-5' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }  else  if  ( mode  ==  'FSK441'  ||  mode  ==  'JT6M' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#rst_sent' ) . val ( '26' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#rst_recv' ) . val ( '26' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }  else  if  ( mode  ==  'CW'  ||  mode  ==  'RTTY'  ||  mode  ==  'PSK31'  ||  mode  ==  'PSK63' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#rst_sent' ) . val ( '599' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#rst_recv' ) . val ( '599' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#rst_sent' ) . val ( '59' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#rst_recv' ) . val ( '59' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  /* Javascript for controlling rig frequency. */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  if  (  $_GET [ 'manual' ]  ==  0  )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  updateFromCAT  =  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if ( $ ( 'select.radios option:selected' ) . val ()  !=  '0' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      radioID  =  $ ( 'select.radios option:selected' ) . val ();  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ . getJSON (  " radio/json/ "  +  radioID ,  function (  data  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          /*  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              " uplink_freq " :  " 2400210000 " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              " downlink_freq " :  " 10489710000 " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              " mode " :  " SSB " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              " satmode " :  " " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              " satname " :  " ES'HAIL-2 " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          }   */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          if  ( data . uplink_freq  !=  " " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#frequency' ) . val ( data . uplink_freq ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( " #band " ) . val ( frequencyToBand ( data . uplink_freq )); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          if  ( data . downlink_freq  !=  " " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#frequency_rx' ) . val ( data . downlink_freq ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-18 03:21:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          old_mode  =  $ ( " .mode " ) . val (); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          if  ( data . mode  ==  " LSB "  ||  data . mode  ==  " USB "  ||  data . mode  ==  " SSB " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( " .mode " ) . val ( 'SSB' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( " .mode " ) . val ( data . mode );   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-18 03:21:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          if  ( old_mode  !==  $ ( " .mode " ) . val ())  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            // Update RST on mode change via CAT
 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-25 14:09:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            setRst ( $ ( " .mode " ) . val ()); 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-18 03:21:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          $ ( " #sat_name " ) . val ( data . satname );   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ ( " #sat_mode " ) . val ( data . satmode );   
							 
						 
					
						
							
								
									
										
										
										
											2020-05-13 05:51:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          // Display CAT Timeout warnng based on the figure given in the config file
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            var  minutes  =  Math . floor ( < ? php  echo  $this -> config -> item ( 'cat_timeout_interval' );  ?>  / 60);
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if ( data . updated_minutes_ago  >  minutes )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              if ( $ ( '.radio_timeout_error' ) . length  ==  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '.qso_panel' ) . prepend ( '<div class="alert alert-danger radio_timeout_error" role="alert">Radio Connection Error: '  +  $ ( 'select.radios option:selected' ) . text ()  +  ' data is '  +  data . updated_minutes_ago  +  ' minutes old.</div>' );   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '.radio_timeout_error' ) . text ( 'Radio Connection Error: '  +  $ ( 'select.radios option:selected' ) . text ()  +  ' data is '  +  data . updated_minutes_ago  +  ' minutes old.' );     
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              $ ( " .radio_timeout_error "  ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-09-07 00:09:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  // Update frequency every three second
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  setInterval ( updateFromCAT ,  3000 ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // If a radios selected from drop down select radio update.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $ ( '.radios' ) . change ( updateFromCAT ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // If radio isn't SatPC32 clear sat_name and sat_mode
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $ (  " .radios "  ) . change ( function ()  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-18 23:00:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      if  ( $ ( " .radios option:selected " ) . text ()  !=  " SatPC32 " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( " #sat_name " ) . val ( " " );   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( " #sat_mode " ) . val ( " " );   
							 
						 
					
						
							
								
									
										
										
										
											2019-08-18 23:04:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( " #frequency " ) . val ( " " );   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( " #frequency_rx " ) . val ( " " );  
							 
						 
					
						
							
								
									
										
										
										
											2020-03-03 03:56:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( " #selectPropagation " ) . val ( $ ( " #selectPropagation option:first " ) . val ()); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-13 05:51:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if  ( $ ( " .radios option:selected " ) . text ()  ==  " None " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( " .radio_timeout_error "  ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  function  convert_case ( str )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  lower  =  str . toLowerCase (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    return  lower . replace ( / ( ^|  )( \w ) / g ,  function ( x )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  x . toUpperCase (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-26 00:59:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-26 01:43:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " logbook "  &&  $this -> uri -> segment ( 2 )  ==  " view " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  mymap  =  L . map ( 'map' ) . setView ([ lat , long ],  5 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  L . tileLayer ( 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw' ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    maxZoom :  18 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    attribution :  'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a>, '  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      'Generated by <a href="http://www.cloudlog.co.uk/">Cloudlog</a>' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    id :  'mapbox.streets' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }) . addTo ( mymap ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 21:37:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  redIcon  =  L . icon ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      iconUrl :  icon_dot_url , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      iconSize :      [ 18 ,  18 ],  // size of the icon
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  L . marker ([ lat , long ],  { icon :  redIcon }) . addTo ( mymap ) 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-26 01:43:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    . bindPopup ( callsign ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  mymap . on ( 'click' ,  onMapClick ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-26 00:59:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " update " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( document ) . ready ( function (){  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( '#btn_update_dxcc' ) . bind ( 'click' ,  function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#dxcc_update_status' ) . show (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ . ajax ({ url : " update/dxcc " }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        setTimeout ( update_stats , 5000 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    function  update_stats (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#dxcc_update_status' ) . load ( '<?php echo base_url()?>updates/status.html' ,  function ( val ){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#dxcc_update_staus' ) . html ( val ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  (( val   ===  null )  ||  ( val . substring ( 0 , 4 )  != " DONE " )){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                setTimeout ( update_stats ,  5000 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-26 00:59:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-27 04:11:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " gridsquares " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  type = " text/javascript "  src = " <?php echo base_url();?>assets/js/leaflet/L.MaidenheadColoured.js " ></ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  layer  =  L . tileLayer ( 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    maxZoom :  18 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    attribution :  'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, '  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      '<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, '  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      'Created by Cloudlog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    id :  'mapbox.streets' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  map  =  L . map ( 'map' ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    layers :  [ layer ], 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    center :  [ 19 ,  0 ], 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-23 23:50:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    zoom :  3 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-27 04:11:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  grid_two  =  < ? php  echo  $grid_2char ;  ?> ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  grid_four  =  < ? php  echo  $grid_4char ;  ?> ;
 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 21:59:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  var  grid_six  =  < ? php  echo  $grid_6char ;  ?> ;
 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-27 04:11:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-29 00:07:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  var  grid_two_confirmed  =  < ? php  echo  $grid_2char_confirmed ;  ?> ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  grid_four_confirmed  =  < ? php  echo  $grid_4char_confirmed ;  ?> ;
 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 21:59:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  var  grid_six_confirmed  =  < ? php  echo  $grid_6char_confirmed ;  ?> ;
 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-29 00:07:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-27 04:11:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  var  maidenhead  =  L . maidenhead () . addTo ( map ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-03-15 06:09:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  map . on ( 'click' ,  onMapClick ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  function  onMapClick ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  LatLng  =  event . latlng ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  lat  =  LatLng . lat ;  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  lng  =  LatLng . lng ;            
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  locator  =  LatLng2Loc ( lat , lng ,  10 ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-15 06:13:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    var  loc_4char  =  locator . substring ( 0 ,  4 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    console . log ( loc_4char ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-16 19:20:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    console . log ( map . getZoom ()); 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-17 01:35:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-03-16 19:20:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if ( map . getZoom ()  >  5 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-17 01:35:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      var  search_type  =  " <?php echo  $this->uri ->segment(2); ?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if ( search_type  ==  " satellites " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        console . log ( " satellites search " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  search_tags  =  " search_sat/ "  +  loc_4char ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  band  =  " <?php echo  $this->uri ->segment(3); ?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        console . log ( band ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  search_tags  =  " search_band/ "  +  band  +  " / "  +  loc_4char ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ . getJSON (  " <?php echo site_url('gridsquares/');?> "  +  search_tags ,  function (  data  )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-22 18:12:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        var  count  =  Object . keys ( data ) . length ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-21 03:05:00 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        console . log ( " Count:  "  +  count ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-17 01:35:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        var  items  =  []; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ . each (  data ,  function (  i ,  item  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          console . log ( item . COL_CALL  +  item . COL_SAT_NAME ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          if ( item . COL_SAT_NAME  !=  undefined )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-21 03:05:00 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            items . push (  " <tr><td> "  +  item . COL_TIME_ON  +  " </td><td> "  +  item . COL_CALL  +  " </td><td> "  +  item . COL_MODE  +  " </td><td> "  +  item . COL_SAT_NAME  +  " </td><td> "  +  item . COL_GRIDSQUARE  +  " </td></tr> "  ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-17 01:35:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          }  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-21 03:05:00 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            items . push (  " <tr><td> "  +  item . COL_TIME_ON  +  " </td><td> "  +  item . COL_CALL  +  " </td><td> "  +  item . COL_MODE  +  " </td><td> "  +  item . COL_BAND  +  " </td><td> "  +  item . COL_GRIDSQUARE  +  " </td></tr> "  ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-17 01:35:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-21 03:05:00 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( '#qso_count' ) . text ( count ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-21 17:48:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        if  ( count  >  1 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								           $ ( '#gt1_qso' ) . text ( " s " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								           $ ( '#gt1_qso' ) . text ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-22 18:12:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-03-17 01:45:28 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( " #grid_results tbody " ) . empty ();  
							 
						 
					
						
							
								
									
										
										
										
											2020-04-22 18:12:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        if  ( count  >  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ ( " #grid_results tbody " ) . append ( items . join (  " "  )); 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-17 01:35:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-22 18:12:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          $ ( '#square_number' ) . text ( loc_4char ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          $ ( '#exampleModal' ) . modal ( 'show' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-17 01:35:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-22 18:12:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-16 19:20:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-15 06:09:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  }; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-29 01:17:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " gridsquares "  &&  $this -> uri -> segment ( 2 )  ==  " band " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  bands_available  =  < ? php  echo  $bands_available ;  ?> ;
 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-25 14:36:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  $ ( '#gridsquare_bands' ) . append ( '<option value="All">All</option>' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $ . each ( bands_available ,  function ( key ,  value )  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-29 01:17:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     $ ( '#gridsquare_bands' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         . append ( $ ( " <option></option> " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    . attr ( " value " , value ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    . text ( value ));  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  num  =  " <?php echo  $this->uri ->segment(3);?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( " #gridsquare_bands option " ) . each ( function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if ( $ ( this ) . val () == num ){  // EDITED THIS LINE
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( this ) . attr ( " selected " , " selected " );     
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $ ( function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      // bind change event to select
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( '#gridsquare_bands' ) . on ( 'change' ,  function  ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          var  url  =  $ ( this ) . val ();  // get selected value
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          if  ( url )  {  // require a URL
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              window . location  =  " <?php echo site_url('gridsquares/band/');?> "  +  url 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 17:49:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-25 05:29:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " dayswithqso " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  src = " https://cdn.jsdelivr.net/npm/chart.js@2.8.0 " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            url :  baseURL + 'index.php/dayswithqso/get_days' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            success :  function ( data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                var  labels  =  []; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                var  dataDxcc  =  []; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ . each ( data ,  function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    labels . push ( this . Year ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    dataDxcc . push ( this . Days ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                var  ctx  =  document . getElementById ( " myChartDiff " ) . getContext ( '2d' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                var  myChart  =  new  Chart ( ctx ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    type :  'bar' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        labels :  labels , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        datasets :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            label :  'Days with QSOs' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            data :  dataDxcc , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            backgroundColor :  'rgba(54, 162, 235, 0.2)' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            borderColor :  'rgba(54, 162, 235, 1)' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            borderWidth :  2 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    options :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        scales :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            yAxes :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                ticks :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                beginAtZero : true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            }] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 17:49:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " distances " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  src = " https://code.highcharts.com/stock/highstock.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  bands_available  =  < ? php  echo  $bands_available ;  ?> ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $ . each ( bands_available ,  function ( key ,  value )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     $ ( '#distplot_bands' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         . append ( $ ( " <option></option> " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    . attr ( " value " , value ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    . text ( value )); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  num  =  " <?php echo  $this->uri ->segment(3);?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( " #distplot_bands option " ) . each ( function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if ( $ ( this ) . val () == num ){  // EDITED THIS LINE
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( this ) . attr ( " selected " , " selected " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  function  distPlot ( form )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( " .alert " ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          url :  baseURL + 'index.php/distances/get_distances' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          data :  { 'locator' :  'JP50HP' ,  'band' :  form . distplot_bands . value }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          success :  function ( tmp )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              if  ( tmp . ok  ==  'OK' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  if  ( ! ( $ ( '#information' ) . length  >  0 )) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      $ ( " #distances_div " ) . append ( '<div id="information"></div><div id="graphcontainer" style="height: 600px; margin: 0 auto"></div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  var  options  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      chart :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          type :  'column' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          zoomType :  'xy' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          renderTo :  'graphcontainer' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      title :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          text :  'Mode distribution' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      xAxis :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          categories :  [], 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          crosshair :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          type :  " category " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          min : 0 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          max : 100 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      yAxis :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          title :  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-20 23:14:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                              text :  '# QSOs' 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 17:49:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      navigator :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          enabled :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          xAxis :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                              labels :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                  formatter :  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                      return  this . value  *  '50'  +  ' km' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                              } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      rangeSelector :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          selected :  1 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      tooltip :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          formatter :  function  ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                              if ( this . point )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                  return  " Distance:  "  +  options . xAxis . categories [ this . point . x ]  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                      " <br />Callsign(s) worked (max 5 shown):  "  +  myComments [ this . point . x ]  + 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-20 23:14:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                      " <br />Number of QSOs: <strong> "  +  series . data [ this . point . x ]  +  " </strong> " ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 17:49:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                              } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      series :  [] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  }; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  var  myComments = []; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  var  series  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      data :  [], 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      showInNavigator :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  }; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  $ . each ( tmp . qsodata ,  function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      myComments . push ( this . calls ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      options . xAxis . categories . push ( this . dist ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-20 23:14:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                      series . name  =  'Number of QSOs' ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 17:49:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                      series . data . push ( this . count ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  options . series . push ( series ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-21 00:12:31 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                  $ ( '#information' ) . html ( tmp . qrb . Qsoes  +  "  contacts were plotted.<br /> Your furthest contact was with  "  +  tmp . qrb . Callsign 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-20 23:14:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                      +  "  in gridsquare  " +  tmp . qrb . Grid 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      + "  the distance was  " 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 17:49:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                      + tmp . qrb . Distance  + " km. " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  var  chart  =  new  Highcharts . Chart ( options ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  if  (( $ ( '#information' ) . length  >  0 ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      $ ( " #information " ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                      $ ( " #graphcontainer " ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  $ ( " #distances_div " ) . append ( '<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>'  +  tmp . Error  +  '</div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-27 04:11:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
									
										
										
										
											2019-05-14 23:46:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-26 05:11:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < ? php  if  ( $this -> uri -> segment ( 2 )  ==  " import " )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < script  type = " text/javascript "  src = " https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < script  type = " text/javascript "  src = " https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/js/tempusdominus-bootstrap-4.min.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < script  type = " text/javascript " > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( function  ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( '#datetimepicker1' ) . datetimepicker ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    format :  'DD/MM/YYYY' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-21 01:43:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < ? php  if  ( $this -> uri -> segment ( 1 )  ==  " qrz " )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            function  ExportQrz ( station_id )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-08 21:52:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                if  ( $ ( " .alert " ) . length  >  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( " .alert " ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                if  ( $ ( " .errormessages " ) . length  >  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( " .errormessages " ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-21 01:43:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                $ ( " .ld-ext-right " ) . addClass ( 'running' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( " .ld-ext-right " ) . prop ( 'disabled' ,  true ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    url :  baseURL  +  'index.php/qrz/upload_station' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    data :  { 'station_id' :  station_id }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    success :  function  ( data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .ld-ext-right " ) . removeClass ( 'running' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .ld-ext-right " ) . prop ( 'disabled' ,  false ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        if  ( data . status  ==  'OK' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            $ . each ( data . info ,  function ( index ,  value ){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                $ ( '#modcount' + value . station_id ) . html ( value . modcount ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                $ ( '#notcount' + value . station_id ) . html ( value . notcount ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                $ ( '#totcount' + value . station_id ) . html ( value . totcount ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            $ ( " .card-body " ) . append ( '<div class="alert alert-success" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>'  +  data . infomessage  +  '</div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            $ ( " .card-body " ) . append ( '<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>'  +  data . info  +  '</div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-08 21:52:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        if  ( data . errormessages . length  >  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            $ ( " .card-body " ) . append ( ''  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                '<div class="errormessages"><p>\n'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                '                            <button class="btn btn-danger" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">\n'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                '                                Show error messages\n'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                '                            </button>\n'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                '                            </p>\n'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                '                            <div class="collapse" id="collapseExample">\n'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                '                                <div class="card card-body"><div class="errors"></div>\n'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                '                            </div>\n'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                '                            </div></div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            $ . each ( data . errormessages ,  function ( index ,  value )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                $ ( " .errors " ) . append ( '<li>'  +  value ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-21 01:43:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < ? php  }  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-19 13:57:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-18 18:17:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            function  displayQso ( id )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    url :  baseURL  +  'index.php/logbook/view/'  +  id , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            title :  'QSO Data' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            cssClass :  'qso-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            onshown :  function ( dialog )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                var  qsoid  =  $ ( " #qsoid " ) . text (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                $ ( " .editButton " ) . html ( '<a class="btn btn-success" id="edit_qso" href="javascript:qso_edit(' + qsoid + ')"><i class="fas fa-edit"></i> Edit QSO</a>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                var  lat  =  $ ( " #lat " ) . text (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                var  long  =  $ ( " #long " ) . text (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                var  callsign  =  $ ( " #callsign " ) . text (); 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-25 02:22:09 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                var  mymap  =  L . map ( 'mapqso' ) . setView ([ lat , long ],  5 ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-18 18:17:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                L . tileLayer ( 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw' ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    maxZoom :  18 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    attribution :  'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a>, '  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        'Generated by <a href="http://www.cloudlog.co.uk/">Cloudlog</a>' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    id :  'mapbox.streets' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                }) . addTo ( mymap ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                var  redIcon  =  L . icon ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    iconUrl :  icon_dot_url , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    iconSize :      [ 18 ,  18 ],  // size of the icon
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                L . marker ([ lat , long ],  { icon :  redIcon }) . addTo ( mymap ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    . bindPopup ( callsign ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                mymap . on ( 'click' ,  onMapClick ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-18 18:17:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 2 )  ==  " dxcc " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( '.tabledxcc' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " pageLength " :  25 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        responsive :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " scrollY " :         " 400px " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " scrollCollapse " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " paging " :          false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " scrollX " :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 12:00:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        function  displayDxccContacts ( country ,  band )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            var  baseURL  =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 12:00:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                url :  baseURL  +  'index.php/awards/dxcc_details_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                type :  'post' , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    'Country' :  country , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 12:00:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    'Band' :  band 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }, 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                success :  function  ( html )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 12:00:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        title :  'QSO Data' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        cssClass :  'qso-dxcc-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								 </ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 12:00:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < ? php  }  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 17:02:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 2 )  ==  " vucc_band " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( '.tablevucc' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " pageLength " :  25 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        responsive :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " scrollY " :         " 400px " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " scrollCollapse " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " paging " :          false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " scrollX " :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 20:09:46 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            function  displayVuccContacts ( gridsquare ,  band )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    url :  baseURL  +  'index.php/awards/vucc_details_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    data :  { 'Gridsquare' :  gridsquare , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        'Band' :  band 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            title :  'QSO Data' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            cssClass :  'qso-vucc-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            }] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-09-20 20:09:46 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 19:57:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 2 )  ==  " dok " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 19:57:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        function  displayDokContacts ( dok ,  band )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                url :  baseURL  +  'index.php/awards/dok_details_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                data :  { 'Dok' :  dok , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    'Band' :  band 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        title :  'QSO Data' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        cssClass :  'qso-dok-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-09-20 19:57:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 2 )  ==  " iota " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 19:57:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( '.tableiota' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " pageLength " :  25 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            responsive :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " scrollY " :         " 400px " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " scrollCollapse " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " paging " :          false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " scrollX " :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 17:09:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        function  displayIotaContacts ( iota ,  band )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                url :  baseURL  +  'index.php/awards/iota_details_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                data :  { 'Iota' :  iota , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    'Band' :  band 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        title :  'QSO Data' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        cssClass :  'qso-iota-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    </ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 17:09:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-09-20 17:02:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 2 )  ==  " cq " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 17:02:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            function  displayCqContacts ( cqzone ,  band )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    url :  baseURL  +  'index.php/awards/cq_details_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    data :  { 'CQZone' :  cqzone , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        'Band' :  band 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            title :  'QSO Data' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            cssClass :  'qso-cq-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            }] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-09-20 17:02:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 2 )  ==  " was " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-19 13:57:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        function  displayWasContacts ( was ,  band )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-25 02:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                url :  baseURL  +  'index.php/awards/was_details_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                data :  { 'State' :  was , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    'Band' :  band 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        title :  'QSO Data' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-18 18:17:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        cssClass :  'qso-was-dialog' , 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-25 02:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-19 13:57:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-09-20 17:02:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
									
										
										
										
											2020-08-25 02:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        function  qsl_rcvd ( id ,  method )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                url :  baseURL  +  'index.php/qso/qsl_rcvd_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                data :  { 'id' :  id , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    'method' :  method 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                success :  function ( data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    if  ( data . message  ==  'OK' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " #qso_ "  +  id ) . find ( " td:eq(8) " ) . find ( " span:eq(1) " ) . attr ( 'class' ,  'qsl-green' );  // Paints arrow green
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .qsl_ "  +  id ) . remove ();  // removes choice from menu
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .bootstrap-dialog-message " ) . append ( '<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>You are not allowed to update QSL status!</div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-19 13:57:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-25 02:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        function  qso_delete ( id ,  call )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            BootstrapDialog . confirm ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                title :  'DANGER' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                message :  'Warning! Are you sure you want delete QSO with '  +  call  +  '?'  , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                type :  BootstrapDialog . TYPE_DANGER , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                closable :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                draggable :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                btnOKClass :  'btn-danger' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                callback :  function ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    if ( result )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 04:03:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        $ ( " .edit-dialog " ) . modal ( 'hide' ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-25 02:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            url :  baseURL  +  'index.php/qso/delete_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            data :  { 'id' :  id 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            success :  function ( data )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 04:03:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                $ ( " .alert " ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                $ ( " .bootstrap-dialog-message " ) . prepend ( '<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>The contact with '  +  call  +  ' has been deleted!</div>' ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-25 02:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                $ ( " #qso_ "  +  id ) . remove ();  // removes qso from table in dialog
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        function  qso_edit ( id )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                url :  baseURL  +  'index.php/qso/edit_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                data :  { 'id' :  id 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        title :  'QSO Data' , 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 04:03:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        cssClass :  'edit-dialog' , 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-25 02:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-19 13:57:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 04:03:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        function  qso_save ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            var  myform  =  document . getElementById ( " qsoform " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            var  fd  =  new  FormData ( myform ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                url :  baseURL  +  'index.php/qso/qso_save_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                data :  fd , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                cache :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                processData :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                contentType :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                type :  'POST' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                success :  function  ( dataofconfirm )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( " .edit-dialog " ) . modal ( 'hide' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( " .qso-dialog " ) . modal ( 'hide' ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-01 00:19:11 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    < ? php  if  ( $this -> uri -> segment ( 1 )  !=  " search "  &&  $this -> uri -> segment ( 2 )  !=  " filter " )  {  ?> location.reload();<?php } ?>
 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 04:03:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-19 13:57:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        </ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-26 00:22:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < ? php  if  ( $this -> uri -> segment ( 1 )  ==  " timeline " )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            function  displayTimelineContacts ( adif ,  band )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    url :  baseURL  +  'index.php/timeline/details' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    data :  { 'Adif' :  adif , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        'Band' :  band 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            title :  'QSO Data' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            cssClass :  'qso-was-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            }] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-18 18:17:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-01-09 23:18:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  </ body > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-18 03:21:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								</ html >