Added SATMode to Massedit (PHP)

This commit is contained in:
int2001
2024-02-20 17:12:46 +00:00
parent e6342d0d15
commit 205ddd1e8f
2 changed files with 5 additions and 1 deletions

View File

@@ -587,13 +587,15 @@ class Logbookadvanced_model extends CI_Model {
} else if ($column == 'COL_SAT_NAME') {
$propmode = $value == '' ? '' : 'SAT';
$satmode = $value2 ?? '';
$sql = "UPDATE ".$this->config->item('table_name')." JOIN station_profile ON ". $this->config->item('table_name').".station_id = station_profile.station_id" .
" SET " . $this->config->item('table_name').".COL_SAT_NAME = ?" .
", " . $this->config->item('table_name').".COL_PROP_MODE = ?" .
", " . $this->config->item('table_name').".COL_SAT_MODE = ?" .
" WHERE " . $this->config->item('table_name').".col_primary_key in ? and station_profile.user_id = ?";
$query = $this->db->query($sql, array($value, $propmode, json_decode($ids, true), $this->session->userdata('user_id')));
$query = $this->db->query($sql, array($value, $propmode, $satmode, json_decode($ids, true), $this->session->userdata('user_id')));
} else {
$sql = "UPDATE ".$this->config->item('table_name')." JOIN station_profile ON ".$this->config->item('table_name').".station_id = station_profile.station_id SET " . $this->config->item('table_name').".".$column . " = ? WHERE " . $this->config->item('table_name').".col_primary_key in ? and station_profile.user_id = ?";

View File

@@ -57,6 +57,8 @@
<select style="display:none" class="form-select form-select-sm w-auto" id="editSatellite" name="satellite" required>
</select>
<label style="display:none" id="editSatelliteModeLabel" class="mx-2 w-auto" for="editSatelliteMode">SAT Mode</label>
<input style="display:none" class="form-control form-control-sm w-auto" id="editSatelliteMode" type="text" name="editSatelliteMode" placeholder="" aria-label="editSatelliteMode">
<select id="editBand" class="form-select w-auto form-select-sm" name="editBand">
<?php foreach($bands as $key=>$bandgroup) {