3
0
mirror of http://git.frickel.earth/Tysox/BOS-Pinneberg.git synced 2025-05-21 06:04:31 +02:00

[+] fixed Bugs ins FrontEnd

This commit is contained in:
Jan-Lukas Pagel 2018-03-02 11:50:13 +01:00
parent b4569550f0
commit a1ed1d6c80
8 changed files with 49 additions and 81 deletions

View File

@ -107,7 +107,7 @@ $header->showHeader("Feuerwehr"); ?>
$.ajax({ $.ajax({
url: "../scripts/vehicle.php", url: "../scripts/vehicle.php",
type: "POST", type: "POST",
data: "org=ff&ort" + ort + "&name=" + name + "&number=" + number + "&type=" + type, data: "org=ff&ort=" + ort + "&name=" + name + "&number=" + number + "&type=" + type,
success: function (resp) { success: function (resp) {
$("#feedback").html(resp); $("#feedback").html(resp);
} }

View File

@ -36,26 +36,29 @@ if ($_POST) {
if (isset($_POST['org'])) { if (isset($_POST['org'])) {
if(strcmp($_POST['org'], "ff")) { if(strcmp($_POST['org'], "ff")) {
if (isset($_POST['ort']) && isset($_POST['name']) && isset($_POST['number']) && isset($_POST['type'])) { if ($_POST['ort'] AND $_POST['name'] AND $_POST['number'] AND $_POST['type']) {
$insert = $pdo->prepare("INSERT INTO feuerwehr (id, OrtID, Organistationskennung, Fahrzeugkennung, Fahrzeugtyp) VALUES (?,?,?,?,?)"); $insert = $pdo->prepare("INSERT INTO feuerwehr (id, OrtID, Organistationskennung, Fahrzeugkennung, Fahrzeugtyp) VALUES (?,?,?,?,?)");
$select = $pdo->prepare("SELECT COUNT(OrtID) FROM feuerwehr WHERE OrtID = ?"); $select = $pdo->prepare("SELECT COUNT(OrtID) FROM feuerwehr WHERE OrtID = ?");
if ($select->execute(array($_POST ['ort']))) { if ($select->execute(array($_POST ['ort']))) {
$count = $select->fetch(); while ($row = $select->fetch()) {
if ($count <= 9) { if ($row <= 9) {
$count = $_POST['ort'] . "0" . $count; $row = $_POST['ort'] . "0" . $row;
} else { } else {
$count = $_POST['ort'] . $count; $row = $_POST['ort'] . $row;
}
} }
} $insert->bindParam(1, $row);
$insert->bindParam(1, $count); $insert->bindParam(2, $_POST['ort']);
$insert->bindParam(2, $_POST['ort']); $insert->bindParam(3, $_POST['name']);
$insert->bindParam(3, $_POST['name']); $insert->bindParam(4, $_POST['number']);
$insert->bindParam(4, $_POST['number']); $insert->bindParam(5, $_POST['type']);
$insert->bindParam(5, $_POST['type']); $insert->execute();
$insert->execute(); echo "Eintrag vom Fahrzeug erfolgreich";
echo "Eintrag vom Fahrzeug erfolgreich"; }
} }
} }

View File

@ -1,5 +1,4 @@
<?php <?php
include 'admin/config/config.inc.php';
$data = new Config(); $data = new Config();
@ -43,8 +42,7 @@ if ($result->num_rows > 0) {
} }
?> ?>
<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"> <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"><?php echo $row['Ort'] . " [" . $row['id']; ?>]</h4>
<table style="margin-left: auto; margin-right: auto" <table style="margin-left: auto; margin-right: auto"
class="mdl-data-table mdl-js-data-table mdl-shadow--2dp"> class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
@ -62,16 +60,26 @@ if ($result->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>
<?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> <td class="mdl-data-table__cell--non-numeric"><?php echo $frow['Organistationskennung'] . " " . $row['id'] . "-" . $frow['Fahrzeugkennung'] ?></td>
</tr> <?php }
<?php } ?>
}
</tr>
<?php
} }
?> ?>
</tbody> </tbody>
</table> </table>
</div>
</section> </section>
<?php } <?php
}
} ?> } ?>

View File

