@@ -14,9 +14,6 @@ function _remap($method) {
1414 elseif ($ method == "map " ) {
1515 $ this ->map ($ method );
1616 }
17- elseif ($ method == "radio_display_component " ) {
18- $ this ->radio_display_component ($ method );
19- }
2017 elseif ($ method == "satellites " ) {
2118 $ this ->satellites ($ method );
2219 }
@@ -81,8 +78,6 @@ public function index($public_slug = NULL)
8178
8279 $ this ->load ->model ('cat ' );
8380
84- $ data ['radio_status ' ] = $ this ->cat ->recent_status ();
85-
8681 // Store info
8782 $ data ['todays_qsos ' ] = $ this ->logbook_model ->todays_qsos ($ logbooks_locations_array );
8883 $ data ['total_qsos ' ] = $ this ->logbook_model ->total_qsos ($ logbooks_locations_array );
@@ -133,13 +128,6 @@ public function index($public_slug = NULL)
133128 }
134129 }
135130
136- public function radio_display_component () {
137- $ this ->load ->model ('cat ' );
138-
139- $ data ['radio_status ' ] = $ this ->cat ->recent_status ();
140- $ this ->load ->view ('components/radio_display_table ' , $ data );
141- }
142-
143131 public function map () {
144132 $ this ->load ->model ('logbook_model ' );
145133
@@ -421,6 +409,16 @@ public function search() {
421409
422410 public function exportmap () {
423411 $ slug = $ this ->security ->xss_clean ($ this ->uri ->segment (3 ));
412+ $ lastqso = $ this ->security ->xss_clean ($ this ->uri ->segment (4 ));
413+
414+ if ($ lastqso === "lastqso " ) {
415+ $ this ->load ->model ('visitor_model ' );
416+ $ result = $ this ->visitor_model ->getlastqsodate ($ slug )->row ();
417+ header ('Content-Type: application/json ' );
418+ echo json_encode ($ result );
419+ return ;
420+ }
421+
424422 $ data ['slug ' ] = $ slug ;
425423
426424 $ data ['page_title ' ] = "Export Map " ;
@@ -430,7 +428,7 @@ public function exportmap() {
430428 }
431429
432430 public function mapqsos () {
433- $ this ->load ->model ('logbook_model ' );
431+ $ this ->load ->model ('visitor_model ' );
434432
435433 $ this ->load ->library ('qra ' );
436434
@@ -453,7 +451,7 @@ public function mapqsos() {
453451 show_404 ('Unknown Public Page. ' );
454452 }
455453
456- $ qsos = $ this ->logbook_model ->get_qsos ($ qsocount, null , $ logbooks_locations_array , $ band );
454+ $ qsos = $ this ->visitor_model ->get_qsos ($ qsocount , $ logbooks_locations_array , $ band );
457455 $ userid = $ this ->stationsetup_model ->public_slug_exists_userid ($ slug );
458456 $ user_default_confirmation = $ this ->get_user_default_confirmation ($ userid );
459457
@@ -519,12 +517,28 @@ public function get_map_custom() {
519517
520518 $ this ->load ->model ('user_options_model ' );
521519
522- $ result= $ this ->user_options_model ->get_options ('map_custom ' , null , $ userid );
523- $ jsonout= [];
520+ $ result = $ this ->user_options_model ->get_options ('map_custom ' , null , $ userid );
521+ $ jsonout = [];
524522 foreach ($ result ->result () as $ options ) {
525523 if ($ options ->option_name =='icon ' ) $ jsonout [$ options ->option_key ]=json_decode ($ options ->option_value ,true );
526524 else $ jsonout [$ options ->option_name .'_ ' .$ options ->option_key ]=$ options ->option_value ;
527525 }
526+
527+ if (count ($ jsonout ) == 0 ) {
528+ $ jsonout ['qso ' ] = array (
529+ "icon " => "fas fa-dot-circle " ,
530+ "color " => "#ff0000 "
531+ );
532+ $ jsonout ['qsoconfirm ' ] = array (
533+ "icon " => "fas fa-dot-circle " ,
534+ "color " => "#00aa00 "
535+ );
536+ $ jsonout ['station ' ] = array (
537+ "icon " => "fas fa-broadcast-tower " ,
538+ "color " => "#0000ff "
539+ );
540+ }
541+
528542 $ jsonout ['gridsquare_layer ' ] = $ this ->user_options_model ->get_options ('ExportMapOptions ' ,array ('option_name ' =>'gridsquare_layer ' ,'option_key ' =>$ slug ), $ userid )->row ()->option_value ?? true ;
529543 $ jsonout ['path_lines ' ] = $ this ->user_options_model ->get_options ('ExportMapOptions ' ,array ('option_name ' =>'path_lines ' ,'option_key ' =>$ slug ), $ userid )->row ()->option_value ?? true ;
530544 $ jsonout ['cqzone_layer ' ] = $ this ->user_options_model ->get_options ('ExportMapOptions ' ,array ('option_name ' =>'cqzone_layer ' ,'option_key ' =>$ slug ), $ userid )->row ()->option_value ?? true ;
0 commit comments