'$show_filter' ";
}
elseif( $show_filter == 1 && $_SESSION["lastupdate"] != "" && !isset($_GET["clean"]) ) {
$show_filter = " WHERE a.num > ".$_SESSION["lastupdate"];
}
elseif( $show_filter == 1 && $_SESSION["lastupdate"] != "" && isset($_GET["clean"]) && $_GET["clean"] == "yes" ) {
$show_filter = filter_zeit(1);
$show_filter = " WHERE a.zeit > '$show_filter' ";
}
elseif( $show_filter != 1 ) {
$show_filter = filter_zeit($filter);
$show_filter = " WHERE a.zeit > '$show_filter' ";
}
/////////
if (!isset($_GET["org_filter"])) $_GET["org_filter"] = "";
if( $_GET["org_filter"] == 'ff' )
{
$sql_org_filter = 'AND (org = "BF" OR org = "FF" OR org = "THW")';
}
elseif ( $_GET["org_filter"] == 'rd' )
{
$sql_org_filter = 'AND org = "RD"';
}
else
{
$sql_org_filter = '';
}
$_SESSION["orgfiltered"] = $sql_org_filter;
$show_filter = $show_filter.' '.$sql_org_filter;
//
// Daten f¸r Formatierung holen und in array->session schreiben
if( !isset($_SESSION["formatierung"]) && !isset($_GET["nooutput"]) )
{
$result = mysqli_query($dbconn, "SELECT id, bg_farbe, text_farbe, text_format, text_groesse, text_groesse_text FROM formatierung ORDER BY id ASC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
$formatierung[$row["id"]] = array(
"bg_farbe" => $row["bg_farbe"],
"text_farbe" => $row["text_farbe"],
"text_format" => $row["text_format"],
"text_groesse" => $row["text_groesse"],
"text_groesse_text" => $row["text_groesse_text"]
);
$_SESSION["formatierung"] = $formatierung;
}
} else {
$formatierung = $_SESSION["formatierung"];
}
//
// Auslesen pocsag
//
$result = mysqli_query($dbconn, "SELECT a.num, a.adresse AS adresse_neu, a.bezeichnung AS bezeichnung_neu, a.text, DATE_FORMAT(a.zeit, '%Y%m%d%H%i%s') AS zeit, a.funktion, a.REC_TYP, a.done,
b.adresse, b.formatierung_id, b.bezeichnung,
d.id AS org_id, d.org_name, d.org, d.alarm_count, d.last_alarm
FROM dme a
LEFT JOIN ric_zvei b ON b.adresse = a.adresse
LEFT JOIN organisation d ON d.id = b.org_id
$show_filter
ORDER BY a.zeit DESC") or die (mysqli_error($dbconn));
while($row = mysqli_fetch_array($result))
{
//echo "
-----------";
if( !isset($_GET["filter"]) || $_GET["filter"] == 1 || (isset($_GET["clean"]) && $_GET["clean"] == "yes") )
{
if( $row["num"] > $_SESSION["lastupdate"] ) $_SESSION["lastupdate"] = $row["num"];
}
$bezeichnung = $row["bezeichnung"];
// Tageswechsel ausgeben
if( isset($lastday) && get_date($row["zeit"]) != $lastday )
{
$tageswechsel = get_timestamp(str_replace("-","",date_dbformat($lastday))."000000");
//$nextday = '
$show[$tageswechsel] .= '