3
0
mirror of http://git.frickel.earth/Tysox/BOS-Pinneberg.git synced 2025-05-21 11:04:30 +02:00
This commit is contained in:
Jan-Lukas Pagel 2019-10-15 00:03:46 +02:00
parent c823c6a157
commit cec4366416

View File

@ -15,30 +15,44 @@ $result = $conn->query("SELECT * FROM `thw_pi`");
if ($result->num_rows > 0) { if ($result->num_rows > 0) {
// output data of each row // output data of each row
while($row = $result->fetch_assoc()) { while ($row = $result->fetch_assoc()) {
?> ?>
<section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp"> <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp">
<div class="mdl-card mdl-cell mdl-cell--12-col mdl-card--border mdl-card__supporting-text"> <div class="mdl-card mdl-cell mdl-cell--12-col mdl-card--border mdl-card__supporting-text">
<h4 style="text-align: center"><?php echo $row['Ort'] ." [". $row['id'];?></h4> <h4 style="text-align: center">Heros <?php echo $row['Ort']; ?></h4>
<table style="margin-left: auto; margin-right: auto" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp"> <table style="margin-left: auto; margin-right: auto"
class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
<thead> <thead>
<tr> <tr>
<th class="mdl-data-table__cell--non-numeric">Fahrzeugtyp</th> <th class="mdl-data-table__cell--non-numeric">Fahrzeugtyp</th>
<th>Funkrufnummer</th> <th class="mdl-data-table__cell--non-numeric">Funkrufnummer</th>
<th class="mdl-data-table__cell--non-numeric">Einheit</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php <?php
$fahrzeuge = $conn->query("SELECT * FROM `thw` WHERE OrtID = ". $row['id'] ); $fahrzeuge = $conn->query("SELECT * FROM `thw` WHERE OrtID = " . $row['id']);
if($fahrzeuge->num_rows > 0) { if ($fahrzeuge->num_rows > 0) {
while ($frow = $fahrzeuge->fetch_assoc()) { while ($frow = $fahrzeuge->fetch_assoc()) {
?> ?>
<tr> <tr>
<td class="mdl-data-table__cell--non-numeric"><?php echo $frow['Fahrzeugtyp'] ?></td> <td class="mdl-data-table__cell--non-numeric"><?php echo $frow['Fahrzeugtyp'] ?></td>
<td><?php echo $frow['Organistationskennung'] . " " . $row['id'] . "-" . $frow['Fahrzeugkennung'] ?></td> <?php if ($frow['Fahrzeugkennung'] == 0) {
?>
<td class="mdl-data-table__cell--non-numeric"><?php echo $frow['Organistationskennung'] ?></td>
<?php } else if ($frow['Fahrzeugkennung'] > 0) { ?>
<td class="mdl-data-table__cell--non-numeric"><?php echo $frow['Organistationskennung'] . " " . $row['id'] . "-" . $frow['Fahrzeugkennung'] ?></td>
<?php } ?>
<td>
<?php
$einheit = $conn->query("SELECT `name` FROM `thw_einheit` WHERE id = " . $frow['Einheit']);
echo($einheit)
?>
</td>
</tr> </tr>
<?php <?php
} }
@ -48,4 +62,5 @@ if ($result->num_rows > 0) {
</table> </table>
</div> </div>
</section> </section>
<?php }}?> <?php }
} ?>