mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge branch 'dl250cdf_master' into dev
This commit is contained in:
@@ -233,7 +233,7 @@ class adif extends CI_Controller {
|
||||
array_push($alladif,$record);
|
||||
};
|
||||
$record=''; // free memory
|
||||
$custom_errors = $this->logbook_model->import_bulk($alladif, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName'), false, $this->input->post('skipStationCheck'));
|
||||
$custom_errors = $this->logbook_model->import_bulk($alladif, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName'), false, $this->input->post('skipStationCheck'), $this->input->post('operatorFirstnameImport'));
|
||||
} else { // Failure, if no ADIF inside ZIP
|
||||
$data['max_upload'] = ini_get('upload_max_filesize');
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
|
||||
@@ -14,7 +14,9 @@ class Operator extends CI_Controller {
|
||||
public function saveOperator() {
|
||||
|
||||
$operator = ['operator_callsign' => $this->security->xss_clean(strtoupper($this->input->post('operator_callsign')))];
|
||||
$op_firstname = ['operator_firstname' => $this->security->xss_clean($this->input->post('operator_firstname'))];
|
||||
|
||||
$this->session->set_userdata($operator);
|
||||
$this->session->set_userdata($op_firstname);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ class Logbook_model extends CI_Model {
|
||||
'COL_QSL_SENT_VIA' => $this->input->post('qsl_sent_method'),
|
||||
'COL_QSL_RCVD_VIA' => $this->input->post('qsl_rcvd_method'),
|
||||
'COL_QSL_VIA' => $this->input->post('qsl_via'),
|
||||
'COL_QSLMSG' => $this->input->post('qslmsg'),
|
||||
'COL_QSLMSG' => $this->session->userdata('operator_firstname') ?? '',
|
||||
'COL_OPERATOR' => $this->input->post('operator_callsign') ?? $this->session->userdata('operator_callsign'),
|
||||
'COL_QTH' => $qso_qth,
|
||||
'COL_PROP_MODE' => $prop_mode,
|
||||
@@ -3411,7 +3411,7 @@ function lotw_last_qsl_date($user_id) {
|
||||
return '1900-01-01 00:00:00.000';
|
||||
}
|
||||
|
||||
function import_bulk($records, $station_id = "0", $skipDuplicate = false, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false) {
|
||||
function import_bulk($records, $station_id = "0", $skipDuplicate = false, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false, $operatorFirstname = NULL) {
|
||||
$this->load->model('user_model');
|
||||
$custom_errors='';
|
||||
$a_qsos=[];
|
||||
@@ -3459,6 +3459,7 @@ function lotw_last_qsl_date($user_id) {
|
||||
return $custom_errors;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* $skipDuplicate - used in ADIF import to skip duplicate checking when importing QSOs
|
||||
* $markLoTW - used in ADIF import to mark QSOs as exported to LoTW when importing QSOs
|
||||
@@ -3468,7 +3469,7 @@ function lotw_last_qsl_date($user_id) {
|
||||
* $skipexport - used in ADIF import to skip the realtime upload to QRZ Logbook when importing QSOs from ADIF
|
||||
*/
|
||||
|
||||
function import($record, $station_id = "0", $skipDuplicate = false, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false, $batchmode = false, $station_id_ok = false, $station_profile = null) {
|
||||
function import($record, $station_id = "0", $skipDuplicate = false, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false, $batchmode = false, $station_id_ok = false, $station_profile = null, $operatorFirstname = null) {
|
||||
// be sure that station belongs to user
|
||||
$this->load->model('stations');
|
||||
if ($station_id_ok == false) {
|
||||
@@ -4022,7 +4023,7 @@ function lotw_last_qsl_date($user_id) {
|
||||
'COL_QSL_SENT' => $input_qsl_sent,
|
||||
'COL_QSL_SENT_VIA' => $input_qsl_sent_via,
|
||||
'COL_QSL_VIA' => (!empty($record['qsl_via'])) ? $record['qsl_via'] : '',
|
||||
'COL_QSLMSG' => (!empty($record['qslmsg'])) ? $record['qslmsg'] : '',
|
||||
'COL_QSLMSG' => $operatorFirstname ?? '',
|
||||
'COL_QSLRDATE' => $input_qslrdate,
|
||||
'COL_QSLSDATE' => $input_qslsdate,
|
||||
'COL_QSO_COMPLETE' => (!empty($record['qso_complete'])) ? $record['qso_complete'] : '',
|
||||
|
||||
@@ -528,6 +528,7 @@ class Logbookadvanced_model extends CI_Model {
|
||||
case "contest": $column = 'COL_CONTEST_ID'; break;
|
||||
case "lotwsent": $column = 'COL_LOTW_QSL_SENT'; break;
|
||||
case "lotwreceived": $column = 'COL_LOTW_QSL_RCVD'; break;
|
||||
case "qslmsg": $column = 'COL_QSLMSG'; break;
|
||||
default: return;
|
||||
}
|
||||
|
||||
@@ -652,6 +653,14 @@ class Logbookadvanced_model extends CI_Model {
|
||||
" SET " . $this->config->item('table_name').".COL_LOTW_QSL_RCVD = ?, " . $this->config->item('table_name').".COL_LOTW_QSLRDATE = now()" .
|
||||
" WHERE " . $this->config->item('table_name').".col_primary_key in ? and station_profile.user_id = ?";
|
||||
|
||||
$query = $this->db->query($sql, array($value, json_decode($ids, true), $this->session->userdata('user_id')));
|
||||
|
||||
} else if ($column == 'COL_QSLMSG') {
|
||||
|
||||
$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_QSLMSG = ? " .
|
||||
" WHERE " . $this->config->item('table_name').".col_primary_key in ? and station_profile.user_id = ?";
|
||||
|
||||
$query = $this->db->query($sql, array($value, json_decode($ids, true), $this->session->userdata('user_id')));
|
||||
} else {
|
||||
|
||||
|
||||
@@ -430,6 +430,7 @@ class User_Model extends CI_Model {
|
||||
'user_type' => $u->row()->user_type,
|
||||
'user_callsign' => $u->row()->user_callsign,
|
||||
'operator_callsign' => ((($this->session->userdata('operator_callsign') ?? '') == '') ? $u->row()->user_callsign : $this->session->userdata('operator_callsign')),
|
||||
'operator_firstname' => $this->session->userdata('operator_firstname') ?? '',
|
||||
'user_locator' => $u->row()->user_locator,
|
||||
'user_lotw_name' => $u->row()->user_lotw_name,
|
||||
'user_clublog_name' => $u->row()->user_clublog_name ?? '',
|
||||
|
||||
@@ -74,6 +74,8 @@
|
||||
echo '<option value="' . $contest['adifname'] . '">' . $contest['name'] . '</option>';
|
||||
} ?>
|
||||
</select>
|
||||
<label for="operatorFirstnameImport">Vorname des Operators</label>
|
||||
<input class="form-control mb-2 w-50 w-lg-100" type="text" name="operatorFirstnameImport" id="operatorFirstnameImport" />
|
||||
<label class="visually-hidden" for="inlineFormInputName2"><?= __("ADIF File") ?></label>
|
||||
<input class="form-control mb-2 me-sm-2 mt-1 w-50 w-lg-100" type="file" name="userfile" id="userfile" />
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<option value="pota"><?= __("POTA"); ?></option>
|
||||
<option value="propagation"><?= __("Propagation"); ?></option>
|
||||
<option value="qslvia"><?= __("QSL via"); ?></option>
|
||||
<option value="qslmsg">QSLMSG</option>
|
||||
<option value="satellite"><?= __("Satellite"); ?></option>
|
||||
<option value="sota"><?= __("SOTA"); ?></option>
|
||||
<option value="station"><?= __("Station Location"); ?></option>
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
<div class="invalid-feedback">
|
||||
<?= __("You have to provide your personal callsign."); ?>
|
||||
</div>
|
||||
<br>
|
||||
<p>Dein Vorname: </p>
|
||||
<input type="text" class="form-control w-auto" id="operator_firstname" name="operator_firstname">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -207,7 +207,7 @@ if ($dxcc_list->result() > 0) {
|
||||
<div class="mb-3">
|
||||
<label for="eqslDefaultQSLMsg"><?= __("Default QSLMSG"); ?></label>
|
||||
<label class="position-absolute end-0 mb-2 me-3" for="eqslDefaultQSLMsg" id="charsLeft"> </label>
|
||||
<textarea class="form-control" name="eqsl_default_qslmsg" id="eqslDefaultQSLMsg" aria-describedby="eqsldefaultqslmsghelp" maxlength="240" rows="2" style="width:100%;"></textarea>
|
||||
<textarea class="form-control" name="eqsl_default_qslmsg" id="eqslDefaultQSLMsg" aria-describedby="eqsldefaultqslmsghelp" maxlength="240" rows="2" style="width:100%;" disabled></textarea>
|
||||
<small id="eqsldefaultqslmsghelp" class="form-text text-muted"><?= __("Define a default message that will be populated and sent for each QSO for this station location."); ?></small>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
|
||||
@@ -312,7 +312,8 @@ if ($dxcc_list->result() > 0) {
|
||||
<div class="mb-3">
|
||||
<label for="eqslDefaultQSLMsg"><?= __("Default QSLMSG"); ?></label>
|
||||
<label class="position-absolute end-0 mb-2 me-3" for="eqslDefaultQSLMsg" id="charsLeft"> </label>
|
||||
<textarea class="form-control" name="eqsl_default_qslmsg" id="eqslDefaultQSLMsg" aria-describedby="eqsldefaultqslmsghelp" maxlength="240" rows="2" style="width:100%;" value="<?php echo $my_station_profile->eqsl_default_qslmsg; ?>"><?php echo $my_station_profile->eqsl_default_qslmsg; ?></textarea>
|
||||
|
||||
<textarea class="form-control" name="eqsl_default_qslmsg" id="eqslDefaultQSLMsg" aria-describedby="eqsldefaultqslmsghelp" maxlength="240" rows="2" style="width:100%;" value="<?php echo $my_station_profile->eqsl_default_qslmsg; ?>" disabled><?php echo $my_station_profile->eqsl_default_qslmsg; ?></textarea>
|
||||
<small id="eqsldefaultqslmsghelp" class="form-text text-muted"><?= __("Define a default message that will be populated and sent for each QSO for this station location."); ?></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -183,7 +183,7 @@ function saveBatchEditQsos(id_list) {
|
||||
if (column == 'lotwsent' || column == 'lotwreceived') {
|
||||
value = $("#editLoTW").val();
|
||||
}
|
||||
if (column == 'sota' || column == 'pota' || column == 'wwff' || column == 'gridsquare' || column == 'comment' || column == 'operator' || column == 'qslvia' || column == 'contest') {
|
||||
if (column == 'sota' || column == 'pota' || column == 'wwff' || column == 'gridsquare' || column == 'comment' || column == 'operator' || column == 'qslvia' || column == 'contest' || column == 'qslmsg') {
|
||||
value = $("#editTextInput").val();
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ function changeEditType(type) {
|
||||
$('#editContest').show();
|
||||
} else if (type == "lotwsent" || type == "lotwreceived") {
|
||||
$('#editLoTW').show();
|
||||
} else if (type == "gridsquare" || type == "sota" || type == "wwff" || type == "operator" || type == "pota" || type == "comment" || type == "qslvia" || type == "contest") {
|
||||
} else if (type == "gridsquare" || type == "sota" || type == "wwff" || type == "operator" || type == "pota" || type == "comment" || type == "qslvia" || type == "contest" || type == "qslmsg") {
|
||||
$('#editTextInput').show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,16 @@ $(document).ready(function () {
|
||||
saveOperator();
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(function () {
|
||||
if (localStorage.getItem('operator_callsign')) {
|
||||
$('#operator_callsign').val(localStorage.getItem('operator_callsign'));
|
||||
}
|
||||
|
||||
if (localStorage.getItem('operator_firstname')) {
|
||||
$('#operator_firstname').val(localStorage.getItem('operator_firstname'));
|
||||
}
|
||||
}, 200);
|
||||
});
|
||||
|
||||
function displayOperatorDialog() {
|
||||
@@ -33,6 +43,7 @@ function closeOperatorDialog() {
|
||||
|
||||
function saveOperator() {
|
||||
var operatorInput = $("#operator_callsign");
|
||||
var operatorFirstname = $("#operator_firstname").val();
|
||||
var operatorCallsign = operatorInput.val();
|
||||
|
||||
if (operatorCallsign != "" && operatorCallsign != sc_account_call) {
|
||||
@@ -42,6 +53,7 @@ function saveOperator() {
|
||||
type: "post",
|
||||
data: {
|
||||
operator_callsign: operatorCallsign,
|
||||
operator_firstname: operatorFirstname
|
||||
},
|
||||
});
|
||||
closeOperatorDialog();
|
||||
@@ -50,4 +62,7 @@ function saveOperator() {
|
||||
} else {
|
||||
operatorInput.addClass("is-invalid");
|
||||
}
|
||||
|
||||
localStorage.setItem('operator_callsign', operatorCallsign);
|
||||
localStorage.setItem('operator_firstname', operatorFirstname);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user