From 63e29ff70a507f38f1c29e4f99d00ea85546b02b Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Sat, 4 Aug 2018 11:17:36 +0200 Subject: [PATCH 01/10] init configuration for local server --- config.inc.php | 25 ++++++++++++------------- index.php | 2 -- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/config.inc.php b/config.inc.php index 86ab7f5..02aeb02 100755 --- a/config.inc.php +++ b/config.inc.php @@ -87,10 +87,10 @@ $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; @@ -99,15 +99,15 @@ $update_adresse_monrc = 1; $ip_start = '192.168.2.2'; $ip_ende = '192.168.2.50'; -// UserID für IP +// UserID für IP $ip_users = array( - "192.168.2.36" => 2, + "192.168.2.81" => 1, "192.168.2.21" => 1, "192.168.2.38" => 1, ); // Alarmmails enable/disable -$amenable = 1; +$amenable = 0; // Pm Funktion $pmenable = 1; @@ -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) @@ -345,4 +345,3 @@ if( $_SERVER["SCRIPT_NAME"] == "/index.php" ) { } else { $body_html = ''; } -?> diff --git a/index.php b/index.php index f222181..dc0d37b 100755 --- a/index.php +++ b/index.php @@ -309,5 +309,3 @@ function doSQL(what, pk) { "; eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");"); - -?> \ No newline at end of file From 8495e849896d51dc2c1730a1118830c10e872b4d Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Sat, 4 Aug 2018 11:33:52 +0200 Subject: [PATCH 02/10] update for php7 --- admin.php | 148 ++++++++++++++++++++--------------------- alarmmail.inc.php | 16 ++--- autocheck.php | 28 ++++---- config.inc.php | 10 +-- functions.inc.php | 6 +- get.php | 18 ++--- get_other.php | 14 ++-- loginfunctions.inc.php | 34 +++++----- pmfunctions.inc.php | 26 ++++---- profile.php | 42 ++++++------ suche.php | 12 ++-- uw_check.inc.php | 16 ++--- 12 files changed, 185 insertions(+), 185 deletions(-) diff --git a/admin.php b/admin.php index 256f280..83e3c87 100755 --- a/admin.php +++ b/admin.php @@ -27,7 +27,7 @@ $_SESSION["load_complete"] = ""; $_SESSION["lastupdate"] = ""; $_SESSION["online_users"] = ""; -// Prüfen ob admin +// Pr�fen ob admin if( $_SESSION["admin"] != 1 ) exit; /**************************/ @@ -39,15 +39,15 @@ if( $_SESSION["admin"] != 1 ) exit; if( $_GET["show"] == 'dme' && !$_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("SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysqli_error()); + while($row = mysqli_fetch_array($result)) { $show_all .= ' '.$row["rec_typ"].'  '.$row["adresse"].' / '.$row["bezeichnung"].'  zuordnen  -  löschen  +  l�schen  '; } @@ -61,48 +61,48 @@ if( $_GET["show"] == 'dme' && !$_GET["do"] ) elseif( $_GET["show"] == 'dme' && $_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("SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysqli_error()); + while($row = mysqli_fetch_array($result)) { if( $_REQUEST["org"] == $row["id"] ) { $selected = 'selected'; } else { $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("SELECT id, beschreibung FROM formatierung ORDER BY beschreibung ASC") or die (mysqli_error()); + 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("SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysqli_error()); + $row = mysqli_fetch_array($result); // Seiteninhalt ausgeben eval ("\$page_middle .= \"".gettemplate($template_dir."body_admin_dme2org")."\";"); } // -// Wenn dme löschen +// Wenn dme l�schen elseif( $_GET["show"] == 'dme' && $_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("DELETE FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysqli_error()); + $result = mysqli_query("DELETE FROM alarm2mail WHERE adresse = '$_GET[adresse]'") or die (mysqli_error()); - // Prüfen ob noch weitere Einträge zur Org da sind, wenn nicht löschen + // 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("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()); + $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("DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error()); } } @@ -118,17 +118,17 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'delete' ) } // -// dme Update ausführen +// dme Update ausf�hren elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) { - // Schauen ob neue oder bestehende Organistaion gewählt wurde + // Schauen ob neue oder bestehende Organistaion gew�hlt wurde if( $_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("SELECT id FROM organisation WHERE org_name = '$_REQUEST[new_org]' AND org = '$_REQUEST[new_org_typ]'") or die (mysqli_error()); + $row = mysqli_fetch_array($result); if( $row["id"] ) { @@ -137,9 +137,9 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) if( !$org_id ) { - $result = mysql_query("INSERT INTO organisation (org_name, org) VALUES ('$_REQUEST[new_org]', '$_REQUEST[new_org_typ]')"); + $result = mysqli_query("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"); + $result = mysqli_query("SELECT MAX(id) as new_id FROM organisation"); $row = mysql_fetch_row($result); $org_id = $row[0]; } @@ -149,20 +149,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("UPDATE ric_zvei SET bezeichnung = '$_REQUEST[bezeichnung]', formatierung_id = '$_REQUEST[formatierung]', org_id = '$org_id' WHERE id='$_REQUEST[id]'") or die (mysqli_error()); - // Prüfen ob noch weitere Einträge zur Org da sind, wenn nicht löschen + // Pr�fen ob noch weitere Eintr�ge zur Org da sind, wenn nicht l�schen if( $_REQUEST["old_org"] ) { - $result = mysql_query("SELECT a.id AS dme_id, b.id AS kfz_id + $result = mysqli_query("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()); + $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("DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysqli_error()); } } @@ -174,14 +174,14 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) elseif( $_GET["show"] == 'kfz' && !$_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("SELECT id, bezeichnung FROM kfz_fms WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysqli_error()); + while($row = mysqli_fetch_array($result)) { $show_all .= '  '.$row["bezeichnung"].'  zuordnen  -  löschen  +  l�schen  '; } @@ -195,39 +195,39 @@ elseif( $_GET["show"] == 'kfz' && !$_GET["do"] ) elseif( $_GET["show"] == 'kfz' && $_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("SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysqli_error()); + 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("SELECT id, bezeichnung FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysqli_error()); + $row = mysqli_fetch_array($result); // Seiteninhalt ausgeben eval ("\$page_middle .= \"".gettemplate($template_dir."body_admin_kfz2org")."\";"); } // -// Wenn kfz löschen +// Wenn kfz l�schen elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'delete' ) { - $result = mysql_query("DELETE FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysql_error()); + $result = mysqli_query("DELETE FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysqli_error()); - // Prüfen ob noch weitere Einträge zur Org da sind, wenn nicht löschen + // 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("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()); + $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("DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error()); } } @@ -250,9 +250,9 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' ) if( $_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("INSERT INTO organisation (org_name, org) VALUES ('$organisation', '$_REQUEST[new_org_typ]')"); - $result = mysql_query("SELECT MAX(id) as new_id FROM organisation"); + $result = mysqli_query("SELECT MAX(id) as new_id FROM organisation"); $row = mysql_fetch_row($result); $organisation = $row[0]; } @@ -261,20 +261,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("UPDATE kfz_fms SET bezeichnung = '$_REQUEST[bezeichnung]', org_id = '$organisation' WHERE id='$_REQUEST[id]'") or die (mysqli_error()); - // Prüfen ob noch weitere Einträge zur Org da sind, wenn nicht löschen + // Pr�fen ob noch weitere Eintr�ge zur Org da sind, wenn nicht l�schen if( $_REQUEST["old_org"] ) { - $result = mysql_query("SELECT a.id AS dme_id, b.id AS kfz_id + $result = mysqli_query("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()); + $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("DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysqli_error()); } } @@ -286,8 +286,8 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' ) elseif( $_GET["show"] == 'user' && !$_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("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()); + while($row = mysqli_fetch_array($result)) { if( $row["a_admin"] == '0' ) $status = '(User) '; elseif( $row["a_admin"] == '1' ) $status = '(Admin) '; @@ -340,23 +340,23 @@ elseif( $_GET["show"] == 'user' && $_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("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("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 +// Wenn user l�schen elseif( $_GET["show"] == 'user' && $_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("DELETE FROM messages WHERE userid_to = '$_GET[id]'") or die (mysqli_error()); + $result = mysqli_query("DELETE FROM alarm2mail WHERE userid = '$_GET[id]'") or die (mysqli_error()); + $result = mysqli_query("DELETE FROM admin_users WHERE id = '$_GET[id]'") or die (mysqli_error()); echo gohome($_SERVER["PHP_SELF"].'?show=user'); } @@ -366,18 +366,18 @@ 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()); + $result = mysqli_query("SELECT id FROM ric_zvei WHERE org_id = '0'") or die (mysqli_error()); $num_dme = mysql_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()); + $result = mysqli_query("SELECT id FROM kfz_fms WHERE org_id = '0'") or die (mysqli_error()); $num_kfz = mysql_num_rows($result); // Wir schauen nach der Userzahl - $result = mysql_query("SELECT id FROM admin_users") or die (mysql_error()); + $result = mysqli_query("SELECT id FROM admin_users") or die (mysqli_error()); $num_user = mysql_num_rows($result); - $result = mysql_query("SELECT id FROM admin_users WHERE a_admin = '2'") or die (mysql_error()); + $result = mysqli_query("SELECT id FROM admin_users WHERE a_admin = '2'") or die (mysqli_error()); $num_new_user = mysql_num_rows($result); // Ausklappmenu erstellen @@ -385,8 +385,8 @@ else '; - // Ausgabe zusammenstellen wenn org zum bearbeiten gewählt + // Ausgabe zusammenstellen wenn org zum bearbeiten gew�hlt if( $_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("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()); + 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("SELECT id, kennung, bezeichnung, org_id FROM kfz_fms WHERE org_id = '$_REQUEST[search_org]' ORDER BY kennung ASC") or die (mysqli_error()); + while($row = mysqli_fetch_array($result)) { $show_ric .= ' '.$row["kennung"].' | '.$row["bezeichnung"].'
'; } @@ -434,5 +434,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..7afb833 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("UPDATE dme SET zeit='$row[zeit]', done='1' WHERE num='$row[num]'") or die (mysqli_error()); 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("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()); + 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 @@ -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("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("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("UPDATE organisation SET alarm_count='$alarmcount', last_alarm='$row[zeit]' WHERE id='$row[org_id]'") or die (mysqli_error()); } ?> \ No newline at end of file diff --git a/autocheck.php b/autocheck.php index e3c8bdd..8229a4f 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("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()); + 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("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("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()); $bezeichnung = $row["bezeichnung_neu"]; } } @@ -63,8 +63,8 @@ require('config.inc.php'); } // 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("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()); +$row = mysqli_fetch_array($result); if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) ) { @@ -93,7 +93,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 +110,25 @@ 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("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()); } // 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("UPDATE unwetter SET u_lastcheck='$timestampnow' WHERE id = '1'") or die(mysqli_error()); } 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("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()); } } -mysql_close($dbconn); +mysqli_close($dbconn); ?> diff --git a/config.inc.php b/config.inc.php index 02aeb02..3bcffbb 100755 --- a/config.inc.php +++ b/config.inc.php @@ -96,8 +96,8 @@ $template_dir = '_html/'; $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 $ip_users = array( @@ -301,8 +301,8 @@ $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) or die (mysqli_error()); +$dbselect = mysqli_select_db($dbname, $dbconn) or die (mysqli_error()); // // Sessions starten @@ -324,7 +324,7 @@ 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("UPDATE admin_users SET last_seen='$tn' WHERE id='$_SESSION[userid]'"); } // Navigationsleiste diff --git a/functions.inc.php b/functions.inc.php index 3c63c7f..73a781b 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; @@ -326,8 +326,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("SELECT Count(*) as $tocount FROM $tocount"); + $result = mysqli_fetch_array($result); return $result[$tocount]; } diff --git a/get.php b/get.php index f9f9f4a..fc8969c 100755 --- a/get.php +++ b/get.php @@ -81,8 +81,8 @@ elseif( $show_filter != 1 ) // Daten f¸r Formatierung holen und in array->session schreiben if( !$_SESSION["formatierung"] && !$_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("SELECT id, bg_farbe, text_farbe, text_format, text_groesse, text_groesse_text FROM formatierung ORDER BY id ASC") or die (mysqli_error()); + while($row = mysqli_fetch_array($result)) { $formatierung[$row["id"]] = array( "bg_farbe" => $row["bg_farbe"], @@ -101,15 +101,15 @@ 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("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()); + while($row = mysqli_fetch_array($result)) { if( !$_GET["filter"] || $_GET["filter"] == 1 || $_GET["clean"] == "yes" ) @@ -141,12 +141,12 @@ 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("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("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()); $bezeichnung = $row["bezeichnung_neu"]; } } @@ -215,7 +215,7 @@ elseif( $show_filter != 1 ) /**************************/ // Datenbank schliessen // -mysql_close($dbconn); +mysqli_close($dbconn); // Ausgabe für Ajax echo " diff --git a/get_other.php b/get_other.php index d4da974..7526acd 100755 --- a/get_other.php +++ b/get_other.php @@ -2,15 +2,15 @@ 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)) + $result = mysqli_query("SELECT id, a_name, real_name FROM admin_users where last_seen > '$useronlinetime' ORDER BY a_name ASC") or die (mysqli_error()); + 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("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()); + $row = mysqli_fetch_array($result); if( !empty($row["u_meldung"]) ) { @@ -25,11 +25,11 @@ require_once("config.inc.php"); } // Check PM - $result = mysql_query("SELECT a.*, DATE_FORMAT(a.pm_date, '%Y%m%d%H%i%s') AS date, b.real_name + $result = mysqli_query("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()); + while($row = mysqli_fetch_array($result)) { $msg_date = get_date_long($row["date"])." / ".get_time($row["date"]); $msg_text = nl2br($row["message"]); diff --git a/loginfunctions.inc.php b/loginfunctions.inc.php index a73883c..f1d4e70 100755 --- a/loginfunctions.inc.php +++ b/loginfunctions.inc.php @@ -33,8 +33,8 @@ 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("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()); + $row = mysqli_fetch_array($result); $_SESSION["name"] = $row["a_name"]; $_SESSION["last_seen"] = ($row["last_seen"] - 200 ); } @@ -47,8 +47,8 @@ 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("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()); + $row = mysqli_fetch_array($result); $_SESSION["name"] = $row["a_name"]; $_SESSION["last_seen"] = ($row["last_seen"] - 200 ); $filter=1; @@ -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("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()); + $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("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("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("UPDATE admin_users SET login_count = '$row[login_count]' WHERE id = '$row[id]' ") or die(mysqli_error()); } else { @@ -158,7 +158,7 @@ elseif( $wap == 1 ) - Login falsch!
zurück + Login falsch!
zurück '; exit; @@ -207,8 +207,8 @@ else } elseif (!$_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("SELECT id, a_name, a_admin, a_mail FROM admin_users WHERE a_name = '$_POST[a_name]'") or die (mysqli_error()); + $row = mysqli_fetch_array($result); if( $row[a_name] && $row["a_admin"] != '2' ) { @@ -219,7 +219,7 @@ 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("UPDATE admin_users SET login_pass='$pass' WHERE id='$row[id]'") or die(mysqli_error()); echo'



