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 >  
						 
					
						
							
								
									
										
										
										
											2020-11-11 23:08:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script  src = " <?php echo base_url(); ?>assets/js/popper.min.js " ></ script >  
						 
					
						
							
								
									
										
										
										
											2020-09-16 04:20:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< 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 >  
						 
					
						
							
								
									
										
										
										
											2021-09-11 00:53:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script  type = " text/javascript "  src = " <?php echo base_url() ;?>assets/js/darkmodehelpers.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 >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-04-30 06:50:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  load_was_map ()  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    BootstrapDialog . show ({ 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-27 18:11:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            title :  'Worked All States Map (' + $ ( '#band2' ) . val () + ' ' + $ ( '#mode' ) . val () + ')' , 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-30 06:50:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            cssClass :  'was-map-dialog' , 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-27 18:11:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            message :  $ ( '<div></div>' ) . load ( site_url  +  '/awards/was_map/'  +  $ ( '#band2' ) . val ()  +  '/'  +  $ ( '#mode' ) . val ()) 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-30 06:50:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ 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-11-08 18:26:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " <?php echo base_url(); ?>assets/js/moment.min.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " <?php echo base_url(); ?>assets/js/tempusdominus-bootstrap-4.min.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-16 04:09:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < 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  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-01-30 04:11:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script  type = " text/javascript "  src = " <?php echo base_url(); ?>assets/js/datatables.min.js " ></ script >  
						 
					
						
							
								
									
										
										
										
											2020-10-19 20:10:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script  type = " text/javascript "  src = " <?php echo base_url(); ?>assets/js/dataTables.buttons.min.js " ></ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  type = " text/javascript "  src = " <?php echo base_url(); ?>assets/js/buttons.html5.min.js " ></ script >  
						 
					
						
							
								
									
										
										
										
											2021-01-16 06:55:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script  type = " text/javascript "  src = " <?php echo base_url();?>assets/js/selectize.js " ></ script >  
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											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  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-24 02:18:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:40:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								function  export_search_result (){  
						 
					
						
							
								
									
										
										
										
											2021-09-24 02:18:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									var  result  =  $ ( '#builder' ) . queryBuilder ( 'getRules' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( ! $ . isEmptyObject ( result ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										xhttp  =  new  XMLHttpRequest (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										xhttp . onreadystatechange  =  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											var  a ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( xhttp . readyState  ===  4  &&  xhttp . status  ===  200 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												// Trick for making downloadable link
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												a  =  document . createElement ( 'a' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												a . href  =  window . URL . createObjectURL ( xhttp . response ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												// Give filename you wish to download
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												a . download  =  " advanced_search_export.adi " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												a . style . display  =  'none' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												document . body . appendChild ( a ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												a . click (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Post data to URL which handles post request
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										xhttp . open ( " POST " ,  " <?php echo site_url('search/export_to_adif');?> " ,  true ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										xhttp . setRequestHeader ( " Content-type " ,  " application/x-www-form-urlencoded " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// You should set responseType as blob for binary responses
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										xhttp . responseType  =  'blob' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										xhttp . send ( " search= "  +  JSON . stringify ( result ,  null ,  2 )); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:40:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2021-09-24 02:18:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:40:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								function  export_stored_query ( id ){  
						 
					
						
							
								
									
										
										
										
											2021-09-26 02:06:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									xhttp  =  new  XMLHttpRequest (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									xhttp . onreadystatechange  =  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  a ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( xhttp . readyState  ===  4  &&  xhttp . status  ===  200 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// Trick for making downloadable link
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											a  =  document . createElement ( 'a' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											a . href  =  window . URL . createObjectURL ( xhttp . response ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// Give filename you wish to download
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											a . download  =  " advanced_search_export.adi " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											a . style . display  =  'none' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											document . body . appendChild ( a ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											a . click (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// Post data to URL which handles post request
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									xhttp . open ( " POST " ,  " <?php echo site_url('search/export_stored_query_to_adif');?> " ,  true ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									xhttp . setRequestHeader ( " Content-type " ,  " application/x-www-form-urlencoded " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// You should set responseType as blob for binary responses
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									xhttp . responseType  =  'blob' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									xhttp . send ( " id= "  +  id ); 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:40:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( '#btn-save' ) . on ( 'click' ,  function ()  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  resultquery  =  $ ( '#builder' ) . queryBuilder ( 'getRules' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( ! $ . isEmptyObject ( resultquery ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										let  message  =  'Description: <input class="form-control input-group-sm getqueryname">' 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-24 02:18:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:40:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										BootstrapDialog . confirm ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											title :  'Query description' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											size :  BootstrapDialog . SIZE_NORMAL , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											cssClass :  'description-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											closable :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											message :  message , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											btnCancelLabel :  'Cancel' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											btnOKLabel :  'Save' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											callback :  function ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ . post (  " <?php echo site_url('search/save_query');?> " ,  {  search :  JSON . stringify ( resultquery ,  null ,  2 ),  description :  $ ( " .getqueryname " ) . val ()  }) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														. done ( function (  data  )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-26 02:06:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
															$ ( " .alert " ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( " .card-body.main " ) . append ( '<div class="alert alert-success"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>Your query has been saved!</div>' ); 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-26 00:08:31 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
															$ ( '#querydropdown' ) . append (  new  Option ( data . description ,  data . id )  );  // We add the saved query to the dropdown
 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:40:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									else { 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-26 02:06:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											title :  'Stored Queries' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											type :  BootstrapDialog . TYPE_WARNING , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											size :  BootstrapDialog . SIZE_NORMAL , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											cssClass :  'queries-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											message :  'You need to make a query before you search!' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}); 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:40:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-24 02:18:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:40:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								function  run_query ()  {  
						 
					
						
							
								
									
										
										
										
											2021-09-26 02:06:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( " .alert " ) . remove (); 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:40:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( " .runbutton " ) . addClass ( 'running' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( " .runbutton " ) . prop ( 'disabled' ,  true ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									let  id  =  $ ( '#querydropdown' ) . val (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ . post (  " <?php echo site_url('search/run_query');?> " ,  {  id :  id }) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										. done ( function (  data  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '.exportbutton' ) . html ( '<button class="btn btn-sm btn-primary" onclick="export_stored_query(' + id + ')">Export to ADIF</button>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '.card-body.result' ) . empty (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( " .search-results-box " ) . show (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '.card-body.result' ) . append ( data ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '.table' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												" pageLength " :  25 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												responsive :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												" scrollY " :         " 400px " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												" scrollCollapse " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												" paging " :          false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												" scrollX " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// change color of csv-button if dark mode is chosen
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( isDarkModeTheme ())  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( " .buttons-csv " ) . css ( " color " ,  " white " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( " .runbutton " ) . removeClass ( 'running' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( " .runbutton " ) . prop ( 'disabled' ,  false ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  delete_stored_query ( id )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									BootstrapDialog . confirm ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										title :  'DANGER' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										message :  'Warning! Are you sure you want delete this stored query?'  , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										type :  BootstrapDialog . TYPE_DANGER , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										closable :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										draggable :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										btnOKClass :  'btn-danger' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										callback :  function ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													url :  base_url  +  'index.php/search/delete_query' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													data :  { 'id' :  id 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													success :  function ( data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( " .bootstrap-dialog-message " ) . prepend ( '<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>The stored query has been deleted!</div>' ); 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:46:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														$ ( " #query_ "  +  id ) . remove ();  // removes query from table in dialog
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( " #querydropdown option[value=' " + id + " '] " ) . remove ();  // removes query from dropdown
 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:40:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  edit_stored_query ( id )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( '#btn-edit' ) . on ( 'click' ,  function ()  {  
						 
					
						
							
								
									
										
										
										
											2021-09-26 02:06:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( " .alert " ) . remove (); 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:40:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										url :  base_url  +  'index.php/search/get_stored_queries' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										success :  function  ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												title :  'Stored Queries' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												cssClass :  'queries-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( '#btn-get' ) . on ( 'click' ,  function ()  {  
						 
					
						
							
								
									
										
										
										
											2021-09-26 02:06:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( " .alert " ) . remove (); 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:40:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									var  result  =  $ ( '#builder' ) . queryBuilder ( 'getRules' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( ! $ . isEmptyObject ( result ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( " .searchbutton " ) . addClass ( 'running' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( " .searchbutton " ) . prop ( 'disabled' ,  true ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ . post (  " <?php echo site_url('search/search_result');?> " ,  {  search :  JSON . stringify ( result ,  null ,  2 ),  temp :  " testvar "  }) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											. done ( function (  data  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '.exportbutton' ) . html ( '<button class="btn btn-sm btn-primary" onclick="export_search_result();">Export to ADIF</button>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '.card-body.result' ) . empty (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( " .search-results-box " ) . show (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '.card-body.result' ) . append ( data ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '.table' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													" pageLength " :  25 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													responsive :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													" scrollY " :         " 400px " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													" scrollCollapse " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													" paging " :          false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													" scrollX " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												// change color of csv-button if dark mode is chosen
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if  ( isDarkModeTheme ())  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( " .buttons-csv " ) . css ( " color " ,  " white " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( " .searchbutton " ) . removeClass ( 'running' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( " .searchbutton " ) . prop ( 'disabled' ,  false ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( " #btn-save " ) . show (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									else { 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-26 02:06:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											title :  'Stored Queries' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											type :  BootstrapDialog . TYPE_WARNING , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											size :  BootstrapDialog . SIZE_NORMAL , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											cssClass :  'queries-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											message :  'You need to make a query before you search!' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}); 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-25 23:40:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
									
										
										
										
											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 >  
						 
					
						
							
								
									
										
										
										
											2020-11-11 23:08:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								var  $ =  jQuery . noConflict ();  
						 
					
						
							
								
									
										
										
										
											2019-10-06 23:38:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								$ ( '[data-fancybox]' ) . fancybox ({  
						 
					
						
							
								
									
										
										
										
											2020-11-08 18:26:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    toolbar   :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    smallBtn  :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    iframe  :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        preload  :  false 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
									
										
										
										
											2019-10-09 04:11:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-14 17:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								// Here we capture ALT-L to invoice the Quick lookup
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								document . onkeyup  =  function ( e )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// ALT-W wipe
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( e . altKey  &&  e . which  ==  76 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										spawnLookupModal (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								};  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// This displays the dialog with the form and it's where the resulttable is displayed
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  spawnLookupModal ()  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										url :  base_url  +  'index.php/lookup' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										success :  function  ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												title :  'Quick lookup' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												cssClass :  'lookup-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												onshown :  function ( dialog )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#quicklookuptype' ) . change ( function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														var  type  =  $ ( '#quicklookuptype' ) . val (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														if  ( type  ==  " dxcc " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupdxcc' ) . show (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupiota' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupcqz' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupwas' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookuptext' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}  else  if  ( type  ==  " iota " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupiota' ) . show (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupdxcc' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupcqz' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupwas' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookuptext' ) . hide (); 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-18 01:23:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														}  else  if  ( type  ==  " grid "  ||  type  ==  " sota "  ||  type  ==  " wwff " )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-14 17:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
															$ ( '#quicklookuptext' ) . show (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupiota' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupdxcc' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupcqz' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupwas' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}  else  if  ( type  ==  " cqz " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupcqz' ) . show (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupiota' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupdxcc' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupwas' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookuptext' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}  else  if  ( type  ==  " was " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupwas' ) . show (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupcqz' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupiota' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookupdxcc' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#quicklookuptext' ) . hide (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// This function executes the call to the backend for fetching queryresult and displays the table in the dialog
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  getLookupResult ()  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( " .ld-ext-right " ) . addClass ( 'running' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( " .ld-ext-right " ) . prop ( 'disabled' ,  true ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										url :  base_url  +  'index.php/lookup/search' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											type :  $ ( '#quicklookuptype' ) . val (), 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											dxcc :  $ ( '#quicklookupdxcc' ) . val (), 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											was :   $ ( '#quicklookupwas' ) . val (), 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											grid :  $ ( '#quicklookuptext' ) . val (), 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											cqz :   $ ( '#quicklookupcqz' ) . val (), 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											iota :  $ ( '#quicklookupiota' ) . val (), 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											sota :  $ ( '#quicklookuptext' ) . val (), 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-18 01:23:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											wwff :  $ ( '#quicklookuptext' ) . val (), 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-14 17:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										}, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										success :  function  ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#lookupresulttable' ) . html ( html ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( " .ld-ext-right " ) . removeClass ( 'running' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( " .ld-ext-right " ) . prop ( 'disabled' ,  false ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-03-21 01:47:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
									
										
										
										
											2019-04-08 22:36:23 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-12-08 01:28:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " map "  &&  $this -> uri -> segment ( 2 )  ==  " custom " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								<!--  Javascript  used  for  ADIF  Import  and  Export  Areas  -->  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  type = " text/javascript "  src = " <?php echo base_url(); ?>assets/js/moment.min.js " ></ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  type = " text/javascript "  src = " <?php echo base_url(); ?>assets/js/tempusdominus-bootstrap-4.min.js " ></ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script  type = " text/javascript "  src = " <?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js " ></ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " <?php echo base_url();?>assets/js/leaflet/leafembed.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  type = " text/javascript " > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( function  ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '[data-toggle="tooltip"]' ) . tooltip () 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < ? php  if ( $qra  ==  " set " )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lat  =  < ? php  echo  $qra_lat ;  ?> ;
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        var  q_lng  =  < ? php  echo  $qra_lng ;  ?> ;
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-08 01:28:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        < ? php  }  else  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lat  =  40.313043 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lng  =  - 32.695312 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-14 18:37:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        var  qso_loc  =  '<?php echo site_url(' map / map_data_custom / ');?><?php echo rawurlencode($date_from); ?>/<?php echo rawurlencode($date_to); ?>/<?php echo rawurlencode($this->input->post(' band ')); ?>' ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-08 01:28:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        var  q_zoom  =  2 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( document ) . ready ( function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            < ? php  if  ( $this -> config -> item ( 'map_gridsquares' )  !=  FALSE )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  grid  =  " Yes " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            < ? php  }  else  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  grid  =  " No " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            initmap ( grid ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " map "  &&  $this -> uri -> segment ( 2 )  ==  " " )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-12-08 00:32:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " <?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " <?php echo base_url();?>assets/js/leaflet/leafembed.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  type = " text/javascript " > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( function  ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '[data-toggle="tooltip"]' ) . tooltip () 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < ? php  if ( $qra  ==  " set " )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lat  =  < ? php  echo  $qra_lat ;  ?> ;
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        var  q_lng  =  < ? php  echo  $qra_lng ;  ?> ;
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-08 00:32:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        < ? php  }  else  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lat  =  40.313043 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_lng  =  - 32.695312 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  qso_loc  =  '<?php echo site_url(' map / map_data ');?>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  q_zoom  =  2 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      $ ( document ) . ready ( function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            < ? php  if  ( $this -> config -> item ( 'map_gridsquares' )  !=  FALSE )  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  grid  =  " Yes " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            < ? php  }  else  {  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              var  grid  =  " No " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            initmap ( grid ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											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 ;  ?> ;
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        var  q_lng  =  < ? php  echo  $qra_lng ;  ?> ;
 
							 
						 
					
						
							
								
									
										
										
										
											2019-03-21 00:58:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        < ? 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  }  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( document ) . on ( 'keypress' , function ( e )  {  
						 
					
						
							
								
									
										
										
										
											2019-09-05 05:11:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  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 ;  ?> ;
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        var  q_lng  =  < ? php  echo  $qra_lng ;  ?> ;
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-14 23:46:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        < ? 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 " )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script  src = " <?php echo base_url() ;?>assets/js/sections/qso.js " ></ script >  
						 
					
						
							
								
									
										
										
										
											2020-05-22 04:01:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-14 07:14:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  markers  =  L . layerGroup (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  var  mymap  =  L . map ( 'qsomap' ) . setView ([ 51.505 ,  - 0.09 ],  13 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-12-26 22:58:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  L . tileLayer ( '<?php echo $this->optionslib->get_option(' map_tile_server ');?>' ,  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-14 07:14:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    maxZoom :  18 , 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-26 22:58:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    attribution :  '<?php echo $this->optionslib->get_option(' map_tile_server_copyright ');?>' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-14 07:14:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    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
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $ ( " #callsign " ) . focus (); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      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 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											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 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +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 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
									
										
										
										
											2019-12-23 04:15:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								});  
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> session -> userdata ( 'user_sota_lookup' )  ==  1 )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#sota_ref' ) . change ( function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  sota  =  $ ( '#sota_ref' ) . val (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( sota . length  >  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												url :  base_url + 'index.php/qso/get_sota_info' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												data :  { 'sota' :  sota }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												success :  function ( res )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#qth' ) . val ( res . name ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#locator' ) . val ( res . locator ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												error :  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#qth' ) . val ( '' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#locator' ) . val ( '' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-04-13 16:34:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											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 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-12-08 04:26:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  if  (  ( $this -> uri -> segment ( 1 )  ==  " qso "  &&  $_GET [ 'manual' ]  ==  0 )  ||  $this -> uri -> segment ( 1 )  ==  " contesting " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script > 
							 
						 
					
						
							
								
									
										
										
										
											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' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-08 04:26:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  if  (  ( $this -> uri -> segment ( 1 )  ==  " qso "  &&  $_GET [ 'manual' ]  ==  0 )  ||  $this -> uri -> segment ( 1 )  ==  " contesting " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Javascript for controlling rig frequency.
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  var  updateFromCAT  =  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if ( $ ( 'select.radios option:selected' ) . val ()  !=  '0' )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-08 04:26:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      radioID  =  $ ( 'select.radios option:selected' ) . val (); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      $ . 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 ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-26 22:07:00 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( " #band_rx " ) . val ( frequencyToBand ( data . downlink_freq )); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
									
										
										
										
											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  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-08 04:26:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( " .mode " ) . val ( data . mode ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 20:44:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											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 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-08 04:26:16 +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 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-08 04:26:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                $ ( '.qso_panel' ) . prepend ( '<div class="alert alert-danger radio_timeout_error" role="alert">Radio connection timed-out: '  +  $ ( 'select.radios option:selected' ) . text ()  +  ' data is '  +  data . updated_minutes_ago  +  ' minutes old.</div>' ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-13 05:51:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              }  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-08 04:26:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                $ ( '.radio_timeout_error' ) . text ( 'Radio connection timed-out: '  +  $ ( 'select.radios option:selected' ) . text ()  +  ' data is '  +  data . updated_minutes_ago  +  ' minutes old.' ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-13 05:51:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }  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 " )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-08 04:26:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( " #sat_name " ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( " #sat_mode " ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( " #frequency " ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( " #frequency_rx " ) . val ( " " ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-26 22:07:00 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( " #band_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 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  </ 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 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-12-26 22:58:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  L . tileLayer ( '<?php echo $this->optionslib->get_option(' map_tile_server ');?>' ,  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-26 01:43:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    maxZoom :  18 , 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-26 22:58:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    attribution :  '<?php echo $this->optionslib->get_option(' map_tile_server_copyright ');?>' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-26 01:43:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    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 >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-12-26 22:58:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  var  layer  =  L . tileLayer ( '<?php echo $this->optionslib->get_option(' map_tile_server ');?>' ,  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-27 04:11:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    maxZoom :  18 , 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-26 22:58:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    attribution :  '<?php echo $this->optionslib->get_option(' map_tile_server_copyright ');?>' , 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-27 04:11:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    id :  'mapbox.streets' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 17:55:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  var  map  =  L . map ( 'gridsquare_map' ,  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-27 04:11:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    layers :  [ layer ], 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    center :  [ 19 ,  0 ], 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-08 01:43:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    zoom :  2 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-27 04:11:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											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 ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    var  lat  =  LatLng . lat ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  lng  =  LatLng . lng ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-15 06:09:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    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 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-08-08 01:43:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if ( map . getZoom ()  >  2 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-20 00:16:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    	< ? php  if  ( $this -> session -> userdata ( 'user_callsign' ))  {  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-19 15:36:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									  var  band  =  '' ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-17 01:35:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      var  search_type  =  " <?php echo  $this->uri ->segment(2); ?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if ( search_type  ==  " satellites " )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-19 15:36:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										band  =  'SAT' ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-17 01:35:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      }  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-19 15:36:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        band  =  " <?php echo  $this->uri ->segment(3); ?> " ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-17 01:35:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-19 15:36:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										$ ( " .modal-body " ) . empty (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										  $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											  url :  base_url  +  'index.php/awards/qso_details_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											  type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											  data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  'Searchphrase' :  loc_4char , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  'Band' :  band , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  'Mode' :  'All' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  'Type' :  'VUCC' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											  }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											  success :  function  ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( " .modal-body " ) . html ( html ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  $ ( " .modal-body table " ) . addClass ( 'table-sm' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  $ ( " .modal-body h5 " ) . empty (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  var  count  =  $ ( '.table tr' ) . length ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  count  =  count  -  1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  $ ( '#qso_count' ) . text ( count ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  if  ( count  >  1 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  $ ( '#gt1_qso' ) . text ( " s " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  $ ( '#gt1_qso' ) . text ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  if  ( count  >  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  $ ( '#square_number' ) . text ( loc_4char ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													  $ ( '#exampleModal' ) . modal ( 'show' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										  }); 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-20 00:16:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										  < ? php  }  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											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 ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    . text ( value )); 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-29 01:17:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  }); 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-29 01:17:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  var  num  =  " <?php echo  $this->uri ->segment(3);?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( " #gridsquare_bands option " ) . each ( function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if ( $ ( this ) . val () == num ){  // EDITED THIS LINE
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( this ) . attr ( " selected " , " selected " ); 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-29 01:17:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  $ ( 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 " )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-11-08 18:26:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url(); ?>assets/js/chart.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-10 01:20:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									< script  src = " <?php echo base_url(); ?>assets/js/sections/dayswithqso.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-25 05:29:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 17:49:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " distances " )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-11-08 18:26:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url(); ?>assets/js/highstock.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-02 21:49:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url(); ?>assets/js/highstock/exporting.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url(); ?>assets/js/highstock/offline-exporting.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url(); ?>assets/js/highstock/export-data.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-10 01:20:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									< script  src = " <?php echo base_url(); ?>assets/js/sections/distances.js " ></ 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 " )  {  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-08 18:26:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        < script  type = " text/javascript "  src = " <?php echo base_url(); ?>assets/js/moment.min.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < script  type = " text/javascript "  src = " <?php echo base_url(); ?>assets/js/tempusdominus-bootstrap-4.min.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-26 05:11:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        < 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 " )  {  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-10 01:20:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										< script  src = " <?php echo base_url(); ?>assets/js/sections/qrzlogbook.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-21 01:43:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < ? php  }  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-19 13:57:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-10 01:20:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									< script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										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-primary" 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 (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															var  mymap  =  L . map ( 'mapqso' ) . setView ([ lat , long ],  5 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															L . tileLayer ( '<?php echo $this->optionslib->get_option(' map_tile_server ');?>' ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																maxZoom :  18 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																attribution :  '<?php echo $this->optionslib->get_option(' map_tile_server_copyright ');?>' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																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 ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											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 , 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-19 20:10:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        " scrollX " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ] 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 01:16:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( '.tablesummary' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        info :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        searching :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " paging " :          false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-11 00:53:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    // change color of csv-button if dark mode is chosen
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( isDarkModeTheme ())  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-19 20:10:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( " .buttons-csv " ) . css ( " color " ,  " white " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											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 , 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 01:16:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        " scrollX " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ] 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 20:09:46 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-11 00:53:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    // change color of csv-button if dark mode is chosen
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( isDarkModeTheme ())  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 01:16:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( " .buttons-csv " ) . css ( " color " ,  " white " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											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 , 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 01:16:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            " scrollX " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '.tablesummary' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            info :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            searching :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " paging " :          false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ] 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-23 03:08:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-20 17:09:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-11 00:53:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        // change color of csv-button if dark mode is chosen
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( isDarkModeTheme ())  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 01:16:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( " .buttons-csv " ) . css ( " color " ,  " white " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											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-10-07 04:01:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( '.tablecq' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " pageLength " :  25 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            responsive :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " scrollY " :         " 400px " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " scrollCollapse " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " paging " :          false , 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 01:16:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            " scrollX " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ] 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-07 04:01:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 01:16:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( '.tablesummary' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            info :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            searching :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " paging " :          false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-11 00:53:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        // change color of csv-button if dark mode is chosen
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( isDarkModeTheme ())  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 01:16:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( " .buttons-csv " ) . css ( " color " ,  " white " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											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-10-07 04:01:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( '.tablewas' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " pageLength " :  25 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            responsive :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " scrollY " :         " 400px " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " scrollCollapse " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " paging " :          false , 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 01:16:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            " scrollX " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '.tablesummary' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            info :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            searching :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " paging " :          false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ] 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-07 04:01:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-11 00:53:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        // change color of csv-button if dark mode is chosen
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( isDarkModeTheme ())  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 01:16:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( " .buttons-csv " ) . css ( " color " ,  " white " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											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 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-11 23:05:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        // Function: qsl_requested
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Marks QSL card requested against the QSO.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        function  qsl_requested ( id ,  method )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                url :  baseURL  +  'index.php/qso/qsl_requested_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                data :  { 'id' :  id , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    'method' :  method 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                success :  function ( data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    if  ( data . message  ==  'OK' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " #qso_ "  +  id ) . find ( " td:eq(8) " ) . find ( " span:eq(0) " ) . attr ( 'class' ,  'qsl-yellow' );  // Paints arrow green
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    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>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-11 23:14:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        // Function: qsl_ignore
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Marks QSL card ignore against the QSO.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        function  qsl_ignore ( id ,  method )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                url :  baseURL  +  'index.php/qso/qsl_ignore_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                data :  { 'id' :  id , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    'method' :  method 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                success :  function ( data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    if  ( data . message  ==  'OK' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " #qso_ "  +  id ) . find ( " td:eq(8) " ) . find ( " span:eq(0) " ) . attr ( 'class' ,  'qsl-red' );  // Paints arrow green
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    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-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-10-04 05:19:09 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        $ ( " .qso-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 , 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-23 13:59:20 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        onshown :  function ( dialog )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-20 01:51:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            var  state  =  $ ( " #input_usa_state_edit option:selected " ) . text (); 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-31 22:27:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            if  ( state  !=  " " )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-20 01:51:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                $ ( " #stationCntyInputEdit " ) . prop ( 'disabled' ,  false ); 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-31 22:27:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                selectize_usa_county (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-20 01:51:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            $ ( '#input_usa_state_edit' ) . change ( function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                var  state  =  $ ( " #input_usa_state_edit option:selected " ) . text (); 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-31 22:27:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                if  ( state  !=  " " )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-20 01:51:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                    $ ( " #stationCntyInputEdit " ) . prop ( 'disabled' ,  false ); 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-31 22:27:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    selectize_usa_county (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                }  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-20 01:51:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                    $ ( " #stationCntyInputEdit " ) . prop ( 'disabled' ,  true ); 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-07 22:44:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                    //$('#stationCntyInput')[0].selectize.destroy();
 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-20 01:51:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                    $ ( " #stationCntyInputEdit " ) . val ( " " ); 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-31 22:27:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-20 01:51:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            $ ( '#sota_ref_edit' ) . selectize ({ 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-23 13:59:20 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                maxItems :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                closeAfterSelect :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                loadThrottle :  250 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                valueField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                labelField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                searchField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                options :  [], 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                create :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                load :  function ( query ,  callback )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    if  ( ! query  ||  query . length  <  3 )  return  callback ();   // Only trigger if 3 or more characters are entered
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        url :  baseURL + 'index.php/qso/get_sota' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        type :  'GET' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        dataType :  'json' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                            query :  query , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        error :  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                            callback (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        success :  function ( res )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                            callback ( res ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-20 01:51:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            $ ( '#darc_dok_edit' ) . selectize ({ 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-23 13:59:20 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                maxItems :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                closeAfterSelect :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                loadThrottle :  250 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                valueField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                labelField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                searchField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                options :  [], 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 00:30:07 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                create :  true , 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-23 13:59:20 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                load :  function ( query ,  callback )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    if  ( ! query )  return  callback ();   // Only trigger if 3 or more characters are entered
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        url :  baseURL + 'index.php/qso/get_dok' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        type :  'GET' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        dataType :  'json' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                            query :  query , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        error :  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                            callback (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        success :  function ( res )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                            callback ( res ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }, 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-25 02:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-31 22:27:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        function  selectize_usa_county ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-20 01:51:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( '#stationCntyInputEdit' ) . selectize ({ 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-15 00:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												delimiter :  ';' , 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-31 22:27:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                maxItems :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                closeAfterSelect :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                loadThrottle :  250 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                valueField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                labelField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                searchField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                options :  [], 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                create :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                load :  function ( query ,  callback )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-20 01:51:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    var  state  =  $ ( " #input_usa_state_edit option:selected " ) . text (); 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-31 22:27:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    if  ( ! query  ||  state  ==  " " )  return  callback (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        url :  baseURL + 'index.php/qso/get_county' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        type :  'GET' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        dataType :  'json' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            query :  query , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            state :  state , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        error :  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            callback (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        success :  function ( res )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            callback ( res ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-25 02:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
									
										
										
										
											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-12-01 03:39:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    < ? php  if  ( $this -> uri -> segment ( 1 )  !=  " search "  &&  $this -> uri -> segment ( 2 )  !=  " filter "  &&  $this -> uri -> segment ( 1 )  !=  " qso " )  {  ?> location.reload();<?php } ?>
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-20 00:17:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                error :  function ( xhr ,  status ,  error )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    console . log ( xhr . responseText ); 
							 
						 
					
						
							
								
									
										
										
										
											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 > 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-14 18:22:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( '.timelinetable' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                " pageLength " :  25 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                responsive :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                " scrollY " :         " 500px " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                " scrollCollapse " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                " paging " :          false , 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 01:16:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                " scrollX " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                ] 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-14 18:22:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-11 00:53:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            // change color of csv-button if dark mode is chosen
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( isDarkModeTheme ())  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 01:16:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                $ ( " .buttons-csv " ) . css ( " color " ,  " white " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-10-23 18:25:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            function  displayTimelineContacts ( querystring ,  band ,  mode ,  type )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-26 00:22:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    url :  baseURL  +  'index.php/timeline/details' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    type :  'post' , 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-23 18:25:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    data :  { 'Querystring' :  querystring , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        'Band' :  band , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        'Mode' :  mode , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        'Type' :  type 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-26 00:22:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    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-10-10 00:29:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < ? php  if  ( $this -> uri -> segment ( 1 )  ==  " mode " )  {  ?> 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-17 19:51:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										< script  src = " <?php echo base_url(); ?>assets/js/sections/mode.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-10 00:29:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < ? php  }  ?> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-10-07 03:12:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " accumulated " )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-11-08 18:26:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url(); ?>assets/js/chart.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-10 01:24:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									< script  src = " <?php echo base_url(); ?>assets/js/sections/accumulatedstatistics.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-07 03:12:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-09-18 18:17:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-10-18 06:00:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " timeplotter " )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-11-08 18:26:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url(); ?>assets/js/highstock.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-02 21:49:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url(); ?>assets/js/highstock/exporting.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url(); ?>assets/js/highstock/offline-exporting.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url(); ?>assets/js/highstock/export-data.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-17 19:56:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									< script  src = " <?php echo base_url(); ?>assets/js/sections/timeplot.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-18 06:00:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-10-29 06:20:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " qsl " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '.qsltable' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " pageLength " :  25 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            responsive :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " scrollY " :         " 500px " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " scrollCollapse " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " paging " :          false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " scrollX " :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 04:45:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-10-29 06:20:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-12-06 20:21:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " kml " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " <?php echo base_url(); ?>assets/js/moment.min.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  type = " text/javascript "  src = " <?php echo base_url(); ?>assets/js/tempusdominus-bootstrap-4.min.js " ></ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < script  type = " text/javascript " > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( function  ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#datetimepicker1' ) . datetimepicker ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                format :  'DD/MM/YYYY' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( function  ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '#datetimepicker2' ) . datetimepicker ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                format :  'DD/MM/YYYY' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    </ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 04:45:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  viewQsl ( picture ,  callsign )  {  
						 
					
						
							
								
									
										
										
										
											2020-10-29 06:20:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            var  $textAndPic  =  $ ( '<div></div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $textAndPic . append ( '<img class="img-fluid" style="height:auto;width:auto;"src="' + baseURL + '/assets/qslcard/' + picture + '" />' ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 04:45:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            var  title  =  '' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( callsign  ==  null )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                title  =  'QSL Card' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                title  =  'QSL Card for '  +  callsign ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-29 06:20:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            BootstrapDialog . show ({ 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 04:45:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                title :  title , 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-29 06:20:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                message :  $textAndPic , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    action :  function ( dialogRef ){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        dialogRef . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 04:45:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
									
										
										
										
											2020-10-29 06:20:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  deleteQsl ( id )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            BootstrapDialog . confirm ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                title :  'DANGER' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                message :  'Warning! Are you sure you want to delete this QSL card?'   , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                type :  BootstrapDialog . TYPE_DANGER , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                closable :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                draggable :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                btnOKClass :  'btn-danger' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                callback :  function ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    if ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            url :  baseURL  +  'index.php/qsl/delete' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            data :  { 'id' :  id 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            success :  function ( data )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-01 19:36:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                $ ( " # "  +  id ) . parent ( " tr:first " ) . remove ();  // removes qsl from table
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                // remove qsl from carousel
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                $ ( " .carousel-indicators li:last-child " ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                $ ( " .carouselimageid_ " + id ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                $ ( '#carouselExampleIndicators' ) . find ( '.carousel-item' ) . first () . addClass ( 'active' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                // remove table and hide tab if all qsls are deleted
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                if  ( $ ( '.qsltable tr' ) . length  ==  1 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    $ ( '.qsltable' ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                    $ ( '.qslcardtab' ) . attr ( 'hidden' , '' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                } 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-29 06:20:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
									
										
										
										
											2020-11-01 19:36:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
									
										
										
										
											2021-07-24 20:31:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  /* 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   *  Used  to  fetch  QSOs  from  the  logbook  in  the  awards 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    function  displayContacts ( searchphrase ,  band ,  mode ,  type )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  baseURL  =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            url :  baseURL  +  'index.php/awards/qso_details_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                'Searchphrase' :  searchphrase , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                'Band' :  band , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                'Mode' :  mode , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                'Type' :  type 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            success :  function  ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    title :  'QSO Data' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    cssClass :  'qso-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-11-01 19:36:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    function  uploadQsl ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  formdata  =  new  FormData ( document . getElementById ( " fileinfo " )); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            url :  baseURL  +  'index.php/qsl/uploadqsl' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            data :  formdata , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            enctype :  'multipart/form-data' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            processData :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            contentType :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            success :  function ( data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                if  ( data . status . front . status  ==  'Success' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    if  ( $ ( '.qsltable' ) . length  >  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( '.qsltable tr:last' ) . after ( '<tr><td style="text-align: center">' + data . status . front . filename + '</td>'  + 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 04:45:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            '<td id="' + data . status . front . insertid + '"style="text-align: center"><button onclick="deleteQsl(' + data . status . front . insertid + ');" class="btn btn-sm btn-danger">Delete</button></td>'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '<td style="text-align: center"><button onclick="viewQsl(\''  +  data . status . front . filename  +  '\')" class="btn btn-sm btn-success">View</button></td>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '</tr>' ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-01 19:36:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        var  quantity  =  $ ( " .carousel-indicators li " ) . length ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .carousel-indicators " ) . append ( '<li data-target="#carouselExampleIndicators" data-slide-to="' + quantity + '"></li>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .carousel-inner " ) . append ( '<div class="carousel-item carouselimageid_' + data . status . front . insertid + '"><img class="d-block w-100" src="' + baseURL + '/assets/qslcard/' + data . status . front . filename + '" alt="QSL picture #' + ( quantity + 1 ) + '"></div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " #qslcardfront " ) . val ( null ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " #qslupload " ) . prepend ( '<table style="width:100%" class="qsltable table table-sm table-bordered table-hover table-striped table-condensed">' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '<thead>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               '<tr>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '<th style="text-align: center">QSL image file</th>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '<th style="text-align: center"></th>' + 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 04:45:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            '<th style="text-align: center"></th>' + 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-01 19:36:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            '</tr>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '</thead><tbody>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                '<tr><td style="text-align: center">' + data . status . front . filename + '</td>'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '<td id="' + data . status . front . insertid + '"style="text-align: center"><button onclick="deleteQsl(' + data . status . front . insertid + ');" class="btn btn-sm btn-danger">Delete</button></td>'  + 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 04:45:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            '<td style="text-align: center"><button onclick="viewQsl(\''  +  data . status . front . filename  +  '\')" class="btn btn-sm btn-success">View</button></td>' + 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-01 19:36:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            '</tr>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        '</tbody></table>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( '.qslcardtab' ) . removeAttr ( 'hidden' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        var  quantity  =  $ ( " .carousel-indicators li " ) . length ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .carousel-indicators " ) . append ( '<li class="active" data-target="#carouselExampleIndicators" data-slide-to="' + quantity + '"></li>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .carousel-inner " ) . append ( '<div class="active carousel-item carouselimageid_' + data . status . front . insertid + '"><img class="d-block w-100" src="' + baseURL + '/assets/qslcard/' + data . status . front . filename + '" alt="QSL picture #' + ( quantity + 1 ) + '"></div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .carouselExampleIndicators " ) . carousel (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " #qslcardfront " ) . val ( null ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( " #qslupload " ) . append ( '<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>\n'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        data . status . front  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        '</div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                if  ( data . status . back . status  ==  'Success' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    var  qsoid  =  $ ( " #qsoid " ) . text (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    if  ( $ ( '.qsltable' ) . length  >  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( '.qsltable tr:last' ) . after ( '<tr><td style="text-align: center">' + data . status . back . filename + '</td>'  + 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 04:45:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            '<td id="' + data . status . back . insertid + '"style="text-align: center"><button onclick="deleteQsl(' + data . status . back . insertid + ');" class="btn btn-sm btn-danger">Delete</button></td>'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '<td style="text-align: center"><button onclick="viewQsl(\''  +  data . status . back . filename  +  '\')" class="btn btn-sm btn-success">View</button></td>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '</tr>' ); 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-01 19:36:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        var  quantity  =  $ ( " .carousel-indicators li " ) . length ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .carousel-indicators " ) . append ( '<li data-target="#carouselExampleIndicators" data-slide-to="' + quantity + '"></li>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .carousel-inner " ) . append ( '<div class="carousel-item carouselimageid_' + data . status . back . insertid + '"><img class="d-block w-100" src="' + baseURL + '/assets/qslcard/' + data . status . back . filename + '" alt="QSL picture #' + ( quantity + 1 ) + '"></div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " #qslcardback " ) . val ( null ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " #qslupload " ) . prepend ( '<table style="width:100%" class="qsltable table table-sm table-bordered table-hover table-striped table-condensed">' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '<thead>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '<tr>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '<th style="text-align: center">QSL image file</th>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '<th style="text-align: center"></th>' + 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 04:45:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            '<th style="text-align: center"></th>' + 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-01 19:36:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            '</tr>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '</thead><tbody>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '<tr><td style="text-align: center">' + data . status . back . filename + '</td>'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '<td id="' + data . status . back . insertid + '"style="text-align: center"><button onclick="deleteQsl(' + data . status . back . insertid + ');" class="btn btn-sm btn-danger">Delete</button></td>'  + 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 04:45:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            '<td><button onclick="viewQsl(\''  +  data . status . back . filename  +  '\')" class="btn btn-sm btn-success">View</button></td>' + 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-01 19:36:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            '</tr>' + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            '</tbody></table>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( '.qslcardtab' ) . removeAttr ( 'hidden' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        var  quantity  =  $ ( " .carousel-indicators li " ) . length ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .carousel-indicators " ) . append ( '<li class="active" data-target="#carouselExampleIndicators" data-slide-to="' + quantity + '"></li>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .carousel-inner " ) . append ( '<div class="active carousel-item carouselimageid_' + data . status . back . insertid + '"><img class="d-block w-100" src="' + baseURL + '/assets/qslcard/' + data . status . back . filename + '" alt="QSL picture #' + ( quantity + 1 ) + '"></div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " .carouselExampleIndicators " ) . carousel (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( " #qslcardback " ) . val ( null ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( " #qslupload " ) . append ( '<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>\n'  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        data . status . back  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        '</div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
									
										
										
										
											2021-07-22 13:55:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									function  addQsosToQsl ( filename )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  title  =  'Add additional QSOs to a QSL Card' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											url :  baseURL  +  'index.php/qsl/loadSearchForm' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											data :  { 'filename' :  filename }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													title :  title , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													cssClass :  'qso-search_results' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									function  addQsoToQsl ( qsoid ,  filename ,  id )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  title  =  'Add additional QSOs to a QSL Card' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											url :  baseURL  +  'index.php/qsl/addQsoToQsl' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											data :  { 'filename' :  filename ,  'qsoid' :  qsoid }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if  ( html . status  ==  'Success' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													location . reload (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( " .alert " ) . remove (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#searchresult' ) . prepend ( '<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>Something went wrong. Please try again!</div>' ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									function  searchAdditionalQsos ( filename )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											url :  baseURL  +  'index.php/qsl/searchQsos' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											data :  { 'callsign' :  $ ( '#callsign' ) . val (),  'filename' :  filename }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#searchresult' ) . empty (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#searchresult' ) . append ( html ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
									
										
										
										
											2020-11-17 02:20:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " contesting " )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2020-12-08 04:26:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < script  src = " <?php echo base_url() ;?>assets/js/sections/contesting.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-24 22:29:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " station " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-15 00:30:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  state  =  $ ( " #StateHelp option:selected " ) . text (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( state  !=  " " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( " #stationCntyInput " ) . prop ( 'disabled' ,  false ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										station_profile_selectize_usa_county (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-01-24 22:29:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $ ( '#StateHelp' ) . change ( function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  state  =  $ ( " #StateHelp option:selected " ) . text (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( state  !=  " " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( " #stationCntyInput " ) . prop ( 'disabled' ,  false ); 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-15 00:30:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											station_profile_selectize_usa_county (); 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-24 22:29:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( " #stationCntyInput " ) . prop ( 'disabled' ,  true ); 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-07 22:44:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            //$('#stationCntyInput')[0].selectize.destroy();
 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-24 22:29:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( " #stationCntyInput " ) . val ( " " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-15 00:30:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    function  station_profile_selectize_usa_county ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#stationCntyInput' ) . selectize ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											maxItems :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											closeAfterSelect :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											loadThrottle :  250 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											valueField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											labelField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											searchField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											options :  [], 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											create :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											load :  function ( query ,  callback )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												var  state  =  $ ( " #StateHelp option:selected " ) . text (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if  ( ! query  ||  state  ==  " " )  return  callback (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													url :  baseURL + 'index.php/station/get_county' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													type :  'GET' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													dataType :  'json' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														query :  query , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														state :  state , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													error :  function ()  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														callback (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													success :  function ( res )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														callback ( res ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-24 22:29:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-07 07:03:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-07 22:22:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 2 )  ==  " counties "  ||  $this -> uri -> segment ( 2 )  ==  " counties_details " )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2021-02-07 07:03:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( '.countiestable' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " pageLength " :  25 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        responsive :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " scrollY " :         " 390px " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " scrollCollapse " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " paging " :          false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " scrollX " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-11 00:53:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    // change color of csv-button if dark mode is chosen
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( isDarkModeTheme ())  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-07 07:03:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( " .buttons-csv " ) . css ( " color " ,  " white " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-07 22:22:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    function  displayCountyContacts ( state ,  county )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        var  baseURL =  " <?php echo base_url();?> " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            url :  baseURL  +  'index.php/awards/counties_details_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            type :  'post' , 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-22 13:55:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            data :  { 'State' :  state ,  'County' :  county  }, 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-07 22:22:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    title :  'QSO Data' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    cssClass :  'qso-counties-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-07 07:03:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								</ script >  
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-21 15:19:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 2 )  ==  " sig_details " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									< script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '.tablesig' ) . DataTable ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											" pageLength " :  25 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											responsive :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											ordering :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											" scrollY " :         " 400px " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											" scrollCollapse " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											" paging " :          false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											" scrollX " :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											dom :  'Bfrtip' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											buttons :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												'csv' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-11 00:53:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										// change color of csv-button if dark mode is chosen
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( isDarkModeTheme ())  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-21 15:19:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											$ ( " .buttons-csv " ) . css ( " color " ,  " white " ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									</ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-13 06:27:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " contesting "  &&  $this -> uri -> segment ( 2 )  ==  " add " )  {  ?> 
  
						 
					
						
							
								
									
										
										
										
											2021-03-17 19:44:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									< script  src = " <?php echo base_url() ;?>assets/js/sections/contestingnames.js " ></ script > 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-17 02:20:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
									
										
										
										
											2021-05-22 14:45:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  if  ( $this -> uri -> segment ( 1 )  ==  " qslprint " )  {  ?> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									< script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										function  deleteFromQslQueue ( id )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-22 23:16:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											BootstrapDialog . confirm ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												title :  'DANGER' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												message :  'Warning! Are you sure you want to removes this QSL from the queue?' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												type :  BootstrapDialog . TYPE_DANGER , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												closable :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												draggable :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												btnOKClass :  'btn-danger' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												callback :  function ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														url :  base_url  +  'index.php/qslprint/delete_from_qsl_queue' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														data :  { 'id' :  id 	}, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														success :  function ( html )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-28 17:10:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
															$ ( " #qslprint_ " + id ) . remove (); 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-22 23:16:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-28 17:10:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										function  openQsoList ( callsign )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												url :  base_url  +  'index.php/qslprint/open_qso_list' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												data :  { 'callsign' :  callsign }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													BootstrapDialog . show ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														title :  'QSO List' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														size :  BootstrapDialog . SIZE_WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														cssClass :  'qso-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														buttons :  [{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															label :  'Close' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																dialogItself . close (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														}] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										function  addQsoToPrintQueue ( id )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ . ajax ({ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												url :  base_url  +  'index.php/qslprint/add_qso_to_print_queue' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												data :  { 'id' :  id }, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													var  line  =  '<tr id="qslprint_' + id + '">' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													line  +=  '<td style=\'text-align: center\'>' + $ ( " #qsolist_ " + id ) . find ( " td:eq(0) " ) . text () + '</td>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													line  +=  '<td style=\'text-align: center\'>' + $ ( " #qsolist_ " + id ) . find ( " td:eq(1) " ) . text () + '</td>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													line  +=  '<td style=\'text-align: center\'>' + $ ( " #qsolist_ " + id ) . find ( " td:eq(2) " ) . text () + '</td>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													line  +=  '<td style=\'text-align: center\'>' + $ ( " #qsolist_ " + id ) . find ( " td:eq(3) " ) . text () + '</td>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													line  +=  '<td style=\'text-align: center\'>' + $ ( " #qsolist_ " + id ) . find ( " td:eq(4) " ) . text () + '</td>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													line  +=  '<td style=\'text-align: center\'><span class="badge badge-light">' + $ ( " #qsolist_ " + id ) . find ( " td:eq(5) " ) . text () + '</span></td>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													line  +=  '<td style=\'text-align: center\'><button onclick="deleteFromQslQueue(' + id + ')" class="btn btn-sm btn-danger">Delete from queue</button></td></td>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													line  +=  '<td style=\'text-align: center\'><button onclick="openQsoList(\'' + $ ( " #qsolist_ " + id ) . find ( " td:eq(0) " ) . text () + '\')" class="btn btn-sm btn-success">Open QSO list</button></td>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													line  +=  '</tr>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '.table tr:last' ) . after ( line ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( " #qsolist_ " + id ) . remove (); '' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-22 23:16:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										$ ( " .station_id " ) . change ( function (){ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											var  station_id  =  $ ( " .station_id " ) . val (); 
							 
						 
					
						
							
								
									
										
										
										
											2021-05-22 14:45:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											$ . ajax ({ 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-22 23:16:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												url :  base_url  +  'index.php/qslprint/get_qsos_for_print_ajax' , 
							 
						 
					
						
							
								
									
										
										
										
											2021-05-22 14:45:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												type :  'post' , 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-22 23:16:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												data :  { 'station_id' :  station_id }, 
							 
						 
					
						
							
								
									
										
										
										
											2021-05-22 14:45:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												success :  function ( html )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-22 23:16:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													$ ( '.resulttable' ) . empty (); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '.resulttable' ) . append ( html ); 
							 
						 
					
						
							
								
									
										
										
										
											2021-05-22 14:45:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}); 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-22 23:16:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										}); 
							 
						 
					
						
							
								
									
										
										
										
											2021-05-22 14:45:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									</ script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< ? php  }  ?> 
  
						 
					
						
							
								
									
										
										
										
											2019-01-09 23:18:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  </ body > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-18 03:21:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								</ html >