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 = '