Eine EMail mit deinem Zugang wurde an '.$row[a_mail].' versand.'; @@ -274,8 +274,8 @@ exit; if( !empty($_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("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()); + $row = mysqli_fetch_array($result); if( !empty($row["a_name"]) ) { @@ -291,10 +291,10 @@ exit; $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("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("UPDATE admin_users SET login_pass='', login_count='$row[login_count]' WHERE id='$row[id]'") or die(mysqli_error()); echo gohome("index.php"); } diff --git a/pmfunctions.inc.php b/pmfunctions.inc.php index 2ccfa38..8c5b332 100755 --- a/pmfunctions.inc.php +++ b/pmfunctions.inc.php @@ -24,16 +24,16 @@ require_once("config.inc.php"); if( $_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("SELECT real_name FROM admin_users WHERE id = '$_GET[to]'") or die (mysqli_error()); + $row = mysqli_fetch_array($result); eval ("\$message_field .= \"".gettemplate($template_dir."body_message_reply")."\";"); echo $message_field; } elseif( $_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("INSERT INTO messages (userid_from, userid_to, message) VALUES ('$_SESSION[userid]', '$_REQUEST[userid_to]', '$_REQUEST[msg_text]')"); + $result = mysqli_query("DELETE FROM messages WHERE id = '$_REQUEST[msg_id]'")or die(mysqli_error()); echo gohome($_SERVER["PHP_SELF"]); } @@ -42,12 +42,12 @@ elseif( $_GET["pmdo"] == "write" ) { $select_msg_to = ' ' ; - $result = mysql_query("SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query("SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysqli_error()); + while($row = mysqli_fetch_array($result)) { $select_search_ric .= ' @@ -98,7 +98,7 @@ if( !$_GET["do"] ) '; - $result = mysql_query("SELECT a.*, + $result = mysqli_query("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 +106,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()); + while($row = mysqli_fetch_array($result)) { // Zeitfunktion if( $row["time_from"] == '0' && $row["time_to"] == '0' ) @@ -135,7 +135,7 @@ if( !$_GET["do"] ) } -// Ric zum Abo wählen +// Ric zum Abo w�hlen elseif( $_GET["do"] == 'abodet' ) { @@ -146,15 +146,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("SELECT id, org_name, org FROM organisation WHERE id = '$_REQUEST[search_ric]'") or die (mysqli_error()); + $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("SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE org_id = '$org_id'") or die (mysqli_error()); + while($row = mysqli_fetch_array($result)) { $select_ric .= ' '.$org.' '.$org_name.' '.$row["bezeichnung"].' - '.$row["rec_typ"].'
'; } @@ -170,13 +170,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("SELECT id FROM alarm2mail WHERE userid = '$_SESSION[userid]' AND adresse = '$v'") or die (mysqli_error()); + $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("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()); } } @@ -184,11 +184,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("DELETE FROM alarm2mail WHERE id = '$_GET[id]' AND userid = '$_SESSION[userid]'") or die(mysqli_error()); echo gohome($_SERVER["PHP_SELF"]); @@ -199,7 +199,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("UPDATE admin_users SET a_alarmmail2sms='$setto', a_alarmmail='$_REQUEST[alarmmail]' WHERE id = '$_SESSION[userid]'") or die(mysqli_error()); echo gohome($_SERVER["PHP_SELF"]); @@ -208,7 +208,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("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()); echo gohome($_SERVER["PHP_SELF"]); } @@ -221,5 +221,5 @@ eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");"); /**************************/ // Datenbank schliessen // -mysql_close($dbconn); +mysqli_close($dbconn); ?> diff --git a/suche.php b/suche.php index 9cdda2e..ad04ff0 100755 --- a/suche.php +++ b/suche.php @@ -44,8 +44,8 @@ require('config.inc.php'); $select_search_ric = ' '; - $result = mysqli_query("SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysqli_error()); + $result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysqli_error()); while($row = mysqli_fetch_array($result)) { if( $_REQUEST["search_org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; } @@ -411,7 +411,7 @@ else $show_ric .= '
--- KFZ/FMS ----------
'; - $result = mysqli_query("SELECT id, kennung, bezeichnung, org_id FROM kfz_fms WHERE org_id = '$_REQUEST[search_org]' ORDER BY kennung ASC") or die (mysqli_error()); + $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()); while($row = mysqli_fetch_array($result)) { $show_ric .= ' '.$row["kennung"].' | '.$row["bezeichnung"].'
'; diff --git a/alarmmail.inc.php b/alarmmail.inc.php index 7afb833..62e4198 100755 --- a/alarmmail.inc.php +++ b/alarmmail.inc.php @@ -21,12 +21,12 @@ */ // Done in Haupttabelle updaten -$result_check_ins = mysqli_query("UPDATE dme SET zeit='$row[zeit]', done='1' WHERE num='$row[num]'") or die (mysqli_error()); +$result_check_ins = mysqli_query($dbconn, "UPDATE dme SET zeit='$row[zeit]', done='1' WHERE num='$row[num]'") or die (mysqli_error()); if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' && $amenable == 1 ) { - $result_alarm_mail = mysqli_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(mysqli_error()); @@ -61,7 +61,7 @@ if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' && } // Mailcounter - $result_counter = mysqli_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 = mysqli_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 = mysqli_query("UPDATE organisation SET alarm_count='$alarmcount', last_alarm='$row[zeit]' WHERE id='$row[org_id]'") or die (mysqli_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()); } ?> \ No newline at end of file diff --git a/autocheck.php b/autocheck.php index 8229a4f..9ed8713 100755 --- a/autocheck.php +++ b/autocheck.php @@ -24,7 +24,7 @@ require('config.inc.php'); $show_filter = ' Where a.done = "0" '; - $result = mysqli_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 @@ -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 = mysqli_query("SELECT id FROM ric_zvei WHERE adresse=".$row["adresse_neu"]); + $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 = mysqli_query("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()); $bezeichnung = $row["bezeichnung_neu"]; } } @@ -63,7 +63,7 @@ require('config.inc.php'); } // Unwetter Check -$result = mysqli_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 (mysqli_error()); +$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()); $row = mysqli_fetch_array($result); if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) ) @@ -116,17 +116,17 @@ if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) ) // Wenn noch kein Eintrag in DB existiert if( empty($row["u_lastcheck"]) ) { - mysqli_query("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()); + 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()); } // Wenn bereits Eintrag vorhanden und Checktime erreicht if( $unwetter_meldung == $row["u_text"] ) { - mysqli_query("UPDATE unwetter SET u_lastcheck='$timestampnow' WHERE id = '1'") or die(mysqli_error()); + mysqli_query($dbconn, "UPDATE unwetter SET u_lastcheck='$timestampnow' WHERE id = '1'") or die(mysqli_error()); } else { - mysqli_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(mysqli_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()); } } diff --git a/config.inc.php b/config.inc.php index 3bcffbb..bc58748 100755 --- a/config.inc.php +++ b/config.inc.php @@ -101,9 +101,9 @@ $ip_ende = '192.168.1.250'; // UserID für IP $ip_users = array( - "192.168.2.81" => 1, - "192.168.2.21" => 1, - "192.168.2.38" => 1, + "192.168.1.81" => 1, + "192.168.1.21" => 1, + "192.168.1.38" => 1, ); // Alarmmails enable/disable @@ -301,8 +301,8 @@ $orgcolor["D"] = 'green'; // RD sonstige // // Datenbankserververbindung aufbauen und Datenbank auswhlen // -$dbconn = mysqli_connect($dbhost, $dbuser, $dbpass) or die (mysqli_error()); -$dbselect = mysqli_select_db($dbname, $dbconn) or die (mysqli_error()); +$dbconn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname) or die (mysqli_error()); +//$dbselect = mysqli_select_db($dbname, $dbconn) or die (mysqli_error()); // // Sessions starten @@ -324,7 +324,7 @@ if( $_SESSION["name"] ) { $tn = date("YmdHis"); $_SESSION["last_seen"] = $tn; - mysqli_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 diff --git a/functions.inc.php b/functions.inc.php index 73a781b..c93b796 100755 --- a/functions.inc.php +++ b/functions.inc.php @@ -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,7 +335,7 @@ function split_kfz($kfz) { } function count_total($tocount) { - $result = mysqli_query("SELECT Count(*) as $tocount FROM $tocount"); + $result = mysqli_query($dbconn, "SELECT Count(*) as $tocount FROM $tocount"); $result = mysqli_fetch_array($result); return $result[$tocount]; } diff --git a/get.php b/get.php index fc8969c..5aa85f8 100755 --- a/get.php +++ b/get.php @@ -81,7 +81,7 @@ elseif( $show_filter != 1 ) // Daten f¸r Formatierung holen und in array->session schreiben if( !$_SESSION["formatierung"] && !$_GET["nooutput"] ) { - $result = mysqli_query("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()); while($row = mysqli_fetch_array($result)) { $formatierung[$row["id"]] = array( @@ -101,7 +101,7 @@ elseif( $show_filter != 1 ) // // Auslesen pocsag // - $result = mysqli_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 @@ -141,12 +141,12 @@ elseif( $show_filter != 1 ) if( $update_adresse_monrc && !$bezeichnung ) { // prfen ob die ric schon vorhanden ist, wenn nicht eintragen - $result_check = mysqli_query("SELECT id FROM ric_zvei WHERE adresse=".$row["adresse_neu"]); + $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 = mysqli_query("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()); $bezeichnung = $row["bezeichnung_neu"]; } } diff --git a/get_other.php b/get_other.php index 7526acd..4a5f81d 100755 --- a/get_other.php +++ b/get_other.php @@ -2,14 +2,14 @@ require_once("config.inc.php"); // Check User online - $result = mysqli_query("SELECT id, a_name, real_name FROM admin_users where last_seen > '$useronlinetime' ORDER BY a_name ASC") or die (mysqli_error()); + $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()); while($row = mysqli_fetch_array($result)) { $show_online_users .= ''.$row["a_name"].','; } // Check Wetter - $result = mysqli_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 (mysqli_error()); + $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()); $row = mysqli_fetch_array($result); if( !empty($row["u_meldung"]) ) @@ -25,7 +25,7 @@ require_once("config.inc.php"); } // Check PM - $result = mysqli_query("SELECT a.*, DATE_FORMAT(a.pm_date, '%Y%m%d%H%i%s') AS date, b.real_name + $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 (mysqli_error()); diff --git a/loginfunctions.inc.php b/loginfunctions.inc.php index f1d4e70..52906d6 100755 --- a/loginfunctions.inc.php +++ b/loginfunctions.inc.php @@ -33,7 +33,7 @@ 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 = mysqli_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 (mysqli_error()); + $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()); $row = mysqli_fetch_array($result); $_SESSION["name"] = $row["a_name"]; $_SESSION["last_seen"] = ($row["last_seen"] - 200 ); @@ -47,7 +47,7 @@ elseif ( $_GET["iam"] == "manuelw" ) $_SESSION["userid"] = 1; - $result = mysqli_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 (mysqli_error()); + $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()); $row = mysqli_fetch_array($result); $_SESSION["name"] = $row["a_name"]; $_SESSION["last_seen"] = ($row["last_seen"] - 200 ); @@ -116,7 +116,7 @@ elseif( $wap == 1 ) if( !$row["wap_handy"] ) { - $result = mysqli_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 = mysqli_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 = mysqli_query("UPDATE admin_users SET login_count = '$row[login_count]' WHERE id = '$row[id]' ") or die(mysqli_error()); + $result = mysqli_query($dbconn, "UPDATE admin_users SET login_count = '$row[login_count]' WHERE id = '$row[id]' ") or die(mysqli_error()); } else { @@ -207,7 +207,7 @@ else } elseif (!$_SESSION["name"] && $_GET["mode"] == 'login') { - $result = mysqli_query("SELECT id, a_name, a_admin, a_mail FROM admin_users WHERE a_name = '$_POST[a_name]'") or die (mysqli_error()); + $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()); $row = mysqli_fetch_array($result); if( $row[a_name] && $row["a_admin"] != '2' ) @@ -219,7 +219,7 @@ else mail_pass($row["a_mail"], $pass); - $result = mysqli_query("UPDATE admin_users SET login_pass='$pass' WHERE id='$row[id]'") or die(mysqli_error()); + $result = mysqli_query($dbconn, "UPDATE admin_users SET login_pass='$pass' WHERE id='$row[id]'") or die(mysqli_error()); echo'



Eine EMail mit deinem Zugang wurde an '.$row[a_mail].' versand.'; @@ -274,7 +274,7 @@ exit; if( !empty($_GET["login"]) ) { - $result = mysqli_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 (mysqli_error()); + $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()); $row = mysqli_fetch_array($result); if( !empty($row["a_name"]) ) @@ -291,10 +291,10 @@ exit; $timenow = date("G:i"); $ip = $_SERVER["REMOTE_ADDR"]; $agent = $HTTP_USER_AGENT; - $result = mysqli_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 = mysqli_query("UPDATE admin_users SET login_pass='', login_count='$row[login_count]' WHERE id='$row[id]'") or die(mysqli_error()); + $result = mysqli_query($dbconn, "UPDATE admin_users SET login_pass='', login_count='$row[login_count]' WHERE id='$row[id]'") or die(mysqli_error()); echo gohome("index.php"); } diff --git a/pmfunctions.inc.php b/pmfunctions.inc.php index 8c5b332..3e5fb3c 100755 --- a/pmfunctions.inc.php +++ b/pmfunctions.inc.php @@ -24,7 +24,7 @@ require_once("config.inc.php"); if( $_GET["pmdo"] == "reply" ) { - $result = mysqli_query("SELECT real_name FROM admin_users WHERE id = '$_GET[to]'") or die (mysqli_error()); + $result = mysqli_query($dbconn, "SELECT real_name FROM admin_users WHERE id = '$_GET[to]'") or die (mysqli_error()); $row = mysqli_fetch_array($result); eval ("\$message_field .= \"".gettemplate($template_dir."body_message_reply")."\";"); @@ -32,8 +32,8 @@ if( $_GET["pmdo"] == "reply" ) } elseif( $_GET["pmdo"] == "doreply" ) { - $result = mysqli_query("INSERT INTO messages (userid_from, userid_to, message) VALUES ('$_SESSION[userid]', '$_REQUEST[userid_to]', '$_REQUEST[msg_text]')"); - $result = mysqli_query("DELETE FROM messages WHERE id = '$_REQUEST[msg_id]'")or die(mysqli_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()); echo gohome($_SERVER["PHP_SELF"]); } @@ -46,7 +46,7 @@ elseif( $_GET["pmdo"] == "write" ) '; - $result = mysqli_query("SELECT id, real_name FROM admin_users WHERE pm_allow = '1' ORDER BY real_name ASC") or die (mysqli_error()); + $result = mysqli_query($dbconn, "SELECT id, real_name FROM admin_users WHERE pm_allow = '1' ORDER BY real_name ASC") or die (mysqli_error()); while($row = mysqli_fetch_array($result)) { if( $_GET["msg_to"] == $row["id"] ) { $selected = 'selected'; $can_pm = '1'; } else { $selected = ''; } @@ -77,15 +77,15 @@ elseif( $_GET["pmdo"] == "dowrite" ) if( $_REQUEST["userid_to"] != '0' ) { // an einen bestimmten User - $result = mysqli_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 = mysqli_query("SELECT id FROM admin_users WHERE pm_allow = '1'") or die (mysqli_error()); + $result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE pm_allow = '1'") or die (mysqli_error()); while($row = mysqli_fetch_array($result)) { - $result_msg = mysqli_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]')"); } } @@ -94,6 +94,6 @@ elseif( $_GET["pmdo"] == "dowrite" ) elseif( $_GET["pmdo"] == "deletepm" ) { - $result = mysqli_query("DELETE FROM messages WHERE id = '$_GET[msg_id]'")or die(mysqli_error()); + $result = mysqli_query($dbconn, "DELETE FROM messages WHERE id = '$_GET[msg_id]'")or die(mysqli_error()); } ?> \ No newline at end of file diff --git a/profile.php b/profile.php index ce11033..d591496 100755 --- a/profile.php +++ b/profile.php @@ -35,7 +35,7 @@ $_SESSION["online_users"] = ""; if( !$_GET["do"] ) { - $result = mysqli_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 (mysqli_error()); + $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()); $row = mysqli_fetch_array($result); $wap_pass = $row["wap_pass"]; @@ -86,7 +86,7 @@ if( !$_GET["do"] ) '; - $result = mysqli_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 @@ -146,14 +146,14 @@ elseif( $_GET["do"] == 'abodet' ) '; } - $result = mysqli_query("SELECT id, org_name, org FROM organisation WHERE id = '$_REQUEST[search_ric]'") or die (mysqli_error()); + $result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation WHERE id = '$_REQUEST[search_ric]'") or die (mysqli_error()); $row = mysqli_fetch_array($result); $org_id = $row["id"]; $org = $row["org"]; $org_name = $row["org_name"]; - $result = mysqli_query("SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE org_id = '$org_id'") or die (mysqli_error()); + $result = mysqli_query($dbconn, "SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE org_id = '$org_id'") or die (mysqli_error()); while($row = mysqli_fetch_array($result)) { $select_ric .= ' '.$org.' '.$org_name.' '.$row["bezeichnung"].' - '.$row["rec_typ"].'
'; @@ -171,12 +171,12 @@ elseif( $_GET["do"] == 'aboins' ) foreach( $_REQUEST["abo_ric"] AS $v ) { // pr�fen ob der User diese Ric bereits Abonniert hat - $result = mysqli_query("SELECT id FROM alarm2mail WHERE userid = '$_SESSION[userid]' AND adresse = '$v'") or die (mysqli_error()); + $result = mysqli_query($dbconn, "SELECT id FROM alarm2mail WHERE userid = '$_SESSION[userid]' AND adresse = '$v'") or die (mysqli_error()); $row = mysqli_fetch_array($result); if( empty($row["id"]) ) { - $result = mysqli_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(mysqli_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()); } } @@ -188,7 +188,7 @@ elseif( $_GET["do"] == 'aboins' ) elseif( $_GET["do"] == 'abodel' ) { - $result = mysqli_query("DELETE FROM alarm2mail WHERE id = '$_GET[id]' AND userid = '$_SESSION[userid]'") or die(mysqli_error()); + $result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE id = '$_GET[id]' AND userid = '$_SESSION[userid]'") or die(mysqli_error()); echo gohome($_SERVER["PHP_SELF"]); @@ -199,7 +199,7 @@ elseif( $_GET["do"] == 'setmailform' ) { if( $_REQUEST["mail2sms"] == 1 ) { $setto = 1; } else { $setto = 0; } - $result = mysqli_query("UPDATE admin_users SET a_alarmmail2sms='$setto', a_alarmmail='$_REQUEST[alarmmail]' WHERE id = '$_SESSION[userid]'") or die(mysqli_error()); + $result = mysqli_query($dbconn, "UPDATE admin_users SET a_alarmmail2sms='$setto', a_alarmmail='$_REQUEST[alarmmail]' WHERE id = '$_SESSION[userid]'") or die(mysqli_error()); echo gohome($_SERVER["PHP_SELF"]); @@ -208,7 +208,7 @@ elseif( $_GET["do"] == 'setmailform' ) // Wap Einstellungen speichern elseif( $_GET["do"] == 'setwap' ) { - $result = mysqli_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(mysqli_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()); echo gohome($_SERVER["PHP_SELF"]); } diff --git a/suche.php b/suche.php index ad04ff0..8339461 100755 --- a/suche.php +++ b/suche.php @@ -44,7 +44,7 @@ require('config.inc.php'); $select_search_ric = ' 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/admin.php b/admin.php index 65bfc2d..df068b0 100755 --- a/admin.php +++ b/admin.php @@ -39,15 +39,15 @@ if( $_SESSION["admin"] != 1 ) exit; if( $_GET["show"] == 'dme' && !$_GET["do"] ) { // Alle DME ohne Organisation holen - $result = mysqli_query($dbconn, "SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysqli_error()); + $result = mysqli_query($dbconn, "SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysqli_error($dbconn)); while($row = mysqli_fetch_array($result)) { $show_all .= ' - - + + '; } @@ -61,7 +61,7 @@ if( $_GET["show"] == 'dme' && !$_GET["do"] ) elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' ) { // Zusammenstellung bekannter Organisationen - $result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysqli_error()); + $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 = ''; } @@ -69,7 +69,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' ) } // Zusammenstellung der Formatierungen - $result = mysqli_query($dbconn, "SELECT id, beschreibung FROM formatierung ORDER BY beschreibung ASC") or die (mysqli_error()); + $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 = ''; } @@ -77,7 +77,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' ) } // Abfrage des verlangten Datensatzes - $result = mysqli_query($dbconn, "SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysqli_error()); + $result = mysqli_query($dbconn, "SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn)); $row = mysqli_fetch_array($result); // Seiteninhalt ausgeben @@ -88,8 +88,8 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' ) // Wenn dme l�schen elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'delete' ) { - $result = mysqli_query($dbconn, "DELETE FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysqli_error()); - $result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE adresse = '$_GET[adresse]'") or die (mysqli_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"] ) @@ -97,12 +97,12 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'delete' ) $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 (mysqli_error()); + 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 = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error()); + $result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error($dbconn)); } } @@ -127,7 +127,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) /////////////////$organisation = $_REQUEST["new_org"]; // 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()); + $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"] ) @@ -149,7 +149,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) $org_id = $_REQUEST["select_org"]; } - $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()); + $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"] ) @@ -157,12 +157,12 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) $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 (mysqli_error()); + 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 = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysqli_error()); + $result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysqli_error($dbconn)); } } @@ -174,14 +174,14 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) elseif( $_GET["show"] == 'kfz' && !$_GET["do"] ) { // Alle DME ohne Organisation holen - $result = mysqli_query($dbconn, "SELECT id, bezeichnung FROM kfz_fms WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysqli_error()); + $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 .= ' - - + + '; } @@ -195,7 +195,7 @@ elseif( $_GET["show"] == 'kfz' && !$_GET["do"] ) elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'update' ) { // Zusammenstellung bekannter Organisationen - $result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysqli_error()); + $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 = ''; } @@ -203,7 +203,7 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'update' ) } // Abfrage des verlangten Datensatzes - $result = mysqli_query($dbconn, "SELECT id, bezeichnung FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysqli_error()); + $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 @@ -214,7 +214,7 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'update' ) // Wenn kfz l�schen elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'delete' ) { - $result = mysqli_query($dbconn, "DELETE FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysqli_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"] ) @@ -222,12 +222,12 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'delete' ) $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 (mysqli_error()); + 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 = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error()); + $result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error($dbconn)); } } @@ -261,7 +261,7 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' ) $organisation = $_REQUEST["select_org"]; } - $result = mysqli_query($dbconn, "UPDATE kfz_fms SET bezeichnung = '$_REQUEST[bezeichnung]', org_id = '$organisation' WHERE id='$_REQUEST[id]'") or die (mysqli_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"] ) @@ -269,12 +269,12 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' ) $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 (mysqli_error()); + 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 = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysqli_error()); + $result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysqli_error($dbconn)); } } @@ -286,7 +286,7 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' ) elseif( $_GET["show"] == 'user' && !$_GET["do"] ) { // Alle DME ohne Organisation holen - $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()); + $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) '; @@ -295,7 +295,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 +304,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] ) - + @@ -321,7 +321,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] ) - + @@ -354,9 +354,9 @@ elseif( $_GET["show"] == 'user' && $_GET["do"] == 'insert' ) // Wenn user l�schen elseif( $_GET["show"] == 'user' && $_GET["do"] == 'delete' ) { - $result = mysqli_query($dbconn, "DELETE FROM messages WHERE userid_to = '$_GET[id]'") or die (mysqli_error()); - $result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE userid = '$_GET[id]'") or die (mysqli_error()); - $result = mysqli_query($dbconn, "DELETE FROM admin_users WHERE id = '$_GET[id]'") or die (mysqli_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,18 +366,18 @@ elseif( $_GET["show"] == 'user' && $_GET["do"] == 'delete' ) else { // Wir schauen nach dme die keiner Org zugeordnet sind - $result = mysqli_query($dbconn, "SELECT id FROM ric_zvei WHERE org_id = '0'") or die (mysqli_error()); + $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 = mysqli_query($dbconn, "SELECT id FROM kfz_fms WHERE org_id = '0'") or die (mysqli_error()); + $result = mysqli_query($dbconn, "SELECT id FROM kfz_fms WHERE org_id = '0'") or die (mysqli_error($dbconn)); $num_kfz = mysql_num_rows($result); // Wir schauen nach der Userzahl - $result = mysqli_query($dbconn, "SELECT id FROM admin_users") or die (mysqli_error()); + $result = mysqli_query($dbconn, "SELECT id FROM admin_users") or die (mysqli_error($dbconn)); $num_user = mysql_num_rows($result); - $result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE a_admin = '2'") or die (mysqli_error()); + $result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE a_admin = '2'") or die (mysqli_error($dbconn)); $num_new_user = mysql_num_rows($result); // Ausklappmenu erstellen @@ -385,7 +385,7 @@ else
'.$row["rec_typ"].'  '.$row["adresse"].' / '.$row["bezeichnung"].' zuordnen  l�schen  zuordnen  l�schen 
 '.$row["bezeichnung"].' zuordnen  l�schen  zuordnen  l�schen 
 '.$status.$row["real_name"].'  '.$row["a_mail"].' '.$row["a_name"].'  '.$show_del_button.' 
EMail
'; foreach ( $show as $item ) diff --git a/get_other.php b/get_other.php index 4a5f81d..0d6c188 100755 --- a/get_other.php +++ b/get_other.php @@ -2,14 +2,15 @@ require_once("config.inc.php"); // Check User online - $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()); + 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 = 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()); + $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,8 +20,9 @@ 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")."\";"); } @@ -28,7 +30,7 @@ require_once("config.inc.php"); $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 (mysqli_error()); + 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"]); @@ -40,7 +42,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 dc0d37b..5155096 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,11 +44,11 @@ require_once("config.inc.php"); } // Filter Status anzeigen - if( $_GET["stat"] == '' && !$_SESSION["stat"] ) + if( !isset($_GET["stat"]) && !isset($_SESSION["stat"]) ) { $stat = '0'; } - elseif( $_GET["stat"] == '' && $_SESSION["stat"] ) + elseif( $_GET["stat"] == '' && isset($_SESSION["stat"]) ) { $stat = $_SESSION["stat"]; } @@ -59,7 +59,7 @@ require_once("config.inc.php"); } // Wenn Aktualisierung ohne Ausgabe - if( $_GET["nooutput"] ) { $filter = 1; $stat = 1; } + if( isset($_GET["nooutput"]) ) { $filter = 1; $stat = 1; } $show_filter = filter_zeit($filter); $show_filter = " WHERE a.zeit > '$show_filter' "; @@ -70,23 +70,25 @@ require_once("config.inc.php"); $nav_org_filter = ' - '; - $result = mysqli_query($dbconn, "SELECT id, real_name FROM admin_users WHERE pm_allow = '1' ORDER BY real_name ASC") or die (mysqli_error()); + $result = mysqli_query($dbconn, "SELECT id, real_name FROM admin_users WHERE pm_allow = '1' ORDER BY real_name ASC") or die (mysqli_error($dbconn)); while($row = mysqli_fetch_array($result)) { if( $_GET["msg_to"] == $row["id"] ) { $selected = 'selected'; $can_pm = '1'; } else { $selected = ''; } @@ -82,7 +82,7 @@ elseif( $_GET["pmdo"] == "dowrite" ) else { // an alle User die PM d�rfen - $result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE pm_allow = '1'") or die (mysqli_error()); + $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 = mysqli_query($dbconn, "INSERT INTO messages (userid_from, userid_to, message) VALUES ('$_SESSION[userid]', '$row[id]', '$_REQUEST[msg_text]')"); @@ -94,6 +94,6 @@ elseif( $_GET["pmdo"] == "dowrite" ) elseif( $_GET["pmdo"] == "deletepm" ) { - $result = mysqli_query($dbconn, "DELETE FROM messages WHERE id = '$_GET[msg_id]'")or die(mysqli_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 d591496..1802913 100755 --- a/profile.php +++ b/profile.php @@ -35,7 +35,7 @@ $_SESSION["online_users"] = ""; if( !$_GET["do"] ) { - $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()); + $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"]; @@ -86,7 +86,7 @@ if( !$_GET["do"] ) '.$org.' '.$org_name.' '.$row["bezeichnung"].' - '.$row["rec_typ"].'
'; @@ -171,12 +171,12 @@ elseif( $_GET["do"] == 'aboins' ) foreach( $_REQUEST["abo_ric"] AS $v ) { // 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()); + $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 = 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()); + $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)); } } @@ -188,7 +188,7 @@ elseif( $_GET["do"] == 'aboins' ) elseif( $_GET["do"] == 'abodel' ) { - $result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE id = '$_GET[id]' AND userid = '$_SESSION[userid]'") or die(mysqli_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 +199,7 @@ elseif( $_GET["do"] == 'setmailform' ) { if( $_REQUEST["mail2sms"] == 1 ) { $setto = 1; } else { $setto = 0; } - $result = mysqli_query($dbconn, "UPDATE admin_users SET a_alarmmail2sms='$setto', a_alarmmail='$_REQUEST[alarmmail]' WHERE id = '$_SESSION[userid]'") or die(mysqli_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 +208,7 @@ elseif( $_GET["do"] == 'setmailform' ) // Wap Einstellungen speichern elseif( $_GET["do"] == 'setwap' ) { - $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()); + $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"]); } diff --git a/suche.php b/suche.php index 8339461..965cfeb 100755 --- a/suche.php +++ b/suche.php @@ -44,7 +44,7 @@ require('config.inc.php'); $select_search_ric = ' - + '; } @@ -58,7 +58,7 @@ 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 = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysqli_error($dbconn)); @@ -86,7 +86,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' ) // // Wenn dme l�schen -elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'delete' ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && $_GET["do"] && $_GET["do"] == 'delete' ) { $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)); @@ -107,7 +107,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'delete' ) } // Wohin gehen nach Aktion - if( !$_GET["org"] ) + if( !isset($_GET["org"]) ) { echo gohome($_SERVER["PHP_SELF"].'?show=dme&org=0'); } @@ -119,10 +119,10 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'delete' ) // // dme Update ausf�hren -elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) +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"] ) + if( isset($_REQUEST["new_org"]) ) { /////////////////$organisation = $_REQUEST["new_org"]; @@ -140,7 +140,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) $result = mysqli_query($dbconn, "INSERT INTO organisation (org_name, org) VALUES ('$_REQUEST[new_org]', '$_REQUEST[new_org_typ]')"); $result = mysqli_query($dbconn, "SELECT MAX(id) as new_id FROM organisation"); - $row = mysql_fetch_row($result); + $row = mysqli_fetch_row($result); $org_id = $row[0]; } } @@ -152,7 +152,7 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) $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"] ) + if( isset($_REQUEST["old_org"]) ) { $result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id FROM ric_zvei a @@ -171,7 +171,7 @@ 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 = mysqli_query($dbconn, "SELECT id, bezeichnung FROM kfz_fms WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysqli_error($dbconn)); @@ -181,7 +181,7 @@ elseif( $_GET["show"] == 'kfz' && !$_GET["do"] ) - + '; } @@ -192,7 +192,7 @@ 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 = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysqli_error($dbconn)); @@ -212,12 +212,12 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'update' ) // // Wenn kfz l�schen -elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'delete' ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'kfz' && isset($_GET["do"]) && $_GET["do"] == 'delete' ) { $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"] ) + if( isset($_GET["org"]) ) { $result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id FROM ric_zvei a @@ -232,7 +232,7 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'delete' ) } // Wohin gehen nach Aktion - if( !$_GET["org"] ) + if( !isset($_GET["org"]) ) { echo gohome($_SERVER["PHP_SELF"].'?show=kfz&org=0'); } @@ -244,16 +244,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 = mysqli_query($dbconn, "INSERT INTO organisation (org_name, org) VALUES ('$organisation', '$_REQUEST[new_org_typ]')"); $result = mysqli_query($dbconn, "SELECT MAX(id) as new_id FROM organisation"); - $row = mysql_fetch_row($result); + $row = mysqli_fetch_row($result); $organisation = $row[0]; } else @@ -264,7 +264,7 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' ) $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"] ) + if( isset($_REQUEST["old_org"]) ) { $result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id FROM ric_zvei a @@ -283,7 +283,7 @@ 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 = 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)); @@ -321,7 +321,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] ) - + @@ -335,7 +335,7 @@ 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); @@ -352,7 +352,7 @@ elseif( $_GET["show"] == 'user' && $_GET["do"] == 'insert' ) // // Wenn user l�schen -elseif( $_GET["show"] == 'user' && $_GET["do"] == 'delete' ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'user' && isset($_GET["do"]) && $_GET["do"] == 'delete' ) { $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)); @@ -371,14 +371,14 @@ else // Wir schauen nach kfz die keiner Org zugeordnet sind $result = mysqli_query($dbconn, "SELECT id FROM kfz_fms WHERE org_id = '0'") or die (mysqli_error($dbconn)); - $num_kfz = mysql_num_rows($result); + $num_kfz = mysqli_num_rows($result); // Wir schauen nach der Userzahl $result = mysqli_query($dbconn, "SELECT id FROM admin_users") or die (mysqli_error($dbconn)); - $num_user = mysql_num_rows($result); + $num_user = mysqli_num_rows($result); $result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE a_admin = '2'") or die (mysqli_error($dbconn)); - $num_new_user = mysql_num_rows($result); + $num_new_user = mysqli_num_rows($result); // Ausklappmenu erstellen $select_search_org = ' @@ -388,7 +388,7 @@ else $result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysqli_error($dbconn)); while($row = mysqli_fetch_array($result)) { - if( $_REQUEST["search_org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; } + if( isset($_REQUEST["search_org"]) && $_REQUEST["search_org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; } $select_search_org .= ' '; @@ -399,7 +399,7 @@ else '; // Ausgabe zusammenstellen wenn org zum bearbeiten gew�hlt - if( $_REQUEST["search_org"] ) + if( isset($_REQUEST["search_org"]) ) { $show_ric = '--- RIC/ZVEI ----------
'; diff --git a/config.inc.php b/config.inc.php index 62e358e..4be2117 100755 --- a/config.inc.php +++ b/config.inc.php @@ -81,7 +81,7 @@ $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 @@ -96,18 +96,18 @@ $template_dir = '_html/'; $update_adresse_monrc = 1; // IP Bereich fr auto Login -$ip_start = '192.168.1.2'; +$ip_start = '192.168.1.82'; $ip_ende = '192.168.1.250'; // UserID für IP $ip_users = array( - "192.168.1.81" => 1, + "192.168.1.82" => 1, "192.168.1.21" => 1, "192.168.1.38" => 1, ); // Alarmmails enable/disable -$amenable = 0; +$amenable = 1; // Pm Funktion $pmenable = 1; @@ -345,3 +345,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 b2abedc..6a8e1d1 100755 --- a/functions.inc.php +++ b/functions.inc.php @@ -406,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); @@ -517,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) { @@ -537,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) { @@ -549,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 99536b0..fe46032 100755 --- a/get.php +++ b/get.php @@ -54,8 +54,8 @@ elseif( $show_filter == 1 && $_SESSION["lastupdate"] != "" && isset($_GET["clean $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' "; } @@ -160,13 +160,13 @@ elseif( $show_filter != 1 ) { // 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( !isset($row["bg_farbe"]) ) $row["bg_farbe"] = 'white'; @@ -175,6 +175,7 @@ elseif( $show_filter != 1 ) { 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.' diff --git a/loginfunctions.inc.php b/loginfunctions.inc.php index bffa15e..176b3e9 100755 --- a/loginfunctions.inc.php +++ b/loginfunctions.inc.php @@ -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.'

- +
'.$row["rec_typ"].'  '.$row["adresse"].' / '.$row["bezeichnung"].'  zuordnen  l�schen  löschen 
 '.$row["bezeichnung"].'  zuordnen  l�schen  löschen 
EMail
@@ -205,12 +206,12 @@ else '; exit; } - elseif (!$_SESSION["name"] && $_GET["mode"] == 'login') + elseif (!isset($_SESSION["name"]) && $_GET["mode"] == 'login') { $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"]; @@ -221,7 +222,7 @@ else $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,7 +273,7 @@ else exit; } - if( !empty($_GET["login"]) ) + if( isset($_GET["login"]) ) { $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); @@ -290,7 +291,7 @@ 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; + $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"]++; diff --git a/pmfunctions.inc.php b/pmfunctions.inc.php index 67623cb..dd2e98d 100755 --- a/pmfunctions.inc.php +++ b/pmfunctions.inc.php @@ -22,7 +22,7 @@ require_once("config.inc.php"); -if( $_GET["pmdo"] == "reply" ) +if( isset($_GET["pmdo"]) && $_GET["pmdo"] == "reply" ) { $result = mysqli_query($dbconn, "SELECT real_name FROM admin_users WHERE id = '$_GET[to]'") or die (mysqli_error($dbconn)); $row = mysqli_fetch_array($result); @@ -30,7 +30,7 @@ if( $_GET["pmdo"] == "reply" ) echo $message_field; } -elseif( $_GET["pmdo"] == "doreply" ) +elseif( isset($_GET["pmdo"]) && $_GET["pmdo"] == "doreply" ) { $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)); @@ -38,18 +38,18 @@ elseif( $_GET["pmdo"] == "doreply" ) 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($_GET["pmdo"]) && empty($can_pm) ) { // 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' ) { @@ -92,7 +94,7 @@ elseif( $_GET["pmdo"] == "dowrite" ) echo gohome($_SERVER["PHP_SELF"]); } -elseif( $_GET["pmdo"] == "deletepm" ) +elseif( isset($_GET["pmdo"]) && $_GET["pmdo"] == "deletepm" ) { $result = mysqli_query($dbconn, "DELETE FROM messages WHERE id = '$_GET[msg_id]'")or die(mysqli_error($dbconn)); } diff --git a/profile.php b/profile.php index 1802913..abdc986 100755 --- a/profile.php +++ b/profile.php @@ -32,7 +32,7 @@ $_SESSION["online_users"] = ""; // // Startseite -if( !$_GET["do"] ) +if( !isset($_GET["do"]) ) { $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)); @@ -121,6 +121,7 @@ if( !$_GET["do"] ) if( !empty($row["stiwo"]) ) { $stiwo = "Stiwo"; } else { $stiwo = ""; } + if (!isset($abos)) $abos=""; $abos .= '
@@ -131,6 +132,8 @@ if( !$_GET["do"] ) } // Seiteninhalt ausgeben + $page_middle=""; + if (!isset($abos)) $abos=""; eval ("\$page_middle .= \"".gettemplate($template_dir."body_profil_alarmmail")."\";"); } @@ -216,6 +219,9 @@ 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")."\");"); /**************************/ From a8f497f3c2085dce620cb7e321922993960d257e Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Sat, 4 Aug 2018 19:22:23 +0200 Subject: [PATCH 06/10] corrected autoupdate functions --- _html/rahmen.html | 4 +- alarmmail.inc.php | 2 +- autocheck.php | 4 +- config.inc.php | 20 +++-- get.php | 8 +- index.php | 24 ++--- index.php.bak | 211 -------------------------------------------- pmfunctions.inc.php | 2 +- profile.php | 2 +- uw_check.inc.php | 2 +- 10 files changed, 40 insertions(+), 239 deletions(-) delete mode 100755 index.php.bak diff --git a/_html/rahmen.html b/_html/rahmen.html index 9697d47..01d27c3 100755 --- a/_html/rahmen.html +++ b/_html/rahmen.html @@ -67,7 +67,7 @@ $body_html - + diff --git a/alarmmail.inc.php b/alarmmail.inc.php index a6823b1..eb39e2c 100755 --- a/alarmmail.inc.php +++ b/alarmmail.inc.php @@ -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 { diff --git a/autocheck.php b/autocheck.php index cc6665a..abd0111 100755 --- a/autocheck.php +++ b/autocheck.php @@ -61,7 +61,8 @@ require('config.inc.php'); if( !$row["org_name"] ) $row["org_name"] = $row["adresse_neu"]; } - + +/* // Unwetter Check $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); @@ -129,6 +130,7 @@ if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) ) 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)); } } +*/ mysqli_close($dbconn); ?> diff --git a/config.inc.php b/config.inc.php index 4be2117..a71bcc2 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. @@ -96,13 +96,13 @@ $template_dir = '_html/'; $update_adresse_monrc = 1; // IP Bereich fr auto Login -$ip_start = '192.168.1.82'; +$ip_start = '192.168.1.2'; $ip_ende = '192.168.1.250'; // UserID für IP $ip_users = array( - "192.168.1.82" => 1, - "192.168.1.21" => 1, + "192.168.1.81" => 1, + "192.168.1.80" => 1, "192.168.1.38" => 1, ); @@ -309,12 +309,18 @@ $dbconn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname) or die (mysqli_erro // 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'); /////////////////// @@ -329,7 +335,7 @@ if( $_SESSION["name"] ) // Navigationsleiste $nav_menu = 'Home | '; -//$nav_menu .= 'Suche | '; +$nav_menu .= 'Suche | '; //$nav_menu .= 'Fahrzeuge | '; $nav_menu .= 'Profil | '; //$nav_menu .= 'Stats | '; diff --git a/get.php b/get.php index fe46032..9fb1976 100755 --- a/get.php +++ b/get.php @@ -41,7 +41,7 @@ require('config.inc.php'); } if (!isset($_SESSION["lastupdate"])) $_SESSION["lastupdate"]; -if (!isset($show_filter)) $show_filter; +if (!isset($show_filter)) $show_filter=""; if( $show_filter == 1 && $_SESSION["lastupdate"] == "" && !isset($_GET["clean"]) ) { $show_filter = filter_zeit(1); @@ -55,7 +55,7 @@ elseif( $show_filter == 1 && $_SESSION["lastupdate"] != "" && isset($_GET["clean $show_filter = " WHERE a.zeit > '$show_filter' "; } else { //if( $show_filter != 1 ) { - $show_filter = filter_zeit((isset($filter) ? $filter : 1)); + $show_filter = filter_zeit((isset($filter)) ? $filter : 1); $show_filter = " WHERE a.zeit > '$show_filter' "; } @@ -81,7 +81,7 @@ else { //if( $show_filter != 1 ) { // // Daten f¸r Formatierung holen und in array->session schreiben - if( !isset($_SESSION["formatierung"]) && !isset($_GET["nooutput"]) ) + if( (!isset($_SESSION["formatierung"]) || $_SESSION["formatierung"]=="") && (!isset($_GET["nooutput"]) || $_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)) @@ -129,7 +129,7 @@ else { //if( $show_filter != 1 ) { //$nextday = ' $show[$tageswechsel] .= ' - + '; } diff --git a/index.php b/index.php index 5155096..4623be5 100755 --- a/index.php +++ b/index.php @@ -44,25 +44,28 @@ require_once("config.inc.php"); } // Filter Status anzeigen - if( !isset($_GET["stat"]) && !isset($_SESSION["stat"]) ) + if( (!isset($_GET["stat"]) || $_GET["stat"] == "") && (!isset($_SESSION["stat"]) || $_SESSION["stat"] == "") ) { - $stat = '0'; + $stat = '0'; } - elseif( $_GET["stat"] == '' && isset($_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( isset($_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,9 +73,9 @@ require_once("config.inc.php"); $nav_org_filter = ' '; - if( isset($_GET["pmdo"]) && 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=""; diff --git a/profile.php b/profile.php index abdc986..f167689 100755 --- a/profile.php +++ b/profile.php @@ -40,7 +40,7 @@ if( !isset($_GET["do"]) ) $wap_pass = $row["wap_pass"]; - if( $row["a_alarmmail2sms"] == 1 ) $checked = 'checked'; + ( $row["a_alarmmail2sms"] == 1 ) ? $checked = 'checked' : $checked=""; $mailform_checkbox = ''; $mailform_mail = ''; diff --git a/uw_check.inc.php b/uw_check.inc.php index 71038a5..334640c 100755 --- a/uw_check.inc.php +++ b/uw_check.inc.php @@ -26,7 +26,7 @@ $row = mysqli_fetch_array($result); if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) && $_GET["nooutput"] == 1 ) { // if( $lines = file('http://www.dwd.de/de/WundK/Warnungen/zeige.php?ID='.$uw_landkreis.'#O') ) - if( $lines = file('http://www.dwd.de/dyn/app/ws/html/reports/'.$uw_landkreis.'_warning_de.html') ) + if( $lines = file('https://www.dwd.de/DE/wetter/warnungen/warnWetter_node.html?ort=Leipzig') ) { // Durchgehen des Arrays und Anzeigen des HTML Source inkl. Zeilennummern if( is_array($lines) ) From 93e7945857835a177152082f57f5d5991fbbd0f7 Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Sat, 4 Aug 2018 19:35:01 +0200 Subject: [PATCH 07/10] =?UTF-8?q?Suche=20f=C3=BCr=20PHP=207=20repariert,?= =?UTF-8?q?=20noch=20nicht=20getestet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- suche.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/suche.php b/suche.php index 965cfeb..f3fb3cb 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 // @@ -131,7 +147,7 @@ require('config.inc.php'); } else{ - $show_filter = 'WHERE d.id = "'.$_REQUEST[search_ric].'"'; + $show_filter = 'WHERE d.id = "'.$_REQUEST["search_ric"].'"'; } if( $_REQUEST["search_org"] != '0' ) From 68b942112d6cca8ae31c2bd787723a1ef9bb8f26 Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Sat, 4 Aug 2018 20:08:17 +0200 Subject: [PATCH 08/10] remove piwik --- _html/rahmen.html | 14 -------------- admin.php | 14 +++++++------- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/_html/rahmen.html b/_html/rahmen.html index 01d27c3..08bf282 100755 --- a/_html/rahmen.html +++ b/_html/rahmen.html @@ -115,20 +115,6 @@ $body_html - - - - -
 Login
  '.$row["org"].' '.$row["org_name"].' '.$row["bezeichnung"].' - '.$row["rec_typ"].' '.$stiwo.'  
 Tageswechsel: '.get_date_long($row["zeit"]).' Tageswechsel: '.get_date_long($row["zeit"]).'
 
diff --git a/admin.php b/admin.php index a5eb5fa..68a3523 100755 --- a/admin.php +++ b/admin.php @@ -92,7 +92,7 @@ elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && $_GET["do"] && $_GET[" $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"] ) + if( $_GET["org"] != "" ) { $result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id FROM ric_zvei a @@ -122,7 +122,7 @@ elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && $_GET["do"] && $_GET[" elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && isset($_GET["do"]) && $_GET["do"] == 'setupdate' ) { // Schauen ob neue oder bestehende Organistaion gew�hlt wurde - if( isset($_REQUEST["new_org"]) ) + if( isset($_REQUEST["new_org"]) && $_REQUEST["new_org"] != "" ) { /////////////////$organisation = $_REQUEST["new_org"]; @@ -135,7 +135,7 @@ elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && isset($_GET["do"]) && $org_id = $row["id"]; } - if( !$org_id ) + if( !isset($org_id) ) { $result = mysqli_query($dbconn, "INSERT INTO organisation (org_name, org) VALUES ('$_REQUEST[new_org]', '$_REQUEST[new_org_typ]')"); @@ -156,13 +156,13 @@ elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && isset($_GET["do"]) && { $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 (mysqli_error($dbconn)); + 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 = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysqli_error($dbconn)); + $result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$org_id'") or die (mysqli_error($dbconn)); } } @@ -403,7 +403,7 @@ else { $show_ric = '--- RIC/ZVEI ----------
'; - $result = mysqli_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 (mysqli_error($dbconn)); + $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"].'
'; From 3353d00f88c45d81f0bdfd752402ab121f2487df Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Sun, 5 Aug 2018 08:18:02 +0200 Subject: [PATCH 09/10] Fehler bereinigt --- Landkreise-Unwetter.txt | 398 ++++++++++++++++++++++++ _html/body_profil_alarmmail_select.html | 2 +- admin.php | 6 + config.inc.php | 4 +- get_other.php | 2 + kfz.php | 121 +++++++ profile.php | 4 + stats.php | 126 ++++++++ 8 files changed, 660 insertions(+), 3 deletions(-) create mode 100755 Landkreise-Unwetter.txt create mode 100755 kfz.php create mode 100755 stats.php diff --git a/Landkreise-Unwetter.txt b/Landkreise-Unwetter.txt new file mode 100755 index 0000000..5b3f0ed --- /dev/null +++ b/Landkreise-Unwetter.txt @@ -0,0 +1,398 @@ +Baden-Wuerttemberg | AA | Aalen/Ostalbkreis - AA +Baden-Wuerttemberg | BAD | Baden-Baden - BAD +Baden-Wuerttemberg | BB | Boeblingen - BB +Baden-Wuerttemberg | BC | Biberach/Riss - BC +Baden-Wuerttemberg | BL | Zollernalbkreis - BL +Baden-Wuerttemberg | CW | Calw - CW +Baden-Wuerttemberg | EM | Emmendingen - EM +Baden-Wuerttemberg | ES | Esslingen - ES +Baden-Wuerttemberg | FDS | Freudenstadt - FDS +Baden-Wuerttemberg | FN | Friedrichshafen/Bodenseekreis - FN +Baden-Wuerttemberg | FR | Freiburg-im-Breisgau/Hochschwarzwald - FR +Baden-Wuerttemberg | GP | Goeppingen - GP +Baden-Wuerttemberg | HD | Heidelberg/Rhein-Neckar-Kreis - HD +Baden-Wuerttemberg | HDH | Heidenheim - HDH +Baden-Wuerttemberg | HN | Heilbronn - HN +Baden-Wuerttemberg | KA | Karlsruhe - KA +Baden-Wuerttemberg | KN | Konstanz - KN +Baden-Wuerttemberg | KUN | Kuenzelsau/Hohenlohe-Kreis - KUN +Baden-Wuerttemberg | LB | Ludwigsburg - LB +Baden-Wuerttemberg | LOE | Loerrach - LOE +Baden-Wuerttemberg | MA | Mannheim - MA +Baden-Wuerttemberg | MOS | Mosbach - MOS +Baden-Wuerttemberg | OG | Offenburg/Ortenaukreis - OG +Baden-Wuerttemberg | PF | Pforzheim - PF +Baden-Wuerttemberg | RA | Rastatt - RA +Baden-Wuerttemberg | RT | Reutlingen - RT +Baden-Wuerttemberg | RW | Rottweil - RW +Baden-Wuerttemberg | RV | Ravensburg - RV +Baden-Wuerttemberg | S | Stuttgart - S +Baden-Wuerttemberg | SHA | Schwaebisch-Hall - SHA +Baden-Wuerttemberg | SIG | Sigmaringen - SIG +Baden-Wuerttemberg | TBB | Tauberbischofsheim/Main-Tauber-Kreis - TBB +Baden-Wuerttemberg | TUE | Tuebingen - TUE +Baden-Wuerttemberg | TUT | Tuttlingen - TUT +Baden-Wuerttemberg | UL | Ulm/Alb-Donau-Kreis - UL +Baden-Wuerttemberg | VS | Villingen-Schwenningen/Schwarzwald-Baar-Kreis - VS +Baden-Wuerttemberg | WN | Waiblingen/Rems-Marr-Kreis - WN +Baden-Wuerttemberg | WT | Waldshut-Tiengen - WT +Bayern | A | Augsburg - A +Bayern | AB | Aschaffenburg - AB +Bayern | AIC | Aichach-Friedberg - AIC +Bayern | AN | Ansbach - AN +Bayern | AS | Amberg-Sulzbach - AS +Bayern | AM | Amberg - AM +Bayern | AO | Altoetting - AO +Bayern | BA | Bamberg - BA +Bayern | BGL | Berchtesgadener Land - BGL +Bayern | BT | Bayreuth - BT +Bayern | CHA | Cham - CHA +Bayern | CO | Coburg - CO +Bayern | DAH | Dachau - DAH +Bayern | DEG | Deggendorf - DEG +Bayern | DGF | Dingolfing/Landau - DGF +Bayern | DLG | Dillingen a.d.D. - DLG +Bayern | DON | Donau-Ries - DON +Bayern | EBE | Ebersberg - EBE +Bayern | ED | Erding - ED +Bayern | EI | Eichstaett - EI +Bayern | ER | Erlangen - ER +Bayern | ERH | Erlangen-Hoechstadt - ERH +Bayern | FFB | Fuerstenfeldbruck - FFB +Bayern | FO | Forchheim - FO +Bayern | FRG | Freyung/Grafenau - FRG +Bayern | FS | Freising - FS +Bayern | FUE | Fuerth/Bay. - FUE +Bayern | GAP | Garmisch-Partenkirchen - GAP +Bayern | GZ | Guenzburg - GZ +Bayern | HAS | Hassfurt - HAS +Bayern | HO | Hof - HO +Bayern | IN | Ingolstadt - IN +Bayern | KC | Kronach - KC +Bayern | KE | Kempten - KE +Bayern | KEH | Kelheim - KEH +Bayern | KF | Kaufberen - KF +Bayern | KG | Bad Kissingen - KG +Bayern | KT | Kitzingen - KT +Bayern | KU | Kulmbach - KU +Bayern | LA | Landshut - LA +Bayern | LAU | Lauf - LAU +Bayern | LI | Lindau - LI +Bayern | LL | Landsberg/Lech - LL +Bayern | LIF | Lichtenfels - LIF +Bayern | MB | Miesbach - MB +Bayern | MIL | Miltenberg - MIL +Bayern | MN | Unterallgaeu/Mindelheim - MN +Bayern | MM | Memmingen - MM +Bayern | MSP | Main-Spessart - MSP +Bayern | M | Muenchen - M +Bayern | MUE | Muehldorf/Inn - MUE +Bayern | N | Nuernberg - N +Bayern | ND | Neuburg/Schrobenhausen - ND +Bayern | NEA | Neustadt/Aisch - NEA +Bayern | NES | Neustadt/Saale - NES +Bayern | NEW | Neustadt/Waldnab - NEW +Bayern | NM | Neumarkt - NM +Bayern | NU | Neu-Ulm - NU +Bayern | OA | Oberallgaeu - OA +Bayern | OAL | Ostallgaeu - OAL +Bayern | PA | Passau - PA +Bayern | PAF | Pfaffenhofen - PAF +Bayern | PAN | Rottal-Inn - PAN +Bayern | R | Regensburg - R +Bayern | REG | Regen - REG +Bayern | RH | Roth - RH +Bayern | RO | Rosenheim - RO +Bayern | SAD | Schwandorf - SAD +Bayern | SC | Schwabach - SC +Bayern | SR | Straubing/Bogen - SR +Bayern | STA | Starnberg - STA +Bayern | SW | Schweinfurt - SW +Bayern | TIR | Tirschenreuth - TIR +Bayern | TOL | Bad Toelz - TOL +Bayern | TS | Traunstein - TS +Bayern | WEN | Wendelstein - WEN +Bayern | WM | Weilheim/Schongau - WM +Bayern | WUE | Wuerzburg - WUE +Bayern | WUG | Weissenburg - WUG +Bayern | WUN | Wunsiedel - WUN +Berlin | B | Berlin - B +Brandenburg | BAR | Barnim - BAR +Brandenburg | BRB | Brandenburg - BRB +Brandenburg | CB | Cottbus - CB +Brandenburg | EE | Elbe-Elster - EE +Brandenburg | FF | Frankfurt/Oder - FF +Brandenburg | HVL | Havelland - HVL +Brandenburg | LDS | Dahme-Spreewald - LDS +Brandenburg | LOS | Oder-Spree - LOS +Brandenburg | MOL | Maerkisch-Oderland - MOL +Brandenburg | OHV | Oberhavel - OHV +Brandenburg | OPR | Ostprignitz-Ruppin - OPR +Brandenburg | OSL | Oberspreewald-Lausitz - OSL +Brandenburg | P | Potsdam - P +Brandenburg | PM | Potsdam-Mittelmark - PM +Brandenburg | PR | Prignitz - PR +Brandenburg | SPN | Spress-Neisse - SPN +Brandenburg | TF | Taltow-Flaeming - TF +Brandenburg | UM | Uckermark - UM +Bremen | HB | Hansestadt_Bremen - HB +Hamburg | HH | Hansestadt_Hamburg - HH +Hessen | DA | Darmstadt-Dieburg - DA +Hessen | ERB | Erbach/Odenwaldkreis - ERB +Hessen | ESW | Eschwege/Werra-Meissner-Kreis - ESW +Hessen | F | Frankfurt/M - F +Hessen | FB | Friedberg/Wetteraukreis - FB +Hessen | FD | Fulda - FD +Hessen | GG | Grossgerau - GG +Hessen | GI | Giessen - GI +Hessen | HEF | Bad-Hersfeld-Rotenburg - HEF +Hessen | HG | Bad-Homburg_v_d_H/Hochtaunuskreis - HG +Hessen | HP | Heppenheim - HP +Hessen | HU | Hanau/Main-Kinzig-Kreis - HU +Hessen | HR | Homburg/Efze/Schwalm-Eder-Kreis - HR +Hessen | KB | Korbach - KB +Hessen | KS | Kassel - KA +Hessen | LDK | Wetzlar/Lahn-Dill-Kreis - LDK +Hessen | LM | Limburg-Weilburg - LM +Hessen | MR | Marburg-Biedenkopf - MR +Hessen | MTK | Main-Taunus-Kreis - MTK +Hessen | OF | Offenbach - OF +Hessen | RUD | Ruedesheim/Rheingau-Taunus-Kreis - RUD +Hessen | VB | Lauterbach/Vogelsbergkreis - VB +Hessen | WI | Wiesbaden - WI +Mecklenburg-Vorpommern | DBR | Bad_Doberau - DBR +Mecklenburg-Vorpommern | DM | Demmin - DM +Mecklenburg-Vorpommern | GUE | Guestrow - GUE +Mecklenburg-Vorpommern | HRO | Hansestadt_Rostock - GUE +Mecklenburg-Vorpommern | HST | Hansestadt_Stralsund - HST +Mecklenburg-Vorpommern | HWG | Hansestadt Greifswald - HGW +Mecklenburg-Vorpommern | LWL | Ludwigslust - LWL +Mecklenburg-Vorpommern | MUR | Mueritz - DM +Mecklenburg-Vorpommern | MST | Meckelnburg-Strelitz - MST +Mecklenburg-Vorpommern | NB | Neubrandenburg - NB +Mecklenburg-Vorpommern | NVP | Nordvorpommern - NVP +Mecklenburg-Vorpommern | NWM | Nordwestmecklenburg - NWM +Mecklenburg-Vorpommern | OVP | Ostvorpommern - OVP +Mecklenburg-Vorpommern | PCH | Parchim - PCH +Mecklenburg-Vorpommern | RUG | Ruegen - RUG +Mecklenburg-Vorpommern | SN | Schwerin - SN +Mecklenburg-Vorpommern | UER | Uecker-Randow - UER +Niedersachsen | AUR | Aurich - AUR +Niedersachsen | BRA | Brake/Wesermarsch - BRA +Niedersachsen | BS | Braunscshweig - BS +Niedersachsen | CEL | Celle - CE +Niedersachsen | CLP | Cloppenburg - CLP +Niedersachsen | CU | Cuxhafen - CUX +Niedersachsen | DAN | Luechow-Dannenberg - DAN +Niedersachsen | DEL | Delmenhorst - DEL +Niedersachsen | DH | Diepholz - DH +Niedersachsen | EL | Emsland - EL +Niedersachsen | EMD | Emden - EMD +Niedersachsen | FRI | Friesland - FRI +Niedersachsen | GIF | Gifhorn - GF +Niedersachsen | GOE | Goettingen - GOE +Niedersachsen | GS | Goslar - GS +Niedersachsen | HE | Helmstedt - HE +Niedersachsen | HM | Hameln/Pyrmont - HM +Niedersachsen | HOL | Holzminden - HOL +Niedersachsen | LER | Leer/Ostfriesland - LER +Niedersachsen | LG | Luenburg - LG +Niedersachsen | NI | Nienburg - NI +Niedersachsen | NOH | Nordhorn/Grafschaft_Bentheim - NOH +Niedersachsen | NOM | Northeim - NOM +Niedersachsen | OHA | Osterrode/Harz - OHA +Niedersachsen | OL | Oldenburg - OL +Niedersachsen | OS | Osnabrueck - OS +Niedersachsen | PE | Peine - PE +Niedersachsen | ROW | Rotenburg/Wuemme - ROW +Niedersachsen | SFA | Soltau-Fallingbostel - SFA +Niedersachsen | SHG | Schaumburg/Stadthagen - SHG +Niedersachsen | STD | Stade - STD +Niedersachsen | SZ | Salzgitter - SZ +Niedersachsen | UEL | Uelzen - UE +Niedersachsen | WF | Wolfenbuettel - WF +Niedersachsen | WHV | Wilhelmshaven - WHV +Niedersachsen | WL | Winsen/Luhe-Harburg - WL +Niedersachsen | WOB | Wolfsburg - WOB +Niedersachsen | WST | Westerstede/Ammerland - WST +Niedersachsen | WTM | Wittmund - WTM +Nordrhein-Westfalen | AC | Aaachen - AC +Nordrhein-Westfalen | BN | Bonn - BN +Nordrhein-Westfalen | BI | Bielefeld - BI +Nordrhein-Westfalen | BO | Bochum - BO +Nordrhein-Westfalen | BOR | Borken - BOR +Nordrhein-Westfalen | BOT | Bottrop - BOT +Nordrhein-Westfalen | COE | Coesfeld - COE +Nordrhein-Westfalen | D | Duesseldorf - D +Nordrhein-Westfalen | DU | Duisburg - DU +Nordrhein-Westfalen | E | Essen - E +Nordrhein-Westfalen | EN | Ennepe-Ruhr-Kreis - EN +Nordrhein-Westfalen | EUS | Euskirchen - EUS +Nordrhein-Westfalen | GE | Gelsenkirchen - GE +Nordrhein-Westfalen | GL | Rheinisch-Bergischer-Kreis/Bergisch_Gladbach - GL +Nordrhein-Westfalen | GM | Gummersbach/Oberbergischer_Kreis - GM +Nordrhein-Westfalen | GT | Guetersloh - GT +Nordrhein-Westfalen | HA | Hagen - HA +Nordrhein-Westfalen | HAM | Hamm - HAM +Nordrhein-Westfalen | HER | Herne - HER +Nordrhein-Westfalen | HF | Herford - HF +Nordrhein-Westfalen | HS | Heinsberg - HS +Nordrhein-Westfalen | HSK | Hochsauerlandkreis/Meschede - HSK +Nordrhein-Westfalen | HX | Hoexter - HX +Nordrhein-Westfalen | K | Koeln - K +Nordrhein-Westfalen | KLE | Kleve - KLE +Nordrhein-Westfalen | KR | Krefeld - KR +Nordrhein-Westfalen | LEV | Leverkusen - LEV +Nordrhein-Westfalen | LIP | Lippe - LIP +Nordrhein-Westfalen | ME | Mettmann - ME +Nordrhein-Westfalen | MG | Moenchengladbach - MG +Nordrhein-Westfalen | MH | Muehlheim/Ruhr - MH +Nordrhein-Westfalen | MI | Minden-Luebbecke - MI +Nordrhein-Westfalen | MK | Maerkischer_Kreis/Luedenscheid - MK +Nordrhein-Westfalen | MS | Muensyer - MS +Nordrhein-Westfalen | NE | Neuss - NE +Nordrhein-Westfalen | OB | Oberhausen - OB +Nordrhein-Westfalen | OE | Ople - OE +Nordrhein-Westfalen | PB | Paderborn - PB +Nordrhein-Westfalen | RE | Recklinghausen - RE +Nordrhein-Westfalen | SI | Siegen/Wittgenstein - SI +Nordrhein-Westfalen | SO | Soest - SO +Nordrhein-Westfalen | ST | Steinfurt - ST +Nordrhein-Westfalen | SU | Siegburg/Rhein-Sieg-Kreis - SU +Nordrhein-Westfalen | UN | Unna - UN +Nordrhein-Westfalen | VIE | Viersen - VIE +Nordrhein-Westfalen | WAF | Warendorf - WAF +Nordrhein-Westfalen | WES | Wesel - WES +Nordseegebiete | DBN | Deutsche Bucht - DBN +Nordseegebiete | DGN | Dogger - DGN +Nordseegebiete | FIN | Fischer - FIN +Nordseegebiete | FON | Forties - FON +Nordseegebiete | SKN | Skagerrak - SKN +Nordseegebiete | SNN | Suedwestliche Nordsee - SNN +Nordseegebiete | UTN | Utsira - UTN +Nordseegebiete | VIN | Viking - VIN +Ostseegebiete | KAO | Kattegat - KAO +Ostseegebiete | SKO | Skagerrak - SKO +Rheinland-Pfalz | AK | Altenkirchen/Westerwald - AK +Rheinland-Pfalz | AW | Bad_Neuenahr/Ahrweiler - AW +Rheinland-Pfalz | AZ | Alzey/Worms - AZ +Rheinland-Pfalz | BIR | Birkenfeld/Idar_Oberstein - BIR +Rheinland-Pfalz | COC | Cochem-Zell - COC +Rheinland-Pfalz | DAU | Daun - DAU +Rheinland-Pfalz | DUW | Bad_Duerkheim - DUW +Rheinland-Pfalz | EMS | Bad_Ems/Rhein-Lahn-Kreis - EMS +Rheinland-Pfalz | FT | Frankenthal - FT +Rheinland-Pfalz | GER | Germersheim - GER +Rheinland-Pfalz | KIB | Kirchheimbolanden/Donnersbergkreis - KIB +Rheinland-Pfalz | KH | Bad_Kreuznach - KH +Rheinland-Pfalz | KL | Kaiserslautern - KL +Rheinland-Pfalz | KO | Koblenz - KO +Rheinland-Pfalz | KUS | Kusel - KUS +Rheinland-Pfalz | LD | Landau - LD +Rheinland-Pfalz | LU | Ludwigshafen - LU +Rheinland-Pfalz | MYK | Mayen/Koblenz - MYK +Rheinland-Pfalz | MZ | Mainz-Bingen - MZ +Rheinland-Pfalz | NR | Neuwied/Rhein - NR +Rheinland-Pfalz | NW | Neustadt/Weinstrasse - NW +Rheinland-Pfalz | PS | Pirmasens/Suedwestpflanz - PS +Rheinland-Pfalz | SIM | Simmern/Rhein-Hunsrueck-Kreis - SIM +Rheinland-Pfalz | SP | Speyer - SP +Rheinland-Pfalz | TR | Trier-Saarburg - TR +Rheinland-Pfalz | WO | Worms - WO +Rheinland-Pfalz | WW | Westerwaldkreis - WW +Saarland | HOM | Homburg/Saar-Pflaz-Kreis - HOM +Saarland | MZG | Merzig-Wadern - MZG +Saarland | NK | Neunkirchen/Saarland - NK +Saarland | SB | Saarbruecken - SB +Saarland | SLS | Saarlouis - SLS +Saarland | WND | St_Wedel - WND +Sachsen | ANA | Annaberg-Buchholz - ANA +Sachsen | ASZ | Aue-Schwarzenberg - ASZ +Sachsen | BZ | Bautzen - BZ +Sachsen | C | Chmenitz - C +Sachsen | DD | Dresden - DD +Sachsen | DL | Doebeln - DL +Sachsen | DW | Dippoldiswalde/Weisseritzkreis - DW +Sachsen | DZ | Delitzsch - DZ +Sachsen | FG | Freiburg/Sachsen - FG +Sachsen | GC | Chemnitzer_Land/Glauchau - GC +Sachsen | GR | Goerlitz - GR +Sachsen | HY | Hoyerswerda - HY +Sachsen | KM | Kamenz - KM +Sachsen | L | Leipzig - L +Sachsen | MEI | Meissen - MEI +Sachsen | MEK | Mittlerer_Erzgebirgskreis - MEK +Sachsen | MTL | Muldentalkreis - MTL +Sachsen | MW | Mittwerda - MW +Sachsen | NOL | Niederschlesischer_Oberlausitzkreis - NOL +Sachsen | PIR | Pirna/Saechsische_Schweiz - PIR +Sachsen | PL | Plauen - PL +Sachsen | RG | Riesa-Grossenhain - RG +Sachsen | STL | Stollberg - STL +Sachsen | TO | Torgau-Oschatz - TO +Sachsen | V | Vogtlandkreis - V +Sachsen | Z | Zwickauer_Land - Z +Sachsen | ZI | Loebau-Zittau - ZI +Sachsen-Anhalt | ASL | Stassfurter_Landkreis/Aschersleben - ASL +Sachsen-Anhalt | AZE | Anhalt-Zerbst - AZE +Sachsen-Anhalt | BBG | Bernburg - BBG +Sachsen-Anhalt | BLK | Burgenlandkreis - BLK +Sachsen-Anhalt | BOE | Boerderkreis - BOE +Sachsen-Anhalt | BTF | Bitterfeld - BTF +Sachsen-Anhalt | DE | Dessau - DE +Sachsen-Anhalt | HAL | Halle - HAL +Sachsen-Anhalt | HBS | Halberstadt - HBS +Sachsen-Anhalt | JL | Jerichower_Land - JL +Sachsen-Anhalt | KOT | Koethen / KOT +Sachsen-Anhalt | MD | Magdeburg - MD +Sachsen-Anhalt | ML | Mansfelder_Land/Eisleben - ML +Sachsen-Anhalt | MQ | Merseburg-Querfurt - MQ +Sachsen-Anhalt | OK | Ohrekreis/Haldensleben - OK +Sachsen-Anhalt | QLB | Quedlingburg - QLB +Sachsen-Anhalt | SAW | Salzwedel/Altmarkkreis - SAW +Sachsen-Anhalt | SBK | Schoenebeck/Elbe - SBK +Sachsen-Anhalt | SDL | Stendal - SDL +Sachsen-Anhalt | SGH | Sangershausen - SGH +Sachsen-Anhalt | SK | Saalkreis - SK +Sachsen-Anhalt | WB | Wittenberg - WB +Sachsen-Anhalt | WSF | Weissenfels - WSF +Sachsen-Anhalt | WR | Wernigerode - WR +Schleswig-Holstein | FL | Flensburg - FL +Schleswig-Holstein | HEI | Heide - HEI +Schleswig-Holstein | HL | Luebeck - HL +Schleswig-Holstein | IZ | Itzehoe - IZ +Schleswig-Holstein | KI | Kiel - KI +Schleswig-Holstein | NF | Nordfriesland - NF +Schleswig-Holstein | NMS | Neumuenster - NMS +Schleswig-Holstein | OD | Bad Oldesloe - OD +Schleswig-Holstein | OH | Ostholstein - OH +Schleswig-Holstein | PI | Pinneberg - PI +Schleswig-Holstein | PIH | Helgoland - PIH +Schleswig-Holstein | PLO | Ploen - PLO +Schleswig-Holstein | RD | Rendsburg/Eckernfoerde - RD +Schleswig-Holstein | RZ | Ratzeburg/Herzogtum_Lauenburg - RZ +Schleswig-Holstein | SE | Bad Segeberg - SE +Schleswig-Holstein | SL | Schleswig/Flensburg - SL +Thueringen | ABG | Altenburger_Land - ABG +Thueringen | AP | Apolda\Weimarer_Land - AP +Thueringen | EA | Eisenach - EA +Thueringen | EF | Erfurt - EF +Thueringen | EIC | Eichsfeld - EIC +Thueringen | G | Gera - G +Thueringen | GRZ | Greiz - GRZ +Thueringen | GTH | Gotha - GTH +Thueringen | HBN | Hildburghausen - HBN +Thueringen | IK | Ilm-Kreis - IK +Thueringen | J | Jena - J +Thueringen | KYF | Kyffhaeuserkreis - KYF +Thueringen | NDH | Nordhausen - NDH +Thueringen | SHK | Saale-Holzland-Kreis - SHK +Thueringen | SHL | Suhl - SHL +Thueringen | SLF | Saalfeld-Rudolstadt - SLF +Thueringen | SM | Schmalkalden-Meiningen - SM +Thueringen | SOK | Saale-Orla-Kreis - SOK +Thueringen | SOM | Soemmerda - SOM +Thueringen | SON | Sonneberg - SON +Thueringen | WAK | Wartburgkreis/Bad_Salzungen - WAK +Thueringen | UH | Unstrut-Hainich - UN +Thueringen | WE | Weimar - WE 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/admin.php b/admin.php index 68a3523..3428422 100755 --- a/admin.php +++ b/admin.php @@ -27,6 +27,12 @@ $_SESSION["load_complete"] = ""; $_SESSION["lastupdate"] = ""; $_SESSION["online_users"] = ""; +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; diff --git a/config.inc.php b/config.inc.php index a71bcc2..49f25f3 100755 --- a/config.inc.php +++ b/config.inc.php @@ -103,7 +103,7 @@ $ip_ende = '192.168.1.250'; $ip_users = array( "192.168.1.81" => 1, "192.168.1.80" => 1, - "192.168.1.38" => 1, + "192.168.1.75" => 1, ); // Alarmmails enable/disable @@ -338,7 +338,7 @@ $nav_menu = 'Home | '; $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 diff --git a/get_other.php b/get_other.php index 0d6c188..8b86232 100755 --- a/get_other.php +++ b/get_other.php @@ -10,6 +10,7 @@ require_once("config.inc.php"); } // Check Wetter +/* $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); @@ -25,6 +26,7 @@ require_once("config.inc.php"); if (!isset($unwetter_field)) $unwetter_field = ""; eval ("\$unwetter_field .= \"".gettemplate($template_dir."body_unwetter")."\";"); } +*/ // Check PM $result = mysqli_query($dbconn, "SELECT a.*, DATE_FORMAT(a.pm_date, '%Y%m%d%H%i%s') AS date, b.real_name diff --git a/kfz.php b/kfz.php new file mode 100755 index 0000000..7c629a8 --- /dev/null +++ b/kfz.php @@ -0,0 +1,121 @@ +1
"; + $set_status .= "2
"; + $set_status .= "3
"; + $set_status .= "4
"; + $set_status .= "6
"; + $set_status .= "7
"; + $set_status .= "8
"; + $set_status .= "9
"; + } + else + { + $set_status = "1
"; + $set_status .= "2
"; + $set_status .= "3
"; + $set_status .= "4
"; + $set_status .= "6
"; + } + + $i++; + if( $i == 1 ) $kfz = '
- In welchem Zeitraum möchtest du Meldungen empfangen: + In welchem Zeitraum möchtest du Meldungen empfangen:
'; + $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/profile.php b/profile.php index f167689..9cdf7e2 100755 --- a/profile.php +++ b/profile.php @@ -30,6 +30,10 @@ $_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( !isset($_GET["do"]) ) diff --git a/stats.php b/stats.php new file mode 100755 index 0000000..c7c66eb --- /dev/null +++ b/stats.php @@ -0,0 +1,126 @@ + +  '.$row["org"].' '.$row["org_name"].' +  '.$row["alarm_count"].' +  '.get_date($row["last_alarm"]).' + '; + } + + $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 .= ' + +  '.$row["org"].' '.$row["org_name"].' +  '.$row["alarm_count"].' +  '.get_date($row["last_alarm"]).' + '; + } + + $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 .= ' + +  '.$row["org"].' '.$row["org_name"].' +  '.$row["alarm_count"].' +  '.get_date($row["last_alarm"]).' + '; + } + + $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 .= ' + +  '.$row["org"].' '.$row["org_name"].' +  '.$row["alarm_count"].' +  '.get_date($row["last_alarm"]).' + '; + } + + // Seiteninhalt ausgeben + eval ("\$page_middle .= \"".gettemplate($template_dir."body_stats")."\";"); + +/**************************/ +// Ausgabe Rahmen +// +eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");"); + +/**************************/ +// Datenbank schliessen +// +mysqli_close($dbconn); +?> From d0b003ab5f2c9cffc8e98ae766bba9de37ff01f1 Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Sun, 5 Aug 2018 08:25:27 +0200 Subject: [PATCH 10/10] Update config.inc.php --- config.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.inc.php b/config.inc.php index 49f25f3..b366837 100755 --- a/config.inc.php +++ b/config.inc.php @@ -81,8 +81,8 @@ $meta = ' $css = ''; // URL deines Webinterface -$monitordomain = "https://monitor.fire-devils.org"; -$monitoremail = "monitor@fire-devils.org"; +$monitordomain = "https://xxx"; +$monitoremail = "monitor@xxx"; // Login Info Text $login_infotext = '

Welcome back

'; @@ -161,7 +161,7 @@ $korr_status_zeit = 2; //in min // Grunddaten fr die Datenbankverbindung $dbhost = "localhost"; $dbuser = "boswatch"; -$dbpass = "druffmann77"; +$dbpass = "boswatch"; $dbname = "monitor"; // Status definieren