fixing custom map

这个提交包含在:
HB9HIL 2023-11-17 22:56:16 +01:00
父节点 d6edea7809
当前提交 adb8526704
共有 2 个文件被更改,包括 81 次插入98 次删除

查看文件

@ -81,16 +81,12 @@ class Map extends CI_Controller {
if ($this->input->post('from')) { if ($this->input->post('from')) {
$from = $this->input->post('from'); $from = $this->input->post('from');
$from = DateTime::createFromFormat('m/d/Y g:i A', $from);
$from = $from->format('Y-m-d H:i');
$footer_data['date_from'] = $from; $footer_data['date_from'] = $from;
} else { } else {
$footer_data['date_from'] = date('Y-m-d H:i:00'); $footer_data['date_from'] = date('Y-m-d H:i:00');
} }
if ($this->input->post('to')) { if ($this->input->post('to')) {
$to = DateTime::createFromFormat('m/d/Y g:i A', $this->input->post('to')); $to = $this->input->post('to');
$to = $to->modify('+1 day')->format('Y-m-d H:i:00');
$footer_data['date_to'] = $to; $footer_data['date_to'] = $to;
} else { } else {
$temp_to = new DateTime('tomorrow'); $temp_to = new DateTime('tomorrow');

查看文件

@ -1,5 +1,5 @@
<div class="container custom-map-QSOs"> <div class="container custom-map-QSOs">
<br>
<h2><?php echo $logbook_name ?> logbook QSOs (Custom Date)</h2> <h2><?php echo $logbook_name ?> logbook QSOs (Custom Date)</h2>
<?php if ($this->session->flashdata('notice')) { ?> <?php if ($this->session->flashdata('notice')) { ?>
@ -10,32 +10,21 @@
<form method="post" action="<?php echo site_url('map/custom'); ?>"> <form method="post" action="<?php echo site_url('map/custom'); ?>">
<div class="row"> <div class="row">
<label class="col-md-2 control-label" for="from">Start Date/Time</label> <div class="mb-3 col-md-3">
<div class="input-group date col-md-3 w-auto" id="datetimepicker1" data-target-input="nearest"> <label for="from"><?php echo lang('gen_from_date') . ": " ?></label>
<input name="from" type="text" placeholder="DD/MM/YYYY" class="form-control form-control-sm datetimepicker-input" data-bs-target="#datetimepicker1" <?php if ($this->input->post('from') != "" || $this->input->method() !== 'post') echo 'value="'.$this->input->post('from').'"'; ?>/> <input name="from" id="from" type="date" class="form-control w-auto">
<div class="input-group-append" data-bs-target="#datetimepicker1" data-bs-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div> </div>
</div>
</div>
</row>
<div class="row"> <div class="mb-3 col-md-3">
<label class="col-md-2 control-label" for="to">End Date/Time</label> <label for="to"><?php echo lang('gen_to_date') . ": " ?></label>
<input name="to" id="to" type="date" class="form-control w-auto">
<div class="input-group date col-md-3 w-auto" id="datetimepicker2" data-target-input="nearest">
<input name="to" type="text" placeholder="DD/MM/YYYY" class="form-control form-control-sm datetimepicker-input" data-bs-target="#datetimepicker2" <?php if ($this->input->post('to') != "" || $this->input->method() !== 'post') echo 'value="'.$this->input->post('to').'"'; ?>/>
<div class="input-group-append" data-bs-target="#datetimepicker2" data-bs-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-2 control-label" for="band">Band</label> <div class="mb-3 col-md-3">
<label for="band">Band</label>
<div class="col-md-3"> <select id="band2" name="band" class="form-select">
<select id="band2" name="band" class="form-select form-select-sm">
<option value="All" <?php if ($this->input->post('band') == "All" || $this->input->method() !== 'post') echo ' selected'; ?>>Every band</option> <option value="All" <?php if ($this->input->post('band') == "All" || $this->input->method() !== 'post') echo ' selected'; ?>>Every band</option>
<?php foreach ($worked_bands as $band) { <?php foreach ($worked_bands as $band) {
echo '<option value="' . $band . '"'; echo '<option value="' . $band . '"';
@ -44,12 +33,11 @@
} ?> } ?>
</select> </select>
</div> </div>
</div>
<div class="row">
<label class="col-md-2 control-label" for="mode">Mode</label> <div class="mb-3 col-md-3">
<div class="col-md-3"> <label for="mode">Mode</label>
<select id="mode" name="mode" class="form-select form-select-sm"> <select id="mode" name="mode" class="form-select">
<option value="All" <?php if ($this->input->post('mode') == "All" || $this->input->method() !== 'post') echo ' selected'; ?>>All</option> <option value="All" <?php if ($this->input->post('mode') == "All" || $this->input->method() !== 'post') echo ' selected'; ?>>All</option>
<?php <?php
foreach ($modes->result() as $mode) { foreach ($modes->result() as $mode) {
@ -66,11 +54,10 @@
?> ?>
</select> </select>
</div> </div>
</div>
<div class="row"> <div class="mb-3 col-md-3">
<label class="col-md-2 control-label"for="selectPropagation">Propagation Mode</label> <label for="selectPropagation">Propagation Mode</label>
<div class="col-md-3"> <select class="form-select" id="selectPropagation" name="prop_mode">
<select class="form-select form-select-sm" id="selectPropagation" name="prop_mode">
<option value="All" <?php if ($this->input->post('prop_mode') == "All" || $this->input->method() !== 'post') echo ' selected'; ?>>All</option> <option value="All" <?php if ($this->input->post('prop_mode') == "All" || $this->input->method() !== 'post') echo ' selected'; ?>>All</option>
<option value="AS" <?php if ($this->input->post('prop_mode') == "AS") echo ' selected'; ?>>Aircraft Scatter</option> <option value="AS" <?php if ($this->input->post('prop_mode') == "AS") echo ' selected'; ?>>Aircraft Scatter</option>
<option value="AUR" <?php if ($this->input->post('prop_mode') == "AUR") echo ' selected'; ?>>Aurora</option> <option value="AUR" <?php if ($this->input->post('prop_mode') == "AUR") echo ' selected'; ?>>Aurora</option>
@ -94,7 +81,7 @@
</div> </div>
</div> </div>
<input type="submit" value="Load Map"> <input class="btn btn-primary" type="submit" value="Load Map">
<br><br> <br><br>
</form> </form>