@ -6,7 +6,7 @@
* Time: 18:09 * Time: 18:09
*/ */
?> ?>
<?php include("../config/config.php");?> <?php include("admin/config/config.inc.php");?>
<!doctype html> <!doctype html>
<!-- <!--
Material Design Lite Material Design Lite
@ -62,6 +62,7 @@
</div> </div>
<div class="mdl-layout--large-screen-only mdl-layout__header-row"> <div class="mdl-layout--large-screen-only mdl-layout__header-row">
<h3>BOS Funk Pinneberg</h3> <h3>BOS Funk Pinneberg</h3>
</div> </div>
<div class="mdl-layout--large-screen-only mdl-layout__header-row"> <div class="mdl-layout--large-screen-only mdl-layout__header-row">
</div> </div>
@ -71,5 +72,9 @@
<a href="#polizei" class="mdl-layout__tab">Polizei</a> <a href="#polizei" class="mdl-layout__tab">Polizei</a>
<a href="#thw" class="mdl-layout__tab">THW</a> <a href="#thw" class="mdl-layout__tab">THW</a>
<a href="#bos" class="mdl-layout__tab">BOS Funk</a> <a href="#bos" class="mdl-layout__tab">BOS Funk</a>
<div class="mdl-layout-spacer"></div>
<button onclick="window.location.href='admin/login.php'" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon mdl--right" id="hdrbtn">
<i class="material-icons">exit_to_app</i>
</button>
</div> </div>
</header> </header>

View File

@ -21,8 +21,7 @@ if ($result->num_rows > 0) {
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"> <div class="mdl-card mdl-cell mdl-cell--12-col mdl-card__supporting-text">
<div class="mdl-card__supporting-text">
<h4 style="text-align: center"><?php echo $row['Ort'] ." [". $row['id'];?>]</h4> <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"> <table style="margin-left: auto; margin-right: auto" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
<thead> <thead>

View File

@ -21,8 +21,7 @@ if ($result->num_rows > 0) {
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"> <div class="mdl-card mdl-cell mdl-cell--12-col mdl-card__supporting-text">
<div class="mdl-card__supporting-text">
<h4 style="text-align: center"><?php echo $row['Ort'] ." [". $row['id'];?>]</h4> <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"> <table style="margin-left: auto; margin-right: auto" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
<thead> <thead>

View File

@ -18,8 +18,7 @@ if ($result->num_rows > 0) {
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"> <div class="mdl-card mdl-cell mdl-cell--12-col mdl-card__supporting-text">
<div class="mdl-card__supporting-text">
<h4 style="text-align: center"><?php echo $row['Ort'] ." [". $row['id'];?></h4> <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"> <table style="margin-left: auto; margin-right: auto" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
<thead> <thead>

View File

@ -86,59 +86,14 @@ include("include/header.php");
</section> </section>
</div> </div>
<footer class="mdl-mega-footer"> <footer class="mdl-mini-footer">
<div class="mdl-mega-footer--middle-section"> <div class="mdl-mini-footer__left-section">
<div class="mdl-mega-footer--drop-down-section"> <div class="mdl-logo">Title</div>
<input class="mdl-mega-footer--heading-checkbox" type="checkbox" checked> <ul class="mdl-mini-footer__link-list">
<h1 class="mdl-mega-footer--heading">Features</h1>
<ul class="mdl-mega-footer--link-list">
<li><a href="#">About</a></li>
<li><a href="#">Terms</a></li>
<li><a href="#">Partners</a></li>
<li><a href="#">Updates</a></li>
</ul>
</div>
<div class="mdl-mega-footer--drop-down-section">
<input class="mdl-mega-footer--heading-checkbox" type="checkbox" checked>
<h1 class="mdl-mega-footer--heading">Details</h1>
<ul class="mdl-mega-footer--link-list">
<li><a href="#">Spec</a></li>
<li><a href="#">Tools</a></li>
<li><a href="#">Resources</a></li>
</ul>
</div>
<div class="mdl-mega-footer--drop-down-section">
<input class="mdl-mega-footer--heading-checkbox" type="checkbox" checked>
<h1 class="mdl-mega-footer--heading">Technology</h1>
<ul class="mdl-mega-footer--link-list">
<li><a href="#">How it works</a></li>
<li><a href="#">Patterns</a></li>
<li><a href="#">Usage</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Contracts</a></li>
</ul>
</div>
<div class="mdl-mega-footer--drop-down-section">
<input class="mdl-mega-footer--heading-checkbox" type="checkbox" checked>
<h1 class="mdl-mega-footer--heading">FAQ</h1>
<ul class="mdl-mega-footer--link-list">
<li><a href="#">Questions</a></li>
<li><a href="#">Answers</a></li>
<li><a href="#">Contact us</a></li>
</ul>
</div>
</div>
<div class="mdl-mega-footer--bottom-section">
<div class="mdl-logo">
More Information
</div>
<ul class="mdl-mega-footer--link-list">
<li><a href="https://developers.google.com/web/starter-kit/">Web Starter Kit</a></li>
<li><a href="#">Help</a></li> <li><a href="#">Help</a></li>
<li><a href="#">Privacy and Terms</a></li> <li><a href="#">Privacy & Terms</a></li>
</ul> </ul>
</div> </div>
</footer> </footer>
</main> </main>
</div> </div>