Monatsansicht auf 3 Monate in die Zukunft erweitert.

This commit is contained in:
Daniel Spitzer
2024-10-07 15:32:13 +02:00
parent 07b3edbf3d
commit 827b3d89ee

View File

@@ -29,7 +29,9 @@ for ($i = 1; $i <= 25; $i++) {
$time = $time - 604800;
}
$time = time();
for ($i = 1; $i <= 12; $i++) {
$timenow = $time;
$time = strtotime('+3 month', $time);
for ($i = 1; $i <= 15; $i++) {
$mon = date('n', $time);
$year = date('Y', $time);
$month[$time] = $monthger[$mon] . " " . $year;
@@ -246,7 +248,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
<?php foreach ($timerecordingCars as $timerecordingCar): ?>
<option value="<?= $timerecordingCar->id ?>"
data-mileagenow="<?= $timerecordingCar->mileage_now ?>"><?= $timerecordingCar->number_plate . " (" . $timerecordingCar->brand." ".$timerecordingCar->model . ")" ?></option>
data-mileagenow="<?= $timerecordingCar->mileage_now ?>"><?= $timerecordingCar->number_plate . " (" . $timerecordingCar->brand . " " . $timerecordingCar->model . ")" ?></option>
</option>
<?php
@@ -311,7 +313,8 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
<div class="input-group">
<select id="datamonth" class="form-control select2">
<?php foreach ($month as $key => $Month): ?>
<option value="<?= $key ?>"><?= $Month ?></option>
<option <?= ($timenow == $key) ? 'selected="selected"' : '' ?>
value="<?= $key ?>"><?= $Month ?></option>
<?php endforeach; ?>
</select>
</div>