fixed pias deletions
All checks were successful
Build and push / Pulling repo on server (push) Successful in 2s

This commit is contained in:
Chris 2023-12-11 19:44:27 +00:00
parent b00f652283
commit fb3c107e1a

View File

@ -15,32 +15,30 @@
<h1 id="<?= $dogid; ?>"><?= $dog; ?></h1> <h1 id="<?= $dogid; ?>"><?= $dog; ?></h1>
<button onClick="getElementById('table_<?= $dog ?>').style.display='table'">Tabelle anzeigen</button> <button onClick="getElementById('table_<?= $dogid ?>').style.display='table'">Tabelle anzeigen</button>
<table id="table_<?= $dog ?>" class="table" style="display:none"> <table id="table_<?= $dogid ?>" class="table" style="display:none">
<tr> <tr>
<th>Event</th> <th>event</th>
<th>Datum</th> <th>Wann wars</th>
<th>Lauf</th> <th>run</th>
<th>Stnr.</th> <th>rang</th>
<th>Teilnehmer</th> <th>stnr</th>
<th>Hund</th> <th>teilnehmer</th>
<th>Verein</th> <th>hund</th>
<th>F</th> <th>verein</th>
<th>VW</th> <th>f</th>
<th>ZF</th> <th>vw</th>
<th>Zeit</th> <th>zf</th>
<th>GF</th> <th>zeit</th>
<th>m/sek</th> <th>gf</th>
<th>Bew</th> <th>msek</th>
<th>Punkte</th> <th>bew</th>
<th>Rang</th> <th>punkte</th>
<th>Aktion</th>
</tr> </tr>
<?php foreach ($results as $res) : <?php foreach ($results as $res) :
// graph data preparation // graph data preparation
if ($res['bew'] != 'DIS' && $res['punkte'] != 'DIS') if ($res['bew'] != 'DIS' && $res['punkte'] != 'DIS') {
{
$sdata['dates'][] = date("d.m.Y", strtotime($res['date'])); $sdata['dates'][] = date("d.m.Y", strtotime($res['date']));
$sdata['speed'][] = $res['msek'] ?: 0; $sdata['speed'][] = $res['msek'] ?: 0;
$sdata['errors'][] = $res['f'] ?: 0; $sdata['errors'][] = $res['f'] ?: 0;
@ -48,13 +46,30 @@
$sdata['time'][] = $res['zeit'] ?: 0; $sdata['time'][] = $res['zeit'] ?: 0;
$sdata['points'][] = $res['punkte']; $sdata['points'][] = $res['punkte'];
$sdata['ranking'][] = $res['rang']; $sdata['ranking'][] = $res['rang'];
$a = array_filter($sdata['speed']);
if(count($a)>0)
$averagespeed = round(array_sum($a)/count($a),2);
$a = $sdata['errors'];
if(count($a)>0)
$averageerrors = round(array_sum($a)/count($a),2);
$a = $sdata['refusals'];
if(count($a)>0)
$averagerefusals = round(array_sum($a)/count($a),2);
$a = array_filter($sdata['ranking']);
if(count($a)>0)
$averageranking = round(array_sum($a)/count($a),2);
} }
?> ?>
<tr> <tr>
<td><?= $res['event'] ?></td> <td><?= $res['event'] ?></td>
<td><?= date("d.m.Y", strtotime($res['date'])) ?></td> <td><?= $res['ago'] ?></td>
<td><?= $res['run'] ?></td> <td><?= $res['run'] ?></td>
<td><?= $res['rang'] ?></td>
<td><?= $res['stnr'] ?></td> <td><?= $res['stnr'] ?></td>
<td><?= $res['teilnehmer'] ?></td> <td><?= $res['teilnehmer'] ?></td>
<td><?= $res['hund'] ?></td> <td><?= $res['hund'] ?></td>
@ -67,14 +82,11 @@
<td><?= $res['msek'] ?></td> <td><?= $res['msek'] ?></td>
<td><?= $res['bew'] ?></td> <td><?= $res['bew'] ?></td>
<td><?= $res['punkte'] ?></td> <td><?= $res['punkte'] ?></td>
<td><?= $res['rang'] ?></td>
<td><a href="#" class="btn btn-primary" title="Importieren"><i class="fas fa-file-import"></i></a></td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
<h4>Statistik</h4> <h4>Statistik</h4>
<div class="card" style="width: 25rem;"> <div class="card" style="width: 25rem;">