mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
add qrzcq to the installer
This commit is contained in:
@@ -9,12 +9,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
|
||||
| 'app_name' Name of the App 'Wavelog'
|
||||
| 'directory' directory where wavelog is installed eg "logger"
|
||||
| 'callbook' Selects which Callbook lookup to use defaults "hamqth" but supports "qrz"
|
||||
| 'callbook' Selects which Callbook lookup to use defaults "hamqth" but supports "qrz" and "qrzcq"
|
||||
*/
|
||||
|
||||
$config['app_name'] = 'Wavelog';
|
||||
$config['directory'] = '/%directory%';
|
||||
$config['callbook'] = '%callbook%'; // Options are hamqth or qrz
|
||||
$config['callbook'] = '%callbook%'; // Options are hamqth, qrz or qrzcq
|
||||
|
||||
$config['datadir'] = null; // default to install directory
|
||||
|
||||
@@ -24,8 +24,8 @@ $config['datadir'] = null; // default to install directory
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 'table_name' SQL table where log can be found
|
||||
| 'locator' Default locator used to calculate bearings/distance
|
||||
| 'display_freq' Show or Hide frequnecy info
|
||||
| 'locator' Default locator used to calculate bearings/distance
|
||||
| 'display_freq' Show or Hide frequency info
|
||||
*/
|
||||
|
||||
$config['table_name'] = 'TABLE_HRD_CONTACTS_V01';
|
||||
@@ -57,6 +57,17 @@ $config['use_fullname'] = false;
|
||||
$config['hamqth_username'] = '%hamqth_username%';
|
||||
$config['hamqth_password'] = '%hamqth_password%';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| QRZcq Login Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 'qrzcq_username' QRZcq.com user login
|
||||
| 'qrzcq_password' QRZcq.com user password
|
||||
*/
|
||||
$config['qrzcq_username'] = '%qrzcq_username%';
|
||||
$config['qrzcq_password'] = '%qrzcq_password%';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication
|
||||
|
||||
@@ -165,17 +165,29 @@ class Core
|
||||
$new = str_replace("%websiteurl%", $data['websiteurl'], $new);
|
||||
$new = str_replace("%directory%", $data['directory'], $new);
|
||||
$new = str_replace("%callbook%", $data['global_call_lookup'], $new);
|
||||
if ($data['global_call_lookup'] == 'qrz') {
|
||||
$new = str_replace("%qrz_username%", $data['callbook_username'], $new);
|
||||
$new = str_replace("%qrz_password%", $data['callbook_password'], $new);
|
||||
$new = str_replace("%hamqth_username%", '', $new);
|
||||
$new = str_replace("%hamqth_password%", '', $new);
|
||||
|
||||
$callbooks = ['qrz', 'hamqth', 'qrzcq'];
|
||||
|
||||
if (in_array($data['global_call_lookup'], $callbooks)) {
|
||||
$c_username = '%' . $data['global_call_lookup'] . '_username%';
|
||||
$c_password = '%' . $data['global_call_lookup'] . '_password%';
|
||||
|
||||
$rest_callbooks = array_diff($callbooks, [$data['global_call_lookup']]);
|
||||
|
||||
foreach ($rest_callbooks as $callbook) {
|
||||
$new = str_replace('%' . $callbook . '_username%', '', $new);
|
||||
$new = str_replace('%' . $callbook . '_password%', '', $new);
|
||||
}
|
||||
|
||||
$new = str_replace($c_username, $data['callbook_username'], $new);
|
||||
$new = str_replace($c_password, $data['callbook_password'], $new);
|
||||
} else {
|
||||
$new = str_replace("%qrz_username%", '', $new);
|
||||
$new = str_replace("%qrz_password%", '', $new);
|
||||
$new = str_replace("%hamqth_username%", $data['callbook_username'], $new);
|
||||
$new = str_replace("%hamqth_password%", $data['callbook_password'], $new);
|
||||
foreach ($callbooks as $callbook) {
|
||||
$new = str_replace('%' . $callbook . '_username%', '', $new);
|
||||
$new = str_replace('%' . $callbook . '_password%', '', $new);
|
||||
}
|
||||
}
|
||||
|
||||
$new = str_replace("%encryptionkey%", $encryptionkey, $new);
|
||||
$new = str_replace("'%log_threshold%'", $data['log_threshold'], $new);
|
||||
|
||||
|
||||
@@ -368,6 +368,7 @@ if (!file_exists('.lock')) {
|
||||
<select id="global_call_lookup" class="form-select" name="global_call_lookup">
|
||||
<option value="hamqth" selected>HamQTH</option>
|
||||
<option value="qrz">QRZ.com</option>
|
||||
<option value="qrzcq">QRZCQ.com</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user