From fe155443e6d9e2ab818e56a4cb5eca415b034a38 Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Sun, 5 Aug 2018 22:37:33 +0200 Subject: [PATCH 1/5] Issue https://gitlab.fire-devils.org/ManuelW/monitor/issues/1 behoben. --- get.php | 2 +- testmail.php | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 testmail.php diff --git a/get.php b/get.php index 9fb1976..b49ca21 100755 --- a/get.php +++ b/get.php @@ -40,7 +40,7 @@ require('config.inc.php'); $filter = $_GET["filter"]; } -if (!isset($_SESSION["lastupdate"])) $_SESSION["lastupdate"]; +if (!isset($_SESSION["lastupdate"])) $_SESSION["lastupdate"]=""; if (!isset($show_filter)) $show_filter=""; if( $show_filter == 1 && $_SESSION["lastupdate"] == "" && !isset($_GET["clean"]) ) { diff --git a/testmail.php b/testmail.php new file mode 100644 index 0000000..14fcf84 --- /dev/null +++ b/testmail.php @@ -0,0 +1,13 @@ + Date: Mon, 6 Aug 2018 08:32:10 +0200 Subject: [PATCH 2/5] Issue https://gitlab.fire-devils.org/ManuelW/monitor/issues/1 behoben. --- get.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get.php b/get.php index b49ca21..bbe0789 100755 --- a/get.php +++ b/get.php @@ -127,9 +127,9 @@ else { //if( $show_filter != 1 ) { $tageswechsel = get_timestamp(str_replace("-","",date_dbformat($lastday))."000000"); //$nextday = ' - $show[$tageswechsel] .= ' + $show[$tageswechsel] = ' -  Tageswechsel: '.get_date_long($row["zeit"]).' +  Tageswechsel: ' . get_date_long($row["zeit"]) . ' '; } From 8b8ac2356dff001afc50b3ac1fb438bc2aa04f2a Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Mon, 6 Aug 2018 14:36:24 +0200 Subject: [PATCH 3/5] Fehler auf Suchseite behoben --- suche.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/suche.php b/suche.php index f3fb3cb..943ef8c 100755 --- a/suche.php +++ b/suche.php @@ -134,15 +134,15 @@ if (!isset($show)) $show=""; { if( $_REQUEST["search_word"] ) { - $show_filter = 'WHERE a.text LIKE "%'.$_REQUEST[search_word].'%"'; + $show_filter = 'WHERE a.text LIKE "%'.$_REQUEST["search_word"].'%"'; if( $_REQUEST["search_word_org"] ) { - $show_filter .= 'AND d.org_name LIKE "%'.$_REQUEST[search_word_org].'%"'; + $show_filter .= 'AND d.org_name LIKE "%'.$_REQUEST["search_word_org"].'%"'; } } else{ - $show_filter = 'WHERE d.org_name LIKE "%'.$_REQUEST[search_word_org].'%"'; + $show_filter = 'WHERE d.org_name LIKE "%'.$_REQUEST["search_word_org"].'%"'; } } @@ -184,6 +184,7 @@ if( $_REQUEST["search_what"] == 'ric' && $_REQUEST["search_ric"] != '' || $_REQU $bezeichnung = $row["bezeichnung"]; // Tageswechsel ausgeben + if (!isset($lastday)) $lastday=""; if( get_day($row["zeit"]) != $lastday ) { $nextday = ' @@ -202,12 +203,12 @@ if( $_REQUEST["search_what"] == 'ric' && $_REQUEST["search_ric"] != '' || $_REQU if( !$bezeichnung && !$row["org_name"] ) $bezeichnung = 'Unbekannt'; // 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.' From b0a6f832aae1aee89a40ce666db96ae5c3fe823e Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Mon, 1 Oct 2018 12:12:24 +0200 Subject: [PATCH 4/5] update config --- .DS_Store | Bin 6148 -> 6148 bytes Landkreise-Unwetter.txt | 398 ++++++++++++++++++++++++ _html/body_admin_dme2org.html | 26 +- _html/body_admin_index.html | 6 +- _html/body_admin_kfz2org.html | 4 +- _html/body_message_reply.html | 2 +- _html/body_message_write.html | 2 +- _html/body_profil_alarmmail_select.html | 2 +- _html/rahmen.html | 18 +- admin.php | 281 ++++++++++------- alarmmail.inc.php | 18 +- apple-touch-icon.png | Bin 0 -> 21452 bytes autocheck.php | 32 +- config.inc.php | 65 ++-- functions.inc.php | 28 +- get.php | 108 ++++--- get_other.php | 26 +- index.php | 52 ++-- index.php.bak | 211 ------------- kfz.php | 121 +++++++ loginfunctions.inc.php | 55 ++-- pmfunctions.inc.php | 42 +-- profile.php | 56 ++-- stats.php | 126 ++++++++ suche.php | 49 ++- uw_check.inc.php | 18 +- 26 files changed, 1148 insertions(+), 598 deletions(-) create mode 100755 Landkreise-Unwetter.txt create mode 100644 apple-touch-icon.png delete mode 100755 index.php.bak create mode 100755 kfz.php create mode 100755 stats.php diff --git a/.DS_Store b/.DS_Store index ac98131236da2d2be8b7abd96b8666e88bae8182..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 100755 GIT binary patch delta 71 zcmZoMXfc=|&Zs&uQEZ}~A_oHyFfuR*Y-VI+W1lR*xN0*yhX4noDv -
+ - + @@ -41,7 +31,7 @@ - + @@ -57,7 +47,7 @@ - +
neue Organisation/Ortneue Org./Ort - - - -/ - + +
Zusatz:
Formatierung: 
diff --git a/_html/body_admin_index.html b/_html/body_admin_index.html index 179859d..6763980 100755 --- a/_html/body_admin_index.html +++ b/_html/body_admin_index.html @@ -7,15 +7,15 @@ - + - + - +
 $num_dme DME/ZVEI ohne Organisation
 $num_kfz Fahrzeuge ohne Organisation
 $num_user User im System, $num_new_user davon neu


