Revert "Correct user date formating on QSO pages (Live/Post)"

This reverts commit 77a99780cb.
pull/1218/head
Peter Goodhall 2021-09-28 16:09:47 +01:00
rodzic 5f10c52323
commit 0f57e62a84
2 zmienionych plików z 13 dodań i 42 usunięć

Wyświetl plik

@ -498,35 +498,10 @@ $(document).on('keypress',function(e) {
$('.input_time').jclock(options);
});
var fmt = "<?php
// Borrowed from ..\qso\index.php
// Get Date format
if($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/cloudlog.php
$custom_date_format = $this->config->item('qso_date_format');
}
// php format string
$find = array('d', // Day of month (2 digit)
'm', // Numeric month (2 digit)
'M', // Month abbreviation (3 char)
'Y', // Year (4 digit)
'y'); // Year (2 digit)
// jclock format string
$replace = array('%d', // Day of month (2 digit)
'%m', // Numeric month (2 digit)
'%b', // Month abbreviation (3 char)
'%Y', // Year (4 digit)
'%y'); // Year (2 digit)
echo str_replace($find, $replace, $custom_date_format)
?>"
$(function($) {
var options = {
utc: true,
format: fmt
format: '%d-%m-%Y'
}
$('.input_date').jclock(options);
});

Wyświetl plik

@ -35,19 +35,6 @@
</ul>
</div>
<?php
// Get Date format
if($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/cloudlog.php
$custom_date_format = $this->config->item('qso_date_format');
}
?>
<div class="card-body">
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="qso" role="tabpanel" aria-labelledby="qso-tab">
@ -55,7 +42,7 @@
<div class="form-row">
<div class="form-group col-md-6">
<label for="start_date"><?php echo $this->lang->line('general_word_date'); ?></label>
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo date($custom_date_format, strtotime($this->session->userdata('start_date'))); } else { echo date($custom_date_format); }?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
</div>
<div class="form-group col-md-6">
@ -64,7 +51,7 @@
</div>
<?php if ( $_GET['manual'] == 0 ) { ?>
<input class="input_time" type="hidden" id="start_time" name="start_time" value="<?php echo date('H:i'); ?>" />
<input class="input_time" type="hidden" id="start_time" name="start_time"value="<?php echo date('H:i'); ?>" />
<input class="input_date" type="hidden" id="start_date" name="start_date" value="<?php echo date('d-m-Y'); ?>" />
<?php } ?>
</div>
@ -526,7 +513,16 @@
<td><?php echo $this->lang->line('gen_hamradio_band'); ?></td>
</tr>
<?php
<?php
// Get Date format
if($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/cloudlog.php
$custom_date_format = $this->config->item('qso_date_format');
}
$i = 0;
foreach ($query->result() as $row) {