diff --git a/.DS_Store b/.DS_Store index ac98131..5008ddf 100755 Binary files a/.DS_Store and b/.DS_Store differ 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_admin_dme2org.html b/_html/body_admin_dme2org.html index f32c892..db58aca 100755 --- a/_html/body_admin_dme2org.html +++ b/_html/body_admin_dme2org.html @@ -6,25 +6,15 @@ } --> -
+ - + @@ -41,7 +31,7 @@ - + @@ -57,7 +47,7 @@ - +
neue Organisation/Ortneue Org./Ort - - - -/ - + +
Zusatz:
Formatierung: 
diff --git a/_html/body_admin_index.html b/_html/body_admin_index.html index 179859d..6763980 100755 --- a/_html/body_admin_index.html +++ b/_html/body_admin_index.html @@ -7,15 +7,15 @@ - + - + - +
 $num_dme DME/ZVEI ohne Organisation
 $num_kfz Fahrzeuge ohne Organisation
 $num_user User im System, $num_new_user davon neu


diff --git a/_html/body_admin_kfz2org.html b/_html/body_admin_kfz2org.html index 1cb9dd0..f24d983 100755 --- a/_html/body_admin_kfz2org.html +++ b/_html/body_admin_kfz2org.html @@ -1,4 +1,4 @@ - + @@ -38,7 +38,7 @@ - +
neue Organisation/Ort 
diff --git a/_html/body_message_reply.html b/_html/body_message_reply.html index c048c97..4535071 100755 --- a/_html/body_message_reply.html +++ b/_html/body_message_reply.html @@ -1,5 +1,5 @@ - + diff --git a/_html/body_message_write.html b/_html/body_message_write.html index 5986a79..9bb327a 100755 --- a/_html/body_message_write.html +++ b/_html/body_message_write.html @@ -1,5 +1,5 @@ - + diff --git a/_html/body_profil_alarmmail_select.html b/_html/body_profil_alarmmail_select.html index 853f2e3..fc22d4f 100755 --- a/_html/body_profil_alarmmail_select.html +++ b/_html/body_profil_alarmmail_select.html @@ -2,7 +2,7 @@
diff --git a/_html/rahmen.html b/_html/rahmen.html index 9697d47..08bf282 100755 --- a/_html/rahmen.html +++ b/_html/rahmen.html @@ -67,7 +67,7 @@ $body_html - + @@ -115,20 +115,6 @@ $body_html - - - - -
- In welchem Zeitraum möchtest du Meldungen empfangen: + In welchem Zeitraum möchtest du Meldungen empfangen:  
diff --git a/admin.php b/admin.php index 256f280..72c5389 100755 --- a/admin.php +++ b/admin.php @@ -27,7 +27,13 @@ $_SESSION["load_complete"] = ""; $_SESSION["lastupdate"] = ""; $_SESSION["online_users"] = ""; -// Prüfen ob admin +if (!isset($_REQUEST["org"])) $_REQUEST["org"]=""; +if (!isset($_REQUEST["form"])) $_REQUEST["form"]=""; +if (!isset($option_org)) $option_org=""; +if (!isset($option_format)) $option_format=""; +if (!isset($_GET["org"])) $_GET["org"]=""; + +// Prüfen ob admin if( $_SESSION["admin"] != 1 ) exit; /**************************/ @@ -36,20 +42,37 @@ if( $_SESSION["admin"] != 1 ) exit; // // Wenn dme ohne Org anzuschauen ist -if( $_GET["show"] == 'dme' && !$_GET["do"] ) +if( isset($_GET["show"]) && $_GET["show"] == 'dme' && !isset($_GET["do"]) ) { // Alle DME ohne Organisation holen - $result = mysql_query("SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn, "SELECT a.id, a.adresse, a.bezeichnung, a.rec_typ, b.id as import_id, b.i_ric, b.i_org, b.i_ort, b.i_zusatz + FROM ric_zvei a + LEFT JOIN import_ric b ON a.adresse = b.i_ric + WHERE a.org_id = '0' + ORDER BY a.bezeichnung ASC") or die (mysqli_error($dbconn)); + + while($row = mysqli_fetch_array($result)) { - $show_all .= ' + if (isset($row["import_id"])) { + $show_all .= ' - '.$row["rec_typ"].' -  '.$row["adresse"].' / '.$row["bezeichnung"].' -  zuordnen  -  löschen  + ' . $row["rec_typ"] . ' +  ' . $row["adresse"] . ' / ' . $row["i_org"]." ".$row["i_ort"]." | ".$row["i_zusatz"] . ' +  zuordnen  +  löschen  - '; + '; + } + else { + $show_all .= ' + + ' . $row["rec_typ"] . ' +  ' . $row["adresse"] . ' / ' . $row["bezeichnung"] . ' +  zuordnen  +  löschen  + + '; + } } // Seiteninhalt ausgeben @@ -58,56 +81,84 @@ if( $_GET["show"] == 'dme' && !$_GET["do"] ) // // Wenn dme updaten -elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'update' ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && $_GET["do"] && $_GET["do"] == 'update' ) { - // Zusammenstellung bekannter Organisationen - $result = mysql_query("SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + // Abfrage ob in import table vorhanden + if (isset($_GET["ric"])) { + $ric = trim($_GET["ric"]); + + $result = mysqli_query($dbconn, "SELECT i_ric, i_org, i_ort, i_zusatz FROM import_ric WHERE i_ric=$ric") or die (mysqli_error($dbconn)); + $imp = mysqli_fetch_array($result); + + (!empty($imp["i_ort"])) ? $org_name = strtoupper($imp["i_ort"]) : $org_name=""; + } + + // Zusammenstellung bekannter Organisationen + $result = mysqli_query($dbconn, "SELECT a.id, a.org_name, a.org + FROM organisation a + ORDER BY a.org ASC, a.org_name ASC") or die (mysqli_error($dbconn)); + + while($row = mysqli_fetch_array($result)) { - if( $_REQUEST["org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; } + ($_REQUEST["org"] == $row["id"]) ? $selected="selected" : $selected=""; $option_org .= ''; } // Zusammenstellung der Formatierungen - $result = mysql_query("SELECT id, beschreibung FROM formatierung ORDER BY beschreibung ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn, "SELECT id, beschreibung FROM formatierung ORDER BY beschreibung ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { if( $_REQUEST["form"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; } $option_format .= ''; } // Abfrage des verlangten Datensatzes - $result = mysql_query("SELECT id, adresse, bezeichnung, rec_typ FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysql_error()); - $row = mysql_fetch_array($result); - + $result = mysqli_query($dbconn, "SELECT a.id, a.adresse, a.bezeichnung, a.rec_typ, b.i_org, b.i_ort, b.i_zusatz + FROM ric_zvei a + LEFT JOIN import_ric b ON a.adresse=b.i_ric + WHERE a.id = '$_GET[id]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); + + (!empty($imp["i_zusatz"])) ? $org_bezeichnung=$imp["i_zusatz"] : $org_bezeichnung=$row["bezeichnung"]; + + // Formular zusammenstellen + $updateSelectOrgTyp=""; + $orgs = array("RLS", "FF", "BF", "RD", "THW", "KAT", "KBM", "RLS"); + foreach ($orgs as $v) { + ($v == trim($row["i_org"])) ? $selected="selected" : $selected=""; + $updateSelectOrgTyp .= ""; + } + + if (!isset($org_name)) $org_name=""; + // Seiteninhalt ausgeben eval ("\$page_middle .= \"".gettemplate($template_dir."body_admin_dme2org")."\";"); } // -// Wenn dme löschen -elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'delete' ) +// Wenn dme l�schen +elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && $_GET["do"] && $_GET["do"] == 'delete' ) { - $result = mysql_query("DELETE FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysql_error()); - $result = mysql_query("DELETE FROM alarm2mail WHERE adresse = '$_GET[adresse]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM ric_zvei WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn)); + $result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE adresse = '$_GET[adresse]'") or die (mysqli_error($dbconn)); - // Prüfen ob noch weitere Einträge zur Org da sind, wenn nicht löschen - if( $_GET["org"] ) + // Pr�fen ob noch weitere Eintr�ge zur Org da sind, wenn nicht l�schen + if( $_GET["org"] != "" ) { - $result = mysql_query("SELECT a.id AS dme_id, b.id AS kfz_id + $result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id FROM ric_zvei a LEFT JOIN kfz_fms b ON b.org_id = $_GET[org] - WHERE a.org_id = '$_GET[org]' OR b.org_id = '$_GET[org]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + WHERE a.org_id = '$_GET[org]' OR b.org_id = '$_GET[org]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( !$row["dme_id"] && !$row["kfz_id"] ) { - $result = mysql_query("DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error($dbconn)); } } // Wohin gehen nach Aktion - if( !$_GET["org"] ) + if( !isset($_GET["org"]) ) { echo gohome($_SERVER["PHP_SELF"].'?show=dme&org=0'); } @@ -118,29 +169,29 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'delete' ) } // -// dme Update ausführen -elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) +// dme Update ausf�hren +elseif( isset($_GET["show"]) && $_GET["show"] == 'dme' && isset($_GET["do"]) && $_GET["do"] == 'setupdate' ) { - // Schauen ob neue oder bestehende Organistaion gewählt wurde - if( $_REQUEST["new_org"] ) + // Schauen ob neue oder bestehende Organistaion gew�hlt wurde + if( isset($_REQUEST["new_org"]) && $_REQUEST["new_org"] != "" ) { /////////////////$organisation = $_REQUEST["new_org"]; - // Prüfen ob die Org schon existiert, wenn ja update kein eintrag - $result = mysql_query("SELECT id FROM organisation WHERE org_name = '$_REQUEST[new_org]' AND org = '$_REQUEST[new_org_typ]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + // Pr�fen ob die Org schon existiert, wenn ja update kein eintrag + $result = mysqli_query($dbconn, "SELECT id FROM organisation WHERE org_name = '$_REQUEST[new_org]' AND org = '$_REQUEST[new_org_typ]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( $row["id"] ) { $org_id = $row["id"]; } - if( !$org_id ) + if( !isset($org_id) ) { - $result = mysql_query("INSERT INTO organisation (org_name, org) VALUES ('$_REQUEST[new_org]', '$_REQUEST[new_org_typ]')"); + $result = mysqli_query($dbconn, "INSERT INTO organisation (org_name, org) VALUES ('$_REQUEST[new_org]', '$_REQUEST[new_org_typ]')"); - $result = mysql_query("SELECT MAX(id) as new_id FROM organisation"); - $row = mysql_fetch_row($result); + $result = mysqli_query($dbconn, "SELECT MAX(id) as new_id FROM organisation"); + $row = mysqli_fetch_row($result); $org_id = $row[0]; } } @@ -149,20 +200,20 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) $org_id = $_REQUEST["select_org"]; } - $result = mysql_query("UPDATE ric_zvei SET bezeichnung = '$_REQUEST[bezeichnung]', formatierung_id = '$_REQUEST[formatierung]', org_id = '$org_id' WHERE id='$_REQUEST[id]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "UPDATE ric_zvei SET bezeichnung = '$_REQUEST[bezeichnung]', formatierung_id = '$_REQUEST[formatierung]', org_id = '$org_id' WHERE id='$_REQUEST[id]'") or die (mysqli_error($dbconn)); - // Prüfen ob noch weitere Einträge zur Org da sind, wenn nicht löschen - if( $_REQUEST["old_org"] ) + // Pr�fen ob noch weitere Eintr�ge zur Org da sind, wenn nicht l�schen + if( isset($_REQUEST["old_org"]) ) { - $result = mysql_query("SELECT a.id AS dme_id, b.id AS kfz_id + $result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id FROM ric_zvei a - LEFT JOIN kfz_fms b ON b.org_id = $_REQUEST[old_org] - WHERE a.org_id = '$_REQUEST[old_org]' OR b.org_id = '$_REQUEST[old_org]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + LEFT JOIN kfz_fms b ON b.org_id = $org_id + WHERE a.org_id = '$org_id' OR b.org_id = '$org_id'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( !$row["dme_id"] && !$row["kfz_id"] ) { - $result = mysql_query("DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$org_id'") or die (mysqli_error($dbconn)); } } @@ -171,17 +222,17 @@ elseif( $_GET["show"] == 'dme' && $_GET["do"] == 'setupdate' ) // // Wenn kfz ohne org anzusehen ist -elseif( $_GET["show"] == 'kfz' && !$_GET["do"] ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'kfz' && !isset($_GET["do"]) ) { // Alle DME ohne Organisation holen - $result = mysql_query("SELECT id, bezeichnung FROM kfz_fms WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn, "SELECT id, bezeichnung FROM kfz_fms WHERE org_id = '0' ORDER BY bezeichnung ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { $show_all .= '  '.$row["bezeichnung"].' -  zuordnen  -  löschen  +  zuordnen  +  löschen  '; } @@ -192,47 +243,47 @@ elseif( $_GET["show"] == 'kfz' && !$_GET["do"] ) // // Wenn kfz updaten -elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'update' ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'kfz' && isset($_GET["do"]) && $_GET["do"] == 'update' ) { // Zusammenstellung bekannter Organisationen - $result = mysql_query("SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation ORDER BY org ASC, org_name ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { if( $_REQUEST["org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; } $option_org .= ''; } // Abfrage des verlangten Datensatzes - $result = mysql_query("SELECT id, bezeichnung FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + $result = mysqli_query($dbconn, "SELECT id, bezeichnung FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); // Seiteninhalt ausgeben eval ("\$page_middle .= \"".gettemplate($template_dir."body_admin_kfz2org")."\";"); } // -// Wenn kfz löschen -elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'delete' ) +// Wenn kfz l�schen +elseif( isset($_GET["show"]) && $_GET["show"] == 'kfz' && isset($_GET["do"]) && $_GET["do"] == 'delete' ) { - $result = mysql_query("DELETE FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM kfz_fms WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn)); - // Prüfen ob noch weitere Einträge zur Org da sind, wenn nicht löschen - if( $_GET["org"] ) + // Pr�fen ob noch weitere Eintr�ge zur Org da sind, wenn nicht l�schen + if( isset($_GET["org"]) ) { - $result = mysql_query("SELECT a.id AS dme_id, b.id AS kfz_id + $result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id FROM ric_zvei a LEFT JOIN kfz_fms b ON b.org_id = $_GET[org] - WHERE a.org_id = '$_GET[org]' OR b.org_id = '$_GET[org]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + WHERE a.org_id = '$_GET[org]' OR b.org_id = '$_GET[org]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( !$row["dme_id"] && !$row["kfz_id"] ) { - $result = mysql_query("DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_GET[org]'") or die (mysqli_error($dbconn)); } } // Wohin gehen nach Aktion - if( !$_GET["org"] ) + if( !isset($_GET["org"]) ) { echo gohome($_SERVER["PHP_SELF"].'?show=kfz&org=0'); } @@ -244,16 +295,16 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'delete' ) // // kfz Update ausfhren -elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'kfz' && isset($_GET["do"]) && $_GET["do"] == 'setupdate' ) { // Schauen ob neue oder bestehende Organistaion gewhlt wurde - if( $_REQUEST["new_org"] ) + if( isset($_REQUEST["new_org"]) ) { $organisation = $_REQUEST["new_org"]; - $result = mysql_query("INSERT INTO organisation (org_name, org) VALUES ('$organisation', '$_REQUEST[new_org_typ]')"); + $result = mysqli_query($dbconn, "INSERT INTO organisation (org_name, org) VALUES ('$organisation', '$_REQUEST[new_org_typ]')"); - $result = mysql_query("SELECT MAX(id) as new_id FROM organisation"); - $row = mysql_fetch_row($result); + $result = mysqli_query($dbconn, "SELECT MAX(id) as new_id FROM organisation"); + $row = mysqli_fetch_row($result); $organisation = $row[0]; } else @@ -261,20 +312,20 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' ) $organisation = $_REQUEST["select_org"]; } - $result = mysql_query("UPDATE kfz_fms SET bezeichnung = '$_REQUEST[bezeichnung]', org_id = '$organisation' WHERE id='$_REQUEST[id]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "UPDATE kfz_fms SET bezeichnung = '$_REQUEST[bezeichnung]', org_id = '$organisation' WHERE id='$_REQUEST[id]'") or die (mysqli_error($dbconn)); - // Prüfen ob noch weitere Einträge zur Org da sind, wenn nicht löschen - if( $_REQUEST["old_org"] ) + // Pr�fen ob noch weitere Eintr�ge zur Org da sind, wenn nicht l�schen + if( isset($_REQUEST["old_org"]) ) { - $result = mysql_query("SELECT a.id AS dme_id, b.id AS kfz_id + $result = mysqli_query($dbconn, "SELECT a.id AS dme_id, b.id AS kfz_id FROM ric_zvei a LEFT JOIN kfz_fms b ON b.org_id = $_REQUEST[old_org] - WHERE a.org_id = '$_REQUEST[old_org]' OR b.org_id = '$_REQUEST[old_org]'") or die (mysql_error()); - $row = mysql_fetch_array($result); + WHERE a.org_id = '$_REQUEST[old_org]' OR b.org_id = '$_REQUEST[old_org]'") or die (mysqli_error($dbconn)); + $row = mysqli_fetch_array($result); if( !$row["dme_id"] && !$row["kfz_id"] ) { - $result = mysql_query("DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM organisation WHERE id = '$_REQUEST[old_org]'") or die (mysqli_error($dbconn)); } } @@ -283,11 +334,11 @@ elseif( $_GET["show"] == 'kfz' && $_GET["do"] == 'setupdate' ) // // Wenn Userliste anzeigen -elseif( $_GET["show"] == 'user' && !$_GET["do"] ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'user' && !isset($_GET["do"]) ) { // Alle DME ohne Organisation holen - $result = mysql_query("SELECT id, a_name, real_name, a_admin, a_mail FROM admin_users ORDER BY a_admin DESC, a_name ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn, "SELECT id, a_name, real_name, a_admin, a_mail FROM admin_users ORDER BY a_admin DESC, a_name ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { if( $row["a_admin"] == '0' ) $status = '(User) '; elseif( $row["a_admin"] == '1' ) $status = '(Admin) '; @@ -295,7 +346,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] ) elseif( $row["a_admin"] == '3' ) $status = '(Closed) '; if( $row["a_admin"] != '1') { - $show_del_button = 'löschen'; + $show_del_button = 'löschen'; } else { $show_del_button = ""; } @@ -304,7 +355,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] )  '.$status.$row["real_name"].'  '.$row["a_mail"].' - + '.$row["a_name"].'  '.$show_del_button.'  @@ -321,7 +372,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] ) EMail - + @@ -335,28 +386,28 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] ) } // User eintragen -elseif( $_GET["show"] == 'user' && $_GET["do"] == 'insert' ) +elseif( isset($_GET["show"]) && $_GET["show"] == 'user' && isset($_GET["do"]) && $_GET["do"] == 'insert' ) { list($vorname, $nachname) = explode(" ", trim($_REQUEST["ins_name"])); $ins_user_name = trim($vorname) .".". substr(trim($nachname),0,1); - $result = mysql_query("SELECT id FROM admin_users WHERE a_name = '$ins_user_name'"); - $row = mysql_fetch_array($result); + $result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE a_name = '$ins_user_name'"); + $row = mysqli_fetch_array($result); if (!empty($row["id"])) $ins_user_name = trim($vorname) .".". substr(trim($nachname),0,1) ."". rand(1,99); - $result = mysql_query("INSERT INTO admin_users (a_name, real_name, a_mail, pm_allow) VALUES ('$ins_user_name', '$_REQUEST[ins_name]', '$_REQUEST[ins_mail]', '1')") or die(mysql_error); + $result = mysqli_query($dbconn, "INSERT INTO admin_users (a_name, real_name, a_mail, pm_allow) VALUES ('$ins_user_name', '$_REQUEST[ins_name]', '$_REQUEST[ins_mail]', '1')") or die(mysqli_error); echo gohome($_SERVER["PHP_SELF"].'?show=user'); } // -// Wenn user löschen -elseif( $_GET["show"] == 'user' && $_GET["do"] == 'delete' ) +// Wenn user l�schen +elseif( isset($_GET["show"]) && $_GET["show"] == 'user' && isset($_GET["do"]) && $_GET["do"] == 'delete' ) { - $result = mysql_query("DELETE FROM messages WHERE userid_to = '$_GET[id]'") or die (mysql_error()); - $result = mysql_query("DELETE FROM alarm2mail WHERE userid = '$_GET[id]'") or die (mysql_error()); - $result = mysql_query("DELETE FROM admin_users WHERE id = '$_GET[id]'") or die (mysql_error()); + $result = mysqli_query($dbconn, "DELETE FROM messages WHERE userid_to = '$_GET[id]'") or die (mysqli_error($dbconn)); + $result = mysqli_query($dbconn, "DELETE FROM alarm2mail WHERE userid = '$_GET[id]'") or die (mysqli_error($dbconn)); + $result = mysqli_query($dbconn, "DELETE FROM admin_users WHERE id = '$_GET[id]'") or die (mysqli_error($dbconn)); echo gohome($_SERVER["PHP_SELF"].'?show=user'); } @@ -366,29 +417,29 @@ elseif( $_GET["show"] == 'user' && $_GET["do"] == 'delete' ) else { // Wir schauen nach dme die keiner Org zugeordnet sind - $result = mysql_query("SELECT id FROM ric_zvei WHERE org_id = '0'") or die (mysql_error()); - $num_dme = mysql_num_rows($result); + $result = mysqli_query($dbconn, "SELECT id FROM ric_zvei WHERE org_id = '0'") or die (mysqli_error($dbconn)); + $num_dme = mysqli_num_rows($result); // Wir schauen nach kfz die keiner Org zugeordnet sind - $result = mysql_query("SELECT id FROM kfz_fms WHERE org_id = '0'") or die (mysql_error()); - $num_kfz = mysql_num_rows($result); + $result = mysqli_query($dbconn, "SELECT id FROM kfz_fms WHERE org_id = '0'") or die (mysqli_error($dbconn)); + $num_kfz = mysqli_num_rows($result); // Wir schauen nach der Userzahl - $result = mysql_query("SELECT id FROM admin_users") or die (mysql_error()); - $num_user = mysql_num_rows($result); + $result = mysqli_query($dbconn, "SELECT id FROM admin_users") or die (mysqli_error($dbconn)); + $num_user = mysqli_num_rows($result); - $result = mysql_query("SELECT id FROM admin_users WHERE a_admin = '2'") or die (mysql_error()); - $num_new_user = mysql_num_rows($result); + $result = mysqli_query($dbconn, "SELECT id FROM admin_users WHERE a_admin = '2'") or die (mysqli_error($dbconn)); + $num_new_user = mysqli_num_rows($result); // Ausklappmenu erstellen $select_search_org = ' '; - // Ausgabe zusammenstellen wenn org zum bearbeiten gewählt - if( $_REQUEST["search_org"] ) + // Ausgabe zusammenstellen wenn org zum bearbeiten gew�hlt + if( isset($_REQUEST["search_org"]) ) { $show_ric = '--- RIC/ZVEI ----------
'; - $result = mysql_query("SELECT id, adresse, bezeichnung, rec_typ, org_id, formatierung_id FROM ric_zvei WHERE org_id = '$_REQUEST[search_org]' ORDER BY rec_typ ASC, adresse ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn,"SELECT id, adresse, bezeichnung, rec_typ, org_id, formatierung_id FROM ric_zvei WHERE org_id = '$_REQUEST[search_org]' ORDER BY rec_typ ASC, adresse ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { $show_ric .= ' '.$row["adresse"].' | '.$row["rec_typ"].' | '.$row["bezeichnung"].'
'; } $show_ric .= '
--- KFZ/FMS ----------
'; - $result = mysql_query("SELECT id, kennung, bezeichnung, org_id FROM kfz_fms WHERE org_id = '$_REQUEST[search_org]' ORDER BY kennung ASC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + $result = mysqli_query($dbconn, "SELECT id, kennung, bezeichnung, org_id FROM kfz_fms WHERE org_id = '$_REQUEST[search_org]' ORDER BY kennung ASC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { $show_ric .= ' '.$row["kennung"].' | '.$row["bezeichnung"].'
'; } @@ -434,5 +485,5 @@ eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");"); /**************************/ // Datenbank schliessen // -mysql_close($dbconn); +mysqli_close($dbconn); ?> diff --git a/alarmmail.inc.php b/alarmmail.inc.php index 086c100..eb39e2c 100755 --- a/alarmmail.inc.php +++ b/alarmmail.inc.php @@ -21,21 +21,21 @@ */ // Done in Haupttabelle updaten -$result_check_ins = mysql_query("UPDATE dme SET zeit='$row[zeit]', done='1' WHERE num='$row[num]'") or die (mysql_error()); +$result_check_ins = mysqli_query($dbconn, "UPDATE dme SET zeit='$row[zeit]', done='1' WHERE num='$row[num]'") or die (mysqli_error($dbconn)); if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' && $amenable == 1 ) { - $result_alarm_mail = mysql_query("SELECT a.userid, a.time_from, a.time_to, a.stiwo, b.id, b.a_mail, b.a_alarmmail, b.a_alarmmail2sms, b.amail_count, b.ft_allow + $result_alarm_mail = mysqli_query($dbconn, "SELECT a.userid, a.time_from, a.time_to, a.stiwo, b.id, b.a_mail, b.a_alarmmail, b.a_alarmmail2sms, b.amail_count, b.ft_allow FROM alarm2mail a LEFT JOIN admin_users b ON b.id = a.userid - WHERE adresse=".$row["adresse_neu"]) or die(mysql_error()); - while( $row_alarm_mail = mysql_fetch_array($result_alarm_mail) ) + WHERE adresse=".$row["adresse_neu"]) or die(mysqli_error($dbconn)); + while( $row_alarm_mail = mysqli_fetch_array($result_alarm_mail) ) { // Alarmmail Counter $amail_count = $row_alarm_mail["amail_count"]+1; - // schauen ob für Alarm extra Mailadresse + // schauen ob f�r Alarm extra Mailadresse if( $row_alarm_mail["a_alarmmail"] ) $row_alarm_mail["a_mail"] = $row_alarm_mail["a_alarmmail"]; // schauen ob Alarm im Zeitfenster liegt @@ -52,7 +52,7 @@ if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' && if ( $row_alarm_mail["ft_allow"] == 1 ) { // Wenn FullText erlaubt - mail_alarm(get_date_long($row["zeit"]), get_time($row["zeit"]), $row_alarm_mail["a_mail"],$row["org"],$row["org_name"],$row["bezeichnung"],utf8_decode($row["text"])); + mail_alarm(get_date_long($row["zeit"]), get_time($row["zeit"]), $row_alarm_mail["a_mail"],$row["org"],$row["org_name"],$row["bezeichnung"],$row["text"]); } else { @@ -61,7 +61,7 @@ if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' && } // Mailcounter - $result_counter = mysql_query("UPDATE admin_users SET amail_count='$amail_count' WHERE id='$row_alarm_mail[id]'"); + $result_counter = mysqli_query($dbconn, "UPDATE admin_users SET amail_count='$amail_count' WHERE id='$row_alarm_mail[id]'"); } // Meldung im SMSformat senden @@ -80,7 +80,7 @@ if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' && } // Mailcounter - $result_counter = mysql_query("UPDATE admin_users SET amail_count='$amail_count' WHERE id='$row_alarm_mail[id]'"); + $result_counter = mysqli_query($dbconn, "UPDATE admin_users SET amail_count='$amail_count' WHERE id='$row_alarm_mail[id]'"); } } @@ -91,6 +91,6 @@ if( trim($row["funktion"]) != 'Klartext' && trim($row["funktion"]) != 'Info' && if( ($row["zeit"] - $row["last_alarm"]) > 1000 ) { $alarmcount = $row["alarm_count"] + 1; - $result_check_ins = mysql_query("UPDATE organisation SET alarm_count='$alarmcount', last_alarm='$row[zeit]' WHERE id='$row[org_id]'") or die (mysql_error()); + $result_check_ins = mysqli_query($dbconn, "UPDATE organisation SET alarm_count='$alarmcount', last_alarm='$row[zeit]' WHERE id='$row[org_id]'") or die (mysqli_error($dbconn)); } ?> \ No newline at end of file diff --git a/apple-touch-icon.png b/apple-touch-icon.png new file mode 100644 index 0000000..060dd55 Binary files /dev/null and b/apple-touch-icon.png differ diff --git a/autocheck.php b/autocheck.php index e3c8bdd..abd0111 100755 --- a/autocheck.php +++ b/autocheck.php @@ -24,15 +24,15 @@ require('config.inc.php'); $show_filter = ' Where a.done = "0" '; - $result = mysql_query("SELECT a.num, a.adresse AS adresse_neu, a.bezeichnung AS bezeichnung_neu, a.text, DATE_FORMAT(a.zeit, '%Y%m%d%H%i%s') AS zeit, a.funktion, a.REC_TYP, a.done, + $result = mysqli_query($dbconn, "SELECT a.num, a.adresse AS adresse_neu, a.bezeichnung AS bezeichnung_neu, a.text, DATE_FORMAT(a.zeit, '%Y%m%d%H%i%s') AS zeit, a.funktion, a.REC_TYP, a.done, b.adresse, b.formatierung_id, b.bezeichnung, d.id AS org_id, d.org_name, d.org, d.alarm_count, d.last_alarm FROM dme a LEFT JOIN ric_zvei b ON b.adresse = a.adresse LEFT JOIN organisation d ON d.id = b.org_id $show_filter - ORDER BY a.zeit DESC") or die (mysql_error()); - while($row = mysql_fetch_array($result)) + ORDER BY a.zeit DESC") or die (mysqli_error($dbconn)); + while($row = mysqli_fetch_array($result)) { if( $row["done"] == '0' ) @@ -46,12 +46,12 @@ require('config.inc.php'); if( $update_adresse_monrc && !$bezeichnung ) { // prfen ob die ric schon vorhanden ist, wenn nicht eintragen - $result_check = mysql_query("SELECT id FROM ric_zvei WHERE adresse=".$row["adresse_neu"]); - $row_check = mysql_fetch_array($result_check); + $result_check = mysqli_query($dbconn, "SELECT id FROM ric_zvei WHERE adresse=".$row["adresse_neu"]); + $row_check = mysqli_fetch_array($result_check); if( !$row_check["id"] ) { - $result_check = mysql_query("INSERT INTO ric_zvei (adresse, bezeichnung, rec_typ, formatierung_id) VALUES ('$row[adresse_neu]', '$row[bezeichnung_neu]', '$row[REC_TYP]', '0')") or die(mysql_error()); + $result_check = mysqli_query($dbconn, "INSERT INTO ric_zvei (adresse, bezeichnung, rec_typ, formatierung_id) VALUES ('$row[adresse_neu]', '$row[bezeichnung_neu]', '$row[REC_TYP]', '0')") or die(mysqli_error($dbconn)); $bezeichnung = $row["bezeichnung_neu"]; } } @@ -61,10 +61,11 @@ require('config.inc.php'); if( !$row["org_name"] ) $row["org_name"] = $row["adresse_neu"]; } - + +/* // Unwetter Check -$result = mysql_query("SELECT u_meldung, u_text, u_farbe, DATE_FORMAT(u_lastcheck, '%Y%m%d%H%i%s') AS u_lastcheck, DATE_FORMAT(u_lastchange, '%Y%m%d%H%i%s') AS u_lastchange FROM unwetter WHERE id = '1'") or die (mysql_error()); -$row = mysql_fetch_array($result); +$result = mysqli_query($dbconn, "SELECT u_meldung, u_text, u_farbe, DATE_FORMAT(u_lastcheck, '%Y%m%d%H%i%s') AS u_lastcheck, DATE_FORMAT(u_lastchange, '%Y%m%d%H%i%s') AS u_lastchange FROM unwetter WHERE id = '1'") or die (mysqli_error($dbconn)); +$row = mysqli_fetch_array($result); if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) ) { @@ -93,7 +94,7 @@ if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) ) $unwetter_meldung .= $line; } - // Zum Prüfen der Ausgabe deaktivieren + // Zum Prüfen der Ausgabe deaktivieren //echo "Line #{$line_num} : " . htmlspecialchars($line) . "
\n"; } @@ -110,25 +111,26 @@ if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) ) { $unwetter_status = 'keine Verbindung !!!'; $unwetter_farbe = '#FFFFFF'; - $unwetter_meldung = 'Verbindung zu dwd.de nicht möglich !'; + $unwetter_meldung = 'Verbindung zu dwd.de nicht m�glich !'; } // Wenn noch kein Eintrag in DB existiert if( empty($row["u_lastcheck"]) ) { - mysql_query("INSERT INTO unwetter (id, u_meldung, u_text, u_farbe, u_lastchange) VALUES ('1', '$unwetter_status', '$unwetter_meldung', '$unwetter_farbe', '$timestampnow')") or die(mysql_error()); + mysqli_query($dbconn, "INSERT INTO unwetter (id, u_meldung, u_text, u_farbe, u_lastchange) VALUES ('1', '$unwetter_status', '$unwetter_meldung', '$unwetter_farbe', '$timestampnow')") or die(mysqli_error($dbconn)); } // Wenn bereits Eintrag vorhanden und Checktime erreicht if( $unwetter_meldung == $row["u_text"] ) { - mysql_query("UPDATE unwetter SET u_lastcheck='$timestampnow' WHERE id = '1'") or die(mysql_error()); + mysqli_query($dbconn, "UPDATE unwetter SET u_lastcheck='$timestampnow' WHERE id = '1'") or die(mysqli_error($dbconn)); } else { - mysql_query("UPDATE unwetter SET u_meldung='$unwetter_status', u_text='$unwetter_meldung', u_farbe='$unwetter_farbe', u_lastcheck='$timestampnow', u_lastchange='$timestampnow' WHERE id = '1'") or die(mysql_error()); + mysqli_query($dbconn, "UPDATE unwetter SET u_meldung='$unwetter_status', u_text='$unwetter_meldung', u_farbe='$unwetter_farbe', u_lastcheck='$timestampnow', u_lastchange='$timestampnow' WHERE id = '1'") or die(mysqli_error($dbconn)); } } +*/ -mysql_close($dbconn); +mysqli_close($dbconn); ?> diff --git a/config.inc.php b/config.inc.php index 86ab7f5..4435845 100755 --- a/config.inc.php +++ b/config.inc.php @@ -27,7 +27,7 @@ // http://board.fire-devils.org oder manuelw@fire-devils.org // // Damit auch alles in die DB gespeichert wird sollte man -// "index.php?nooutput=1" in einen Cron aller Minute einbinden. +// "autoupdate.php?nooutput=1" in einen Cron aller Minute einbinden. // // Die Status müssen in der .monrc folgendermaßen // definiert sein. Wichtig ist das KFZ: bzw LST: voran steht. @@ -81,29 +81,29 @@ $meta = ' $css = ''; // URL deines Webinterface -$monitordomain = "http://monitor.fire-devils.org"; +$monitordomain = "https://monitor.fire-devils.org"; $monitoremail = "monitor@fire-devils.org"; // Login Info Text $login_infotext = '

Welcome back

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

'.$login_infotext.'

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



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



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

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


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