@@ -247,6 +247,80 @@ public function waja () {
247247 $ this ->load ->view ('interface_assets/footer ' , $ footerData );
248248 }
249249
250+ public function jcc () {
251+ $ footerData = [];
252+ $ footerData ['scripts ' ] = ['assets/js/sections/jcc.js ' ];
253+
254+ $ this ->load ->model ('jcc_model ' );
255+ $ this ->load ->model ('modes ' );
256+ $ this ->load ->model ('bands ' );
257+
258+ $ data ['worked_bands ' ] = $ this ->bands ->get_worked_bands ('jcc ' );
259+ $ data ['modes ' ] = $ this ->modes ->active ();
260+
261+ if ($ this ->input ->post ('band ' ) != NULL ) { // Band is not set when page first loads.
262+ if ($ this ->input ->post ('band ' ) == 'All ' ) { // Did the user specify a band? If not, use all bands
263+ $ bands = $ data ['worked_bands ' ];
264+ }
265+ else {
266+ $ bands [] = $ this ->security ->xss_clean ($ this ->input ->post ('band ' ));
267+ }
268+ }
269+ else {
270+ $ bands = $ data ['worked_bands ' ];
271+ }
272+
273+ $ data ['bands ' ] = $ bands ; // Used for displaying selected band(s) in the table in the view
274+
275+ if ($ this ->input ->method () === 'post ' ) {
276+ $ postdata ['qsl ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('qsl ' ));
277+ $ postdata ['lotw ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('lotw ' ));
278+ $ postdata ['eqsl ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('eqsl ' ));
279+ $ postdata ['qrz ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('qrz ' ));
280+ $ postdata ['worked ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('worked ' ));
281+ $ postdata ['confirmed ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('confirmed ' ));
282+ $ postdata ['notworked ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('notworked ' ));
283+ $ postdata ['includedeleted ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('includedeleted ' ));
284+ $ postdata ['Africa ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Africa ' ));
285+ $ postdata ['Asia ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Asia ' ));
286+ $ postdata ['Europe ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Europe ' ));
287+ $ postdata ['NorthAmerica ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('NorthAmerica ' ));
288+ $ postdata ['SouthAmerica ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('SouthAmerica ' ));
289+ $ postdata ['Oceania ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Oceania ' ));
290+ $ postdata ['Antarctica ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Antarctica ' ));
291+ $ postdata ['band ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('band ' ));
292+ $ postdata ['mode ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('mode ' ));
293+ }
294+ else { // Setting default values at first load of page
295+ $ postdata ['qsl ' ] = 1 ;
296+ $ postdata ['lotw ' ] = 1 ;
297+ $ postdata ['eqsl ' ] = 0 ;
298+ $ postdata ['qrz ' ] = 0 ;
299+ $ postdata ['worked ' ] = 1 ;
300+ $ postdata ['confirmed ' ] = 1 ;
301+ $ postdata ['notworked ' ] = 0 ;
302+ $ postdata ['includedeleted ' ] = 0 ;
303+ $ postdata ['Africa ' ] = 1 ;
304+ $ postdata ['Asia ' ] = 1 ;
305+ $ postdata ['Europe ' ] = 1 ;
306+ $ postdata ['NorthAmerica ' ] = 1 ;
307+ $ postdata ['SouthAmerica ' ] = 1 ;
308+ $ postdata ['Oceania ' ] = 1 ;
309+ $ postdata ['Antarctica ' ] = 1 ;
310+ $ postdata ['band ' ] = 'All ' ;
311+ $ postdata ['mode ' ] = 'All ' ;
312+ }
313+
314+ $ data ['jcc_array ' ] = $ this ->jcc_model ->get_jcc_array ($ bands , $ postdata );
315+ $ data ['jcc_summary ' ] = $ this ->jcc_model ->get_jcc_summary ($ bands , $ postdata );
316+
317+ // Render Page
318+ $ data ['page_title ' ] = "Awards - JCC " ;
319+ $ this ->load ->view ('interface_assets/header ' , $ data );
320+ $ this ->load ->view ('awards/jcc/index ' );
321+ $ this ->load ->view ('interface_assets/footer ' , $ footerData );
322+ }
323+
250324 public function vucc () {
251325 $ this ->load ->model ('vucc ' );
252326 $ this ->load ->model ('bands ' );
@@ -581,12 +655,20 @@ public function rac() {
581655 $ this ->load ->view ('interface_assets/footer ' , $ footerData );
582656 }
583657
584- public function iota () {
585- $ this ->load ->model ('iota ' );
658+ public function helvetia () {
659+ $ footerData = [];
660+ $ footerData ['scripts ' ] = [
661+ 'assets/js/sections/helvetiamap_geojson.js? ' . filemtime (realpath (__DIR__ . "/../../assets/js/sections/helvetiamap_geojson.js " )),
662+ 'assets/js/sections/helvetiamap.js? ' . filemtime (realpath (__DIR__ . "/../../assets/js/sections/helvetiamap.js " )),
663+ 'assets/js/leaflet/L.Maidenhead.js ' ,
664+ ];
665+
666+ $ this ->load ->model ('helvetia_model ' );
586667 $ this ->load ->model ('modes ' );
587668 $ this ->load ->model ('bands ' );
588669
589- $ data ['worked_bands ' ] = $ this ->bands ->get_worked_bands ('iota ' ); // Used in the view for band select
670+ $ data ['worked_bands ' ] = $ this ->bands ->get_worked_bands ('helvetia ' );
671+ $ data ['modes ' ] = $ this ->modes ->active (); // Used in the view for mode select
590672
591673 if ($ this ->input ->post ('band ' ) != NULL ) { // Band is not set when page first loads.
592674 if ($ this ->input ->post ('band ' ) == 'All ' ) { // Did the user specify a band? If not, use all bands
@@ -601,48 +683,99 @@ public function iota () {
601683 }
602684
603685 $ data ['bands ' ] = $ bands ; // Used for displaying selected band(s) in the table in the view
604- $ data ['modes ' ] = $ this ->modes ->active (); // Used in the view for mode select
605686
606687 if ($ this ->input ->method () === 'post ' ) {
688+ $ postdata ['qsl ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('qsl ' ));
689+ $ postdata ['lotw ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('lotw ' ));
690+ $ postdata ['eqsl ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('eqsl ' ));
691+ $ postdata ['qrz ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('qrz ' ));
607692 $ postdata ['worked ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('worked ' ));
608693 $ postdata ['confirmed ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('confirmed ' ));
609694 $ postdata ['notworked ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('notworked ' ));
610- $ postdata ['includedeleted ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('includedeleted ' ));
611- $ postdata ['Africa ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Africa ' ));
612- $ postdata ['Asia ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Asia ' ));
613- $ postdata ['Europe ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Europe ' ));
614- $ postdata ['NorthAmerica ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('NorthAmerica ' ));
615- $ postdata ['SouthAmerica ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('SouthAmerica ' ));
616- $ postdata ['Oceania ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Oceania ' ));
617- $ postdata ['Antarctica ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Antarctica ' ));
618695 $ postdata ['band ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('band ' ));
619696 $ postdata ['mode ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('mode ' ));
620697 }
621698 else { // Setting default values at first load of page
699+ $ postdata ['qsl ' ] = 1 ;
700+ $ postdata ['lotw ' ] = 1 ;
701+ $ postdata ['eqsl ' ] = 0 ;
702+ $ postdata ['qrz ' ] = 0 ;
622703 $ postdata ['worked ' ] = 1 ;
623704 $ postdata ['confirmed ' ] = 1 ;
624705 $ postdata ['notworked ' ] = 1 ;
625- $ postdata ['includedeleted ' ] = 0 ;
626- $ postdata ['Africa ' ] = 1 ;
627- $ postdata ['Asia ' ] = 1 ;
628- $ postdata ['Europe ' ] = 1 ;
629- $ postdata ['NorthAmerica ' ] = 1 ;
630- $ postdata ['SouthAmerica ' ] = 1 ;
631- $ postdata ['Oceania ' ] = 1 ;
632- $ postdata ['Antarctica ' ] = 1 ;
633706 $ postdata ['band ' ] = 'All ' ;
634707 $ postdata ['mode ' ] = 'All ' ;
635708 }
636709
637- $ iotalist = $ this ->iota ->fetchIota ($ postdata );
638- $ data ['iota_array ' ] = $ this ->iota ->get_iota_array ($ iotalist , $ bands , $ postdata );
639- $ data ['iota_summary ' ] = $ this ->iota ->get_iota_summary ($ bands , $ postdata );
710+ $ data ['helvetia_array ' ] = $ this ->helvetia_model ->get_helvetia_array ($ bands , $ postdata );
711+ $ data ['helvetia_summary ' ] = $ this ->helvetia_model ->get_helvetia_summary ($ bands , $ postdata );
640712
641713 // Render Page
642- $ data ['page_title ' ] = "Awards - IOTA (Islands On The Air) " ;
714+ $ data ['page_title ' ] = "Awards - H26 " ;
643715 $ this ->load ->view ('interface_assets/header ' , $ data );
644- $ this ->load ->view ('awards/iota/index ' );
645- $ this ->load ->view ('interface_assets/footer ' );
716+ $ this ->load ->view ('awards/helvetia/index ' );
717+ $ this ->load ->view ('interface_assets/footer ' , $ footerData );
718+ }
719+
720+ public function iota () {
721+ $ this ->load ->model ('iota ' );
722+ $ this ->load ->model ('modes ' );
723+ $ this ->load ->model ('bands ' );
724+
725+ $ data ['worked_bands ' ] = $ this ->bands ->get_worked_bands ('iota ' ); // Used in the view for band select
726+
727+ if ($ this ->input ->post ('band ' ) != NULL ) { // Band is not set when page first loads.
728+ if ($ this ->input ->post ('band ' ) == 'All ' ) { // Did the user specify a band? If not, use all bands
729+ $ bands = $ data ['worked_bands ' ];
730+ } else {
731+ $ bands [] = $ this ->security ->xss_clean ($ this ->input ->post ('band ' ));
732+ }
733+ } else {
734+ $ bands = $ data ['worked_bands ' ];
735+ }
736+
737+ $ data ['bands ' ] = $ bands ; // Used for displaying selected band(s) in the table in the view
738+ $ data ['modes ' ] = $ this ->modes ->active (); // Used in the view for mode select
739+
740+ if ($ this ->input ->method () === 'post ' ) {
741+ $ postdata ['worked ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('worked ' )) ?? NULL ;
742+ $ postdata ['confirmed ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('confirmed ' )) ?? NULL ;
743+ $ postdata ['notworked ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('notworked ' )) ?? NULL ;
744+ $ postdata ['includedeleted ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('includedeleted ' )) ?? NULL ;
745+ $ postdata ['Africa ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Africa ' )) ?? NULL ;
746+ $ postdata ['Asia ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Asia ' )) ?? NULL ;
747+ $ postdata ['Europe ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Europe ' )) ?? NULL ;
748+ $ postdata ['NorthAmerica ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('NorthAmerica ' )) ?? NULL ;
749+ $ postdata ['SouthAmerica ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('SouthAmerica ' )) ?? NULL ;
750+ $ postdata ['Oceania ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Oceania ' )) ?? NULL ;
751+ $ postdata ['Antarctica ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('Antarctica ' )) ?? NULL ;
752+ $ postdata ['band ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('band ' )) ?? NULL ;
753+ $ postdata ['mode ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('mode ' )) ?? NULL ;
754+ } else { // Setting default values at first load of page
755+ $ postdata ['worked ' ] = 1 ;
756+ $ postdata ['confirmed ' ] = 1 ;
757+ $ postdata ['notworked ' ] = 1 ;
758+ $ postdata ['includedeleted ' ] = 0 ;
759+ $ postdata ['Africa ' ] = 1 ;
760+ $ postdata ['Asia ' ] = 1 ;
761+ $ postdata ['Europe ' ] = 1 ;
762+ $ postdata ['NorthAmerica ' ] = 1 ;
763+ $ postdata ['SouthAmerica ' ] = 1 ;
764+ $ postdata ['Oceania ' ] = 1 ;
765+ $ postdata ['Antarctica ' ] = 1 ;
766+ $ postdata ['band ' ] = 'All ' ;
767+ $ postdata ['mode ' ] = 'All ' ;
768+ }
769+
770+ $ iotalist = $ this ->iota ->fetchIota ($ postdata );
771+ $ data ['iota_array ' ] = $ this ->iota ->get_iota_array ($ iotalist , $ bands , $ postdata );
772+ $ data ['iota_summary ' ] = $ this ->iota ->get_iota_summary ($ bands , $ postdata );
773+
774+ // Render Page
775+ $ data ['page_title ' ] = "Awards - IOTA (Islands On The Air) " ;
776+ $ this ->load ->view ('interface_assets/header ' , $ data );
777+ $ this ->load ->view ('awards/iota/index ' );
778+ $ this ->load ->view ('interface_assets/footer ' );
646779 }
647780
648781 public function counties () {
@@ -1066,6 +1199,61 @@ public function rac_map() {
10661199 echo json_encode ($ states );
10671200 }
10681201
1202+ /*
1203+ function H26_map
1204+
1205+ This displays the H26 map and requires the $band_type and $mode_type
1206+ */
1207+ public function helvetia_map () {
1208+ $ stateString = 'AG,AI,AR,BE,BL,BS,FR,GE,GL,GR,JU,LU,NE,NW,OW,SG,SH,SO,SZ,TG,TI,UR,VD,VS,ZG,ZH ' ;
1209+ $ helvetiaArray = explode (', ' , $ stateString );
1210+
1211+ $ this ->load ->model ('helvetia_model ' );
1212+
1213+ $ bands [] = $ this ->security ->xss_clean ($ this ->input ->post ('band ' ));
1214+
1215+ $ postdata ['qsl ' ] = $ this ->input ->post ('qsl ' ) == 0 ? NULL : 1 ;
1216+ $ postdata ['lotw ' ] = $ this ->input ->post ('lotw ' ) == 0 ? NULL : 1 ;
1217+ $ postdata ['eqsl ' ] = $ this ->input ->post ('eqsl ' ) == 0 ? NULL : 1 ;
1218+ $ postdata ['qrz ' ] = $ this ->input ->post ('qrz ' ) == 0 ? NULL : 1 ;
1219+ $ postdata ['worked ' ] = $ this ->input ->post ('worked ' ) == 0 ? NULL : 1 ;
1220+ $ postdata ['confirmed ' ] = $ this ->input ->post ('confirmed ' ) == 0 ? NULL : 1 ;
1221+ $ postdata ['notworked ' ] = $ this ->input ->post ('notworked ' ) == 0 ? NULL : 1 ;
1222+ $ postdata ['band ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('band ' ));
1223+ $ postdata ['mode ' ] = $ this ->security ->xss_clean ($ this ->input ->post ('mode ' ));
1224+
1225+ $ helvetia_array = $ this ->helvetia_model ->get_helvetia_array ($ bands , $ postdata );
1226+
1227+ $ states = array ();
1228+
1229+ foreach ($ helvetiaArray as $ state ) { // Generating array for use in the table
1230+ $ states [$ state ] = '- ' ; // Inits each state's count
1231+ }
1232+
1233+
1234+ foreach ($ helvetia_array as $ was => $ value ) {
1235+ foreach ($ value as $ key ) {
1236+ if ($ key != "" ) {
1237+ if (strpos ($ key , '>W< ' ) !== false ) {
1238+ $ states [$ was ] = 'W ' ;
1239+ break ;
1240+ }
1241+ if (strpos ($ key , '>C< ' ) !== false ) {
1242+ $ states [$ was ] = 'C ' ;
1243+ break ;
1244+ }
1245+ if (strpos ($ key , '- ' ) !== false ) {
1246+ $ states [$ was ] = '- ' ;
1247+ break ;
1248+ }
1249+ }
1250+ }
1251+ }
1252+
1253+ header ('Content-Type: application/json ' );
1254+ echo json_encode ($ states );
1255+ }
1256+
10691257 /*
10701258 function cq_map
10711259 This displays the CQ Zone map and requires the $band_type and $mode_type
0 commit comments