3
0
mirror of http://git.frickel.earth/Tysox/BOS-Pinneberg.git synced 2025-12-15 22:34:22 +01:00

added adding in Admin Panel

This commit is contained in:
2018-02-28 21:11:28 +01:00
parent dc1bfa4ccf
commit 051b49bb43
3 changed files with 118 additions and 21 deletions

View File

@@ -3,7 +3,6 @@ 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");
@@ -19,35 +18,36 @@ $result = $conn->query("SELECT * FROM `feuerwehr_pi`");
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
while ($row = $result->fetch_assoc()) {
if($row['id'] == 10) {
if ($row['id'] == 10) {
echo("<h4>Revier Pinneberg</h4>");
}
if($row['id'] == 20) {
if ($row['id'] == 20) {
echo("<h4>Revier Elmshorn</h4>");
}
if($row['id'] == 30) {
if ($row['id'] == 30) {
echo("<h4>Revier Wedel</h4>");
}
if($row['id'] == 40) {
if ($row['id'] == 40) {
echo("<h4>Revier Uetersen</h4>");
}
if($row['id'] == 60) {
if ($row['id'] == 60) {
echo("<h4>Revier Hörnerkirchen</h4>");
}
if($row['id'] == 70) {
if ($row['id'] == 70) {
echo("<h4>Revier Quickborn</h4>");
}
if($row['id'] == 80) {
if ($row['id'] == 80) {
echo("<h4>Revier Barmstedt</h4>");
}
?>
?>
<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'] ." [". $row['id'];?>]</h4>
<table style="margin-left: auto; margin-right: auto" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
<h4 style="text-align: center"><?php echo $row['Ort'] . " [" . $row['id']; ?>]</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>
@@ -55,17 +55,15 @@ if ($result->num_rows > 0) {
</tr>
</thead>
<tbody>
<?php
$fahrzeuge = $conn->query("SELECT * FROM `feuerwehr` WHERE OrtID = " . $row['id']);
$fahrzeuge = $conn->query("SELECT * FROM `feuerwehr` WHERE OrtID = ". $row['id'] );
if($fahrzeuge->num_rows > 0) {
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>
<td class="mdl-data-table__cell--non-numeric"><?php echo $frow['Organistationskennung'] . " " . $row['id'] . "-" . $frow['Fahrzeugkennung'] ?></td>
</tr>
<?php
}
@@ -73,6 +71,7 @@ if ($result->num_rows > 0) {
?>
</tbody>
</table>
</div>
</section>
<?php }}?>
<?php }
} ?>