Übersicht läuft
This commit is contained in:
60
get.php
60
get.php
@ -22,6 +22,7 @@
|
||||
|
||||
require('config.inc.php');
|
||||
|
||||
if (!isset($_SESSION["querystring"])) $_SESSION["querystring"] = "";
|
||||
if( $_SERVER['QUERY_STRING'] != $_SESSION["querystring"] )
|
||||
{
|
||||
//$_SESSION["lastupdate"] = "";
|
||||
@ -30,7 +31,7 @@ require('config.inc.php');
|
||||
}
|
||||
|
||||
// Filter Datum/Zeit erstellen
|
||||
if( !$_GET["filter"] || $_GET["filter"] == 1 )
|
||||
if( !isset($_GET["filter"]) || $_GET["filter"] == 1 )
|
||||
{
|
||||
$show_filter = 1;
|
||||
}
|
||||
@ -39,27 +40,28 @@ require('config.inc.php');
|
||||
$filter = $_GET["filter"];
|
||||
}
|
||||
|
||||
if( $show_filter == 1 && $_SESSION["lastupdate"] == "" && !$_GET["clean"] ) {
|
||||
$show_filter = filter_zeit(1);
|
||||
if (!isset($_SESSION["lastupdate"])) $_SESSION["lastupdate"];
|
||||
if (!isset($show_filter)) $show_filter;
|
||||
|
||||
if( $show_filter == 1 && $_SESSION["lastupdate"] == "" && !isset($_GET["clean"]) ) {
|
||||
$show_filter = filter_zeit(1);
|
||||
$show_filter = " WHERE a.zeit > '$show_filter' ";
|
||||
}
|
||||
elseif( $show_filter == 1 && $_SESSION["lastupdate"] != "" && !$_GET["clean"] )
|
||||
{
|
||||
elseif( $show_filter == 1 && $_SESSION["lastupdate"] != "" && !isset($_GET["clean"]) ) {
|
||||
$show_filter = " WHERE a.num > ".$_SESSION["lastupdate"];
|
||||
}
|
||||
elseif( $show_filter == 1 && $_GET["clean"] == "yes" )
|
||||
{
|
||||
$show_filter = filter_zeit(1);
|
||||
}
|
||||
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);
|
||||
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")';
|
||||
@ -79,9 +81,9 @@ elseif( $show_filter != 1 )
|
||||
|
||||
//
|
||||
// Daten f¸r Formatierung holen und in array->session schreiben
|
||||
if( !$_SESSION["formatierung"] && !$_GET["nooutput"] )
|
||||
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());
|
||||
$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(
|
||||
@ -108,11 +110,11 @@ elseif( $show_filter != 1 )
|
||||
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());
|
||||
ORDER BY a.zeit DESC") or die (mysqli_error($dbconn));
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
|
||||
if( !$_GET["filter"] || $_GET["filter"] == 1 || $_GET["clean"] == "yes" )
|
||||
//echo "<br>-----------";
|
||||
if( !isset($_GET["filter"]) || $_GET["filter"] == 1 || (isset($_GET["clean"]) && $_GET["clean"] == "yes") )
|
||||
{
|
||||
if( $row["num"] > $_SESSION["lastupdate"] ) $_SESSION["lastupdate"] = $row["num"];
|
||||
}
|
||||
@ -120,7 +122,7 @@ elseif( $show_filter != 1 )
|
||||
$bezeichnung = $row["bezeichnung"];
|
||||
|
||||
// Tageswechsel ausgeben
|
||||
if( get_date($row["zeit"]) != $lastday && $lastday )
|
||||
if( isset($lastday) && get_date($row["zeit"]) != $lastday )
|
||||
{
|
||||
$tageswechsel = get_timestamp(str_replace("-","",date_dbformat($lastday))."000000");
|
||||
|
||||
@ -146,7 +148,7 @@ elseif( $show_filter != 1 )
|
||||
|
||||
if( !$row_check["id"] )
|
||||
{
|
||||
$result_check = mysqli_query($dbconn, "INSERT INTO ric_zvei (adresse, bezeichnung, rec_typ, formatierung_id) VALUES ('$row[adresse_neu]', '$row[bezeichnung_neu]', '$row[REC_TYP]', '0')") or die(mysqli_error());
|
||||
$result_check = mysqli_query($dbconn, "INSERT INTO ric_zvei (adresse, bezeichnung, rec_typ, formatierung_id) VALUES ('$row[adresse_neu]', '$row[bezeichnung_neu]', '$row[REC_TYP]', '0')") or die(mysqli_error($dbconn));
|
||||
$bezeichnung = $row["bezeichnung_neu"];
|
||||
}
|
||||
}
|
||||
@ -160,19 +162,19 @@ elseif( $show_filter != 1 )
|
||||
|
||||
$row["bg_farbe"] = $formatierung[$row["formatierung_id"]]["bg_farbe"];
|
||||
$row["text_farbe"] = $formatierung[$row["formatierung_id"]]["text_farbe"];
|
||||
$row["text_farbe_text"] = $formatierung[$row["formatierung_id"]]["text_farbe_text"];
|
||||
$row["bg_farbe_text"] = $formatierung[$row["formatierung_id"]]["bg_farbe_text"];
|
||||
//$row["text_farbe_text"] = $formatierung[$row["formatierung_id"]]["text_farbe_text"];
|
||||
//$row["bg_farbe_text"] = $formatierung[$row["formatierung_id"]]["bg_farbe_text"];
|
||||
$row["text_groesse"] = $formatierung[$row["formatierung_id"]]["text_groesse"];
|
||||
$row["text_groesse_text"] = $formatierung[$row["formatierung_id"]]["text_groesse_text"];
|
||||
$row["text_format"] = $formatierung[$row["formatierung_id"]]["text_format"];
|
||||
|
||||
// default Farben bestimmen
|
||||
if( !$row["bg_farbe"] ) $row["bg_farbe"] = 'white';
|
||||
if( !$row["text_farbe"] ) $row["text_farbe"] = 'black';
|
||||
if( !$row["text_farbe_text"] ) $row["text_farbe_text"] = 'black';
|
||||
if( !$row["bg_farbe_text"] ) $row["bg_farbe_text"] = '#CCCCCC';
|
||||
if( !$row["text_groesse"] ) $row["text_groesse"] = '13';
|
||||
if( !$row["text_groesse_text"] ) $row["text_groesse_text"] = '12';
|
||||
if( !isset($row["bg_farbe"]) ) $row["bg_farbe"] = 'white';
|
||||
if( !isset($row["text_farbe"]) ) $row["text_farbe"] = 'black';
|
||||
if( !isset($row["text_farbe_text"]) ) $row["text_farbe_text"] = 'black';
|
||||
if( !isset($row["bg_farbe_text"]) ) $row["bg_farbe_text"] = '#CCCCCC';
|
||||
if( !isset($row["text_groesse"]) ) $row["text_groesse"] = '13';
|
||||
if( !isset($row["text_groesse_text"]) ) $row["text_groesse_text"] = '12';
|
||||
|
||||
// pocsag in Array schreiben
|
||||
//$thisday = $nextday.'
|
||||
@ -201,7 +203,7 @@ elseif( $show_filter != 1 )
|
||||
|
||||
// Falls sich Zeit letzter Status mit pocsag berschneiden um eins erhÔøΩen
|
||||
$show_time = get_timestamp($row["zeit"]);
|
||||
if( $show )
|
||||
if( isset($show) )
|
||||
{
|
||||
while( array_key_exists($show_time, $show) )
|
||||
{
|
||||
@ -224,7 +226,7 @@ echo "
|
||||
|
||||
//if ($new_unwetter == 1) echo '<meta http-equiv="refresh" content="1">';
|
||||
|
||||
if ( $show )
|
||||
if ( isset($show) )
|
||||
{
|
||||
echo '<table width="98%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000" valign="top">';
|
||||
foreach ( $show as $item )
|
||||
|
Reference in New Issue
Block a user