Commit 0e0589c3 by Dominik Pfennig

Merge branch '526-count-seite-anpasse-sodass-auch-ein-langerer-zeitraum-ausgewah…

…lt-werden-kann' into 'development'

Bugfix

Closes #526

See merge request !931
2 parents 093b5072 486fd9fe
Pipeline #1725 passed
in 31 seconds
......@@ -132,14 +132,16 @@ class AdminInterface extends Controller
}else{
$result = "";
foreach($oldLogs as $key => $value){
$result .= '"' . date("D, d M y", mktime(date("H"),date("i"), date("s"), date("m"), date("d")-$key, date("Y"))) . '",';
$result .= '"' . $value['sameTime'] . '",';
$result .= '"' . $value['insgesamt'] . '",';
$result .= '"' . $value['median'] . '"' . "\r\n";
$resultTmp = '"' . date("D, d M y", mktime(date("H"),date("i"), date("s"), date("m"), date("d")-$key, date("Y"))) . '",';
$resultTmp .= '"' . $value['sameTime'] . '",';
$resultTmp .= '"' . $value['insgesamt'] . '",';
$resultTmp .= '"' . $value['median'] . '"' . "\r\n";
$result = $resultTmp . $result;
}
return response($result, 200)
->header('Content-Type', 'text/csv')
->header('Content-Disposition', 'attachment; filename="count.csv"');
}
}
......
......@@ -4,9 +4,8 @@
@section('content')
<h2>{{ exec("uptime") }}</h2>
<h2>
<table class="table table-striped">
<caption>Daten der letzten <form method="POST"><input type="number" name="days" value="{{days}}" /> Tage <button type="submit" class="btn btn-sm btn-default">Aktualisieren</button><button type="submit" name="out" value="csv" class="btn btn-sm btn-default">Als CSV exportieren</button></form></caption>
<caption>Daten der letzten <form method="POST"><input type="number" name="days" value="{{$days}}" /> Tage <button type="submit" class="btn btn-sm btn-default">Aktualisieren</button><button type="submit" name="out" value="csv" class="btn btn-sm btn-default">Als CSV exportieren</button></form></caption>
<tr>
<th>Datum</th>
<th>Suchanfragen zur gleichen Zeit</th>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!