Commit 3492b3ed authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Bugfix

parent ddf37d76
......@@ -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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment