File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,11 @@ public function index() {
3131 show_404 ();
3232 }
3333
34- $ data ['active_station_profile ' ] = $ this ->stations ->find_active ();
34+ if ($ this ->stations ->check_station_is_accessible ($ this ->session ->userdata ('station_profile_id ' ) ?? 0 )) { // Last Station from session accessible? Take it!
35+ $ data ['active_station_profile ' ] = $ this ->session ->userdata ('station_profile_id ' );
36+ } else {
37+ $ data ['active_station_profile ' ] =$ this ->stations ->find_active ();
38+ }
3539
3640 $ data ['notice ' ] = false ;
3741 $ data ['stations ' ] = $ this ->stations ->all_of_user ();
@@ -88,6 +92,13 @@ public function index() {
8892 $ data ['user_dok_to_qso_tab ' ] = 0 ;
8993 }
9094
95+ $ qkey_opt =$ this ->user_options_model ->get_options ('qso_tab ' ,array ('option_name ' =>'station ' ,'option_key ' =>'show ' ))->result ();
96+ if (count ($ qkey_opt )>0 ) {
97+ $ data ['user_station_to_qso_tab ' ] = $ qkey_opt [0 ]->option_value ;
98+ } else {
99+ $ data ['user_station_to_qso_tab ' ] = 0 ;
100+ }
101+
91102 // Get status of DX Waterfall enable option
92103 $ qkey_opt =$ this ->user_options_model ->get_options ('dxwaterfall ' ,array ('option_name ' =>'enable ' ,'option_key ' =>'boolean ' ))->result ();
93104 if (count ($ qkey_opt )>0 ) {
Original file line number Diff line number Diff line change 341341 </div>
342342 <?php } ?>
343343
344+ <?php if ($ user_station_to_qso_tab ?? false ) { ?>
345+ <div class="mb-3">
346+ <label for="stationProfile"><?= __ ("Station Location " ); ?> </label>
347+ <select id="stationProfile" class="form-select" name="station_profile" onChange="panMap(this.value);">
348+ <?php
349+ $ power = '' ;
350+ foreach ($ stations ->result () as $ stationrow ) {
351+ ?>
352+ <option value="<?php echo $ stationrow ->station_id ; ?> " <?php if ($ active_station_profile == $ stationrow ->station_id ) { echo "selected= \"selected \"" ; $ power = $ stationrow ->station_power ; $ station_callsign = $ stationrow ->station_callsign ; } ?> ><?php echo $ stationrow ->station_profile_name ; ?> </option>
353+ <?php } ?>
354+ </select>
355+ </div>
356+ <?php } ?>
357+
344358 <div class="mb-3 row">
345359 <label for="qth" class="col-sm-3 col-form-label"><?= __ ("Location " ); ?> </label>
346360 <div class="col-sm-9">
369383
370384 <!-- Station Panel Data -->
371385 <div class="tab-pane fade" id="station" role="tabpanel" aria-labelledby="station-tab">
386+ <?php if (!$ user_station_to_qso_tab ?? false ) { ?>
372387 <div class="mb-3">
373388 <label for="stationProfile"><?= __ ("Station Location " ); ?> </label>
374389 <select id="stationProfile" class="form-select" name="station_profile" onChange="panMap(this.value);">
380395 <?php } ?>
381396 </select>
382397 </div>
398+ <?php } ?>
383399
384400 <div class="mb-3">
385401 <label for="radio"><?= __ ("Radio " ); ?> </label>
You can’t perform that action at this time.
0 commit comments