directory structure and web-time format

This commit is contained in:
Bastian Schroll 2015-04-04 19:10:50 +02:00
parent 98932c1efe
commit a4e7d6f3f6
4 changed files with 16 additions and 10 deletions

View file

@ -1,4 +1,4 @@
![# BOSWatch](/gfx/logo.png)
![# BOSWatch](/www/gfx/logo.png)
Python Script to Recive and Decode German BOS Information with rtl_fm and multimon-NG

View file

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View file

@ -15,7 +15,7 @@ $db_link = mysqli_connect ($dbhost, $dbuser, $dbpassword, $database);
<div style="text-align: center; width: 1250px; margin: 0px auto;">
<h1>BOSWatch</h1>
<img src="gfx/logo.png" alt="BOSWatch"><br>
Last alarms for FMS and ZVEI (max. 50)<br><br>
@ -25,14 +25,17 @@ $db_link = mysqli_connect ($dbhost, $dbuser, $dbpassword, $database);
$sql = "SELECT id, time, service, country, location, vehicle, status, direction, tsi FROM ".$tableFMS." ORDER BY id DESC LIMIT 50";
$db_erg = mysqli_query( $db_link, $sql );
echo '<table border="1" style="width: 800px;">';
while ($data = mysqli_fetch_array( $db_erg, MYSQL_ASSOC))
{
$time = strtotime($data['time']);
$time = date("d.m.Y H:i:s", $time);
$fms_id = $data['service'].$data['country'].$data['location'].$data['vehicle'].$data['status'].$data['direction'];
echo "<tr>";
echo "<td>". $data['id'] . "</td>";
echo "<td>". $data['time'] . "</td>";
echo "<td>". $time . "</td>";
echo "<td>". parse("service",$fms_id) . "</td>";
echo "<td>". parse("country",$fms_id) . "</td>";
echo "<td>". $data['location'] . "</td>";
@ -51,14 +54,17 @@ $db_link = mysqli_connect ($dbhost, $dbuser, $dbpassword, $database);
<?php
$sql = "SELECT id, time, zvei FROM ".$tableZVEI." ORDER BY id DESC LIMIT 50";
$db_erg = mysqli_query( $db_link, $sql );
echo '<table border="1" style="width: 400px;">';
while ($data = mysqli_fetch_array( $db_erg, MYSQL_ASSOC))
{
echo "<tr>";
$time = strtotime($data['time']);
$time = date("d.m.Y H:i:s", $time);
echo "<tr>";
echo "<td>". $data['id'] . "</td>";
echo "<td>". $data['time'] . "</td>";
echo "<td>". $time . "</td>";
echo "<td>". $data['zvei'] . "</td>";
echo "</tr>";
}

View file

@ -55,9 +55,9 @@
case "direction":
if(substr($fms,9,1) == 1){
return "L-F";
return "L->F";
}elseif(substr($fms,9,1) == 0){
return "F-L";
return "F->L";
}
break;