From 1e18c2ed67a3e61cc1e3edf7da38fa24dd9c82a1 Mon Sep 17 00:00:00 2001 From: Schrolli Date: Tue, 14 Jul 2015 10:23:43 +0200 Subject: [PATCH] edit the old webend - insert all new fields from the database - own page for each function - overview for last 50 alarm of all function in one --- www/old_webend/gfx/lupe.png | Bin 0 -> 478 bytes www/old_webend/index.php | 29 ++++++- www/old_webend/style.css | 42 ++++++++++ www/old_webend/tpl/content.fms.php | 10 +++ www/old_webend/tpl/content.overview.php | 34 +++----- www/old_webend/tpl/content.pocsag.php | 10 +++ www/old_webend/tpl/content.zvei.php | 10 +++ www/old_webend/tpl/template.fms.php | 30 +++++++ www/old_webend/tpl/template.overview.php | 98 +++++------------------ www/old_webend/tpl/template.parser.php | 1 + www/old_webend/tpl/template.pocsag.php | 30 +++++++ www/old_webend/tpl/template.zvei.php | 24 ++++++ 12 files changed, 214 insertions(+), 104 deletions(-) create mode 100644 www/old_webend/gfx/lupe.png create mode 100644 www/old_webend/style.css create mode 100644 www/old_webend/tpl/content.fms.php create mode 100644 www/old_webend/tpl/content.pocsag.php create mode 100644 www/old_webend/tpl/content.zvei.php create mode 100644 www/old_webend/tpl/template.fms.php create mode 100644 www/old_webend/tpl/template.pocsag.php create mode 100644 www/old_webend/tpl/template.zvei.php diff --git a/www/old_webend/gfx/lupe.png b/www/old_webend/gfx/lupe.png new file mode 100644 index 0000000000000000000000000000000000000000..60b51cd5d92d25c1351e7a9c989563f97f128e85 GIT binary patch literal 478 zcmV<40U`d0P)``qoA1n^5hXGU#|=2b9HJ}QpD=4+7eTvre~w-Q%Lz&y;$Hy<08d9@ UHgHG(3jhEB07*qoM6N<$f&?|kfB*mh literal 0 HcmV?d00001 diff --git a/www/old_webend/index.php b/www/old_webend/index.php index aeaa785..737d621 100644 --- a/www/old_webend/index.php +++ b/www/old_webend/index.php @@ -11,14 +11,22 @@ $db = new Database($dbhost, $dbuser, $dbpassword, $database, 1); //Show Error = BOSWatch - + +
BOSWatch
- [�bersicht] - [Parser] + +

+ + diff --git a/www/old_webend/style.css b/www/old_webend/style.css new file mode 100644 index 0000000..fd88f4c --- /dev/null +++ b/www/old_webend/style.css @@ -0,0 +1,42 @@ +/*navigation*/ +#navi{ + width: 400px; + margin: auto; + border: 1px solid black; + padding: 5px; + font-weight: bold; +} + +#navi a:link { color: red; text-decoration: none;} +#navi a:visited { color: red; } +#navi a:hover { color: black; } +#navi a:active { color: black; } + + +/*table center and border in*/ +table { margin: auto; border-collapse: collapse; } + +/*Tabellen mit Rahmen*/ +table, th, td { border: 1px solid black; } + +/*alternating line color in table*/ +/*without first line (header)*/ +tr:nth-child(2n+2) { background: #FFF; } +tr:nth-child(2n+3) { background: #CCC; } + +/*table head*/ +.tableHead{ + color: white; + background-color: #BE2F01; + font-weight: bold; +} + + +/*footer*/ +#footer{ + margin-top: 50px; + margin-bottom: 25px; + text-align: center; + color: gray; +} +#footer a{ color: gray; } diff --git a/www/old_webend/tpl/content.fms.php b/www/old_webend/tpl/content.fms.php new file mode 100644 index 0000000..541cb21 --- /dev/null +++ b/www/old_webend/tpl/content.fms.php @@ -0,0 +1,10 @@ +query("SELECT id, time, fms, status, direction, directionText, tsi, description FROM ".$tableFMS." ORDER BY id DESC"); + $Rows = array(); + while ($daten = $db->fetchAssoc()) + { + $Rows[] = $daten; + } + $tpl['fms'] = $Rows; +?> diff --git a/www/old_webend/tpl/content.overview.php b/www/old_webend/tpl/content.overview.php index dd09404..0818017 100644 --- a/www/old_webend/tpl/content.overview.php +++ b/www/old_webend/tpl/content.overview.php @@ -1,27 +1,11 @@ query("SELECT id, time, fms, status, direction, tsi FROM ".$tableFMS." ORDER BY id DESC LIMIT 50"); - $Rows = array(); - while ($daten = $db->fetchAssoc()) - { - $Rows[] = $daten; - } - $tpl['fms'] = $Rows; - //read ZVEI - $db->query("SELECT id, time, zvei FROM ".$tableZVEI." ORDER BY id DESC LIMIT 50"); - $Rows = array(); - while ($daten = $db->fetchAssoc()) - { - $Rows[] = $daten; - } - $tpl['zvei'] = $Rows; - //read POCSAG - $db->query("SELECT id, time, ric, funktion, text FROM ".$tablePOC." ORDER BY id DESC LIMIT 50"); - $Rows = array(); - while ($daten = $db->fetchAssoc()) - { - $Rows[] = $daten; - } - $tpl['poc'] = $Rows; -?> + +//read all +$db->query("SELECT id, time, fms as data, 'fms' AS typ FROM ".$tableFMS." UNION ALL SELECT id, time, zvei as data, 'zvei' AS typ FROM ".$tableZVEI." UNION ALL SELECT id, time, ric as data, 'pocsag' AS typ FROM ".$tablePOC." ORDER BY time DESC"); +$Rows = array(); +while ($daten = $db->fetchAssoc()) +{ + $Rows[] = $daten; +} +$tpl['lastAla'] = $Rows; diff --git a/www/old_webend/tpl/content.pocsag.php b/www/old_webend/tpl/content.pocsag.php new file mode 100644 index 0000000..5e0138c --- /dev/null +++ b/www/old_webend/tpl/content.pocsag.php @@ -0,0 +1,10 @@ +query("SELECT id, time, ric, function, functionChar, bitrate, msg, description FROM ".$tablePOC." ORDER BY id DESC"); + $Rows = array(); + while ($daten = $db->fetchAssoc()) + { + $Rows[] = $daten; + } + $tpl['poc'] = $Rows; +?> diff --git a/www/old_webend/tpl/content.zvei.php b/www/old_webend/tpl/content.zvei.php new file mode 100644 index 0000000..2cb5042 --- /dev/null +++ b/www/old_webend/tpl/content.zvei.php @@ -0,0 +1,10 @@ +query("SELECT id, time, zvei, description FROM ".$tableZVEI." ORDER BY id DESC"); + $Rows = array(); + while ($daten = $db->fetchAssoc()) + { + $Rows[] = $daten; + } + $tpl['zvei'] = $Rows; +?> diff --git a/www/old_webend/tpl/template.fms.php b/www/old_webend/tpl/template.fms.php new file mode 100644 index 0000000..61ca296 --- /dev/null +++ b/www/old_webend/tpl/template.fms.php @@ -0,0 +1,30 @@ +Last FMS alarms + + + + + + + + + + + "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + ?> +
IDDatum - ZeitFMSStat.Richt.TKIBeschreibung
". $fms['id'] . "". $time . "". $fms['fms'] . "". $fms['status'] . "". $fms['direction'] . " = " . $fms['directionText'] . "". $fms['tsi'] . "". $fms['description'] . "
diff --git a/www/old_webend/tpl/template.overview.php b/www/old_webend/tpl/template.overview.php index fa4e3e6..544bae5 100644 --- a/www/old_webend/tpl/template.overview.php +++ b/www/old_webend/tpl/template.overview.php @@ -1,84 +1,28 @@ -Last alarms for FMS and ZVEI (max. 50)

- -
- Last FMS alarms - - +
+ Last 50 alarms +
+ - - - - + + + - "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } - ?> -
ID Datum - ZeitFMSStat.Richt.TKITypDaten
". $fms['id'] . "". $time . "". $fms['fms'] . "". $fms['status'] . "". $fms['direction'] . "". $fms['tsi'] . "
-
- Last POCSAG alarms - - - - - - - - - "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } - ?> -
IDDatum - ZeitRICFunktionText
". $poc['id'] . "". $time . "". $poc['ric'] . "". $poc['funktion'] . "". $poc['text'] . "
-
- -
- Last ZVEI alarms - - - - - - - "; - echo ""; - echo ""; - echo ""; - echo ""; - } - ?> + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + ?>
IDDatum - ZeitSchleife
". $zvei['id'] . "". $time . "". $zvei['zvei'] . "
". $lastAla['id'] . "". $time . "". $lastAla['typ'] . "". $lastAla['data'] . "show
diff --git a/www/old_webend/tpl/template.parser.php b/www/old_webend/tpl/template.parser.php index e69de29..2e9b6fa 100644 --- a/www/old_webend/tpl/template.parser.php +++ b/www/old_webend/tpl/template.parser.php @@ -0,0 +1 @@ +no function yet! diff --git a/www/old_webend/tpl/template.pocsag.php b/www/old_webend/tpl/template.pocsag.php new file mode 100644 index 0000000..66277ce --- /dev/null +++ b/www/old_webend/tpl/template.pocsag.php @@ -0,0 +1,30 @@ +Last POCSAG alarms + + + + + + + + + + + "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + ?> +
IDDatum - ZeitRICFunktionBitrateNachrichtBeschreibung
". $poc['id'] . "". $time . "". $poc['ric'] . "". $poc['function'] . " = " . $poc['functionChar'] . "". $poc['bitrate'] . "". $poc['msg'] . "". $poc['description'] . "
diff --git a/www/old_webend/tpl/template.zvei.php b/www/old_webend/tpl/template.zvei.php new file mode 100644 index 0000000..2484f28 --- /dev/null +++ b/www/old_webend/tpl/template.zvei.php @@ -0,0 +1,24 @@ +Last ZVEI alarms + + + + + + + + "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + ?> +
IDDatum - ZeitSchleifeBeschreibung
". $zvei['id'] . "". $time . "". $zvei['zvei'] . "". $zvei['description'] . "