kopia lustrzana https://github.com/magicbug/Cloudlog
Allow user to define date format
rodzic
ad694204ef
commit
c5aeab0ce0
|
@ -88,3 +88,24 @@ $config['public_search'] = FALSE;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$config['callsign_tags'] = TRUE;
|
$config['callsign_tags'] = TRUE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Date Format
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| QSO Date format allows you to change the frontend display date to something
|
||||||
|
| that suits your region or operating style better.
|
||||||
|
|
|
||||||
|
| It uses the php date format so see https://www.php.net/manual/en/function.date.php
|
||||||
|
| for information on the layout.
|
||||||
|
|
|
||||||
|
| Example
|
||||||
|
| d/m/y = day/month/year
|
||||||
|
| Y/m/d = 2020/02/21
|
||||||
|
|
|
||||||
|
| Default is: d/m/y
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$config['qso_date_format'] = "d/m/y";
|
||||||
|
|
|
@ -388,7 +388,7 @@ class Logbook extends CI_Controller {
|
||||||
foreach ($query->result() as $row)
|
foreach ($query->result() as $row)
|
||||||
{
|
{
|
||||||
$html .= "<tr>";
|
$html .= "<tr>";
|
||||||
$html .= "<td>".date('d/m/y H:i',strtotime($row->COL_TIME_ON))."</td>";
|
$html .= "<td>".date($this->config->item('qso_date_format').' H:i',strtotime($row->COL_TIME_ON))."</td>";
|
||||||
$html .= "<td>".str_replace("0","Ø",strtoupper($row->COL_CALL))."</td>";
|
$html .= "<td>".str_replace("0","Ø",strtoupper($row->COL_CALL))."</td>";
|
||||||
$html .= "<td>".$row->COL_RST_SENT."</td>";
|
$html .= "<td>".$row->COL_RST_SENT."</td>";
|
||||||
$html .= "<td>".$row->COL_RST_RCVD."</td>";
|
$html .= "<td>".$row->COL_RST_RCVD."</td>";
|
||||||
|
|
|
@ -44,10 +44,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<?php $i = 0;
|
<?php
|
||||||
|
$i = 0;
|
||||||
foreach ($last_five_qsos->result() as $row) { ?>
|
foreach ($last_five_qsos->result() as $row) { ?>
|
||||||
<?php echo '<tr class="tr'.($i & 1).'">'; ?>
|
<?php echo '<tr class="tr'.($i & 1).'">'; ?>
|
||||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); ?></td>
|
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($this->config->item('qso_date_format'), $timestamp); ?></td>
|
||||||
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
|
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
|
||||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
|
@ -338,7 +338,7 @@
|
||||||
<?php $i = 0;
|
<?php $i = 0;
|
||||||
foreach ($query->result() as $row) { ?>
|
foreach ($query->result() as $row) { ?>
|
||||||
<?php echo '<tr class="tr'.($i & 1).'">'; ?>
|
<?php echo '<tr class="tr'.($i & 1).'">'; ?>
|
||||||
<td><?php echo date('d/m/y H:i',strtotime($row->COL_TIME_ON)); ?></td>
|
<td><?php echo date($this->config->item('qso_date_format').' H:i',strtotime($row->COL_TIME_ON)); ?></td>
|
||||||
<td><a class="qsobox" data-fancybox data-type="iframe" data-src="<?php echo site_url('logbook/view')."/".$row->COL_PRIMARY_KEY; ?>" href="javascript:;"><?php echo str_replace("0","Ø",strtoupper($row->COL_CALL)); ?></a></td>
|
<td><a class="qsobox" data-fancybox data-type="iframe" data-src="<?php echo site_url('logbook/view')."/".$row->COL_PRIMARY_KEY; ?>" href="javascript:;"><?php echo str_replace("0","Ø",strtoupper($row->COL_CALL)); ?></a></td>
|
||||||
<td><?php echo $row->COL_MODE; ?></td>
|
<td><?php echo $row->COL_MODE; ?></td>
|
||||||
<td><?php echo $row->COL_RST_SENT; ?></td>
|
<td><?php echo $row->COL_RST_SENT; ?></td>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
<?php $i = 0; foreach ($results->result() as $row) { ?>
|
<?php $i = 0; foreach ($results->result() as $row) { ?>
|
||||||
<?php echo '<tr class="tr'.($i & 1).'">'; ?>
|
<?php echo '<tr class="tr'.($i & 1).'">'; ?>
|
||||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); ?></td>
|
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($this->config->item('qso_date_format'), $timestamp); ?></td>
|
||||||
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
|
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
|
||||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>Date/Time:</td>
|
<td>Date/Time:</td>
|
||||||
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
|
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
|
||||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at ".date('H:i', $timestamp); ?></td>
|
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($this->config->item('qso_date_format'), $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at ".date('H:i', $timestamp); ?></td>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); ?></td>
|
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($this->config->item('qso_date_format'), $timestamp); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue