当前提交
7f19c1b0a4
共有 1 个文件被更改,包括 6 次插入 和 28 次删除
|
|
@ -1458,40 +1458,18 @@ class Logbook_model extends CI_Model {
|
||||||
|
|
||||||
// Store Freq
|
// Store Freq
|
||||||
// Check if 'freq' is defined in the import?
|
// Check if 'freq' is defined in the import?
|
||||||
if (isset($record['freq'])){
|
if (isset($record['freq'])){ // record[freq] in MHz
|
||||||
$cleanfreq = preg_replace('#\W#', '', $record['freq']);
|
$freq = floatval($record['freq']) * 1E6; // store in Hz
|
||||||
$freqlng = strlen($cleanfreq);
|
|
||||||
}else{
|
|
||||||
$freqlng = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($record['freq']) && $freqlng < 7 ) {
|
|
||||||
$cleansedstring = preg_replace('#\W#', '', $record['freq']);
|
|
||||||
$freq = $cleansedstring."0";
|
|
||||||
} elseif($freqlng >= 7) {
|
|
||||||
$cleansedstring = preg_replace('#\W#', '', $record['freq']);
|
|
||||||
$freq = $cleansedstring;
|
|
||||||
} else {
|
} else {
|
||||||
$freq = "0";
|
$freq = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for RX Freq
|
// Check for RX Freq
|
||||||
// Check if 'freq' is defined in the import?
|
// Check if 'freq' is defined in the import?
|
||||||
if (isset($record['freq_rx'])){
|
if (isset($record['freq_rx'])){ // record[freq] in MHz
|
||||||
$cleanfreqRX = preg_replace('#\W#', '', $record['freq_rx']);
|
$freqRX = floatval($record['freq_rx']) * 1E6; // store in Hz
|
||||||
$freqlngRX = strlen($cleanfreqRX);
|
|
||||||
}else{
|
|
||||||
$freqlngRX = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($record['freq_rx']) && $freqlngRX < 7 ) {
|
|
||||||
$cleansedstringRX = preg_replace('#\W#', '', $record['freq_rx']);
|
|
||||||
$freqRX = $cleansedstringRX."0";
|
|
||||||
} elseif($freqlngRX >= 7) {
|
|
||||||
$cleansedstringRX = preg_replace('#\W#', '', $record['freq_rx']);
|
|
||||||
$freqRX = $cleansedstringRX;
|
|
||||||
} else {
|
} else {
|
||||||
$freqRX = NULL;
|
$freqRX = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// DXCC id
|
// DXCC id
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用