DupeSearch Lang & PHP-Logic

这个提交包含在:
int2001 2023-10-17 10:14:10 +00:00
父节点 fc18464c47
当前提交 cf084f577c
找不到此签名对应的密钥
GPG 密钥 ID: DFB1C13CD2DB037B
共有 5 个文件被更改,包括 21 次插入2 次删除

查看文件

@ -124,6 +124,7 @@ class Logbookadvanced extends CI_Controller {
'pota' => xss_clean($this->input->post('pota')), 'pota' => xss_clean($this->input->post('pota')),
'wwff' => xss_clean($this->input->post('wwff')), 'wwff' => xss_clean($this->input->post('wwff')),
'qslimages' => xss_clean($this->input->post('qslimages')), 'qslimages' => xss_clean($this->input->post('qslimages')),
'dupes' => xss_clean($this->input->post('dupes')),
); );
$qsos = []; $qsos = [];

查看文件

@ -15,6 +15,7 @@ $lang['filter_filters'] = 'Filters';
$lang['filter_actions'] = 'Actions'; $lang['filter_actions'] = 'Actions';
$lang['filter_results'] = '# Results'; $lang['filter_results'] = '# Results';
$lang['filter_search'] = 'Search'; $lang['filter_search'] = 'Search';
$lang['filter_dupes'] = 'Dupes';
$lang['filter_map'] = 'Map'; $lang['filter_map'] = 'Map';
$lang['filter_options'] = 'Options'; $lang['filter_options'] = 'Options';
$lang['filter_reset'] = 'Reset'; $lang['filter_reset'] = 'Reset';
@ -153,4 +154,4 @@ $lang['filter_options_show'] = 'Show';
// $lang['gen_hamradio_wwff'] --> application/language/english/general_words_lang.php // $lang['gen_hamradio_wwff'] --> application/language/english/general_words_lang.php
// $lang['gen_hamradio_pota'] --> application/language/english/general_words_lang.php // $lang['gen_hamradio_pota'] --> application/language/english/general_words_lang.php
// $lang['options_save'] --> application/language/english/options_lang.php // $lang['options_save'] --> application/language/english/options_lang.php
$lang['filter_options_close'] = 'Close'; $lang['filter_options_close'] = 'Close';

查看文件

@ -15,6 +15,7 @@ $lang['filter_filters'] = 'Filter';
$lang['filter_actions'] = 'Aktionen'; $lang['filter_actions'] = 'Aktionen';
$lang['filter_results'] = '# Resultate'; $lang['filter_results'] = '# Resultate';
$lang['filter_search'] = 'Suche'; $lang['filter_search'] = 'Suche';
$lang['filter_dupes'] = 'Doppelte';
$lang['filter_map'] = 'Karte'; $lang['filter_map'] = 'Karte';
$lang['filter_options'] = 'Optionen'; $lang['filter_options'] = 'Optionen';
$lang['filter_reset'] = 'Reset'; $lang['filter_reset'] = 'Reset';
@ -153,4 +154,4 @@ $lang['filter_options_show'] = 'Anzeigen';
// $lang['gen_hamradio_wwff'] --> application/language/english/general_words_lang.php // $lang['gen_hamradio_wwff'] --> application/language/english/general_words_lang.php
// $lang['gen_hamradio_pota'] --> application/language/english/general_words_lang.php // $lang['gen_hamradio_pota'] --> application/language/english/general_words_lang.php
// $lang['options_save'] --> application/language/english/options_lang.php // $lang['options_save'] --> application/language/english/options_lang.php
$lang['filter_options_close'] = 'Schliessen'; $lang['filter_options_close'] = 'Schliessen';

查看文件

@ -7,6 +7,20 @@ class Logbookadvanced_model extends CI_Model {
$conditions = []; $conditions = [];
$binding = [$searchCriteria['user_id']]; $binding = [$searchCriteria['user_id']];
if ($searchCriteria['dupes'] !== '') {
$id_sql="select group_concat(x.qsoids separator ',') as QSO_IDs from (
select GROUP_CONCAT(col_primary_key separator ',') as qsoids, COL_CALL, COL_MODE, COL_SUBMODE, station_callsign, COL_SAT_NAME, COL_BAND, min(col_time_on) Mintime, max(col_time_on) Maxtime from
TABLE_HRD_CONTACTS_V01 join station_profile on TABLE_HRD_CONTACTS_V01.station_id = station_profile.station_id where station_profile.user_id=?
group by col_call, col_mode, COL_SUBMODE, STATION_CALLSIGN, col_band, COL_SAT_NAME having count(*) > 1 and timediff(maxtime, mintime) < 3000) x";
$id_query = $this->db->query($id_sql, $searchCriteria['user_id']);
foreach ($id_query->result() as $id) {
$ids2fetch=$id->QSO_IDs;
}
if ($ids2fetch !== '') {
$conditions[] = "qsos.COL_PRIMARY_KEY in (".$ids2fetch.")";
}
}
if ($searchCriteria['dateFrom'] !== '') { if ($searchCriteria['dateFrom'] !== '') {
$from = DateTime::createFromFormat('d/m/Y', $searchCriteria['dateFrom']); $from = DateTime::createFromFormat('d/m/Y', $searchCriteria['dateFrom']);
$from = $from->format('Y-m-d'); $from = $from->format('Y-m-d');

查看文件

@ -53,6 +53,7 @@ $options = json_decode($options);
<form id="searchForm" name="searchForm" action="<?php echo base_url()."index.php/logbookadvanced/search";?>" <form id="searchForm" name="searchForm" action="<?php echo base_url()."index.php/logbookadvanced/search";?>"
method="post"> method="post">
<input type="hidden" id="dupes" name="dupes" value="">
<div class="filterbody collapse"> <div class="filterbody collapse">
<div class="form-row"> <div class="form-row">
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl"> <div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
@ -390,6 +391,7 @@ $options = json_decode($options);
<option value="5000">5000</option> <option value="5000">5000</option>
</select> </select>
<button type="submit" class="btn btn-sm btn-primary mr-1" id="searchButton"><?php echo lang('filter_search'); ?></button> <button type="submit" class="btn btn-sm btn-primary mr-1" id="searchButton"><?php echo lang('filter_search'); ?></button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="dupeButton"><?php echo lang('filter_dupes'); ?></button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="mapButton" onclick="mapQsos(this.form);"><?php echo lang('filter_map'); ?></button> <button type="button" class="btn btn-sm btn-primary mr-1" id="mapButton" onclick="mapQsos(this.form);"><?php echo lang('filter_map'); ?></button>
<button type="options" class="btn btn-sm btn-primary mr-1" id="optionButton"><?php echo lang('filter_options'); ?></button> <button type="options" class="btn btn-sm btn-primary mr-1" id="optionButton"><?php echo lang('filter_options'); ?></button>
<button type="reset" class="btn btn-sm btn-danger mr-1" id="resetButton"><?php echo lang('filter_reset'); ?></button> <button type="reset" class="btn btn-sm btn-danger mr-1" id="resetButton"><?php echo lang('filter_reset'); ?></button>