smart changes

This commit is contained in:
piapassecker 2023-12-11 19:54:21 +01:00
parent 44c0cfcfae
commit a7f8efe628
3 changed files with 58 additions and 53 deletions

View File

@ -11,6 +11,7 @@ class Smart extends Page {
function index() function index()
{ {
$this->set('user', $_SESSION['user']->data);
$this->set('template', "smart.html.php"); $this->set('template', "smart.html.php");
} }

View File

@ -15,28 +15,29 @@
<h1 id="<?= $dog; ?>"><?= $dog; ?></h1> <h1 id="<?= $dog; ?>"><?= $dog; ?></h1>
<button onClick="getElementById('table_<?= $dog ?>').style.display='table'">Tabelle anzeigen</button> <button onClick="getElementById('table_<?= $dog ?>').style.display='table'">Tabelle anzeigen</button>
<div class="table-responsive">
<table id="table_<?= $dog ?>" class="table" style="display:none"> <table id="table_<?= $dog ?>" class="table" style="display:none">
<tr> <tr>
<th>event</th> <th>Event</th>
<th>Wann wars</th> <th>Datum</th>
<th>run</th> <th>Lauf</th>
<th>rang</th> <th>Startnummer</th>
<th>stnr</th> <th>Teilnehmer</th>
<th>teilnehmer</th> <th>Hund</th>
<th>hund</th> <th>Verein</th>
<th>verein</th> <th>F</th>
<th>f</th> <th>VW</th>
<th>vw</th> <th>ZF</th>
<th>zf</th> <th>Zeit</th>
<th>zeit</th> <th>GF</th>
<th>gf</th> <th>m/sek</th>
<th>msek</th> <th>Bew.</th>
<th>bew</th> <th>Punkte</th>
<th>punkte</th> <th>Rang</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']));
@ -51,9 +52,8 @@
?> ?>
<tr> <tr>
<td><?= $res['event'] ?></td> <td><?= $res['event'] ?></td>
<td><?= $res['ago'] ?></td> <td><?= date("d.m.Y", strtotime($res['date'])) ?></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>
@ -66,10 +66,13 @@
<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>
</div>
<?php if (count($results) > 0) : ?> <?php if (count($results) > 0) : ?>
<div class="col"> <div class="col">

View File

@ -11,6 +11,7 @@
placeholder="Suchen..." placeholder="Suchen..."
hx-indicator="#indicator" hx-indicator="#indicator"
class="form-control" id="basic-url" class="form-control" id="basic-url"
value="<?= escape($user['lastname'].' '.$user['firstname']); ?>"
> >
</div> </div>