diff --git a/_html/body_admin_kfz2org.html b/_html/body_admin_kfz2org.html index 1cb9dd0..f24d983 100755 --- a/_html/body_admin_kfz2org.html +++ b/_html/body_admin_kfz2org.html @@ -1,4 +1,4 @@ - + @@ -38,7 +38,7 @@ - +
neue Organisation/Ort 
diff --git a/_html/body_message_reply.html b/_html/body_message_reply.html index c048c97..4535071 100755 --- a/_html/body_message_reply.html +++ b/_html/body_message_reply.html @@ -1,5 +1,5 @@ - + diff --git a/_html/body_message_write.html b/_html/body_message_write.html index 5986a79..9bb327a 100755 --- a/_html/body_message_write.html +++ b/_html/body_message_write.html @@ -1,5 +1,5 @@ - + diff --git a/_html/body_profil_alarmmail_select.html b/_html/body_profil_alarmmail_select.html index 853f2e3..fc22d4f 100755 --- a/_html/body_profil_alarmmail_select.html +++ b/_html/body_profil_alarmmail_select.html @@ -2,7 +2,7 @@
diff --git a/_html/rahmen.html b/_html/rahmen.html index 9697d47..08bf282 100755 --- a/_html/rahmen.html +++ b/_html/rahmen.html @@ -67,7 +67,7 @@ $body_html - + @@ -115,20 +115,6 @@ $body_html - - - - -
- In welchem Zeitraum möchtest du Meldungen empfangen: + In welchem Zeitraum möchtest du Meldungen empfangen:  
diff --git a/admin.php b/admin.php index 256f280..72c5389 100755 --- a/admin.php +++ b/admin.php @@ -27,7 +27,13 @@ $_SESSION["load_complete"] = ""; $_SESSION["lastupdate"] = ""; $_SESSION["online_users"] = ""; -// Prüfen ob admin +if (!isset($_REQUEST["org"])) $_REQUEST["org"]=""; +if (!isset($_REQUEST["form"])) $_REQUEST["form"]=""; +if (!isset($option_org)) $option_org=""; +if (!isset($option_format)) $option_format=""; +if (!isset($_GET["org"])) $_GET["org"]=""; + +// Prüfen ob admin if( $_SESSION["admin"] != 1 ) exit; /**************************/ @@ -36,20 +42,37 @@ if( $_SESSION["admin"] != 1 ) exit; // // Wenn dme ohne Org anzuschauen ist -if( $_GET["show"] == 'dme' && !$_GET["do"] ) +if( isset($_GET["show"]) && $_GET["show"] == 'dme' && !isset($_GET["do"]) ) { // Alle DME ohne Organisation holen - $result = mysql_query("SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn, "SELECT a.id, a.adresse, a.bezeichnung, a.rec_typ, b.id as import_id, b.i_ric, b.i_org, b.i_ort, b.i_zusatz + FROM ric_zvei a + LEFT JOIN import_ric b ON a.adresse = b.i_ric + WHERE a.org_id = '0' + ORDER BY a.bezeichnung ASC") or die (mysqli_error($dbconn)); + + while($row = mysqli_fetch_array($result)) { - $show_all .= ' + if (isset($row["import_id"])) { + $show_all .= ' - '.$row["rec_typ"].' -  '.$row["adresse"].' / '.$row["bezeichnung"].' -  zuordnen  -  löschen  + ' . $row["rec_typ"] . ' +  ' . $row["adresse"] . ' / ' . $row["i_org"]." ".$row["i_ort"]." | ".$row["i_zusatz"] . ' +  zuordnen  +  löschen  - '; + '; + } + else { + $show_all .= ' + + ' . $row["rec_typ"] . ' +  ' . $row["adresse"] . ' / ' . $row["bezeichnung"] . ' +  zuordnen  +  löschen  + + '; + } } // Seiteninhalt ausgeben @@ -58,56 +81,84 @@ if( $_GET["show"] == 'dme' && !$_GET["do"] ) // // Wenn dme updaten -elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && $_GET["do"] && $_GET["do"] == 'update' ) { - // Zusammenstellung bekannter Organisationen - $result = mysql_query("SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + // Abfrage ob in import table vorhanden + if (isset($_GET["ric"])) { + $ric = trim($_GET["ric"]); + + $result = mysqli_query($dbconn, "SELECT i_ric, i_org, i_ort, i_zusatz FROM import_ric WHERE i_ric=$ric") or die (mysqli_error($dbconn)); + $imp = mysqli_fetch_array($result); + + (!empty($imp["i_ort"])) ? $org_name = strtoupper($imp["i_ort"]) : $org_name=""; + } + + // Zusammenstellung bekannter Organisationen + $result = mysqli_query($dbconn, "SELECT a.id, a.org_name, a.org + FROM organisation a + ORDER BY a.org ASC, a.org_name ASC") or die (mysqli_error($dbconn)); + + while($row = mysqli_fetch_array($result)) { - if( $_REQUEST["org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; } + ($_REQUEST["org"] == $row["id"]) ? $selected="selected" : $selected=""; $option_org .= ''; } // Zusammenstellung der Formatierungen - $result = mysql_query("SELECT id, beschreibung FROM formatierung ORDER BY beschreibung ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn, "SELECT id, beschreibung FROM formatierung ORDER BY beschreibung ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { if( $_REQUEST["form"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; } $option_format .= ''; } // Abfrage des verlangten Datensatzes - $result = mysql_query("SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysql_error()); - $row = mysql_fetch_array($result); - + $result = mysqli_query($dbconn, "SELECT a.id, a.adresse, a.bezeichnung, a.rec_typ, b.i_org, b.i_ort, b.i_zusatz + FROM ric_zvei a + LEFT JOIN import_ric b ON a.adresse=b.i_ric + WHERE a.id = '$_GET[id]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); + + (!empty($imp["i_zusatz"])) ? $org_bezeichnung=$imp["i_zusatz"] : $org_bezeichnung=$row["bezeichnung"]; + + // Formular zusammenstellen + $updateSelectOrgTyp=""; + $orgs = array("RLS", "FF", "BF", "RD", "THW", "KAT", "KBM", "RLS"); + foreach ($orgs as $v) { + ($v == trim($row["i_org"])) ? $selected="selected" : $selected=""; + $updateSelectOrgTyp .= ""; + } + + if (!isset($org_name)) $org_name=""; + // Seiteninhalt ausgeben eval ("\$page_middle .= \"".gettemplate($template_dir."body_admin_dme2org")."\";"); } // -// Wenn dme löschen -elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'delete' ) +// Wenn dme l�schen +elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && $_GET["do"] && $_GET["do"] == 'delete' ) { - $result = mysql_query("DELETE FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysql_error()); - $result = mysql_query("DELETE FROM alarm2mail WHERE adresse = '$_GET[adresse]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn)); + $result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE adresse = '$_GET[adresse]'") or die (mysqli_error($dbconn)); - // Prüfen ob noch weitere Einträge zur Org da sind, wenn nicht löschen - if( $_GET["org"] ) + // Pr�fen ob noch weitere Eintr�ge zur Org da sind, wenn nicht l�schen + if( $_GET["org"] != "" ) { - $result = mysql_query("SELECT a.id AS dme_id, b.id AS kfz_id + $result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id FROM ric_zvei a LEFT JOIN kfz_fms b ON b.org_id = $_GET[org] - WHERE a.org_id = '$_GET[org]' OR b.org_id = '$_GET[org]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + WHERE a.org_id = '$_GET[org]' OR b.org_id = '$_GET[org]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( !$row["dme_id"] && !$row["kfz_id"] ) { - $result = mysql_query("DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error($dbconn)); } } // Wohin gehen nach Aktion - if( !$_GET["org"] ) + if( !isset($_GET["org"]) ) { echo gohome($_SERVER["PHP_SELF"].'?show=dme&org=0'); } @@ -118,29 +169,29 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'delete' ) } // -// dme Update ausführen -elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) +// dme Update ausf�hren +elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && isset($_GET["do"]) && $_GET["do"] == 'setupdate' ) { - // Schauen ob neue oder bestehende Organistaion gewählt wurde - if( $_REQUEST["new_org"] ) + // Schauen ob neue oder bestehende Organistaion gew�hlt wurde + if( isset($_REQUEST["new_org"]) && $_REQUEST["new_org"] != "" ) { /////////////////$organisation = $_REQUEST["new_org"]; - // Prüfen ob die Org schon existiert, wenn ja update kein eintrag - $result = mysql_query("SELECT id FROM organisation WHERE org_name = '$_REQUEST[new_org]' AND org = '$_REQUEST[new_org_typ]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + // Pr�fen ob die Org schon existiert, wenn ja update kein eintrag + $result = mysqli_query($dbconn, "SELECT id FROM organisation WHERE org_name = '$_REQUEST[new_org]' AND org = '$_REQUEST[new_org_typ]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( $row["id"] ) { $org_id = $row["id"]; } - if( !$org_id ) + if( !isset($org_id) ) { - $result = mysql_query("INSERT INTO organisation (org_name, org) VALUES ('$_REQUEST[new_org]', '$_REQUEST[new_org_typ]')"); + $result = mysqli_query($dbconn, "INSERT INTO organisation (org_name, org) VALUES ('$_REQUEST[new_org]', '$_REQUEST[new_org_typ]')"); - $result = mysql_query("SELECT MAX(id) as new_id FROM organisation"); - $row = mysql_fetch_row($result); + $result = mysqli_query($dbconn, "SELECT MAX(id) as new_id FROM organisation"); + $row = mysqli_fetch_row($result); $org_id = $row[0]; } } @@ -149,20 +200,20 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) $org_id = $_REQUEST["select_org"]; } - $result = mysql_query("UPDATE ric_zvei SET bezeichnung = '$_REQUEST[bezeichnung]', formatierung_id = '$_REQUEST[formatierung]', org_id = '$org_id' WHERE id='$_REQUEST[id]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "UPDATE ric_zvei SET bezeichnung = '$_REQUEST[bezeichnung]', formatierung_id = '$_REQUEST[formatierung]', org_id = '$org_id' WHERE id='$_REQUEST[id]'") or die (mysqli_error($dbconn)); - // Prüfen ob noch weitere Einträge zur Org da sind, wenn nicht löschen - if( $_REQUEST["old_org"] ) + // Pr�fen ob noch weitere Eintr�ge zur Org da sind, wenn nicht l�schen + if( isset($_REQUEST["old_org"]) ) { - $result = mysql_query("SELECT a.id AS dme_id, b.id AS kfz_id + $result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id FROM ric_zvei a - LEFT JOIN kfz_fms b ON b.org_id = $_REQUEST[old_org] - WHERE a.org_id = '$_REQUEST[old_org]' OR b.org_id = '$_REQUEST[old_org]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + LEFT JOIN kfz_fms b ON b.org_id = $org_id + WHERE a.org_id = '$org_id' OR b.org_id = '$org_id'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( !$row["dme_id"] && !$row["kfz_id"] ) { - $result = mysql_query("DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$org_id'") or die (mysqli_error($dbconn)); } } @@ -171,17 +222,17 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) // // Wenn kfz ohne org anzusehen ist -elseif( $_GET["show"] == 'kfz' && !$_GET["do"] ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'kfz' && !isset($_GET["do"]) ) { // Alle DME ohne Organisation holen - $result = mysql_query("SELECT id, bezeichnung FROM kfz_fms WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn, "SELECT id, bezeichnung FROM kfz_fms WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { $show_all .= '  '.$row["bezeichnung"].' -  zuordnen  -  löschen  +  zuordnen  +  löschen  '; } @@ -192,47 +243,47 @@ elseif( $_GET["show"] == 'kfz' && !$_GET["do"] ) // // Wenn kfz updaten -elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'update' ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'kfz' && isset($_GET["do"]) && $_GET["do"] == 'update' ) { // Zusammenstellung bekannter Organisationen - $result = mysql_query("SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { if( $_REQUEST["org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; } $option_org .= ''; } // Abfrage des verlangten Datensatzes - $result = mysql_query("SELECT id, bezeichnung FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + $result = mysqli_query($dbconn, "SELECT id, bezeichnung FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); // Seiteninhalt ausgeben eval ("\$page_middle .= \"".gettemplate($template_dir."body_admin_kfz2org")."\";"); } // -// Wenn kfz löschen -elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'delete' ) +// Wenn kfz l�schen +elseif( isset($_GET["show"]) && $_GET["show"] == 'kfz' && isset($_GET["do"]) && $_GET["do"] == 'delete' ) { - $result = mysql_query("DELETE FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn)); - // Prüfen ob noch weitere Einträge zur Org da sind, wenn nicht löschen - if( $_GET["org"] ) + // Pr�fen ob noch weitere Eintr�ge zur Org da sind, wenn nicht l�schen + if( isset($_GET["org"]) ) { - $result = mysql_query("SELECT a.id AS dme_id, b.id AS kfz_id + $result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id FROM ric_zvei a LEFT JOIN kfz_fms b ON b.org_id = $_GET[org] - WHERE a.org_id = '$_GET[org]' OR b.org_id = '$_GET[org]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + WHERE a.org_id = '$_GET[org]' OR b.org_id = '$_GET[org]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( !$row["dme_id"] && !$row["kfz_id"] ) { - $result = mysql_query("DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error($dbconn)); } } // Wohin gehen nach Aktion - if( !$_GET["org"] ) + if( !isset($_GET["org"]) ) { echo gohome($_SERVER["PHP_SELF"].'?show=kfz&org=0'); } @@ -244,16 +295,16 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'delete' ) // // kfz Update ausfhren -elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'kfz' && isset($_GET["do"]) && $_GET["do"] == 'setupdate' ) { // Schauen ob neue oder bestehende Organistaion gewhlt wurde - if( $_REQUEST["new_org"] ) + if( isset($_REQUEST["new_org"]) ) { $organisation = $_REQUEST["new_org"]; - $result = mysql_query("INSERT INTO organisation (org_name, org) VALUES ('$organisation', '$_REQUEST[new_org_typ]')"); + $result = mysqli_query($dbconn, "INSERT INTO organisation (org_name, org) VALUES ('$organisation', '$_REQUEST[new_org_typ]')"); - $result = mysql_query("SELECT MAX(id) as new_id FROM organisation"); - $row = mysql_fetch_row($result); + $result = mysqli_query($dbconn, "SELECT MAX(id) as new_id FROM organisation"); + $row = mysqli_fetch_row($result); $organisation = $row[0]; } else @@ -261,20 +312,20 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' ) $organisation = $_REQUEST["select_org"]; } - $result = mysql_query("UPDATE kfz_fms SET bezeichnung = '$_REQUEST[bezeichnung]', org_id = '$organisation' WHERE id='$_REQUEST[id]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "UPDATE kfz_fms SET bezeichnung = '$_REQUEST[bezeichnung]', org_id = '$organisation' WHERE id='$_REQUEST[id]'") or die (mysqli_error($dbconn)); - // Prüfen ob noch weitere Einträge zur Org da sind, wenn nicht löschen - if( $_REQUEST["old_org"] ) + // Pr�fen ob noch weitere Eintr�ge zur Org da sind, wenn nicht l�schen + if( isset($_REQUEST["old_org"]) ) { - $result = mysql_query("SELECT a.id AS dme_id, b.id AS kfz_id + $result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id FROM ric_zvei a LEFT JOIN kfz_fms b ON b.org_id = $_REQUEST[old_org] - WHERE a.org_id = '$_REQUEST[old_org]' OR b.org_id = '$_REQUEST[old_org]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + WHERE a.org_id = '$_REQUEST[old_org]' OR b.org_id = '$_REQUEST[old_org]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( !$row["dme_id"] && !$row["kfz_id"] ) { - $result = mysql_query("DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysqli_error($dbconn)); } } @@ -283,11 +334,11 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' ) // // Wenn Userliste anzeigen -elseif( $_GET["show"] == 'user' && !$_GET["do"] ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'user' && !isset($_GET["do"]) ) { // Alle DME ohne Organisation holen - $result = mysql_query("SELECT id, a_name, real_name, a_admin, a_mail FROM admin_users ORDER BY a_admin DESC, a_name ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn, "SELECT id, a_name, real_name, a_admin, a_mail FROM admin_users ORDER BY a_admin DESC, a_name ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { if( $row["a_admin"] == '0' ) $status = '(User) '; elseif( $row["a_admin"] == '1' ) $status = '(Admin) '; @@ -295,7 +346,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] ) elseif( $row["a_admin"] == '3' ) $status = '(Closed) '; if( $row["a_admin"] != '1') { - $show_del_button = 'löschen'; + $show_del_button = 'löschen'; } else { $show_del_button = ""; } @@ -304,7 +355,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] )  '.$status.$row["real_name"].'  '.$row["a_mail"].' - + '.$row["a_name"].'  '.$show_del_button.'  @@ -321,7 +372,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] ) EMail - + @@ -335,28 +386,28 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] ) } // User eintragen -elseif( $_GET["show"] == 'user' && $_GET["do"] == 'insert' ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'user' && isset($_GET["do"]) && $_GET["do"] == 'insert' ) { list($vorname, $nachname) = explode(" ", trim($_REQUEST["ins_name"])); $ins_user_name = trim($vorname) .".". substr(trim($nachname),0,1); - $result = mysql_query("SELECT id FROM admin_users WHERE a_name = '$ins_user_name'"); - $row = mysql_fetch_array($result); + $result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE a_name = '$ins_user_name'"); + $row = mysqli_fetch_array($result); if (!empty($row["id"])) $ins_user_name = trim($vorname) .".". substr(trim($nachname),0,1) ."". rand(1,99); - $result = mysql_query("INSERT INTO admin_users (a_name, real_name, a_mail, pm_allow) VALUES ('$ins_user_name', '$_REQUEST[ins_name]', '$_REQUEST[ins_mail]', '1')") or die(mysql_error); + $result = mysqli_query($dbconn, "INSERT INTO admin_users (a_name, real_name, a_mail, pm_allow) VALUES ('$ins_user_name', '$_REQUEST[ins_name]', '$_REQUEST[ins_mail]', '1')") or die(mysqli_error); echo gohome($_SERVER["PHP_SELF"].'?show=user'); } // -// Wenn user löschen -elseif( $_GET["show"] == 'user' && $_GET["do"] == 'delete' ) +// Wenn user l�schen +elseif( isset($_GET["show"]) && $_GET["show"] == 'user' && isset($_GET["do"]) && $_GET["do"] == 'delete' ) { - $result = mysql_query("DELETE FROM messages WHERE userid_to = '$_GET[id]'") or die (mysql_error()); - $result = mysql_query("DELETE FROM alarm2mail WHERE userid = '$_GET[id]'") or die (mysql_error()); - $result = mysql_query("DELETE FROM admin_users WHERE id = '$_GET[id]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM messages WHERE userid_to = '$_GET[id]'") or die (mysqli_error($dbconn)); + $result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE userid = '$_GET[id]'") or die (mysqli_error($dbconn)); + $result = mysqli_query($dbconn, "DELETE FROM admin_users WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn)); echo gohome($_SERVER["PHP_SELF"].'?show=user'); } @@ -366,29 +417,29 @@ elseif( $_GET["show"] == 'user' && $_GET["do"] == 'delete' ) else { // Wir schauen nach dme die keiner Org zugeordnet sind - $result = mysql_query("SELECT id FROM ric_zvei WHERE org_id = '0'") or die (mysql_error()); - $num_dme = mysql_num_rows($result); + $result = mysqli_query($dbconn, "SELECT id FROM ric_zvei WHERE org_id = '0'") or die (mysqli_error($dbconn)); + $num_dme = mysqli_num_rows($result); // Wir schauen nach kfz die keiner Org zugeordnet sind - $result = mysql_query("SELECT id FROM kfz_fms WHERE org_id = '0'") or die (mysql_error()); - $num_kfz = mysql_num_rows($result); + $result = mysqli_query($dbconn, "SELECT id FROM kfz_fms WHERE org_id = '0'") or die (mysqli_error($dbconn)); + $num_kfz = mysqli_num_rows($result); // Wir schauen nach der Userzahl - $result = mysql_query("SELECT id FROM admin_users") or die (mysql_error()); - $num_user = mysql_num_rows($result); + $result = mysqli_query($dbconn, "SELECT id FROM admin_users") or die (mysqli_error($dbconn)); + $num_user = mysqli_num_rows($result); - $result = mysql_query("SELECT id FROM admin_users WHERE a_admin = '2'") or die (mysql_error()); - $num_new_user = mysql_num_rows($result); + $result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE a_admin = '2'") or die (mysqli_error($dbconn)); + $num_new_user = mysqli_num_rows($result); // Ausklappmenu erstellen $select_search_org = ' '; - // Ausgabe zusammenstellen wenn org zum bearbeiten gewählt - if( $_REQUEST["search_org"] ) + // Ausgabe zusammenstellen wenn org zum bearbeiten gew�hlt + if( isset($_REQUEST["search_org"]) ) { $show_ric = '--- RIC/ZVEI ----------
'; - $result = mysql_query("SELECT id, adresse, bezeichnung, rec_typ, org_id, formatierung_id FROM ric_zvei WHERE org_id = '$_REQUEST[search_org]' ORDER BY rec_typ ASC, adresse ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn,"SELECT id, adresse, bezeichnung, rec_typ, org_id, formatierung_id FROM ric_zvei WHERE org_id = '$_REQUEST[search_org]' ORDER BY rec_typ ASC, adresse ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { $show_ric .= ' '.$row["adresse"].' | '.$row["rec_typ"].' | '.$row["bezeichnung"].'
'; } $show_ric .= '
--- KFZ/FMS ----------
'; - $result = mysql_query("SELECT id, kennung, bezeichnung, org_id FROM kfz_fms WHERE org_id = '$_REQUEST[search_org]' ORDER BY kennung ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn, "SELECT id, kennung, bezeichnung, org_id FROM kfz_fms WHERE org_id = '$_REQUEST[search_org]' ORDER BY kennung ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { $show_ric .= ' '.$row["kennung"].' | '.$row["bezeichnung"].'
'; } @@ -434,5 +485,5 @@ eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");"); /**************************/ // Datenbank schliessen // -mysql_close($dbconn); +mysqli_close($dbconn); ?> diff --git a/alarmmail.inc.php b/alarmmail.inc.php index 086c100..eb39e2c 100755 --- a/alarmmail.inc.php +++ b/alarmmail.inc.php @@ -21,21 +21,21 @@ */ // Done in Haupttabelle updaten -$result_check_ins = mysql_query("UPDATE dme SET zeit='$row[zeit]', done='1' WHERE num='$row[num]'") or die (mysql_error()); +$result_check_ins = mysqli_query($dbconn, "UPDATE dme SET zeit='$row[zeit]', done='1' WHERE num='$row[num]'") or die (mysqli_error($dbconn)); if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' && $amenable == 1 ) { - $result_alarm_mail = mysql_query("SELECT a.userid, a.time_from, a.time_to, a.stiwo, b.id, b.a_mail, b.a_alarmmail, b.a_alarmmail2sms, b.amail_count, b.ft_allow + $result_alarm_mail = mysqli_query($dbconn, "SELECT a.userid, a.time_from, a.time_to, a.stiwo, b.id, b.a_mail, b.a_alarmmail, b.a_alarmmail2sms, b.amail_count, b.ft_allow FROM alarm2mail a LEFT JOIN admin_users b ON b.id = a.userid - WHERE adresse=".$row["adresse_neu"]) or die(mysql_error()); - while( $row_alarm_mail = mysql_fetch_array($result_alarm_mail) ) + WHERE adresse=".$row["adresse_neu"]) or die(mysqli_error($dbconn)); + while( $row_alarm_mail = mysqli_fetch_array($result_alarm_mail) ) { // Alarmmail Counter $amail_count = $row_alarm_mail["amail_count"]+1; - // schauen ob für Alarm extra Mailadresse + // schauen ob f�r Alarm extra Mailadresse if( $row_alarm_mail["a_alarmmail"] ) $row_alarm_mail["a_mail"] = $row_alarm_mail["a_alarmmail"]; // schauen ob Alarm im Zeitfenster liegt @@ -52,7 +52,7 @@ if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' && if ( $row_alarm_mail["ft_allow"] == 1 ) { // Wenn FullText erlaubt - mail_alarm(get_date_long($row["zeit"]), get_time($row["zeit"]), $row_alarm_mail["a_mail"],$row["org"],$row["org_name"],$row["bezeichnung"],utf8_decode($row["text"])); + mail_alarm(get_date_long($row["zeit"]), get_time($row["zeit"]), $row_alarm_mail["a_mail"],$row["org"],$row["org_name"],$row["bezeichnung"],$row["text"]); } else { @@ -61,7 +61,7 @@ if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' && } // Mailcounter - $result_counter = mysql_query("UPDATE admin_users SET amail_count='$amail_count' WHERE id='$row_alarm_mail[id]'"); + $result_counter = mysqli_query($dbconn, "UPDATE admin_users SET amail_count='$amail_count' WHERE id='$row_alarm_mail[id]'"); } // Meldung im SMSformat senden @@ -80,7 +80,7 @@ if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' && } // Mailcounter - $result_counter = mysql_query("UPDATE admin_users SET amail_count='$amail_count' WHERE id='$row_alarm_mail[id]'"); + $result_counter = mysqli_query($dbconn, "UPDATE admin_users SET amail_count='$amail_count' WHERE id='$row_alarm_mail[id]'"); } } @@ -91,6 +91,6 @@ if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' && if( ($row["zeit"] - $row["last_alarm"]) > 1000 ) { $alarmcount = $row["alarm_count"] + 1; - $result_check_ins = mysql_query("UPDATE organisation SET alarm_count='$alarmcount', last_alarm='$row[zeit]' WHERE id='$row[org_id]'") or die (mysql_error()); + $result_check_ins = mysqli_query($dbconn, "UPDATE organisation SET alarm_count='$alarmcount', last_alarm='$row[zeit]' WHERE id='$row[org_id]'") or die (mysqli_error($dbconn)); } ?> \ No newline at end of file diff --git a/apple-touch-icon.png b/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..060dd550b9a6461022c01bfc7dbe86b787cd03e4 GIT binary patch literal 21452 zcmaI7b980Fw=Npnwr$(CZQI$g({VbsZFOuX9osfL={Ozd?ccfQ-248x@2xTRUKlm2 zYSpTmbJjP%8LgrujR=Pa2Lb|uC@UkO20W+#=LZ7@{BJftZ3Uii0g^fZb!RJpm#Ld2 zh^U3LnI(y=qp7u}nx(0QkL!e`00;;;hOLGUKu1x5&)nIO$@D*En7kcbfYKl!0>a)d zrsnpR01`7xYg;ElvYYOHG7?)0K{9PlMHWRDaZ4Lp8DBR`bzdb7b6=d9gD&yIC`{^78UBv#>Fy!Ue766W7A1JNc_bvHczM}b#s1S zLr4>J*{xk~HD$`GQbl!aJ-H$kJ%Sj0*ER9K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!)36ae-8yv!;fEb;+qw;ygY)OiIdtHldgXU--%?2A7S1lKSFOsf z8YKGs=~K7PU2q5j7D&Cz#QnP$Gf24zxW;@|=DDX4R2&u%W4(El2QN|%k`^vRRDR2pb52lww+jrCT@KbZ_{ z?Y~#8a&vW^q_pk82(e*X-&Hz90860PJT;|58D5y;=IlCT;Gi7kKthRFY-ekWr5^j9 z@9lHwh@r!%1meiy!)rQd{vX0Rym93fXHTCtXD}It#w%B>Os?Sv;PLsnN+hzgvq9sC zQmz;b#n;EDW|S`M^Jn=yI?vYX2d`hdwtnq8p`eywXCkra*3Fwh-$wcdqlOQ!cZ}%& zLs&}zVFNlvhxR^nJ^h~Dx`V{3b@&2^Js?(f;TIhp4GL|w%D|byoVa@B%J&}%_j z6)3A<&lu|IgN=xd0Q!$DKOl3X;DD~(yW85@em|Km zmJLqBrxXB0SFkB@p19tU%tQww@pb&DJw7Q-?!f&fB%-P zJeruD@c$vK4@;r2qP+a+)2Bg!LD2Lm$;svD+B4=B7UpO%VKV4+x|Ws}fQmzKVu@J5 z=a-h16&4htizsDg=j7z)<gwd|+^KVCXJ=4H6?{39$)q$ndCxyv c{!f4b0MfGpiN$@!GXMYp07*qoM6N<$f`+9@*Z=?k literal 0 HcmV?d00001 diff --git a/autocheck.php b/autocheck.php index e3c8bdd..abd0111 100755 --- a/autocheck.php +++ b/autocheck.php @@ -24,15 +24,15 @@ require('config.inc.php'); $show_filter = ' Where a.done = "0" '; - $result = mysql_query("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, + $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 (mysql_error()); - while($row = mysql_fetch_array($result)) + ORDER BY a.zeit DESC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { if( $row["done"] == '0' ) @@ -46,12 +46,12 @@ require('config.inc.php'); if( $update_adresse_monrc && !$bezeichnung ) { // prfen ob die ric schon vorhanden ist, wenn nicht eintragen - $result_check = mysql_query("SELECT id FROM ric_zvei WHERE adresse=".$row["adresse_neu"]); - $row_check = mysql_fetch_array($result_check); + $result_check = mysqli_query($dbconn, "SELECT id FROM ric_zvei WHERE adresse=".$row["adresse_neu"]); + $row_check = mysqli_fetch_array($result_check); if( !$row_check["id"] ) { - $result_check = mysql_query("INSERT INTO ric_zvei (adresse, bezeichnung, rec_typ, formatierung_id) VALUES ('$row[adresse_neu]', '$row[bezeichnung_neu]', '$row[REC_TYP]', '0')") or die(mysql_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"]; } } @@ -61,10 +61,11 @@ require('config.inc.php'); if( !$row["org_name"] ) $row["org_name"] = $row["adresse_neu"]; } - + +/* // Unwetter Check -$result = mysql_query("SELECT u_meldung, u_text, u_farbe, DATE_FORMAT(u_lastcheck, '%Y%m%d%H%i%s') AS u_lastcheck, DATE_FORMAT(u_lastchange, '%Y%m%d%H%i%s') AS u_lastchange FROM unwetter WHERE id = '1'") or die (mysql_error()); -$row = mysql_fetch_array($result); +$result = mysqli_query($dbconn, "SELECT u_meldung, u_text, u_farbe, DATE_FORMAT(u_lastcheck, '%Y%m%d%H%i%s') AS u_lastcheck, DATE_FORMAT(u_lastchange, '%Y%m%d%H%i%s') AS u_lastchange FROM unwetter WHERE id = '1'") or die (mysqli_error($dbconn)); +$row = mysqli_fetch_array($result); if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) ) { @@ -93,7 +94,7 @@ if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) ) $unwetter_meldung .= $line; } - // Zum Prüfen der Ausgabe deaktivieren + // Zum Prüfen der Ausgabe deaktivieren //echo "Line #{$line_num} : " . htmlspecialchars($line) . "
\n"; } @@ -110,25 +111,26 @@ if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) ) { $unwetter_status = 'keine Verbindung !!!'; $unwetter_farbe = '#FFFFFF'; - $unwetter_meldung = 'Verbindung zu dwd.de nicht möglich !'; + $unwetter_meldung = 'Verbindung zu dwd.de nicht m�glich !'; } // Wenn noch kein Eintrag in DB existiert if( empty($row["u_lastcheck"]) ) { - mysql_query("INSERT INTO unwetter (id, u_meldung, u_text, u_farbe, u_lastchange) VALUES ('1', '$unwetter_status', '$unwetter_meldung', '$unwetter_farbe', '$timestampnow')") or die(mysql_error()); + mysqli_query($dbconn, "INSERT INTO unwetter (id, u_meldung, u_text, u_farbe, u_lastchange) VALUES ('1', '$unwetter_status', '$unwetter_meldung', '$unwetter_farbe', '$timestampnow')") or die(mysqli_error($dbconn)); } // Wenn bereits Eintrag vorhanden und Checktime erreicht if( $unwetter_meldung == $row["u_text"] ) { - mysql_query("UPDATE unwetter SET u_lastcheck='$timestampnow' WHERE id = '1'") or die(mysql_error()); + mysqli_query($dbconn, "UPDATE unwetter SET u_lastcheck='$timestampnow' WHERE id = '1'") or die(mysqli_error($dbconn)); } else { - mysql_query("UPDATE unwetter SET u_meldung='$unwetter_status', u_text='$unwetter_meldung', u_farbe='$unwetter_farbe', u_lastcheck='$timestampnow', u_lastchange='$timestampnow' WHERE id = '1'") or die(mysql_error()); + mysqli_query($dbconn, "UPDATE unwetter SET u_meldung='$unwetter_status', u_text='$unwetter_meldung', u_farbe='$unwetter_farbe', u_lastcheck='$timestampnow', u_lastchange='$timestampnow' WHERE id = '1'") or die(mysqli_error($dbconn)); } } +*/ -mysql_close($dbconn); +mysqli_close($dbconn); ?> diff --git a/config.inc.php b/config.inc.php index 86ab7f5..4435845 100755 --- a/config.inc.php +++ b/config.inc.php @@ -27,7 +27,7 @@ // http://board.fire-devils.org oder manuelw@fire-devils.org // // Damit auch alles in die DB gespeichert wird sollte man -// "index.php?nooutput=1" in einen Cron aller Minute einbinden. +// "autoupdate.php?nooutput=1" in einen Cron aller Minute einbinden. // // Die Status müssen in der .monrc folgendermaßen // definiert sein. Wichtig ist das KFZ: bzw LST: voran steht. @@ -81,29 +81,29 @@ $meta = ' $css = ''; // URL deines Webinterface -$monitordomain = "http://monitor.fire-devils.org"; +$monitordomain = "https://monitor.fire-devils.org"; $monitoremail = "monitor@fire-devils.org"; // Login Info Text $login_infotext = '

Welcome back

'; -// Templates / Sprachen (nicht �dern) +// Templates / Sprachen (nicht ändern) $template_dir = '_html/'; -// Updatefunktion fr bestehenden Eintr�e der monrc +// Updatefunktion fr bestehenden Einträge der monrc // Sollen Namen und Text aus der monrc fr KFZ zB. // bernommen werden $update_adresse_monrc = 1; // IP Bereich fr auto Login -$ip_start = '192.168.2.2'; -$ip_ende = '192.168.2.50'; +$ip_start = '192.168.1.2'; +$ip_ende = '192.168.1.250'; -// UserID für IP +// UserID für IP $ip_users = array( - "192.168.2.36" => 2, - "192.168.2.21" => 1, - "192.168.2.38" => 1, + "192.168.1.50" => 1, + "192.168.1.80" => 1, + "192.168.1.75" => 1, ); // Alarmmails enable/disable @@ -147,7 +147,7 @@ $status_color[15] = '#808080'; //gray $status_format[15] = 'normal'; // Status korrektur -$korr_kenner = 1; //Status l�chen wenn Fahrzeugkenner keine Ziffern sind (zb 02F3) +$korr_kenner = 1; //Status löschen wenn Fahrzeugkenner keine Ziffern sind (zb 02F3) $korr_status = 1; //Korrektur ein = 1 aus = 0 // Alle LST Ausgaben anzeigen (aut.Q) @@ -155,13 +155,13 @@ $aq = 0; // 1 anzeigen, 0 filtern // Zeit die zwischen dem letzen Status und dem zu berichtigendem sein muss, // das also nich 3aut.Q hintereinandern, welche sicher 1 Status bedeuten sollen -// in 3 fortlaufende Status ge�dert werden +// in 3 fortlaufende Status geändert werden $korr_status_zeit = 2; //in min // Grunddaten fr die Datenbankverbindung $dbhost = "localhost"; -$dbuser = "root"; -$dbpass = ""; +$dbuser = "boswatch"; +$dbpass = "druffmann77"; $dbname = "monitor"; // Status definieren @@ -232,7 +232,7 @@ $bos_ort = array( "021" => 'Sac V', #Vogtlandkreis "022" => 'Sac FBG', #Freiberg (Brand-Erbisdorf) "023" => 'Sac STL', #Chemnitzer Land (Stollberg) - "024" => 'Sac FBG', #Freiberg (Fl�a) + "024" => 'Sac FBG', #Freiberg (Flöha) "025" => 'Sac FBG', #Freiberg "026" => 'Sac GC', #Chemnitzer Land (Glauchau) "027" => 'Sac MIW', #Mittweida (Hainichen) @@ -264,7 +264,7 @@ $bos_ort = array( "061" => 'Sac RG', #Riesa-Groenhain (Groenhain) "062" => 'Sac KM', #Kamenz "063" => 'Sac KM', #Kamenz - "064" => 'Sac LB', #L�au-Zittau (Lbau) + "064" => 'Sac LB', #Löbau-Zittau (Lbau) "065" => 'Sac MEI', #Meien-Radebeul (Radebeul) "066" => 'Sac NOK', #Niederschlesischer Oberlausitzkreis "067" => 'Sac PIR', #Schsische Schweiz (Pirna) @@ -277,7 +277,7 @@ $bos_ort = array( "081" => 'Sac L', #Leipzig "082" => 'Sac L-B', #Leipziger Land (Borna) "083" => 'Sac DZ', #Delitzsch - "084" => 'Sac DBL', #D�eln + "084" => 'Sac DBL', #Döbeln "085" => 'Sac EIL', #Delitzsch (Eilenburg) "086" => 'Sac GHA', #Leipziger Land (Geithain) "087" => 'Sac GRM', #Muldentalkreis (Grimma) @@ -301,20 +301,26 @@ $orgcolor["D"] = 'green'; // RD sonstige // // Datenbankserververbindung aufbauen und Datenbank auswhlen // -$dbconn = mysql_connect($dbhost, $dbuser, $dbpass) or die (mysql_error()); -$dbselect = mysql_select_db($dbname, $dbconn) or die (mysql_error()); +$dbconn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname) or die (mysqli_error($dbconn)); +//$dbselect = mysqli_select_db($dbname, $dbconn) or die (mysqli_error($dbconn)); // // Sessions starten // -//session_start(); +session_start(); + +if (!isset($_GET["nooutput"])) $_GET["nooutput"]=""; +if ($_GET["nooutput"] == 1) { + $_SESSION["name"]=""; + $_SESSION["admin"]=""; +} ///////////////// // Requires ///////////////// require_once('functions.inc.php'); -require_once('loginfunctions.inc.php'); -//if( $pmenable == '1' && $_GET["nooutput"] != '1' && $_SESSION["pmallow"] == '1' ) require_once('pmfunctions.inc.php'); +if ($_GET["nooutput"] != '1') require_once('loginfunctions.inc.php'); +if( $pmenable == '1' && $_GET["nooutput"] != '1' && $_SESSION["pmallow"] == '1' ) require_once('pmfunctions.inc.php'); //if( $uw_checktime > 0 ) require_once('uw_check.inc.php'); /////////////////// @@ -324,15 +330,15 @@ if( $_SESSION["name"] ) { $tn = date("YmdHis"); $_SESSION["last_seen"] = $tn; - mysql_query("UPDATE admin_users SET last_seen='$tn' WHERE id='$_SESSION[userid]'"); + mysqli_query($dbconn, "UPDATE admin_users SET last_seen='$tn' WHERE id='$_SESSION[userid]'"); } // Navigationsleiste $nav_menu = 'Home | '; -//$nav_menu .= 'Suche | '; +$nav_menu .= 'Suche | '; //$nav_menu .= 'Fahrzeuge | '; $nav_menu .= 'Profil | '; -//$nav_menu .= 'Stats | '; +$nav_menu .= 'Stats | '; //$nav_menu .= 'FORUM | '; $nav_menu .= 'PM | '; // Wenn User Adminrechte hat @@ -345,4 +351,11 @@ if( $_SERVER["SCRIPT_NAME"] == "/index.php" ) { } else { $body_html = ''; } -?> + +// PHP 7 compatibility +if (!isset($show_to_edit)) $show_to_edit=""; +if (!isset($page_middle)) $page_middle=""; +if (!isset($java_script)) $java_script=""; +if (!isset($nav_org_filter)) $nav_org_filter=""; +if (!isset($nav_filter)) $nav_filter=""; +if (!isset($show_all)) $show_all=""; \ No newline at end of file diff --git a/functions.inc.php b/functions.inc.php index 3c63c7f..6a8e1d1 100755 --- a/functions.inc.php +++ b/functions.inc.php @@ -20,7 +20,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -// Status prüfen, berichtigen, ersetzen +// Status pr�fen, berichtigen, ersetzen function repair_status($kennung, $zeit_neu, $status_alt, $zeit_alt) { global $korr_status_zeit, $status_kfz; @@ -140,7 +140,7 @@ function get_day($time) { // Filter Zeit errechnen function filter_zeit($filter) { $filter = date("YmdHis", mktime(date("G")-$filter,date("i"),date("s"), date("m"),date("d"),date("Y"))); - + //$filter = date("Y-m-d H:i:s", mktime(date("G")-$filter,date("i"),date("s"), date("m"),date("d"),date("Y"))); return $filter; } @@ -171,7 +171,16 @@ function get_hour($time) { } function ip2str($ip) { - $ip = preg_replace("/(\d{1,3})\.?/e", 'sprintf("%03d", \1)', $ip); + //$ip = preg_replace("/(\d{1,3})\.?/e", 'sprintf("%03d", \1)', $ip); + $ip = preg_replace_callback( + "/(\d{1,3})\.?/", + function($matches){ + foreach($matches as $match){ + return sprintf("%03d", $match); + } + }, + $ip + ); return (string)$ip; } @@ -326,8 +335,8 @@ function split_kfz($kfz) { } function count_total($tocount) { - $result = mysql_query("SELECT Count(*) as $tocount FROM $tocount"); - $result = mysql_fetch_array($result); + $result = mysqli_query($dbconn, "SELECT Count(*) as $tocount FROM $tocount"); + $result = mysqli_fetch_array($result); return $result[$tocount]; } @@ -397,7 +406,8 @@ function time_format($settime) { } function pass_erstellen ($wert) { - $i = 0; + if (!isset($pass)) $pass=""; + $i = 0; while($i < $wert) { mt_srand((double)microtime()*1000000); $zahl = mt_rand(1,20); @@ -508,7 +518,7 @@ function mail_pass($email,$pass) { $xtra .= "MIME-Version: 1.0\n"; $xtra .= "Content-Transfer-Encoding: 8bit\n"; $xtra .= "X-Mailer: PHP ". phpversion(); - mail("$email", "Monitor Loginanfrage", utf8_decode($body), $xtra); + mail("$email", "Monitor Loginanfrage", $body, $xtra); } function mail_alarm($datum,$zeit,$email,$org,$org_name,$bezeichnung,$text) { @@ -528,7 +538,7 @@ function mail_alarm($datum,$zeit,$email,$org,$org_name,$bezeichnung,$text) { $xtra .= "MIME-Version: 1.0\n"; $xtra .= "Content-Transfer-Encoding: 8bit\n"; $xtra .= "X-Mailer: PHP ". phpversion(); - mail("$email", "Monitor Alarm: $org ".mail_message_header($org_name), utf8_decode($body), $xtra); + mail("$email", "Monitor Alarm: $org ".mail_message_header($org_name), $body, $xtra); } function mail_alarm_sms($datum,$zeit,$email,$org,$org_name,$text) { @@ -540,7 +550,7 @@ function mail_alarm_sms($datum,$zeit,$email,$org,$org_name,$text) { $xtra .= "MIME-Version: 1.0\n"; $xtra .= "Content-Transfer-Encoding: 8bit\n"; $xtra .= "X-Mailer: PHP ". phpversion(); - mail("$email", "$org ".mail_message_header($org_name).": ".mail_message_body($text), utf8_decode($body), $xtra); + mail("$email", "$org ".mail_message_header($org_name).": ".mail_message_body($text), $body, $xtra); } $timestampnow = date("YmdHis"); diff --git a/get.php b/get.php index f9f9f4a..facc0c9 100755 --- a/get.php +++ b/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); +else { //if( $show_filter != 1 ) { + $show_filter = filter_zeit((isset($filter)) ? $filter : 1); $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,10 +81,10 @@ elseif( $show_filter != 1 ) // // Daten f¸r Formatierung holen und in array->session schreiben - if( !$_SESSION["formatierung"] && !$_GET["nooutput"] ) + if( (!isset($_SESSION["formatierung"]) || $_SESSION["formatierung"]=="") && (!isset($_GET["nooutput"]) || $_GET["nooutput"] == "") ) { - $result = mysql_query("SELECT id, bg_farbe, text_farbe, text_format, text_groesse, text_groesse_text FROM formatierung ORDER BY id ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $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"], @@ -101,18 +103,18 @@ elseif( $show_filter != 1 ) // // Auslesen pocsag // - $result = mysql_query("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, + $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 (mysql_error()); - while($row = mysql_fetch_array($result)) + 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 "
-----------"; + if( !isset($_GET["filter"]) || $_GET["filter"] == 1 || (isset($_GET["clean"]) && $_GET["clean"] == "yes") ) { if( $row["num"] > $_SESSION["lastupdate"] ) $_SESSION["lastupdate"] = $row["num"]; } @@ -120,14 +122,14 @@ 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"); //$nextday = ' - $show[$tageswechsel] .= ' + $show[$tageswechsel] = ' -  Tageswechsel: '.get_date_long($row["zeit"]).' +  Tageswechsel: ' . get_date_long($row["zeit"]) . ' '; } @@ -141,38 +143,58 @@ elseif( $show_filter != 1 ) if( $update_adresse_monrc && !$bezeichnung ) { // prfen ob die ric schon vorhanden ist, wenn nicht eintragen - $result_check = mysql_query("SELECT id FROM ric_zvei WHERE adresse=".$row["adresse_neu"]); - $row_check = mysql_fetch_array($result_check); + $result_check = mysqli_query($dbconn, "SELECT id FROM ric_zvei WHERE adresse=".$row["adresse_neu"]); + $row_check = mysqli_fetch_array($result_check); if( !$row_check["id"] ) { - $result_check = mysql_query("INSERT INTO ric_zvei (adresse, bezeichnung, rec_typ, formatierung_id) VALUES ('$row[adresse_neu]', '$row[bezeichnung_neu]', '$row[REC_TYP]', '0')") or die(mysql_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"]; } } // Wenn unbekannte Ric Wert setzen - if( !$bezeichnung && !$row["org_name"] ) $bezeichnung = 'Unbekannt'; + $isNew = false; + if( empty($row["org_name"]) ) { + $check_imp = mysqli_query($dbconn, "SELECT id, i_org, i_ort, i_zusatz FROM import_ric WHERE i_ric=".$row["adresse_neu"]); + $imp = mysqli_fetch_array($check_imp); + + if( !empty($imp["id"])) { + $bezeichnung = $row["adresse_neu"]; + $row["org_name"] = $imp["i_org"]." ".$imp["i_ort"]." ".$imp["i_zusatz"]; + $isNew = true; + } + else { + $bezeichnung = 'Unbekannt'; + } + } if( !$row["org_name"] ) $row["org_name"] = $row["adresse_neu"]; // Wenn ZVEI if( $row["REC_TYP"] == 'ZVEI' ) $row["funktion"] = $row["text"]; - $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_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"]; + if (isset($formatierung[$row["formatierung_id"]]["bg_farbe"])) $row["bg_farbe"] = $formatierung[$row["formatierung_id"]]["bg_farbe"]; + if (isset($formatierung[$row["formatierung_id"]]["text_farbe"])) $row["text_farbe"] = $formatierung[$row["formatierung_id"]]["text_farbe"]; + if (isset($formatierung[$row["formatierung_id"]]["text_farbe_text"])) $row["text_farbe_text"] = $formatierung[$row["formatierung_id"]]["text_farbe_text"]; + if (isset($formatierung[$row["formatierung_id"]]["bg_farbe_text"])) $row["bg_farbe_text"] = $formatierung[$row["formatierung_id"]]["bg_farbe_text"]; + if (isset($formatierung[$row["formatierung_id"]]["text_groesse"])) $row["text_groesse"] = $formatierung[$row["formatierung_id"]]["text_groesse"]; + if (isset($formatierung[$row["formatierung_id"]]["text_groesse_text"])) $row["text_groesse_text"] = $formatierung[$row["formatierung_id"]]["text_groesse_text"]; + if (isset($formatierung[$row["formatierung_id"]]["text_format"])) $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"]) && $isNew == false ) { + $row["bg_farbe"] = '#FFFFFF'; + } + elseif( !isset($row["bg_farbe"]) && $isNew == true ) { + $row["bg_farbe"] = '#E8C700'; + } + //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'; + if( !isset($row["text_format"]) ) $row["text_format"] = '1'; // pocsag in Array schreiben //$thisday = $nextday.' @@ -201,7 +223,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) ) { @@ -215,7 +237,7 @@ elseif( $show_filter != 1 ) /**************************/ // Datenbank schliessen // -mysql_close($dbconn); +mysqli_close($dbconn); // Ausgabe für Ajax echo " @@ -224,7 +246,7 @@ echo " //if ($new_unwetter == 1) echo ''; -if ( $show ) +if ( isset($show) ) { echo ''; foreach ( $show as $item ) diff --git a/get_other.php b/get_other.php index d4da974..66cee4b 100755 --- a/get_other.php +++ b/get_other.php @@ -2,15 +2,17 @@ require_once("config.inc.php"); // Check User online - $result = mysql_query("SELECT id, a_name, real_name FROM admin_users where last_seen > '$useronlinetime' ORDER BY a_name ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + if (!isset($show_online_users)) $show_online_users = ""; + $result = mysqli_query($dbconn, "SELECT id, a_name, real_name FROM admin_users where last_seen > '$useronlinetime' ORDER BY a_name ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { $show_online_users .= ''.$row["a_name"].','; } // Check Wetter - $result = mysql_query("SELECT u_meldung, u_text, u_farbe, DATE_FORMAT(u_lastcheck, '%Y%m%d%H%i%s') AS u_lastcheck, DATE_FORMAT(u_lastchange, '%Y%m%d%H%i%s') AS u_lastchange FROM unwetter WHERE id = '1'") or die (mysql_error()); - $row = mysql_fetch_array($result); +/* + $result = mysqli_query($dbconn, "SELECT u_meldung, u_text, u_farbe, DATE_FORMAT(u_lastcheck, '%Y%m%d%H%i%s') AS u_lastcheck, DATE_FORMAT(u_lastchange, '%Y%m%d%H%i%s') AS u_lastchange FROM unwetter WHERE id = '1'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( !empty($row["u_meldung"]) ) { @@ -19,17 +21,21 @@ require_once("config.inc.php"); $uw_text = $row["u_text"]; // Neu markieren wenn ungelesen - if( $_SESSION["last_seen"] <= $row["u_lastchange"] ) $_SESSION["uw_isnew"] = 'neu'; - + ( $_SESSION["last_seen"] <= $row["u_lastchange"] ) ? $_SESSION["uw_isnew"] = 'neu' : $_SESSION["uw_isnew"] = ""; + + if (!isset($unwetter_field)) $unwetter_field = ""; eval ("\$unwetter_field .= \"".gettemplate($template_dir."body_unwetter")."\";"); } +*/ // Check PM - $result = mysql_query("SELECT a.*, DATE_FORMAT(a.pm_date, '%Y%m%d%H%i%s') AS date, b.real_name + if (!isset($message_field)) $message_field = ""; + + $result = mysqli_query($dbconn, "SELECT a.*, DATE_FORMAT(a.pm_date, '%Y%m%d%H%i%s') AS date, b.real_name FROM messages a LEFT JOIN admin_users b ON b.id = a.userid_from - WHERE a.userid_to = '$_SESSION[userid]' ORDER BY pm_date ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + WHERE a.userid_to = '$_SESSION[userid]' ORDER BY pm_date ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { $msg_date = get_date_long($row["date"])." / ".get_time($row["date"]); $msg_text = nl2br($row["message"]); @@ -40,7 +46,7 @@ require_once("config.inc.php"); // Ausgabe echo ""; -if( $_SESSION["online_users"] != $show_online_users ) echo $show_online_users; +if( !isset($_SESSION["online_users"]) || $_SESSION["online_users"] != $show_online_users ) echo $show_online_users; echo "|"; if( !empty($uw_text) ) echo $unwetter_field."@".$uw_text; diff --git a/index.php b/index.php index f222181..4623be5 100755 --- a/index.php +++ b/index.php @@ -2,26 +2,26 @@ require_once("config.inc.php"); // Filter Datum/Zeit erstellen - if( !$_GET["filter"] && !$_SESSION["filter"] ) + if( !isset($_GET["filter"]) && !isset($_SESSION["filter"]) ) { $filter = 1; } - elseif( !$_GET["filter"] && $_SESSION["filter"] ) + elseif( !isset($_GET["filter"]) && isset($_SESSION["filter"]) ) { $filter = $_SESSION["filter"]; } - elseif( $_GET["filter"] ) + elseif( isset($_GET["filter"]) ) { $filter = $_GET["filter"]; $_SESSION["filter"] = $_GET["filter"]; } // Filter organisation - if( !$_GET["org_filter"] && !$_SESSION["org_filter"] ) + if( !isset($_GET["org_filter"]) && !isset($_SESSION["org_filter"]) ) { $org_filter = ''; } - elseif( !$_GET["org_filter"] && $_SESSION["org_filter"] ) + elseif( !isset($_GET["org_filter"]) && isset($_SESSION["org_filter"]) ) { if( $_SESSION["org_filter"] == 'AND (org = "BF" OR org = "FF")' ) { @@ -32,7 +32,7 @@ require_once("config.inc.php"); $org_filter = $_SESSION["org_filter"]; } } - elseif( $_GET["org_filter"] && $_GET["org_filter"] != 'all' ) + elseif( isset($_GET["org_filter"]) && $_GET["org_filter"] != 'all' ) { $org_filter = $_GET["org_filter"]; $_SESSION["org_filter"] = $_GET["org_filter"]; @@ -44,25 +44,28 @@ require_once("config.inc.php"); } // Filter Status anzeigen - if( $_GET["stat"] == '' && !$_SESSION["stat"] ) + if( (!isset($_GET["stat"]) || $_GET["stat"] == "") && (!isset($_SESSION["stat"]) || $_SESSION["stat"] == "") ) { - $stat = '0'; + $stat = '0'; } - elseif( $_GET["stat"] == '' && $_SESSION["stat"] ) + elseif( (isset($_GET["stat"]) && $_GET["stat"] == '') && isset($_SESSION["stat"]) ) { $stat = $_SESSION["stat"]; } - elseif( $_GET["stat"] != '' ) + elseif( isset($_GET["stat"]) && $_GET["stat"] != "" ) { $stat = $_GET["stat"]; $_SESSION["stat"] = $_GET["stat"]; } + else { + $stat = 0; + } // Wenn Aktualisierung ohne Ausgabe - if( $_GET["nooutput"] ) { $filter = 1; $stat = 1; } + if( isset($_GET["nooutput"]) && $_GET["nooutput"] == 1 ) { $filter = 1; $stat = 1; } $show_filter = filter_zeit($filter); - $show_filter = " WHERE a.zeit > '$show_filter' "; + $show_filter = " WHERE a.zeit > '$show_filter' "; $refresh = ' @@ -70,23 +73,24 @@ require_once("config.inc.php"); $nav_org_filter = ' - '; - - $nav_org_filter = ' -
'; + $kfz .= ''; + } + if( $i > 0 ) $kfz .= '
'.$row_kfz["bezeichnung"].'
'; + + if( $kfz ) + { + if( $row[org] == 'FF' ) $bgcolor = 'red'; + if( $row[org] == 'RD' ) $bgcolor = 'green'; + + $show_all .= ' + + '.$row["org_name"].' + '.$kfz.' + + + '; + } + + } + + // Seiteninhalt ausgeben + eval ("\$page_middle .= \"".gettemplate($template_dir."body_kfz_uebersicht")."\";"); + +/**************************/ +// Ausgabe Rahmen +// +eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");"); + +/**************************/ +// Datenbank schliessen +// +mysql_close($dbconn); +?> diff --git a/loginfunctions.inc.php b/loginfunctions.inc.php index a73883c..176b3e9 100755 --- a/loginfunctions.inc.php +++ b/loginfunctions.inc.php @@ -33,12 +33,12 @@ if ( (ip2str($ip_start) <= ip2str($_SERVER["REMOTE_ADDR"]) && ip2str($_SERVER["R $_SESSION["userid"] = $ip_users[$_SERVER["REMOTE_ADDR"]]; } $zack = $ip_users[$_SERVER["REMOTE_ADDR"]]; - $result = mysql_query("SELECT a_name, DATE_FORMAT(last_seen, '%Y%m%d%H%i%s') AS last_seen FROM admin_users WHERE id = '$zack'") or die (mysql_error()); - $row = mysql_fetch_array($result); + $result = mysqli_query($dbconn, "SELECT a_name, DATE_FORMAT(last_seen, '%Y%m%d%H%i%s') AS last_seen FROM admin_users WHERE id = '$zack'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); $_SESSION["name"] = $row["a_name"]; $_SESSION["last_seen"] = ($row["last_seen"] - 200 ); } -elseif ( $_GET["iam"] == "manuelw" ) +elseif ( isset($_GET["iam"]) && $_GET["iam"] == "manuelw" ) { //$_SESSION["userid"] = '1'; $_SESSION["admin"] = '1'; @@ -47,13 +47,13 @@ elseif ( $_GET["iam"] == "manuelw" ) $_SESSION["userid"] = 1; - $result = mysql_query("SELECT a_name, DATE_FORMAT(last_seen, '%Y%m%d%H%i%s') AS last_seen FROM admin_users WHERE id = '1'") or die (mysql_error()); - $row = mysql_fetch_array($result); + $result = mysqli_query($dbconn, "SELECT a_name, DATE_FORMAT(last_seen, '%Y%m%d%H%i%s') AS last_seen FROM admin_users WHERE id = '1'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); $_SESSION["name"] = $row["a_name"]; $_SESSION["last_seen"] = ($row["last_seen"] - 200 ); $filter=1; } -elseif( $wap == 1 ) +elseif( isset($wap) && $wap == 1 ) { //////////////////////// // Login per Wap @@ -111,12 +111,12 @@ elseif( $wap == 1 ) } elseif (!$_SESSION["name"] && $_GET["mode"] == 'login' && $_REQUEST["a_name"] && $_REQUEST["a_pass"]) { - $result = mysql_query("SELECT id, a_name, a_admin, a_mail, real_name, wap_show, wap_rows, wap_def_orgfilter, wap_def_statfilter, wap_handy, login_count FROM admin_users WHERE a_name = '$_REQUEST[a_name]' AND wap_pass = '$_REQUEST[a_pass]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + $result = mysqli_query($dbconn, "SELECT id, a_name, a_admin, a_mail, real_name, wap_show, wap_rows, wap_def_orgfilter, wap_def_statfilter, wap_handy, login_count FROM admin_users WHERE a_name = '$_REQUEST[a_name]' AND wap_pass = '$_REQUEST[a_pass]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( !$row["wap_handy"] ) { - $result = mysql_query("UPDATE admin_users SET wap_handy='$HTTP_USER_AGENT' WHERE a_name = '$_REQUEST[a_name]' AND wap_pass = '$_REQUEST[a_pass]'"); + $result = mysqli_query($dbconn, "UPDATE admin_users SET wap_handy='$HTTP_USER_AGENT' WHERE a_name = '$_REQUEST[a_name]' AND wap_pass = '$_REQUEST[a_pass]'"); } else { @@ -140,10 +140,10 @@ elseif( $wap == 1 ) $timenow = date("G:i"); $ip = $_SERVER["REMOTE_ADDR"]; $agent = $HTTP_USER_AGENT; - $result = mysql_query("INSERT INTO pocsag_logins (name, zeit, datum, ip, agent) VALUES ('$row[real_name]', '$timenow', '$datnow', '$ip', '$agent')"); + $result = mysqli_query($dbconn, "INSERT INTO pocsag_logins (name, zeit, datum, ip, agent) VALUES ('$row[real_name]', '$timenow', '$datnow', '$ip', '$agent')"); $row["login_count"]++; - $result = mysql_query("UPDATE admin_users SET login_count = '$row[login_count]' WHERE id = '$row[id]' ") or die(mysql_error()); + $result = mysqli_query($dbconn, "UPDATE admin_users SET login_count = '$row[login_count]' WHERE id = '$row[id]' ") or die(mysqli_error($dbconn)); } else { @@ -158,7 +158,7 @@ elseif( $wap == 1 ) - Login falsch!
zurück + Login falsch!
zurück '; exit; @@ -171,12 +171,13 @@ else //////////////////////// // Sicherheitsabfrage //////////////////////// - if ( !$_SESSION["name"] && $_GET["mode"] != 'login' && !$_GET["login"] ) + if (!isset($_GET["mode"])) $_GET["mode"] =""; + if ( !isset($_SESSION["name"]) && $_GET["mode"] != 'login' && !isset($_GET["login"]) ) { echo '

'.$login_infotext.'

- + @@ -205,12 +206,12 @@ else '; exit; } - elseif (!$_SESSION["name"] && $_GET["mode"] == 'login') + elseif (!isset($_SESSION["name"]) && $_GET["mode"] == 'login') { - $result = mysql_query("SELECT id, a_name, a_admin, a_mail FROM admin_users WHERE a_name = '$_POST[a_name]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + $result = mysqli_query($dbconn, "SELECT id, a_name, a_admin, a_mail FROM admin_users WHERE a_name = '$_POST[a_name]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); - if( $row[a_name] && $row["a_admin"] != '2' ) + if( $row["a_name"] && $row["a_admin"] != '2' ) { //$_SESSION["name"] = $_REQUEST["a_name"]; //$_SESSION["admin"] = $row["a_admin"]; @@ -219,9 +220,9 @@ else mail_pass($row["a_mail"], $pass); - $result = mysql_query("UPDATE admin_users SET login_pass='$pass' WHERE id='$row[id]'") or die(mysql_error()); + $result = mysqli_query($dbconn, "UPDATE admin_users SET login_pass='$pass' WHERE id='$row[id]'") or die(mysqli_error($dbconn)); - echo'



Eine EMail mit deinem Zugang wurde an '.$row[a_mail].' versand.'; + echo'



Eine EMail mit deinem Zugang wurde an '.$row["a_mail"].' versand.'; exit; } @@ -232,7 +233,7 @@ else } } - elseif (!$_SESSION["name"] && $_GET["mode"] == 'register') + elseif (!isset($_SESSION["name"]) && isset($_GET["mode"]) && $_GET["mode"] == 'register') { echo '

@@ -272,10 +273,10 @@ else exit; } - if( !empty($_GET["login"]) ) + if( isset($_GET["login"]) ) { - $result = mysql_query("SELECT id, a_name, a_admin, a_mail, real_name, login_count, pm_allow, DATE_FORMAT(last_seen, '%Y%m%d%H%i%s') AS last_seen FROM admin_users WHERE login_pass = '$_GET[login]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + $result = mysqli_query($dbconn, "SELECT id, a_name, a_admin, a_mail, real_name, login_count, pm_allow, DATE_FORMAT(last_seen, '%Y%m%d%H%i%s') AS last_seen FROM admin_users WHERE login_pass = '$_GET[login]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( !empty($row["a_name"]) ) { @@ -290,11 +291,11 @@ exit; $datnow = date("Y-m-d", mktime(0,0,0, date("m"),date("d"),date("Y"))); $timenow = date("G:i"); $ip = $_SERVER["REMOTE_ADDR"]; - $agent = $HTTP_USER_AGENT; - $result = mysql_query("INSERT INTO pocsag_logins (name, zeit, datum, ip, agent) VALUES ('$row[real_name]', '$timenow', '$datnow', '$ip', '$agent')"); + $agent = $_SERVER["HTTP_USER_AGENT"]; + $result = mysqli_query($dbconn, "INSERT INTO pocsag_logins (name, zeit, datum, ip, agent) VALUES ('$row[real_name]', '$timenow', '$datnow', '$ip', '$agent')"); $row["login_count"]++; - $result = mysql_query("UPDATE admin_users SET login_pass='', login_count='$row[login_count]' WHERE id='$row[id]'") or die(mysql_error()); + $result = mysqli_query($dbconn, "UPDATE admin_users SET login_pass='', login_count='$row[login_count]' WHERE id='$row[id]'") or die(mysqli_error($dbconn)); echo gohome("index.php"); } diff --git a/pmfunctions.inc.php b/pmfunctions.inc.php index 2ccfa38..d264431 100755 --- a/pmfunctions.inc.php +++ b/pmfunctions.inc.php @@ -22,34 +22,34 @@ require_once("config.inc.php"); -if( $_GET["pmdo"] == "reply" ) +if( isset($_GET["pmdo"]) && $_GET["pmdo"] == "reply" ) { - $result = mysql_query("SELECT real_name FROM admin_users WHERE id = '$_GET[to]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + $result = mysqli_query($dbconn, "SELECT real_name FROM admin_users WHERE id = '$_GET[to]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); eval ("\$message_field .= \"".gettemplate($template_dir."body_message_reply")."\";"); echo $message_field; } -elseif( $_GET["pmdo"] == "doreply" ) +elseif( isset($_GET["pmdo"]) && $_GET["pmdo"] == "doreply" ) { - $result = mysql_query("INSERT INTO messages (userid_from, userid_to, message) VALUES ('$_SESSION[userid]', '$_REQUEST[userid_to]', '$_REQUEST[msg_text]')"); - $result = mysql_query("DELETE FROM messages WHERE id = '$_REQUEST[msg_id]'")or die(mysql_error()); + $result = mysqli_query($dbconn, "INSERT INTO messages (userid_from, userid_to, message) VALUES ('$_SESSION[userid]', '$_REQUEST[userid_to]', '$_REQUEST[msg_text]')"); + $result = mysqli_query($dbconn, "DELETE FROM messages WHERE id = '$_REQUEST[msg_id]'")or die(mysqli_error($dbconn)); echo gohome($_SERVER["PHP_SELF"]); } -elseif( $_GET["pmdo"] == "write" ) +elseif( isset($_GET["pmdo"]) && $_GET["pmdo"] == "write" ) { $select_msg_to = ' '; - if( $_GET["msg_to"] && empty($can_pm) ) + if( (!isset($can_pm) || $can_pm!=1) && isset($_GET["msg_to"]) ) { // pm_allow ist auf 0 + if (!isset($message_field)) $message_field=""; $message_field .= "
Der User darf keine PM Empfangen/Senden


"; } else { //pm_allow ist auf 1 + if (!isset($message_field)) $message_field = ""; eval ("\$message_field .= \"".gettemplate($template_dir."body_message_write")."\";"); } echo $message_field; } -elseif( $_GET["pmdo"] == "dowrite" ) +elseif( isset($_GET["pmdo"]) && $_GET["pmdo"] == "dowrite" ) { if( $_REQUEST["userid_to"] != '0' ) { // an einen bestimmten User - $result = mysql_query("INSERT INTO messages (userid_from, userid_to, message) VALUES ('$_SESSION[userid]', '$_REQUEST[userid_to]', '$_REQUEST[msg_text]')"); + $result = mysqli_query($dbconn, "INSERT INTO messages (userid_from, userid_to, message) VALUES ('$_SESSION[userid]', '$_REQUEST[userid_to]', '$_REQUEST[msg_text]')"); } else { - // an alle User die PM dürfen - $result = mysql_query("SELECT id FROM admin_users WHERE pm_allow = '1'") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + // an alle User die PM d�rfen + $result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE pm_allow = '1'") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { - $result_msg = mysql_query("INSERT INTO messages (userid_from, userid_to, message) VALUES ('$_SESSION[userid]', '$row[id]', '$_REQUEST[msg_text]')"); + $result_msg = mysqli_query($dbconn, "INSERT INTO messages (userid_from, userid_to, message) VALUES ('$_SESSION[userid]', '$row[id]', '$_REQUEST[msg_text]')"); } } echo gohome($_SERVER["PHP_SELF"]); } -elseif( $_GET["pmdo"] == "deletepm" ) +elseif( isset($_GET["pmdo"]) && $_GET["pmdo"] == "deletepm" ) { - $result = mysql_query("DELETE FROM messages WHERE id = '$_GET[msg_id]'")or die(mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM messages WHERE id = '$_GET[msg_id]'")or die(mysqli_error($dbconn)); } ?> \ No newline at end of file diff --git a/profile.php b/profile.php index df436b9..9cdf7e2 100755 --- a/profile.php +++ b/profile.php @@ -30,17 +30,21 @@ $_SESSION["online_users"] = ""; // Seite zusammenstellen // +if (!isset($select_time_filter)) $select_time_filter=""; +if (!isset($i)) $i=0; +if (!isset($select_ric)) $select_ric=""; + // // Startseite -if( !$_GET["do"] ) +if( !isset($_GET["do"]) ) { - $result = mysql_query("SELECT a_alarmmail, a_alarmmail2sms, wap_pass, wap_show, wap_rows, wap_def_orgfilter, wap_def_statfilter FROM admin_users WHERE id = '$_SESSION[userid]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + $result = mysqli_query($dbconn, "SELECT a_alarmmail, a_alarmmail2sms, wap_pass, wap_show, wap_rows, wap_def_orgfilter, wap_def_statfilter FROM admin_users WHERE id = '$_SESSION[userid]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); $wap_pass = $row["wap_pass"]; - if( $row["a_alarmmail2sms"] == 1 ) $checked = 'checked'; + ( $row["a_alarmmail2sms"] == 1 ) ? $checked = 'checked' : $checked=""; $mailform_checkbox = ''; $mailform_mail = ''; @@ -86,8 +90,8 @@ if( !$_GET["do"] ) '; - $result = mysql_query("SELECT a.*, + $result = mysqli_query($dbconn, "SELECT a.*, b.adresse, b.formatierung_id, b.bezeichnung, b.rec_typ, c.bg_farbe, c.text_farbe, c.text_format, c.text_groesse, c.text_groesse_text, d.org_name, d.org @@ -106,8 +110,8 @@ if( !$_GET["do"] ) LEFT JOIN ric_zvei b ON b.adresse = a.adresse LEFT JOIN formatierung c ON c.id = b.formatierung_id LEFT JOIN organisation d ON d.id = b.org_id - WHERE a.userid = '$_SESSION[userid]' ORDER BY org ASC, org_name ASC, rec_typ ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + WHERE a.userid = '$_SESSION[userid]' ORDER BY org ASC, org_name ASC, rec_typ ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { // Zeitfunktion if( $row["time_from"] == '0' && $row["time_to"] == '0' ) @@ -121,6 +125,7 @@ if( !$_GET["do"] ) if( !empty($row["stiwo"]) ) { $stiwo = "Stiwo"; } else { $stiwo = ""; } + if (!isset($abos)) $abos=""; $abos .= '
@@ -131,11 +136,13 @@ if( !$_GET["do"] ) } // Seiteninhalt ausgeben + $page_middle=""; + if (!isset($abos)) $abos=""; eval ("\$page_middle .= \"".gettemplate($template_dir."body_profil_alarmmail")."\";"); } -// Ric zum Abo wählen +// Ric zum Abo w�hlen elseif( $_GET["do"] == 'abodet' ) { @@ -146,15 +153,15 @@ elseif( $_GET["do"] == 'abodet' ) '; } - $result = mysql_query("SELECT id, org_name, org FROM organisation WHERE id = '$_REQUEST[search_ric]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + $result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation WHERE id = '$_REQUEST[search_ric]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); $org_id = $row["id"]; $org = $row["org"]; $org_name = $row["org_name"]; - $result = mysql_query("SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE org_id = '$org_id'") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn, "SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE org_id = '$org_id'") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { $select_ric .= ''.$org.' '.$org_name.' '.$row["bezeichnung"].' - '.$row["rec_typ"].'
'; } @@ -170,13 +177,13 @@ elseif( $_GET["do"] == 'aboins' ) foreach( $_REQUEST["abo_ric"] AS $v ) { - // prüfen ob der User diese Ric bereits Abonniert hat - $result = mysql_query("SELECT id FROM alarm2mail WHERE userid = '$_SESSION[userid]' AND adresse = '$v'") or die (mysql_error()); - $row = mysql_fetch_array($result); + // pr�fen ob der User diese Ric bereits Abonniert hat + $result = mysqli_query($dbconn, "SELECT id FROM alarm2mail WHERE userid = '$_SESSION[userid]' AND adresse = '$v'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( empty($row["id"]) ) { - $result = mysql_query("INSERT INTO alarm2mail (adresse, userid, time_from, time_to, stiwo) VALUES ('$v', '$_SESSION[userid]', '$_REQUEST[alarm_time_filter_from]', '$_REQUEST[alarm_time_filter_to]', '$_REQUEST[alarm_stiwo]')") or die(mysql_error()); + $result = mysqli_query($dbconn, "INSERT INTO alarm2mail (adresse, userid, time_from, time_to, stiwo) VALUES ('$v', '$_SESSION[userid]', '$_REQUEST[alarm_time_filter_from]', '$_REQUEST[alarm_time_filter_to]', '$_REQUEST[alarm_stiwo]')") or die(mysqli_error($dbconn)); } } @@ -184,11 +191,11 @@ elseif( $_GET["do"] == 'aboins' ) } -// Abo löschen +// Abo l�schen elseif( $_GET["do"] == 'abodel' ) { - $result = mysql_query("DELETE FROM alarm2mail WHERE id = '$_GET[id]' AND userid = '$_SESSION[userid]'") or die(mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE id = '$_GET[id]' AND userid = '$_SESSION[userid]'") or die(mysqli_error($dbconn)); echo gohome($_SERVER["PHP_SELF"]); @@ -199,7 +206,7 @@ elseif( $_GET["do"] == 'setmailform' ) { if( $_REQUEST["mail2sms"] == 1 ) { $setto = 1; } else { $setto = 0; } - $result = mysql_query("UPDATE admin_users SET a_alarmmail2sms='$setto', a_alarmmail='$_REQUEST[alarmmail]' WHERE id = '$_SESSION[userid]'") or die(mysql_error()); + $result = mysqli_query($dbconn, "UPDATE admin_users SET a_alarmmail2sms='$setto', a_alarmmail='$_REQUEST[alarmmail]' WHERE id = '$_SESSION[userid]'") or die(mysqli_error($dbconn)); echo gohome($_SERVER["PHP_SELF"]); @@ -208,7 +215,7 @@ elseif( $_GET["do"] == 'setmailform' ) // Wap Einstellungen speichern elseif( $_GET["do"] == 'setwap' ) { - $result = mysql_query("UPDATE admin_users SET wap_show='$_REQUEST[wap_show]', wap_rows='$_REQUEST[wap_rows]', wap_pass='$_REQUEST[wap_pass]', wap_def_orgfilter='$_REQUEST[wap_orgfilter]', wap_def_statfilter='$_REQUEST[wap_statfilter]' WHERE id = '$_SESSION[userid]'") or die(mysql_error()); + $result = mysqli_query($dbconn, "UPDATE admin_users SET wap_show='$_REQUEST[wap_show]', wap_rows='$_REQUEST[wap_rows]', wap_pass='$_REQUEST[wap_pass]', wap_def_orgfilter='$_REQUEST[wap_orgfilter]', wap_def_statfilter='$_REQUEST[wap_statfilter]' WHERE id = '$_SESSION[userid]'") or die(mysqli_error($dbconn)); echo gohome($_SERVER["PHP_SELF"]); } @@ -216,10 +223,13 @@ elseif( $_GET["do"] == 'setwap' ) /**************************/ // Ausgabe Rahmen // +if( !isset($java_script)) $java_script=""; +if( !isset($nav_org_filter)) $nav_org_filter=""; +if( !isset($nav_filter)) $nav_filter=""; eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");"); /**************************/ // Datenbank schliessen // -mysql_close($dbconn); +mysqli_close($dbconn); ?> diff --git a/stats.php b/stats.php new file mode 100755 index 0000000..c7c66eb --- /dev/null +++ b/stats.php @@ -0,0 +1,126 @@ + + + + + '; + } + + $result = mysqli_query($dbconn, "SELECT org_name, alarm_count, DATE_FORMAT(last_alarm, '%Y%m%d%H%i%s') AS last_alarm FROM organisation WHERE org = 'RD' AND alarm_count != 0 ORDER BY alarm_count DESC, last_alarm DESC, org ASC, org_name ASC") or die (mysql_error()); + while($row = mysqli_fetch_array($result)) + { + if( !isset($row["org"])) $row["org"]=""; + $stats_rd .= ' + + + + + '; + } + + $result = mysqli_query($dbconn, "SELECT org_name, alarm_count, DATE_FORMAT(last_alarm, '%Y%m%d%H%i%s') AS last_alarm FROM organisation WHERE org = 'THW' AND alarm_count != 0 ORDER BY alarm_count DESC, last_alarm DESC, org ASC, org_name ASC") or die (mysql_error()); + while($row = mysqli_fetch_array($result)) + { + if( !isset($row["org"])) $row["org"]=""; + $stats_thw .= ' + + + + + '; + } + + $result = mysqli_query($dbconn, "SELECT org_name, alarm_count, DATE_FORMAT(last_alarm, '%Y%m%d%H%i%s') AS last_alarm FROM organisation WHERE org = 'KAT' AND alarm_count != 0 ORDER BY alarm_count DESC, last_alarm DESC, org ASC, org_name ASC") or die (mysql_error()); + while($row = mysqli_fetch_array($result)) + { + $stats_kat .= ' + + + + + '; + } + + // Seiteninhalt ausgeben + eval ("\$page_middle .= \"".gettemplate($template_dir."body_stats")."\";"); + +/**************************/ +// Ausgabe Rahmen +// +eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");"); + +/**************************/ +// Datenbank schliessen +// +mysqli_close($dbconn); +?> diff --git a/suche.php b/suche.php index 9cdda2e..943ef8c 100755 --- a/suche.php +++ b/suche.php @@ -22,6 +22,22 @@ require('config.inc.php'); +if (!isset($_REQUEST["search_what"])) $_REQUEST["search_what"]=""; +if (!isset($search_word)) $search_word=""; +if (!isset($search_word_org)) $search_word_org=""; +if (!isset($_REQUEST["search_org"])) $_REQUEST["search_org"]=""; +if (!isset($_REQUEST["search_ric"])) $_REQUEST["search_ric"]=""; +if (!isset($_REQUEST["search_max_results"])) $_REQUEST["search_max_results"]=""; +if (!isset($_REQUEST["search_time"])) $_REQUEST["search_time"]=""; +if (!isset($_REQUEST["search_time_from"])) $_REQUEST["search_time_from"]=""; +if (!isset($_REQUEST["search_time_to"])) $_REQUEST["search_time_to"]=""; +if (!isset($_REQUEST["Submit"])) $_REQUEST["Submit"]=""; +if (!isset($_REQUEST["select_tag_from"])) $_REQUEST["select_tag_from"]=""; +if (!isset($_REQUEST["select_monat_from"])) $_REQUEST["select_monat_from"]=""; +if (!isset($_REQUEST["select_tag_to"])) $_REQUEST["select_tag_to"]=""; +if (!isset($_REQUEST["select_monat_to"])) $_REQUEST["select_monat_to"]=""; +if (!isset($show)) $show=""; + /**************************/ // Seite zusammenstellen // @@ -44,8 +60,8 @@ require('config.inc.php'); $select_search_ric = ' '; diff --git a/idea.php b/idea.php new file mode 100644 index 0000000..18f4ba4 --- /dev/null +++ b/idea.php @@ -0,0 +1,10 @@ +", "", "", "", ""); + + foreach ($toRemove as $value) { + $output = str_replace($value, "", $input); + } + + return $output; +} \ No newline at end of file diff --git a/testmail.php b/testmail.php deleted file mode 100644 index 14fcf84..0000000 --- a/testmail.php +++ /dev/null @@ -1,13 +0,0 @@ -
 Login
  '.$row["org"].' '.$row["org_name"].' '.$row["bezeichnung"].' - '.$row["rec_typ"].' '.$stiwo.'    '.$row["org"].' '.$row["org_name"].' '.$row["alarm_count"].' '.get_date($row["last_alarm"]).'
 '.$row["org"].' '.$row["org_name"].' '.$row["alarm_count"].' '.get_date($row["last_alarm"]).'
 '.$row["org"].' '.$row["org_name"].' '.$row["alarm_count"].' '.get_date($row["last_alarm"]).'
 '.$row["org"].' '.$row["org_name"].' '.$row["alarm_count"].' '.get_date($row["last_alarm"]).'
- '.$row["text"].' + '.remove_idea_codes($row["text"]).'