Merge remote-tracking branch 'upstream/dev' into ans-user-page-reorganize

这个提交包含在:
abarrau 2023-12-16 19:07:10 +01:00
当前提交 bb1938600b
共有 30 个文件被更改,包括 303 次插入172 次删除

查看文件

@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
*/
$config['migration_version'] = 161;
$config['migration_version'] = 162;
/*
|--------------------------------------------------------------------------

查看文件

@ -1,4 +1,4 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
Controller to interact with the hrdlog.net API
@ -20,11 +20,12 @@ class Hrdlog extends CI_Controller {
if ($station_ids) {
foreach ($station_ids as $station) {
$hrdlog_username = $station->hrdlog_username;
$hrdlog_code = $station->hrdlog_code;
if($this->mass_upload_qsos($station->station_id, $hrdlog_code)) {
if ($this->mass_upload_qsos($station->station_id, $hrdlog_username, $hrdlog_code)) {
echo "QSOs have been uploaded to hrdlog.net.";
log_message('info', 'QSOs have been uploaded to hrdlog.net.');
} else{
} else {
echo "No QSOs found for upload.";
log_message('info', 'No QSOs found for upload.');
}
@ -48,49 +49,53 @@ class Hrdlog extends CI_Controller {
* Function gets all QSOs from given station_id, that are not previously uploaded to hrdlog.
* Adif is build for each qso, and then uploaded, one at a time
*/
function mass_upload_qsos($station_id, $hrdlog_code) {
$i = 0;
$data['qsos'] = $this->logbook_model->get_hrdlog_qsos($station_id);
$errormessages=array();
function mass_upload_qsos($station_id, $hrdlog_username, $hrdlog_code) {
$i = 0;
$data['qsos'] = $this->logbook_model->get_hrdlog_qsos($station_id);
$errormessages = array();
$CI =& get_instance();
$CI->load->library('AdifHelper');
$this->load->library('AdifHelper');
if ($data['qsos']) {
foreach ($data['qsos']->result() as $qso) {
$adif = $CI->adifhelper->getAdifLine($qso);
if ($data['qsos']) {
foreach ($data['qsos']->result() as $qso) {
$adif = $this->adifhelper->getAdifLine($qso);
if ($qso->COL_HRDLOG_QSO_UPLOAD_STATUS == 'M') {
$result = $this->logbook_model->push_qso_to_hrdlog($hrdlog_code, $qso->COL_STATION_CALLSIGN,$adif, true);
} else {
$result = $this->logbook_model->push_qso_to_hrdlog($hrdlog_code, $qso->COL_STATION_CALLSIGN,$adif);
}
if ($qso->COL_HRDLOG_QSO_UPLOAD_STATUS == 'M') {
$result = $this->logbook_model->push_qso_to_hrdlog($hrdlog_username, $hrdlog_code, $adif, true);
} else {
$result = $this->logbook_model->push_qso_to_hrdlog($hrdlog_username, $hrdlog_code, $adif);
}
if ( ($result['status'] == 'OK') || ( ($result['status'] == 'error') || ($result['status'] == 'duplicate')) ){
$this->markqso($qso->COL_PRIMARY_KEY);
$i++;
} elseif ((substr($result['status'],0,11) == 'auth_error')) {
log_message('error', 'hrdlog upload failed for qso: Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON);
log_message('error', 'hrdlog upload failed with the following message: ' .$result['message']);
log_message('error', 'hrdlog upload stopped for Station_ID: ' .$station_id);
$errormessages[] = $result['message'] . 'Invalid HRDLog-Code, stopped at Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON;
break; /* If key is invalid, immediate stop syncing for more QSOs of this station */
} else {
log_message('error', 'hrdlog upload failed for qso: Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON);
log_message('error', 'hrdlog upload failed with the following message: ' .$result['message']);
$errormessages[] = $result['message'] . ' Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON;
}
}
$result['status'] = 'OK';
$result['count'] = $i;
$result['errormessages'] = $errormessages;
return $result;
} else {
$result['status'] = 'Error';
$result['count'] = $i;
$result['errormessages'] = $errormessages;
return $result;
}
if (($result['status'] == 'OK') || (($result['status'] == 'error') || ($result['status'] == 'duplicate'))) {
$this->markqso($qso->COL_PRIMARY_KEY);
$i++;
$result['status'] = 'OK';
} elseif ((substr($result['status'], 0, 11) == 'auth_error')) {
log_message('error', 'hrdlog upload failed for qso: Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON);
log_message('error', 'hrdlog upload failed with the following message: ' . $result['message']);
log_message('error', 'hrdlog upload stopped for Station_ID: ' . $station_id);
$errormessages[] = $result['message'] . 'Invalid HRDLog-Code, stopped at Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON;
$result['status'] = 'Error';
break; /* If key is invalid, immediate stop syncing for more QSOs of this station */
} else {
log_message('error', 'hrdlog upload failed for qso: Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON);
log_message('error', 'hrdlog upload failed with the following message: ' . $result['message']);
$result['status'] = 'Error';
$errormessages[] = $result['message'] . ' Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON;
}
}
if ($i == 0) {
$result['status']='Error';
}
$result['count'] = $i;
$result['errormessages'] = $errormessages;
return $result;
} else {
$result['status'] = 'Error';
$result['count'] = $i;
$result['errormessages'] = $errormessages;
return $result;
}
}
/*
@ -108,7 +113,7 @@ class Hrdlog extends CI_Controller {
$data['page_title'] = "HRDlog.net Logbook";
$data['station_profiles'] = $this->stations->all_of_user();
$data['station_profiles'] = $this->stations->all_of_user();
$data['station_profile'] = $this->stations->stations_with_hrdlog_code();
$this->load->view('interface_assets/header', $data);
@ -126,10 +131,11 @@ class Hrdlog extends CI_Controller {
$postData = $this->input->post();
$this->load->model('logbook_model');
$result = $this->logbook_model->exists_hrdlog_code($postData['station_id']);
$result = $this->logbook_model->exists_hrdlog_credentials($postData['station_id']);
$hrdlog_username = $result->hrdlog_username;
$hrdlog_code = $result->hrdlog_code;
header('Content-type: application/json');
$result = $this->mass_upload_qsos($postData['station_id'], $hrdlog_code);
$result = $this->mass_upload_qsos($postData['station_id'], $hrdlog_username, $hrdlog_code);
if ($result['status'] == 'OK') {
$stationinfo = $this->stations->stations_with_hrdlog_code();
$info = $stationinfo->result();
@ -141,31 +147,31 @@ class Hrdlog extends CI_Controller {
echo json_encode($data);
} else {
$data['status'] = 'Error';
$data['info'] = 'Error: No QSOs found to upload.';
$data['info'] = 'No QSOs found to upload.';
$data['errormessages'] = $result['errormessages'];
echo json_encode($data);
}
}
public function mark_hrdlog() {
// Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1');
public function mark_hrdlog() {
// Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1');
$station_id = $this->security->xss_clean($this->input->post('station_profile'));
$station_id = $this->security->xss_clean($this->input->post('station_profile'));
$this->load->model('adif_data');
$this->load->model('adif_data');
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id);
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id);
$this->load->model('logbook_model');
$this->load->model('logbook_model');
foreach ($data['qsos']->result() as $qso)
foreach ($data['qsos']->result() as $qso)
{
$this->logbook_model->mark_hrdlog_qsos_sent($qso->COL_PRIMARY_KEY);
}
$this->logbook_model->mark_hrdlog_qsos_sent($qso->COL_PRIMARY_KEY);
}
$this->load->view('interface_assets/header', $data);
$this->load->view('hrdlog/mark_hrdlog', $data);
$this->load->view('interface_assets/footer');
}
$this->load->view('interface_assets/header', $data);
$this->load->view('hrdlog/mark_hrdlog', $data);
$this->load->view('interface_assets/footer');
}
}

查看文件

@ -74,19 +74,21 @@ class Qrz extends CI_Controller {
if ( ($result['status'] == 'OK') || ( ($result['status'] == 'error') && ($result['message'] == 'STATUS=FAIL&REASON=Unable to add QSO to database: duplicate&EXTENDED=')) ){
$this->markqso($qso->COL_PRIMARY_KEY);
$i++;
$result['status'] = 'OK';
} elseif ( ($result['status']=='error') && (substr($result['message'],0,11) == 'STATUS=AUTH')) {
log_message('error', 'QRZ upload failed for qso: Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON);
log_message('error', 'QRZ upload failed with the following message: ' .$result['message']);
log_message('error', 'QRZ upload stopped for Station_ID: ' .$station_id);
$errormessages[] = $result['message'] . ' Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON;
$result['status'] = 'Error';
break; /* If key is invalid, immediate stop syncing for more QSOs of this station */
} else {
log_message('error', 'QRZ upload failed for qso: Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON);
log_message('error', 'QRZ upload failed with the following message: ' .$result['message']);
$errormessages[] = $result['message'] . ' Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON;
$result['status'] = 'Error';
}
}
$result['status'] = 'OK';
$result['count'] = $i;
$result['errormessages'] = $errormessages;
return $result;

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Define a default message th
$lang['station_location_qrz_subscription'] = 'Subscription Required';
$lang['station_location_qrz_hint'] = "Find your API key on <a href='https://logbook.qrz.com/logbook' target='_blank'>the QRZ.com Logbook settings page";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbook Realtime Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbook Realtime Upload";
$lang['station_location_hrdlog_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_hrdlog_code_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_qo100_hint'] = "Create your API key on <a href='https://qo100dx.club' target='_blank'>your QO-100 Dx Club's profile page";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Realtime Upload";
$lang['station_location_oqrs_enabled'] = "OQRS Enabled";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Define a default message th
$lang['station_location_qrz_subscription'] = 'Subscription Required';
$lang['station_location_qrz_hint'] = "Find your API key on <a href='https://logbook.qrz.com/logbook' target='_blank'>the QRZ.com Logbook settings page";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbook Realtime Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbook Realtime Upload";
$lang['station_location_hrdlog_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_hrdlog_code_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_qo100_hint'] = "Create your API key on <a href='https://qo100dx.club' target='_blank'>your QO-100 Dx Club's profile page";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Realtime Upload";
$lang['station_location_oqrs_enabled'] = "OQRS Enabled";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Define a default message th
$lang['station_location_qrz_subscription'] = 'Subscription Required';
$lang['station_location_qrz_hint'] = "Find your API key on <a href='https://logbook.qrz.com/logbook' target='_blank'>the QRZ.com Logbook settings page";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbook Realtime Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbook Realtime Upload";
$lang['station_location_hrdlog_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_hrdlog_code_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_qo100_hint'] = "Create your API key on <a href='https://qo100dx.club' target='_blank'>your QO-100 Dx Club's profile page";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Realtime Upload";
$lang['station_location_oqrs_enabled'] = "OQRS Enabled";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Define a default message th
$lang['station_location_qrz_subscription'] = 'Subscription Required';
$lang['station_location_qrz_hint'] = "Find your API key on <a href='https://logbook.qrz.com/logbook' target='_blank'>the QRZ.com Logbook settings page";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbook Realtime Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbook Realtime Upload";
$lang['station_location_hrdlog_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_hrdlog_code_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_qo100_hint'] = "Create your API key on <a href='https://qo100dx.club' target='_blank'>your QO-100 Dx Club's profile page";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Realtime Upload";
$lang['station_location_oqrs_enabled'] = "OQRS Enabled";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Define a default message th
$lang['station_location_qrz_subscription'] = 'Subscription Required';
$lang['station_location_qrz_hint'] = "Find your API key on <a href='https://logbook.qrz.com/logbook' target='_blank'>the QRZ.com Logbook settings page";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbook Realtime Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbook Realtime Upload";
$lang['station_location_hrdlog_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_hrdlog_code_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_qo100_hint'] = "Create your API key on <a href='https://qo100dx.club' target='_blank'>your QO-100 Dx Club's profile page";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Realtime Upload";
$lang['station_location_oqrs_enabled'] = "OQRS Enabled";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Define a default message th
$lang['station_location_qrz_subscription'] = 'Subscription Required';
$lang['station_location_qrz_hint'] = "Find your API key on <a href='https://logbook.qrz.com/logbook' target='_blank'>the QRZ.com Logbook settings page";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbook Realtime Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbook Realtime Upload";
$lang['station_location_hrdlog_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_hrdlog_code_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_qo100_hint'] = "Create your API key on <a href='https://qo100dx.club' target='_blank'>your QO-100 Dx Club's profile page";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Realtime Upload";
$lang['station_location_oqrs_enabled'] = "OQRS Enabled";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Vous pouvez définir un mes
$lang['station_location_qrz_subscription'] = 'Subscription Required';
$lang['station_location_qrz_hint'] = "Find your API key on <a href='https://logbook.qrz.com/logbook' target='_blank'>the QRZ.com Logbook settings page";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbook Realtime Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbook Realtime Upload";
$lang['station_location_hrdlog_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_hrdlog_code_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_qo100_hint'] = "Create your API key on <a href='https://qo100dx.club' target='_blank'>your QO-100 Dx Club's profile page";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Realtime Upload";
$lang['station_location_oqrs_enabled'] = "OQRS Enabled";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Definiere eine Standard-Nac
$lang['station_location_qrz_subscription'] = 'Abonnement erforderlich';
$lang['station_location_qrz_hint'] = "Finde deinen 'QRZ Logbook API Key' in den <a href='https://logbook.qrz.com/logbook' target='_blank'>QRZ.com Logbuch Einstellungen";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbuch Echtzeit Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Benutzername";
$lang['station_location_hrdlog_username_hint'] = "Der Benutzername mit dem du bei HRDlog.net registriert bist (normalerweise dein Rufzeichen).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbuch Echtzeit Upload";
$lang['station_location_hrdlog_hint'] = "Erstelle deinen API Key auf <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Benutzerprofil Seite";
$lang['station_location_hrdlog_code_hint'] = "Erstelle deinen API Key auf <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Benutzerprofil Seite";
$lang['station_location_qo100_hint'] = "Erstelle deinen API Key auf <a href='https://qo100dx.club' target='_blank'>deiner QO-100 Dx Club's Profil Seite";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Echtzeit Upload";
$lang['station_location_oqrs_enabled'] = "OQRS aktivieren";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Define a default message th
$lang['station_location_qrz_subscription'] = 'Subscription Required';
$lang['station_location_qrz_hint'] = "Find your API key on <a href='https://logbook.qrz.com/logbook' target='_blank'>the QRZ.com Logbook settings page";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbook Realtime Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbook Realtime Upload";
$lang['station_location_hrdlog_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_hrdlog_code_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_qo100_hint'] = "Create your API key on <a href='https://qo100dx.club' target='_blank'>your QO-100 Dx Club's profile page";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Realtime Upload";
$lang['station_location_oqrs_enabled'] = "OQRS Enabled";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Define a default message th
$lang['station_location_qrz_subscription'] = 'Subscription Required';
$lang['station_location_qrz_hint'] = "Find your API key on <a href='https://logbook.qrz.com/logbook' target='_blank'>the QRZ.com Logbook settings page";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbook Realtime Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbook Realtime Upload";
$lang['station_location_hrdlog_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_hrdlog_code_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_qo100_hint'] = "Create your API key on <a href='https://qo100dx.club' target='_blank'>your QO-100 Dx Club's profile page";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Realtime Upload";
$lang['station_location_oqrs_enabled'] = "OQRS Enabled";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Define a default message th
$lang['station_location_qrz_subscription'] = 'Subscription Required';
$lang['station_location_qrz_hint'] = "Find your API key on <a href='https://logbook.qrz.com/logbook' target='_blank'>the QRZ.com Logbook settings page";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbook Realtime Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbook Realtime Upload";
$lang['station_location_hrdlog_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_hrdlog_code_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_qo100_hint'] = "Create your API key on <a href='https://qo100dx.club' target='_blank'>your QO-100 Dx Club's profile page";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Realtime Upload";
$lang['station_location_oqrs_enabled'] = "OQRS Enabled";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Define a default message th
$lang['station_location_qrz_subscription'] = 'Требуется подписка';
$lang['station_location_qrz_hint'] = "Ваш ключ API находится на <a href='https://logbook.qrz.com/logbook' target='_blank'>странице настроек журнала QRZ.com";
$lang['station_location_qrz_realtime_upload'] = 'Загрузка в журнал QRZ.com в реальном времени';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "Загрузка в журнал HRDLog.net в реальном времени";
$lang['station_location_hrdlog_hint'] = "Создайте свой код к API наn <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>странице профиля пользователя HRDLog.net";
$lang['station_location_hrdlog_code_hint'] = "Создайте свой код к API наn <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>странице профиля пользователя HRDLog.net";
$lang['station_location_qo100_hint'] = "Создайте свой ключ API на <a href='https://qo100dx.club' target='_blank'>странице вашего профиля в QO-100 Dx Club";
$lang['station_location_qo100_realtime_upload'] = "Загрузка QO-100 Dx Club в реальном времени";
$lang['station_location_oqrs_enabled'] = "OQRS включен";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Define a default message th
$lang['station_location_qrz_subscription'] = 'Subscription Required';
$lang['station_location_qrz_hint'] = "Find your API key on <a href='https://logbook.qrz.com/logbook' target='_blank'>the QRZ.com Logbook settings page";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbook Realtime Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbook Realtime Upload";
$lang['station_location_hrdlog_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_hrdlog_code_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_qo100_hint'] = "Create your API key on <a href='https://qo100dx.club' target='_blank'>your QO-100 Dx Club's profile page";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Realtime Upload";
$lang['station_location_oqrs_enabled'] = "OQRS Enabled";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Define a default message th
$lang['station_location_qrz_subscription'] = 'Subscription Required';
$lang['station_location_qrz_hint'] = "Find your API key on <a href='https://logbook.qrz.com/logbook' target='_blank'>the QRZ.com Logbook settings page";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbook Realtime Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbook Realtime Upload";
$lang['station_location_hrdlog_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_hrdlog_code_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_qo100_hint'] = "Create your API key on <a href='https://qo100dx.club' target='_blank'>your QO-100 Dx Club's profile page";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Realtime Upload";
$lang['station_location_oqrs_enabled'] = "OQRS Enabled";

查看文件

@ -99,8 +99,11 @@ $lang['station_location_eqsl_defaultqslmsg_hint'] = "Define a default message th
$lang['station_location_qrz_subscription'] = 'Subscription Required';
$lang['station_location_qrz_hint'] = "Find your API key on <a href='https://logbook.qrz.com/logbook' target='_blank'>the QRZ.com Logbook settings page";
$lang['station_location_qrz_realtime_upload'] = 'QRZ.com Logbook Realtime Upload';
$lang['station_location_hrdlog_username'] = "HRDLog.net Username";
$lang['station_location_hrdlog_username_hint'] = "The username you are registered with at HRDlog.net (usually your callsign).";
$lang['station_location_hrdlog_code'] = "HRDLog.net API Key";
$lang['station_location_hrdlog_realtime_upload'] = "HRDLog.net Logbook Realtime Upload";
$lang['station_location_hrdlog_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_hrdlog_code_hint'] = "Create your API Code on <a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>HRDLog.net Userprofile page";
$lang['station_location_qo100_hint'] = "Create your API key on <a href='https://qo100dx.club' target='_blank'>your QO-100 Dx Club's profile page";
$lang['station_location_qo100_realtime_upload'] = "QO-100 Dx Club Realtime Upload";
$lang['station_location_oqrs_enabled'] = "OQRS Enabled";

查看文件

@ -32,7 +32,7 @@ class Migration_create_dxpedition_table extends CI_Migration
),
'callsign' => array(
'type' => 'VARCHAR',
'constraint' => '255',
'constraint' => '50',
'null' => FALSE,
),
'country' => array(

查看文件

@ -0,0 +1,45 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/*
* This adds the hrdlog username to the station profile as this is needed
* for special callsigns
*/
class Migration_hrdlog_username extends CI_Migration
{
public function up()
{
if (!$this->db->field_exists('hrdlog_username', 'station_profile')) {
$fields = array(
'hrdlog_username VARCHAR(20) DEFAULT NULL AFTER hrdlog_code',
);
$this->dbforge->add_column('station_profile', $fields);
}
// SELECT all rows where hrdlog_code is not empty
$this->db->where("(hrdlog_code IS NOT NULL AND hrdlog_code != '')");
$query = $this->db->get('station_profile');
$rows = $query->result();
// Iterate through all selected rows
foreach ($rows as $row) {
// Extract the username using the regex pattern
$regex = '/^((\d|[A-Z])+\/)?((\d|[A-Z]){3,})(\/(\d|[A-Z])+)?(\/(\d|[A-Z])+)?$/';
preg_match($regex, $row->station_callsign, $matches);
$username = $matches[3];
// Update the row with the extracted username
$this->db->where('station_id', $row->station_id);
$this->db->update('station_profile', array('hrdlog_username' => $username));
}
}
public function down()
{
if ($this->db->field_exists('hrdlog_username', 'station_profile')) {
$this->dbforge->drop_column('station_profile', 'hrdlog_username');
}
}
}

查看文件

@ -278,7 +278,7 @@ class Logbook_model extends CI_Model {
$data['COL_MY_GRIDSQUARE'] = strtoupper(trim($station['station_gridsquare']));
}
if ($this->exists_hrdlog_code($station_id)) {
if ($this->exists_hrdlog_credentials($station_id)) {
$data['COL_HRDLOG_QSO_UPLOAD_STATUS'] = 'N';
}
@ -602,15 +602,15 @@ class Logbook_model extends CI_Model {
}
$result = '';
$result = $this->exists_hrdlog_code($data['station_id']);
$result = $this->exists_hrdlog_credentials($data['station_id']);
// Push qso to hrdlog if code is set, and realtime upload is enabled, and we're not importing an adif-file
if (isset($result->hrdlog_code) && $result->hrdlogrealtime == 1) {
if (isset($result->hrdlog_code) && isset($result->hrdlog_username) && $result->hrdlogrealtime == 1) {
$CI =& get_instance();
$CI->load->library('AdifHelper');
$qso = $this->get_qso($last_id,true)->result();
$adif = $CI->adifhelper->getAdifLine($qso[0]);
$result = $this->push_qso_to_hrdlog($result->hrdlog_code, $data['COL_STATION_CALLSIGN'], $adif);
$result = $this->push_qso_to_hrdlog($result->hrdlog_username, $result->hrdlog_code, $adif);
if ( ($result['status'] == 'OK') || ( ($result['status'] == 'error') || ($result['status'] == 'duplicate') || ($result['status'] == 'auth_error') )){
$this->mark_hrdlog_qsos_sent($last_id);
}
@ -652,10 +652,10 @@ class Logbook_model extends CI_Model {
}
/*
* Function checks if a HRDLog Code exists in the table with the given station id
* Function checks if a HRDLog Code and Username exists in the table with the given station id
*/
function exists_hrdlog_code($station_id) {
$sql = 'select hrdlog_code, hrdlogrealtime from station_profile
function exists_hrdlog_credentials($station_id) {
$sql = 'select hrdlog_username, hrdlog_code, hrdlogrealtime from station_profile
where station_id = ?';
$query = $this->db->query($sql,$station_id);
@ -762,7 +762,7 @@ class Logbook_model extends CI_Model {
* Function uploads a QSO to HRDLog with the API given.
* $adif contains a line with the QSO in the ADIF format. QSO ends with an <EOR>
*/
function push_qso_to_hrdlog($apikey, $station_callsign, $adif, $replaceoption = false) {
function push_qso_to_hrdlog($hrdlog_username, $apikey, $adif, $replaceoption = false) {
$url = 'https://robot.hrdlog.net/newentry.aspx';
$post_data['Code'] = $apikey;
@ -772,7 +772,7 @@ class Logbook_model extends CI_Model {
}
$post_data['ADIFData'] = $adif;
$post_data['Callsign'] = $station_callsign;
$post_data['Callsign'] = $hrdlog_username;
$post_encoded=http_build_query($post_data);
@ -797,6 +797,10 @@ class Logbook_model extends CI_Model {
$result['status'] = 'auth_error';
$result['message'] = $content;
return $result;
} elseif (stristr($content,'Invalid token</error>')) {
$result['status'] = 'auth_error';
$result['message'] = $content;
return $result;
} else {
$result['status'] = 'error';
$result['message'] = $content;
@ -1213,7 +1217,7 @@ class Logbook_model extends CI_Model {
'COL_CNTY' => $uscounty
);
if ($this->exists_hrdlog_code($data['station_id'])) {
if ($this->exists_hrdlog_credentials($data['station_id'])) {
$data['COL_HRDLOG_QSO_UPLOAD_STATUS'] = 'M';
}
@ -1745,9 +1749,11 @@ class Logbook_model extends CI_Model {
* Function returns all the station_id's with HRDLOG Code
*/
function get_station_id_with_hrdlog_code() {
$sql = 'select station_id, hrdlog_code from station_profile
where coalesce(hrdlog_code, "") <> ""';
$sql = 'SELECT station_id, hrdlog_username, hrdlog_code
FROM station_profile
WHERE coalesce(hrdlog_username, "") <> ""
AND coalesce(hrdlog_code, "") <> ""';
$query = $this->db->query($sql);
$result = $query->result();
@ -2539,6 +2545,8 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray =
$QSLBreakdown['eQSL_Received'] = 0;
$QSLBreakdown['LoTW_Sent'] = 0;
$QSLBreakdown['LoTW_Received'] = 0;
$QSLBreakdown['QRZ_Sent'] = 0;
$QSLBreakdown['QRZ_Received'] = 0;
$QSLBreakdown['QSL_Sent_today'] = 0;
$QSLBreakdown['QSL_Received_today'] = 0;
$QSLBreakdown['QSL_Requested_today'] = 0;
@ -2546,6 +2554,8 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray =
$QSLBreakdown['eQSL_Received_today'] = 0;
$QSLBreakdown['LoTW_Sent_today'] = 0;
$QSLBreakdown['LoTW_Received_today'] = 0;
$QSLBreakdown['QRZ_Sent_today'] = 0;
$QSLBreakdown['QRZ_Received_today'] = 0;
return $QSLBreakdown;
}
@ -2557,6 +2567,8 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray =
$QSLBreakdown['eQSL_Received'] = 0;
$QSLBreakdown['LoTW_Sent'] = 0;
$QSLBreakdown['LoTW_Received'] = 0;
$QSLBreakdown['QRZ_Sent'] = 0;
$QSLBreakdown['QRZ_Received'] = 0;
$QSLBreakdown['QSL_Sent_today'] = 0;
$QSLBreakdown['QSL_Received_today'] = 0;
$QSLBreakdown['QSL_Requested_today'] = 0;
@ -2564,6 +2576,8 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray =
$QSLBreakdown['eQSL_Received_today'] = 0;
$QSLBreakdown['LoTW_Sent_today'] = 0;
$QSLBreakdown['LoTW_Received_today'] = 0;
$QSLBreakdown['QRZ_Sent_today'] = 0;
$QSLBreakdown['QRZ_Received_today'] = 0;
return $QSLBreakdown;
}

查看文件

@ -101,6 +101,7 @@ class Stations extends CI_Model {
'station_itu' => xss_clean($this->input->post('station_itu', true)),
'state' => $state,
'eqslqthnickname' => xss_clean($this->input->post('eqslnickname', true)),
'hrdlog_username' => xss_clean($this->input->post('hrdlog_username', true)),
'hrdlog_code' => xss_clean($this->input->post('hrdlog_code', true)),
'hrdlogrealtime' => xss_clean($this->input->post('hrdlogrealtime', true)),
'clublogrealtime' => xss_clean($this->input->post('clublogrealtime', true)),
@ -150,6 +151,7 @@ class Stations extends CI_Model {
'station_itu' => xss_clean($this->input->post('station_itu', true)),
'state' => $state,
'eqslqthnickname' => xss_clean($this->input->post('eqslnickname', true)),
'hrdlog_username' => xss_clean($this->input->post('hrdlog_username', true)),
'hrdlog_code' => xss_clean($this->input->post('hrdlog_code', true)),
'hrdlogrealtime' => xss_clean($this->input->post('hrdlogrealtime', true)),
'clublogrealtime' => xss_clean($this->input->post('clublogrealtime', true)),
@ -363,58 +365,58 @@ class Stations extends CI_Model {
}
function stations_with_hrdlog_code() {
$sql = "select station_profile.station_id, station_profile.station_profile_name, station_profile.station_callsign, modc.modcount, notc.notcount, totc.totcount
from station_profile
left outer join (
select count(*) modcount, station_id
from ". $this->config->item('table_name') .
" where COL_HRDLOG_QSO_UPLOAD_STATUS = 'M'
$sql = "SELECT station_profile.station_id, station_profile.station_profile_name, station_profile.station_callsign, modc.modcount, notc.notcount, totc.totcount
FROM station_profile
LEFT OUTER JOIN (
SELECT count(*) modcount, station_id
FROM ". $this->config->item('table_name') .
" WHERE COL_HRDLOG_QSO_UPLOAD_STATUS = 'M'
group by station_id
) as modc on station_profile.station_id = modc.station_id
left outer join (
select count(*) notcount, station_id
from " . $this->config->item('table_name') .
" where (coalesce(COL_HRDLOG_QSO_UPLOAD_STATUS, '') = ''
LEFT OUTER JOIN (
SELECT count(*) notcount, station_id
FROM " . $this->config->item('table_name') .
" WHERE (coalesce(COL_HRDLOG_QSO_UPLOAD_STATUS, '') = ''
or COL_HRDLOG_QSO_UPLOAD_STATUS = 'N')
group by station_id
) as notc on station_profile.station_id = notc.station_id
left outer join (
select count(*) totcount, station_id
from " . $this->config->item('table_name') .
" where COL_HRDLOG_QSO_UPLOAD_STATUS = 'Y'
LEFT OUTER JOIN (
SELECT count(*) totcount, station_id
FROM " . $this->config->item('table_name') .
" WHERE COL_HRDLOG_QSO_UPLOAD_STATUS = 'Y'
group by station_id
) as totc on station_profile.station_id = totc.station_id
where coalesce(station_profile.hrdlog_code, '') <> ''
and station_profile.user_id = " . $this->session->userdata('user_id');
WHERE coalesce(station_profile.hrdlog_code, '') <> '' AND coalesce(station_profile.hrdlog_username, '') <> ''
AND station_profile.user_id = " . $this->session->userdata('user_id');
$query = $this->db->query($sql);
return $query;
}
function stations_with_qrz_api_key() {
$sql = "select station_profile.station_id, station_profile.station_profile_name, station_profile.station_callsign, modc.modcount, notc.notcount, totc.totcount
from station_profile
left outer join (
select count(*) modcount, station_id
from ". $this->config->item('table_name') .
" where COL_QRZCOM_QSO_UPLOAD_STATUS = 'M'
$sql = "SELECT station_profile.station_id, station_profile.station_profile_name, station_profile.station_callsign, modc.modcount, notc.notcount, totc.totcount
FROM station_profile
LEFT OUTER JOIN (
SELECT count(*) modcount, station_id
FROM ". $this->config->item('table_name') .
" WHERE COL_QRZCOM_QSO_UPLOAD_STATUS = 'M'
group by station_id
) as modc on station_profile.station_id = modc.station_id
left outer join (
select count(*) notcount, station_id
from " . $this->config->item('table_name') .
" where (coalesce(COL_QRZCOM_QSO_UPLOAD_STATUS, '') = ''
LEFT OUTER JOIN (
SELECT count(*) notcount, station_id
FROM " . $this->config->item('table_name') .
" WHERE (coalesce(COL_QRZCOM_QSO_UPLOAD_STATUS, '') = ''
or COL_QRZCOM_QSO_UPLOAD_STATUS = 'N')
group by station_id
) as notc on station_profile.station_id = notc.station_id
left outer join (
select count(*) totcount, station_id
from " . $this->config->item('table_name') .
" where COL_QRZCOM_QSO_UPLOAD_STATUS = 'Y'
LEFT OUTER JOIN (
SELECT count(*) totcount, station_id
FROM " . $this->config->item('table_name') .
" WHERE COL_QRZCOM_QSO_UPLOAD_STATUS = 'Y'
group by station_id
) as totc on station_profile.station_id = totc.station_id
where coalesce(station_profile.qrzapikey, '') <> ''
and station_profile.user_id = " . $this->session->userdata('user_id');
WHERE coalesce(station_profile.qrzapikey, '') <> ''
AND station_profile.user_id = " . $this->session->userdata('user_id');
$query = $this->db->query($sql);
return $query;

查看文件

@ -1,4 +1,4 @@
<div class="container adif">
<div class="container adif" id="adif_import">
<h2><?php echo $page_title; ?></h2>
<?php

查看文件

@ -1,5 +1,5 @@
<div class="container adif">
<div class="container adif" id="hrdlog_export">
<h2><?php echo $page_title; ?></h2>
@ -53,7 +53,7 @@
}
else {
echo '<div class="alert alert-danger" role="alert">Nothing found!</div>';
echo '<div class="alert alert-danger" role="alert">No Station Locations with valid HRDlog-Settings found. Check the HRDlog Credentials in the Station Location Settings!</div>';
}
?>

查看文件

@ -1,5 +1,5 @@
<div class="container adif">
<div class="container adif" id="qrz_export">
<h2><?php echo $page_title; ?></h2>

查看文件

@ -265,12 +265,17 @@
</div>
<div class="row">
<div class="mb-3 col-sm-6">
<label for="hrdlog_code">HRDLog.net API Code</label> <!-- This does not need Multilanguage Support -->
<input type="text" class="form-control" name="hrdlog_code" id="hrdlog_code" aria-describedby="hrdlog_codeHelp">
<small id="hrdlog_codeHelp" class="form-text text-muted"><?php echo lang("station_location_hrdlog_hint"); ?></a></small>
<div class="mb-3 col-sm-3">
<label for="hrdlog_username"><?php echo lang("station_location_hrdlog_username"); ?></label>
<input type="text" class="form-control" name="hrdlog_username" id="hrdlog_username" aria-describedby="hrdlog_usernameHelp">
<small id="hrdlog_usernameHelp" class="form-text text-muted"><?php echo lang("station_location_hrdlog_username_hint"); ?></a></small>
</div>
<div class="mb-3 col-sm-6">
<div class="mb-3 col-sm-3">
<label for="hrdlog_code"><?php echo lang("station_location_hrdlog_code"); ?></label>
<input type="text" class="form-control" name="hrdlog_code" id="hrdlog_code" aria-describedby="hrdlog_codeHelp">
<small id="hrdlog_codeHelp" class="form-text text-muted"><?php echo lang("station_location_hrdlog_code_hint"); ?></a></small>
</div>
<div class="mb-3 col-sm-3">
<label for="hrdlogrealtime"><?php echo lang("station_location_hrdlog_realtime_upload"); ?></label>
<select class="form-select" id="hrdlogrealtime" name="hrdlogrealtime">
<option value="1"><?php echo lang("general_word_yes"); ?></option>

查看文件

@ -407,9 +407,14 @@
<h5 class="card-header">HRDLog.net</h5> <!-- This does not need Multilanguage Support -->
<div class="card-body">
<div class="mb-3">
<label for="webadifApiKey">HRDLog.net API Code</label> <!-- This does not need Multilanguage Support -->
<label for="webadifApiKey"><?php echo lang("station_location_hrdlog_username"); ?></label>
<input type="text" class="form-control" name="hrdlog_username" id="hrdlog_username" aria-describedby="hrdlog_usernameHelp" value="<?php if(set_value('hrdlog_username') != "") { echo set_value('hrdlog_username'); } else { echo $my_station_profile->hrdlog_username; } ?>">
<small id="hrdlog_usernameHelp" class="form-text text-muted"><?php echo lang("station_location_hrdlog_username_hint"); ?></a></small>
</div>
<div class="mb-3">
<label for="webadifApiKey"><?php echo lang("station_location_hrdlog_code"); ?></label> <!-- This does not need Multilanguage Support -->
<input type="text" class="form-control" name="hrdlog_code" id="hrdlog_code" aria-describedby="hrdlog_codeHelp" value="<?php if(set_value('hrdlog_code') != "") { echo set_value('hrdlog_code'); } else { echo $my_station_profile->hrdlog_code; } ?>">
<small id="hrdlog_codeHelp" class="form-text text-muted"><?php echo lang("station_location_hrdlog_hint"); ?></a></small>
<small id="hrdlog_codeHelp" class="form-text text-muted"><?php echo lang("station_location_hrdlog_code_hint"); ?></a></small>
</div>
<div class="mb-3">
<label for="hrdlogrealtime"><?php echo lang("station_location_hrdlog_realtime_upload"); ?></label>

查看文件

@ -21,27 +21,30 @@ function ExportHrd(station_id) {
$('#notcount'+value.station_id).html(value.notcount);
$('#totcount'+value.station_id).html(value.totcount);
});
$(".card-body").append('<div class="alert alert-success" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>' + data.infomessage + '</div>');
$(".card-body").append('<div class="alert alert-success" role="alert">' + data.infomessage + '</div>');
}
else {
$(".card-body").append('<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>' + data.info + '</div>');
$(".card-body").append('<div class="alert alert-info" role="alert">' + data.info + '</div>');
}
if (data.errormessages.length > 0) {
$(".card-body").append('' +
'<div class="errormessages"><p>\n' +
' <button class="btn btn-danger" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">\n' +
' Show error messages\n' +
' </button>\n' +
' </p>\n' +
' <div class="collapse" id="collapseExample">\n' +
' <div class="card card-body"><div class="errors"></div>\n' +
' </div>\n' +
' </div></div>');
$.each(data.errormessages, function(index, value) {
$("#hrdlog_export").append(
'<div class="errormessages">\n' +
' <div class="card mt-2">\n' +
' <div class="card-header bg-danger">\n' +
' Error Message\n' +
' </div>\n' +
' <div class="card-body">\n' +
' <div class="errors"></div>\n' +
' </div>\n' +
' </div>\n' +
'</div>'
);
$.each(data.errormessages, function (index, value) {
$(".errors").append('<li>' + value);
});
}
}
});
}

查看文件

@ -21,24 +21,26 @@ function ExportQrz(station_id) {
$('#notcount'+value.station_id).html(value.notcount);
$('#totcount'+value.station_id).html(value.totcount);
});
$(".card-body").append('<div class="alert alert-success" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>' + data.infomessage + '</div>');
$(".card-body").append('<div class="alert alert-success" role="alert">' + data.infomessage + '</div>');
}
else {
$(".card-body").append('<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>' + data.info + '</div>');
$(".card-body").append('<div class="alert alert-danger" role="alert">' + data.info + '</div>');
}
if (data.errormessages.length > 0) {
$(".card-body").append('' +
'<div class="errormessages"><p>\n' +
' <button class="btn btn-danger" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">\n' +
' Show error messages\n' +
' </button>\n' +
' </p>\n' +
' <div class="collapse" id="collapseExample">\n' +
' <div class="card card-body"><div class="errors"></div>\n' +
' </div>\n' +
' </div></div>');
$.each(data.errormessages, function(index, value) {
$("#qrz_export").append(
'<div class="errormessages">\n' +
' <div class="card mt-2">\n' +
' <div class="card-header bg-danger">\n' +
' Error Message\n' +
' </div>\n' +
' <div class="card-body">\n' +
' <div class="errors"></div>\n' +
' </div>\n' +
' </div>\n' +
'</div>'
);
$.each(data.errormessages, function (index, value) {
$(".errors").append('<li>' + value);
});
}

查看文件

@ -35,21 +35,23 @@ function ExportWebADIF(station_id) {
$(".card-body").append('<div class="alert alert-success" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>' + data.infomessage + '</div>');
}
else {
$(".card-body").append('<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>' + data.info + '</div>');
$(".card-body").append('<div class="alert alert-danger" role="alert">' + data.info + '</div>');
}
if (data.errormessages.length > 0) {
$(".card-body").append('' +
'<div class="errormessages"><p>\n' +
' <button class="btn btn-danger" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">\n' +
' Show error messages\n' +
' </button>\n' +
' </p>\n' +
' <div class="collapse" id="collapseExample">\n' +
' <div class="card card-body"><div class="errors"></div>\n' +
' </div>\n' +
' </div></div>');
$.each(data.errormessages, function(index, value) {
$("#adif_import").append(
'<div class="errormessages">\n' +
' <div class="card mt-2">\n' +
' <div class="card-header bg-danger">\n' +
' Error Message\n' +
' </div>\n' +
' <div class="card-body">\n' +
' <div class="errors"></div>\n' +
' </div>\n' +
' </div>\n' +
'</div>'
);
$.each(data.errormessages, function (index, value) {
$(".errors").append('<li>' + value);
});
}