mirror of
http://git.frickel.earth/Tysox/BOS-Pinneberg.git
synced 2025-12-15 00:24:33 +01:00
[+] added THW, Rettung and Polizei
This commit is contained in:
53
include/thw.php
Normal file
53
include/thw.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
include 'admin/config/config.inc.php';
|
||||
$data = new Config();
|
||||
|
||||
// Create connection
|
||||
$conn = new mysqli($data->getSQLHost(), $data->getSQLUser(), $data->getSQLPassword(), $data->getSQLDatabase());
|
||||
mysqli_set_charset($conn, "utf8");
|
||||
|
||||
// Check connection
|
||||
if ($conn->connect_error) {
|
||||
die("Connection failed: " . $conn->connect_error);
|
||||
}
|
||||
|
||||
$result = $conn->query("SELECT * FROM `thw_pi`");
|
||||
|
||||
|
||||
if ($result->num_rows > 0) {
|
||||
// output data of each row
|
||||
while($row = $result->fetch_assoc()) {
|
||||
?>
|
||||
<section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp">
|
||||
<div class="mdl-card mdl-cell mdl-cell--12-col">
|
||||
<div class="mdl-card__supporting-text">
|
||||
<h4 style="text-align: center"><?php echo $row['Ort'];?></h4>
|
||||
<table style="margin-left: auto; margin-right: auto" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="mdl-data-table__cell--non-numeric">Fahrzeugtyp</th>
|
||||
<th>Funkrufnummer</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
|
||||
$fahrzeuge = $conn->query("SELECT * FROM `thw` WHERE OrtID = ". $row['id'] );
|
||||
|
||||
if($fahrzeuge->num_rows > 0) {
|
||||
while ($frow = $fahrzeuge->fetch_assoc()) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="mdl-data-table__cell--non-numeric"><?php echo $frow['Fahrzeugtyp'] ?></td>
|
||||
<td><?php echo $frow['Organistationskennung'] . " " . $row['id'] . "-" . $frow['Fahrzeugkennung'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<?php }}?>
|
||||
Reference in New Issue
Block a user