Merge branch 'main' of http://git.miteruzo.com/miteruzo/nizika
This commit is contained in:
@@ -13,6 +13,9 @@ $asc = ($_GET['asc'] ?? 0) != 0;
|
||||
$keyword = trim ($_GET['q'] ?? '');
|
||||
$escaped = ($_GET['escaped'] ?? 0) != 0;
|
||||
|
||||
$date_start = ($_GET['start'] ?? null) ?: null;
|
||||
$date_end = ($_GET['end'] ?? null) ?: null;
|
||||
|
||||
$f = fopen (LOG_PATH, 'r');
|
||||
|
||||
if ($f !== false)
|
||||
@@ -41,6 +44,18 @@ if ($keyword != '')
|
||||
!== false));
|
||||
}
|
||||
|
||||
if ($date_start)
|
||||
{
|
||||
$log_data = array_filter ($log_data, fn ($row) => (
|
||||
substr ($row['date_time'], 0, 10) >= $date_start));
|
||||
}
|
||||
|
||||
if ($date_end)
|
||||
{
|
||||
$log_data = array_filter ($log_data, fn ($row) => (
|
||||
substr ($row['date_time'], 0, 10) <= $date_end));
|
||||
}
|
||||
|
||||
$pages_max = (int) ((count ($log_data) - 1) / $length) + 1;
|
||||
|
||||
if (!($asc))
|
||||
|
||||
Reference in New Issue
Block a user