update config
This commit is contained in:
parent
0f09a883f4
commit
b0a6f832aa
398
Landkreise-Unwetter.txt
Executable file
398
Landkreise-Unwetter.txt
Executable file
@ -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
|
@ -6,25 +6,15 @@
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
<form name="form1" method="post" action="$_SERVER[php_self]?show=dme&do=setupdate">
|
||||
<form name="form1" method="post" action="$_SERVER[PHP_SELF]?show=dme&do=setupdate">
|
||||
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td>neue Organisation/Ort</td>
|
||||
<td>neue Org./Ort</td>
|
||||
<td><!--<input name="new_org_typ" type="text" id="new_org_typ" size="3" maxlength="3">-->
|
||||
|
||||
<select name="new_org_typ" id="new_org_typ">
|
||||
<option value="RLS" selected>Org</option>
|
||||
<option value="FF">FF</option>
|
||||
<option value="BF">BF</option>
|
||||
<option value="RD">RD</option>
|
||||
<option value="THW">THW</option>
|
||||
<option value="KAT">KAT</option>
|
||||
<option value="KBM">KBM</option>
|
||||
<option value="RLS">RLS</option>
|
||||
</select>
|
||||
|
||||
/
|
||||
<input name="new_org" type="text" id="new_org" size="40">
|
||||
|
||||
<select name="new_org_typ" id="new_org_typ">
|
||||
$updateSelectOrgTyp
|
||||
</select> <input name="new_org" type="text" id="new_org" size="40" value="$org_name">
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
@ -41,7 +31,7 @@
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td>Zusatz:</td>
|
||||
<td><input name="bezeichnung" type="text" id="bezeichnung" value="$row[bezeichnung]" size="50"></td>
|
||||
<td><input name="bezeichnung" type="text" id="bezeichnung" value="$org_bezeichnung" size="50"></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td>Formatierung:</td>
|
||||
@ -57,7 +47,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF"><div align="center"><a href="admin.php">Zurück</a> | <a href="$_SERVER[php_self]?show=dme&do=delete&id=$_GET[id]&org=$_GET[org]&adresse=$row[adresse]">RIC Löschen</a> </div></td>
|
||||
<td bgcolor="#FFFFFF"><div align="center"><a href="javascript:history.back()">Zurück</a> | <a href="$_SERVER[PHP_SELF]?show=dme&do=delete&id=$_GET[id]&org=$_GET[org]&adresse=$row[adresse]">RIC Löschen</a> </div></td>
|
||||
<td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="Aktualisieren"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -7,15 +7,15 @@
|
||||
<table width="400" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td> <strong>$num_dme</strong> DME/ZVEI ohne Organisation </td>
|
||||
<td><div align="center"><a href="$_SERVER[php_self]?show=dme&org=0">anzeigen</a></div></td>
|
||||
<td><div align="center"><a href="$_SERVER[PHP_SELF]?show=dme&org=0">anzeigen</a></div></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td> <strong>$num_kfz</strong> Fahrzeuge ohne Organisation </td>
|
||||
<td><div align="center"><a href="$_SERVER[php_self]?show=kfz&org=0">anzeigen</a></div></td>
|
||||
<td><div align="center"><a href="$_SERVER[PHP_SELF]?show=kfz&org=0">anzeigen</a></div></td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td> <strong>$num_user</strong> User im System, <strong>$num_new_user</strong> davon neu </td>
|
||||
<td><div align="center"><a href="$_SERVER[php_self]?show=user">anzeigen</a></div></td>
|
||||
<td><div align="center"><a href="$_SERVER[PHP_SELF]?show=user">anzeigen</a></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br><br>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<form name="form1" method="post" action="$_SERVER[php_self]?show=kfz&do=setupdate">
|
||||
<form name="form1" method="post" action="$_SERVER[PHP_SELF]?show=kfz&do=setupdate">
|
||||
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td>neue Organisation/Ort</td>
|
||||
@ -38,7 +38,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF"><div align="center"><a href="admin.php">Zurück</a> | <a href="$_SERVER[php_self]?show=kfz&do=delete&id=$_GET[id]&org=$_GET[org]">KFZ Löschen</a> </div></td>
|
||||
<td bgcolor="#FFFFFF"><div align="center"><a href="admin.php">Zurück</a> | <a href="$_SERVER[PHP_SELF]?show=kfz&do=delete&id=$_GET[id]&org=$_GET[org]">KFZ Löschen</a> </div></td>
|
||||
<td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="Aktualisieren"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<body onload="javascript:document.form1.msg_text.focus()">
|
||||
<form name="form1" method="post" action="$_SERVER[php_self]?pmdo=doreply">
|
||||
<form name="form1" method="post" action="$_SERVER[PHP_SELF]?pmdo=doreply">
|
||||
<input name="userid_to" type="hidden" id="userid_to" value="$_GET[to]">
|
||||
<input name="msg_id" type="hidden" id="msg_id" value="$_GET[msg_id]">
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<body onload="javascript:document.form1.msg_text.focus()">
|
||||
<form name="form1" id="form1" method="post" action="$_SERVER[php_self]?pmdo=dowrite">
|
||||
<form name="form1" id="form1" method="post" action="$_SERVER[PHP_SELF]?pmdo=dowrite">
|
||||
|
||||
<table width="90%" class="msg_box" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<table width="500" border="0" cellspacing="0" cellpadding="0" style="font-face:Arial;font-size:11px;font-weight:normal;">
|
||||
<tr>
|
||||
<td>
|
||||
In welchem Zeitraum möchtest du Meldungen empfangen:
|
||||
In welchem Zeitraum möchtest du Meldungen empfangen:
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
|
@ -67,7 +67,7 @@ $body_html
|
||||
<!-- ENDE Navigation -->
|
||||
|
||||
<!-- START Messages und Unwettermeldungen -->
|
||||
|
||||
<!--
|
||||
<tr>
|
||||
|
||||
<td height="1%" align="center" valign="top">
|
||||
@ -93,7 +93,7 @@ $body_html
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
-->
|
||||
<!-- ENDE Messages und Unwettermeldungen -->
|
||||
|
||||
<!-- START Mittelteil -->
|
||||
@ -115,20 +115,6 @@ $body_html
|
||||
<td background="_img/foot.gif" height="35" colspan="2"> </td>
|
||||
</tr>
|
||||
<!-- ENDE Fusszeile -->
|
||||
|
||||
|
||||
<!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var pkBaseURL = (("https:" == document.location.protocol) ? "https://livestats.rc-heli.de/" : "http://livestats.rc-heli.de/");
|
||||
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script><script type="text/javascript">
|
||||
try {
|
||||
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 4);
|
||||
piwikTracker.trackPageView();
|
||||
piwikTracker.enableLinkTracking();
|
||||
} catch( err ) {}
|
||||
</script><noscript><p><img src="http://livestats.rc-heli.de/piwik.php?idsite=4" style="border:0" alt="" /></p></noscript>
|
||||
<!-- End Piwik Tracking Code -->
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
281
admin.php
281
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 .= '
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td align="center">'.$row["rec_typ"].'</td>
|
||||
<td> <b>'.$row["adresse"].'</b> / '.$row["bezeichnung"].'</td>
|
||||
<td align="center"> <a href="'.$_SERVER["php_self"].'?show=dme&do=update&id='.$row["id"].'">zuordnen</a> </td>
|
||||
<td align="center"> <a href="'.$_SERVER["php_self"].'?show=dme&do=delete&id='.$row["id"].'">löschen</a> </td>
|
||||
<td align="center">' . $row["rec_typ"] . '</td>
|
||||
<td> <b>' . $row["adresse"] . '</b> / ' . $row["i_org"]." ".$row["i_ort"]." | ".$row["i_zusatz"] . '</td>
|
||||
<td align="center"> <a href="' . $_SERVER["PHP_SELF"] . '?show=dme&do=update&id=' . $row["id"] . '&ric='.$row["i_ric"].'">zuordnen</a> </td>
|
||||
<td align="center"> <a href="' . $_SERVER["PHP_SELF"] . '?show=dme&do=delete&id=' . $row["id"] . '">löschen</a> </td>
|
||||
</tr>
|
||||
';
|
||||
';
|
||||
}
|
||||
else {
|
||||
$show_all .= '
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td align="center">' . $row["rec_typ"] . '</td>
|
||||
<td> <b>' . $row["adresse"] . '</b> / ' . $row["bezeichnung"] . '</td>
|
||||
<td align="center"> <a href="' . $_SERVER["PHP_SELF"] . '?show=dme&do=update&id=' . $row["id"] . '">zuordnen</a> </td>
|
||||
<td align="center"> <a href="' . $_SERVER["PHP_SELF"] . '?show=dme&do=delete&id=' . $row["id"] . '">löschen</a> </td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
||||
// 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 .= '<option value="'.$row["id"].'" '.$selected.'>'.$row["org"].' '.$row["org_name"].'</option>';
|
||||
}
|
||||
|
||||
// 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 .= '<option value="'.$row["id"].'" '.$selected.'>'.$row["beschreibung"].'</option>';
|
||||
}
|
||||
|
||||
// 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 .= "<option value=\"$v\" $selected>$v</option>";
|
||||
}
|
||||
|
||||
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<EFBFBD>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<EFBFBD>fen ob noch weitere Eintr<74>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<EFBFBD>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<EFBFBD>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<EFBFBD>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<EFBFBD>fen ob noch weitere Eintr<74>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 .= '
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td> '.$row["bezeichnung"].'</td>
|
||||
<td align="center"> <a href="'.$_SERVER["php_self"].'?show=kfz&do=update&id='.$row["id"].'">zuordnen</a> </td>
|
||||
<td align="center"> <a href="'.$_SERVER["php_self"].'?show=kfz&do=delete&id='.$row["id"].'">löschen</a> </td>
|
||||
<td align="center"> <a href="'.$_SERVER["PHP_SELF"].'?show=kfz&do=update&id='.$row["id"].'">zuordnen</a> </td>
|
||||
<td align="center"> <a href="'.$_SERVER["PHP_SELF"].'?show=kfz&do=delete&id='.$row["id"].'">löschen</a> </td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
@ -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 .= '<option value="'.$row["id"].'" '.$selected.'>'.$row["org"].' '.$row["org_name"].'</option>';
|
||||
}
|
||||
|
||||
// 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<EFBFBD>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<EFBFBD>fen ob noch weitere Eintr<74>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<EFBFBD>fen ob noch weitere Eintr<74>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 = '<b>(User)</b> ';
|
||||
elseif( $row["a_admin"] == '1' ) $status = '<b>(Admin)</b> ';
|
||||
@ -295,7 +346,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] )
|
||||
elseif( $row["a_admin"] == '3' ) $status = '<b>(Closed)</b> ';
|
||||
|
||||
if( $row["a_admin"] != '1') {
|
||||
$show_del_button = '<a href="'.$_SERVER["php_self"].'?show=user&do=delete&id='.$row["id"].'">löschen</a>';
|
||||
$show_del_button = '<a href="'.$_SERVER["PHP_SELF"].'?show=user&do=delete&id='.$row["id"].'">löschen</a>';
|
||||
} else {
|
||||
$show_del_button = "";
|
||||
}
|
||||
@ -304,7 +355,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] )
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td> '.$status.$row["real_name"].'</td>
|
||||
<td><font size="2"> '.$row["a_mail"].'</font></td>
|
||||
<!--<td align="center"> <a href="'.$_SERVER["php_self"].'?show=user&do=update&id='.$row["id"].'">ändern</a> </td>-->
|
||||
<!--<td align="center"> <a href="'.$_SERVER["PHP_SELF"].'?show=user&do=update&id='.$row["id"].'">ändern</a> </td>-->
|
||||
<td>'.$row["a_name"].'</td>
|
||||
<td align="center"> '.$show_del_button.' </td>
|
||||
</tr>
|
||||
@ -321,7 +372,7 @@ elseif( $_GET["show"] == 'user' && !$_GET["do"] )
|
||||
<td>EMail</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
<form name="form999" method="post" action="'.$_SERVER[php_self].'?show=user&do=insert">
|
||||
<form name="form999" method="post" action="'.$_SERVER["PHP_SELF"].'?show=user&do=insert">
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td><input name="ins_name" id="ins_name" type="text" size="30"> </td>
|
||||
<td><input name="ins_mail" id="ins_mail" type="text" size="30"> </td>
|
||||
@ -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<EFBFBD>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 = '
|
||||
<select name="search_org" id="search_org">
|
||||
<option value="">--- wähle Org. zum bearbeiten ---</option>';
|
||||
|
||||
$result = mysql_query("SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysql_error());
|
||||
while($row = mysql_fetch_array($result))
|
||||
$result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysqli_error($dbconn));
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
if( $_REQUEST["search_org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
|
||||
if( isset($_REQUEST["search_org"]) && $_REQUEST["search_org"] == $row["id"] ) { $selected = 'selected'; } else { $selected = ''; }
|
||||
$select_search_org .= '
|
||||
<option value="'.$row["id"].'" '.$selected.'>'.$row["org"].' '.$row["org_name"].'</option>
|
||||
';
|
||||
@ -398,21 +449,21 @@ else
|
||||
</select>
|
||||
';
|
||||
|
||||
// Ausgabe zusammenstellen wenn org zum bearbeiten gewählt
|
||||
if( $_REQUEST["search_org"] )
|
||||
// Ausgabe zusammenstellen wenn org zum bearbeiten gew<EFBFBD>hlt
|
||||
if( isset($_REQUEST["search_org"]) )
|
||||
{
|
||||
$show_ric = '--- <b>RIC/ZVEI</b> ----------<br>';
|
||||
|
||||
$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 .= ' <a href="'.$_SERVER["PHP_SELF"].'?do=update&id='.$row["id"].'&show=dme&org='.$row["org_id"].'&form='.$row["formatierung_id"].'">'.$row["adresse"].'</a> | '.$row["rec_typ"].' | '.$row["bezeichnung"].'<br>';
|
||||
}
|
||||
|
||||
$show_ric .= '<br>--- <b>KFZ/FMS</b> ----------<br>';
|
||||
|
||||
$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 .= ' <a href="'.$_SERVER["PHP_SELF"].'?do=update&id='.$row["id"].'&show=kfz&org='.$row["org_id"].'">'.$row["kennung"].'</a> | '.$row["bezeichnung"].'<br>';
|
||||
}
|
||||
@ -434,5 +485,5 @@ eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");");
|
||||
/**************************/
|
||||
// Datenbank schliessen
|
||||
//
|
||||
mysql_close($dbconn);
|
||||
mysqli_close($dbconn);
|
||||
?>
|
||||
|
@ -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<EFBFBD>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));
|
||||
}
|
||||
?>
|
BIN
apple-touch-icon.png
Normal file
BIN
apple-touch-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
@ -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 #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br>\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<EFBFBD>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);
|
||||
?>
|
||||
|
@ -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 = '<link href="/monitor.css" rel="stylesheet" type="text/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 = '<center><h3><b>Welcome back</b></h3></center>';
|
||||
|
||||
// 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 = '<a href="index.php">Home</a> | ';
|
||||
//$nav_menu .= '<a href="suche.php">Suche</a> | ';
|
||||
$nav_menu .= '<a href="suche.php">Suche</a> | ';
|
||||
//$nav_menu .= '<a href="kfz.php">Fahrzeuge</a> | ';
|
||||
$nav_menu .= '<a href="profile.php">Profil</a> | ';
|
||||
//$nav_menu .= '<a href="stats.php">Stats</a> | ';
|
||||
$nav_menu .= '<a href="stats.php">Stats</a> | ';
|
||||
//$nav_menu .= '<a href="http://board.fire-devils.org" target="_blank"><b>FORUM</b></a> | ';
|
||||
$nav_menu .= '<a href="javascript:oeffnefenster(\'pmfunctions.inc.php?pmdo=write\');">PM</a> | ';
|
||||
// Wenn User Adminrechte hat
|
||||
@ -345,4 +351,11 @@ if( $_SERVER["SCRIPT_NAME"] == "/index.php" ) {
|
||||
} else {
|
||||
$body_html = '<body>';
|
||||
}
|
||||
?>
|
||||
|
||||
// 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="";
|
@ -20,7 +20,7 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
// Status prüfen, berichtigen, ersetzen
|
||||
// Status pr<EFBFBD>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");
|
||||
|
108
get.php
108
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 "<br>-----------";
|
||||
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] = '
|
||||
<tr>
|
||||
<td colspan="5" bgcolor="black"><span style="color:white;font-size:16;font-weight:bold"> Tageswechsel: '.get_date_long($row["zeit"]).'</span></td>
|
||||
<td colspan="5" bgcolor="black"><span style="color:white;font-size:16px;font-weight:bold"> Tageswechsel: ' . get_date_long($row["zeit"]) . '</span></td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
@ -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 '<meta http-equiv="refresh" content="1">';
|
||||
|
||||
if ( $show )
|
||||
if ( isset($show) )
|
||||
{
|
||||
echo '<table width="98%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000" valign="top">';
|
||||
foreach ( $show as $item )
|
||||
|
@ -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 .= '<a href="javascript:oeffnefenster(\'pmfunctions.inc.php?pmdo=write&msg_to='.$row["id"].'\');" title="Nachricht an: '.$row["real_name"].'"><i>'.$row["a_name"].'</i></a>,';
|
||||
}
|
||||
|
||||
// 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 "<html>";
|
||||
|
||||
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;
|
||||
|
52
index.php
52
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 = '
|
||||
<input type=button name="refresh" value="Aktualisieren" onClick="history.go()">
|
||||
@ -70,23 +73,24 @@ require_once("config.inc.php");
|
||||
|
||||
$nav_org_filter = '
|
||||
<select name="org_filter" onChange="MM_jumpMenu(\'parent\',this,0)">
|
||||
<option value="'.$_SERVER["php_self"].'?filter='.$filter.'&org_filter=ff&stat=0"'; if( $org_filter == 'ff' && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>Feuerwehr</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter='.$filter.'&org_filter=rd&stat=0"'; if( $org_filter == 'rd' && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>Rettungsdienst</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter='.$filter.'&org_filter=all&stat=0"'; if( !$org_filter && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>FW und RD</option>
|
||||
<option value="'.$_SERVER["PHP_SELF"].'?filter='.$filter.'&org_filter=ff&stat=0"'; if( $org_filter == 'ff') $nav_org_filter .= 'selected'; $nav_org_filter .= '>Feuerwehr</option>
|
||||
<option value="'.$_SERVER["PHP_SELF"].'?filter='.$filter.'&org_filter=rd&stat=0"'; if( $org_filter == 'rd') $nav_org_filter .= 'selected'; $nav_org_filter .= '>Rettungsdienst</option>
|
||||
<option value="'.$_SERVER["PHP_SELF"].'?filter='.$filter.'&org_filter=all&stat=0"'; if( $org_filter == "") $nav_org_filter .= 'selected'; $nav_org_filter .= '>FW und RD</option>
|
||||
</select>
|
||||
';
|
||||
|
||||
$nav_filter = '
|
||||
<select id="filter" name="filter" onChange="MM_jumpMenu(\'parent\',this,0)">
|
||||
<option value="'.$_SERVER["php_self"].'?filter=48&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 48 ) $nav_filter .= 'selected'; $nav_filter .= '>48</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter=24&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 24 ) $nav_filter .= 'selected'; $nav_filter .= '>24</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter=10&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 10 ) $nav_filter .= 'selected'; $nav_filter .= '>10</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter=5&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 5 ) $nav_filter .= 'selected'; $nav_filter .= '>5</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter=2&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 2 ) $nav_filter .= 'selected'; $nav_filter .= '>2</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter=1&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 1 ) $nav_filter .= 'selected'; $nav_filter .= '>1</option>
|
||||
<option value="'.$_SERVER["PHP_SELF"].'?filter=48&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 48 ) $nav_filter .= 'selected'; $nav_filter .= '>48</option>
|
||||
<option value="'.$_SERVER["PHP_SELF"].'?filter=24&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 24 ) $nav_filter .= 'selected'; $nav_filter .= '>24</option>
|
||||
<option value="'.$_SERVER["PHP_SELF"].'?filter=10&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 10 ) $nav_filter .= 'selected'; $nav_filter .= '>10</option>
|
||||
<option value="'.$_SERVER["PHP_SELF"].'?filter=5&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 5 ) $nav_filter .= 'selected'; $nav_filter .= '>5</option>
|
||||
<option value="'.$_SERVER["PHP_SELF"].'?filter=2&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 2 ) $nav_filter .= 'selected'; $nav_filter .= '>2</option>
|
||||
<option value="'.$_SERVER["PHP_SELF"].'?filter=1&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 1 ) $nav_filter .= 'selected'; $nav_filter .= '>1</option>
|
||||
</select>
|
||||
';
|
||||
|
||||
if (!isset($java_script)) $java_script = "";
|
||||
$java_script .= "
|
||||
<script type=\"text/javascript\" language=\"javascript\">
|
||||
|
||||
@ -255,10 +259,12 @@ function toggleindicator(status){
|
||||
document.getElementById(\"onlUsers\").innerHTML = answer_OnlUsers;
|
||||
}
|
||||
|
||||
/*
|
||||
if(document.getElementById(\"Unwetter\").innerHTML != answer_Unwetter[1] && answer_Unwetter[1] != \"\"){
|
||||
document.getElementById(\"Unwetter\").innerHTML = answer_Unwetter[0];
|
||||
document.getElementById(\"UnwetterContent\").innerHTML = answer_Unwetter[1];
|
||||
}
|
||||
*/
|
||||
|
||||
if(document.getElementById(\"PrivateMessage\").innerHTML != answer_UserPM && answer_UserPM != \"\"){
|
||||
document.getElementById(\"PrivateMessage\").innerHTML = answer_UserPM;
|
||||
@ -308,6 +314,6 @@ function doSQL(what, pk) {
|
||||
</script>
|
||||
";
|
||||
|
||||
eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");");
|
||||
if (!isset($page_middle)) $page_middle = "";
|
||||
|
||||
?>
|
||||
eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");");
|
||||
|
211
index.php.bak
211
index.php.bak
@ -1,211 +0,0 @@
|
||||
<?php
|
||||
require_once("config.inc.php");
|
||||
|
||||
// Filter Datum/Zeit erstellen
|
||||
if( !$_GET["filter"] && !$_SESSION["filter"] )
|
||||
{
|
||||
$filter = 1;
|
||||
}
|
||||
elseif( !$_GET["filter"] && $_SESSION["filter"] )
|
||||
{
|
||||
$filter = $_SESSION["filter"];
|
||||
}
|
||||
elseif( $_GET["filter"] )
|
||||
{
|
||||
$filter = $_GET["filter"];
|
||||
$_SESSION["filter"] = $_GET["filter"];
|
||||
}
|
||||
|
||||
// Filter organisation
|
||||
if( !$_GET["org_filter"] && !$_SESSION["org_filter"] )
|
||||
{
|
||||
$org_filter = '';
|
||||
}
|
||||
elseif( !$_GET["org_filter"] && $_SESSION["org_filter"] )
|
||||
{
|
||||
if( $_SESSION["org_filter"] == 'AND (org = "BF" OR org = "FF")' )
|
||||
{
|
||||
$org_filter = 'ff';
|
||||
}
|
||||
else
|
||||
{
|
||||
$org_filter = $_SESSION["org_filter"];
|
||||
}
|
||||
}
|
||||
elseif( $_GET["org_filter"] && $_GET["org_filter"] != 'all' )
|
||||
{
|
||||
$org_filter = $_GET["org_filter"];
|
||||
$_SESSION["org_filter"] = $_GET["org_filter"];
|
||||
}
|
||||
elseif( $_GET["org_filter"] == 'all' )
|
||||
{
|
||||
$org_filter = '';
|
||||
$_SESSION["org_filter"] = '';
|
||||
}
|
||||
|
||||
// Filter Status anzeigen
|
||||
if( $_GET["stat"] == '' && !$_SESSION["stat"] )
|
||||
{
|
||||
$stat = '0';
|
||||
}
|
||||
elseif( $_GET["stat"] == '' && $_SESSION["stat"] )
|
||||
{
|
||||
$stat = $_SESSION["stat"];
|
||||
}
|
||||
elseif( $_GET["stat"] != '' )
|
||||
{
|
||||
$stat = $_GET["stat"];
|
||||
$_SESSION["stat"] = $_GET["stat"];
|
||||
}
|
||||
|
||||
// Wenn Aktualisierung ohne Ausgabe
|
||||
if( $_GET["nooutput"] ) { $filter = 1; $stat = 1; }
|
||||
|
||||
$show_filter = filter_zeit($filter);
|
||||
$show_filter = " WHERE a.zeit > '$show_filter' ";
|
||||
|
||||
$refresh = '
|
||||
<input type=button name="refresh" value="Aktualisieren" onClick="history.go()">
|
||||
';
|
||||
|
||||
$nav_org_filter = '
|
||||
<select name="org_filter" onChange="MM_jumpMenu(\'parent\',this,0)">
|
||||
<option value="'.$_SERVER["php_self"].'?filter='.$filter.'&org_filter=ff&stat=0"'; if( $org_filter == 'ff' && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>Feuerwehr</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter='.$filter.'&org_filter=rd&stat=0"'; if( $org_filter == 'rd' && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>Rettungsdienst</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter='.$filter.'&org_filter=all&stat=0"'; if( !$org_filter && $stat == '0' ) $nav_org_filter .= 'selected'; $nav_org_filter .= '>FW und RD</option>
|
||||
</select>
|
||||
';
|
||||
|
||||
$nav_filter = '
|
||||
<select id="filter" name="filter" onChange="MM_jumpMenu(\'parent\',this,0)">
|
||||
<option value="'.$_SERVER["php_self"].'?filter=48&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 48 ) $nav_filter .= 'selected'; $nav_filter .= '>48</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter=24&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 24 ) $nav_filter .= 'selected'; $nav_filter .= '>24</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter=10&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 10 ) $nav_filter .= 'selected'; $nav_filter .= '>10</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter=5&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 5 ) $nav_filter .= 'selected'; $nav_filter .= '>5</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter=2&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 2 ) $nav_filter .= 'selected'; $nav_filter .= '>2</option>
|
||||
<option value="'.$_SERVER["php_self"].'?filter=1&org_filter='.$org_filter.'&stat='.$stat.'&aq='.$aq.'"'; if( $filter == 1 ) $nav_filter .= 'selected'; $nav_filter .= '>1</option>
|
||||
</select>
|
||||
';
|
||||
|
||||
$java_script .= "
|
||||
<script type=\"text/javascript\" language=\"javascript\">
|
||||
|
||||
var http_request = false;
|
||||
var http_request2 = false;
|
||||
|
||||
function toggleindicator(status){
|
||||
//Diese Variable definiert wie lange der Indicator mindestens da sein soll.
|
||||
var timetowait = 2100;
|
||||
if(status=='off') {
|
||||
var vergangen = new Date().getTime() - time
|
||||
|
||||
if( vergangen >=timetowait) {
|
||||
document.getElementById(\"loading-indicator\").style.display='none';
|
||||
} else {
|
||||
setTimeout(toggleindicator(\"off\"),timetowait - vergangen);
|
||||
}
|
||||
} else {
|
||||
document.getElementById(\"loading-indicator\").style.display='';
|
||||
document.getElementById(\"loading-indicator\").style.position='absolute';
|
||||
document.getElementById(\"loading-indicator\").style.left='40%';
|
||||
document.getElementById(\"loading-indicator\").style.top='100px';
|
||||
time = new Date().getTime();
|
||||
}
|
||||
}
|
||||
|
||||
/// second Request
|
||||
function macheSecondaryRequest() {
|
||||
|
||||
var url = 'get_other.php';
|
||||
|
||||
http_request2 = false;
|
||||
|
||||
if (window.XMLHttpRequest) { // Mozilla, Safari,...
|
||||
http_request2 = new XMLHttpRequest();
|
||||
} else if (window.ActiveXObject) { // IE
|
||||
try {
|
||||
http_request2 = new ActiveXObject(\"Msxml2.XMLHTTP\");
|
||||
} catch (e) {
|
||||
try {
|
||||
http_request2 = new ActiveXObject(\"Microsoft.XMLHTTP\");
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
if (!http_request2) {
|
||||
alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen');
|
||||
return false;
|
||||
}
|
||||
http_request2.open('GET', url, true);
|
||||
http_request2.onreadystatechange = alertSecondaryInhalt;
|
||||
http_request2.send(null);
|
||||
|
||||
window.setTimeout(\"macheSecondaryRequest()\",60000);
|
||||
}
|
||||
|
||||
function alertSecondaryInhalt() {
|
||||
if (http_request2.readyState == 4) {
|
||||
var answer = http_request2.responseText;
|
||||
if(document.getElementById(\"onlUsers\").innerHTML != answer){
|
||||
document.getElementById(\"onlUsers\").innerHTML = answer;
|
||||
}
|
||||
else{
|
||||
document.getElementById(\"onlUsers\").innerHTML = \"\";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function macheRequest() {
|
||||
|
||||
var url = 'get.php?".$_SERVER['QUERY_STRING']."';
|
||||
|
||||
http_request = false;
|
||||
|
||||
if (window.XMLHttpRequest) { // Mozilla, Safari,...
|
||||
http_request = new XMLHttpRequest();
|
||||
} else if (window.ActiveXObject) { // IE
|
||||
try {
|
||||
http_request = new ActiveXObject(\"Msxml2.XMLHTTP\");
|
||||
} catch (e) {
|
||||
try {
|
||||
http_request = new ActiveXObject(\"Microsoft.XMLHTTP\");
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
if (!http_request) {
|
||||
alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen');
|
||||
return false;
|
||||
}
|
||||
http_request.open('GET', url, true);
|
||||
http_request.onreadystatechange = alertInhalt;
|
||||
http_request.send(null);
|
||||
|
||||
if (document.getElementById(\"filter\").options[5].selected == true) {
|
||||
window.setTimeout(\"macheRequest()\",10000);
|
||||
}
|
||||
}
|
||||
|
||||
function alertInhalt() {
|
||||
if (http_request.readyState == 4) {
|
||||
var answer = http_request.responseText;
|
||||
if(document.getElementById(\"inhalt\").innerHTML != answer){
|
||||
document.getElementById(\"inhalt\").innerHTML = answer;
|
||||
}
|
||||
else{
|
||||
document.getElementById(\"inhalt\").innerHTML = \"\";
|
||||
}
|
||||
|
||||
if(document.getElementById(\"loading-indicator\").style.display=='')
|
||||
{
|
||||
toggleindicator(\"off\");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
";
|
||||
|
||||
eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");");
|
||||
|
||||
?>
|
121
kfz.php
Executable file
121
kfz.php
Executable file
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
/*
|
||||
* PHP Frontend for pocsag monitor
|
||||
*
|
||||
* Copyright (C) 2004-2005
|
||||
* Manuel Weiser (manuelw@fire-devils.org)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
require('config.inc.php');
|
||||
|
||||
/**************************/
|
||||
// Seite zusammenstellen
|
||||
//
|
||||
|
||||
// Wenn zurcksetzen geklickt
|
||||
if( $_GET["do"] == 'reset' )
|
||||
{
|
||||
$result = mysql_query("UPDATE kfz_fms SET status='2' WHERE org_id='$_GET[orgid]'") or die (mysql_error());
|
||||
}
|
||||
|
||||
// Wenn einzel Status setzen
|
||||
if( $_GET["do"] == 'setkfz' )
|
||||
{
|
||||
$result_kfz = mysql_query("SELECT num, status, richtung, text, zeit FROM status WHERE kennung = '$_GET[kennung]' ORDER BY zeit DESC LIMIT 0,1") or die (mysql_error());
|
||||
$row_kfz = mysql_fetch_array($result_kfz);
|
||||
|
||||
$set_status_text = $status_kfz[$_GET[status]].' (S)';
|
||||
|
||||
echo ($row_kfz["zeit"] - $_GET["last"]);
|
||||
|
||||
if( $row_kfz["richtung"] == '1' && ($row_kfz["zeit"] - $_GET["last"]) < ($korr_status_zeit*100) )
|
||||
{
|
||||
$result = mysql_query("UPDATE status SET status='$_GET[status]', richtung='0', text='$set_status_text', zeit='$row_kfz[zeit]' WHERE num='$row_kfz[num]'") or die (mysql_error());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = mysql_query("INSERT INTO status (kennung, status, richtung, text, done) VALUES ('$_GET[kennung]', '$_GET[status]', '0', '$set_status_text', '1')") or die(mysql_error());
|
||||
}
|
||||
|
||||
$result = mysql_query("UPDATE kfz_fms SET status='$_GET[status]' WHERE kennung='$_GET[kennung]'") or die (mysql_error());
|
||||
}
|
||||
|
||||
// Organisationen abrufen
|
||||
$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))
|
||||
{
|
||||
|
||||
// Fahrzeuge zur Organisation abrufen
|
||||
$kfz = ''; $i = 0;
|
||||
$result_kfz = mysql_query("SELECT id, kennung, bezeichnung, status, status_zeit, org_id FROM kfz_fms WHERE org_id = '$row[id]' ORDER BY bezeichnung ASC") or die (mysql_error());
|
||||
while($row_kfz = mysql_fetch_array($result_kfz))
|
||||
{
|
||||
if( $row["org"] == 'RD' )
|
||||
{
|
||||
$set_status = "<a href=\'$_SERVER[PHP_SELF]?kennung=$row_kfz[kennung]&status=1&do=setkfz&last=$row_kfz[status_zeit]\'>1</a><br>";
|
||||
$set_status .= "<a href=\'$_SERVER[PHP_SELF]?kennung=$row_kfz[kennung]&status=2&do=setkfz&last=$row_kfz[status_zeit]\'>2</a><br>";
|
||||
$set_status .= "<a href=\'$_SERVER[PHP_SELF]?kennung=$row_kfz[kennung]&status=3&do=setkfz&last=$row_kfz[status_zeit]\'>3</a><br>";
|
||||
$set_status .= "<a href=\'$_SERVER[PHP_SELF]?kennung=$row_kfz[kennung]&status=4&do=setkfz&last=$row_kfz[status_zeit]\'>4</a><br>";
|
||||
$set_status .= "<a href=\'$_SERVER[PHP_SELF]?kennung=$row_kfz[kennung]&status=6&do=setkfz&last=$row_kfz[status_zeit]\'>6</a><br>";
|
||||
$set_status .= "<a href=\'$_SERVER[PHP_SELF]?kennung=$row_kfz[kennung]&status=7&do=setkfz&last=$row_kfz[status_zeit]\'>7</a><br>";
|
||||
$set_status .= "<a href=\'$_SERVER[PHP_SELF]?kennung=$row_kfz[kennung]&status=8&do=setkfz&last=$row_kfz[status_zeit]\'>8</a><br>";
|
||||
$set_status .= "<a href=\'$_SERVER[PHP_SELF]?kennung=$row_kfz[kennung]&status=9&do=setkfz&last=$row_kfz[status_zeit]\'>9</a><br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$set_status = "<a href=\'$_SERVER[PHP_SELF]?kennung=$row_kfz[kennung]&status=1&do=setkfz&last=$row_kfz[status_zeit]\'>1</a><br>";
|
||||
$set_status .= "<a href=\'$_SERVER[PHP_SELF]?kennung=$row_kfz[kennung]&status=2&do=setkfz&last=$row_kfz[status_zeit]\'>2</a><br>";
|
||||
$set_status .= "<a href=\'$_SERVER[PHP_SELF]?kennung=$row_kfz[kennung]&status=3&do=setkfz&last=$row_kfz[status_zeit]\'>3</a><br>";
|
||||
$set_status .= "<a href=\'$_SERVER[PHP_SELF]?kennung=$row_kfz[kennung]&status=4&do=setkfz&last=$row_kfz[status_zeit]\'>4</a><br>";
|
||||
$set_status .= "<a href=\'$_SERVER[PHP_SELF]?kennung=$row_kfz[kennung]&status=6&do=setkfz&last=$row_kfz[status_zeit]\'>6</a><br>";
|
||||
}
|
||||
|
||||
$i++;
|
||||
if( $i == 1 ) $kfz = '<table><tr>';
|
||||
$kfz .= '<td width="70" class="kfz_trennung" onClick="return overlib(\'<center>'.$set_status.'</center>\', STICKY, CAPTION, \'auf\', CENTER);" onmouseout="nd();"><span style="cursor:move;color:'.$status_color[$row_kfz["status"]].'; font-size:'.$status_size.'; font-weight:'.$status_format[$row_kfz["status"]].'"><center>'.$row_kfz["bezeichnung"].'</center></span></td>';
|
||||
}
|
||||
if( $i > 0 ) $kfz .= '</tr></table>';
|
||||
|
||||
if( $kfz )
|
||||
{
|
||||
if( $row[org] == 'FF' ) $bgcolor = 'red';
|
||||
if( $row[org] == 'RD' ) $bgcolor = 'green';
|
||||
|
||||
$show_all .= '
|
||||
<tr>
|
||||
<td bgcolor="'.$bgcolor.'" width="150"><font color="white">'.$row["org_name"].'</font></td>
|
||||
<td bgcolor="white">'.$kfz.'</td>
|
||||
<td bgcolor="white" width="80"><div align="center"><a href="'.$_SERVER["php_self"].'?orgid='.$row["id"].'&do=reset">rücksetzen</a></div></td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Seiteninhalt ausgeben
|
||||
eval ("\$page_middle .= \"".gettemplate($template_dir."body_kfz_uebersicht")."\";");
|
||||
|
||||
/**************************/
|
||||
// Ausgabe Rahmen
|
||||
//
|
||||
eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");");
|
||||
|
||||
/**************************/
|
||||
// Datenbank schliessen
|
||||
//
|
||||
mysql_close($dbconn);
|
||||
?>
|
@ -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 )
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Login falsch!<br><a href="javascript:history.back()">zurück</a>
|
||||
Login falsch!<br><a href="javascript:history.back()">zurück</a>
|
||||
</body>
|
||||
</html>';
|
||||
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 '
|
||||
<br><br>
|
||||
'.$login_infotext.'<br><br>
|
||||
<form name="form1" method="post" action="'.$PHP_SELF.'?mode=login">
|
||||
<form name="form1" method="post" action="'.$_SERVER["PHP_SELF"].'?mode=login">
|
||||
<table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td class="table_news_head"> <b>Login</b></td>
|
||||
@ -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'<center><br><br><br>Eine EMail mit deinem Zugang wurde an <b>'.$row[a_mail].'</b> versand.';
|
||||
echo'<center><br><br><br>Eine EMail mit deinem Zugang wurde an <b>'.$row["a_mail"].'</b> versand.';
|
||||
|
||||
exit;
|
||||
}
|
||||
@ -232,7 +233,7 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
elseif (!$_SESSION["name"] && $_GET["mode"] == 'register')
|
||||
elseif (!isset($_SESSION["name"]) && isset($_GET["mode"]) && $_GET["mode"] == 'register')
|
||||
{
|
||||
echo '
|
||||
<br><br>
|
||||
@ -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");
|
||||
}
|
||||
|
@ -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 = '
|
||||
<select name="userid_to" id="userid_to">
|
||||
<option value="0">Empfänger</option>
|
||||
<option value="0">Empfänger</option>
|
||||
<option>--------------------</option>
|
||||
<option value="0">Alle</option>';
|
||||
|
||||
$result = mysql_query("SELECT id, real_name FROM admin_users WHERE pm_allow = '1' ORDER BY real_name ASC") or die (mysql_error());
|
||||
while($row = mysql_fetch_array($result))
|
||||
$result = mysqli_query($dbconn, "SELECT id, real_name FROM admin_users WHERE pm_allow = '1' ORDER BY real_name ASC") or die (mysqli_error($dbconn));
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
if( $_GET["msg_to"] == $row["id"] ) { $selected = 'selected'; $can_pm = '1'; } else { $selected = ''; }
|
||||
if( isset($_GET["msg_to"]) && $_GET["msg_to"] == $row["id"] ) { $selected = 'selected'; $can_pm = '1'; } else { $selected = ''; }
|
||||
$select_msg_to .= '
|
||||
<option value="'.$row["id"].'" '.$selected.'>'.$row["real_name"].'</option>
|
||||
';
|
||||
@ -59,41 +59,43 @@ elseif( $_GET["pmdo"] == "write" )
|
||||
</select>
|
||||
';
|
||||
|
||||
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 .= "<b><font color=\"red\"><br>Der User darf keine PM Empfangen/Senden</font></b><br><br>";
|
||||
}
|
||||
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<EFBFBD>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));
|
||||
}
|
||||
?>
|
56
profile.php
56
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 = '<input type="checkbox" name="mail2sms" value="1" '.$checked.'>';
|
||||
$mailform_mail = '<input name="alarmmail" type="text" id="alarmmail" value="'.$row["a_alarmmail"].'">';
|
||||
|
||||
@ -86,8 +90,8 @@ if( !$_GET["do"] )
|
||||
<select name="search_ric" id="search_ric">'
|
||||
;
|
||||
|
||||
$result = mysql_query("SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysql_error());
|
||||
while($row = mysql_fetch_array($result))
|
||||
$result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysqli_error($dbconn));
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
$select_search_ric .= '
|
||||
<option value="'.$row["id"].'">'.$row["org"].' '.$row["org_name"].'</option>
|
||||
@ -98,7 +102,7 @@ if( !$_GET["do"] )
|
||||
</select>
|
||||
';
|
||||
|
||||
$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 = "<span title=\"$row[stiwo]\">Stiwo</span>"; } else { $stiwo = ""; }
|
||||
|
||||
if (!isset($abos)) $abos="";
|
||||
$abos .= '<tr>
|
||||
<td bgcolor="'.$row["bg_farbe"].'" style="border-bottom-style:solid;border-bottom-width:thin;"><span style="font-family:Verdana;color:'.$row["text_farbe"].';font-size:'.$row["text_groesse"].' px;font-weight:'.$row["text_format"].'"> '.$row["org"].' '.$row["org_name"].' '.$row["bezeichnung"].' - '.$row["rec_typ"].'</span></td>
|
||||
<td align="center" bgcolor="'.$row["bg_farbe"].'" style="border-bottom-style:solid;border-bottom-width:thin;">'.$stiwo.' </td>
|
||||
@ -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<EFBFBD>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 .= '<input name="abo_ric['.$i++.']" type="checkbox" value="'.$row["adresse"].'"> <b>'.$org.' '.$org_name.' '.$row["bezeichnung"].'</b> - '.$row["rec_typ"].'<br>';
|
||||
}
|
||||
@ -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<EFBFBD>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<EFBFBD>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);
|
||||
?>
|
||||
|
126
stats.php
Executable file
126
stats.php
Executable file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
/*
|
||||
* PHP Frontend for pocsag monitor
|
||||
*
|
||||
* Copyright (C) 2004-2005
|
||||
* Manuel Weiser (manuelw@fire-devils.org)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
require('config.inc.php');
|
||||
|
||||
if (!isset($count_rd_dme)) $count_rd_dme="";
|
||||
if (!isset($count_ff_dme)) $count_ff_dme="";
|
||||
if (!isset($count_rd_zvei)) $count_rd_zvei="";
|
||||
if (!isset($count_ffvei)) $count_ff_zvei="";
|
||||
if (!isset($count_rd_kfz)) $count_rd_kfz="";
|
||||
if (!isset($count_ff_kfz)) $count_ff_kfz="";
|
||||
if (!isset($stats_ff)) $stats_ff="";
|
||||
if (!isset($stats_rd)) $stats_rd="";
|
||||
if (!isset($stats_thw)) $stats_thw="";
|
||||
if (!isset($stats_kat)) $stats_kat="";
|
||||
|
||||
|
||||
/**************************/
|
||||
// Seite zusammenstellen
|
||||
//
|
||||
|
||||
$result = mysqli_query($dbconn, "SELECT a.rec_typ, b.org
|
||||
FROM ric_zvei a
|
||||
LEFT JOIN organisation b ON b.id = a.org_id") or die (mysqli_error());
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
if( $row["org"] == 'RD' )
|
||||
{
|
||||
if( $row["rec_typ"] == 'DME' ) $count_rd_dme++;
|
||||
else $count_rd_zvei++;
|
||||
}
|
||||
elseif( $row["org"] != 'RD' && $row["org"] != 'RLS' )
|
||||
{
|
||||
if( $row["rec_typ"] == 'DME' ) $count_ff_dme++;
|
||||
else $count_ff_zvei++;
|
||||
}
|
||||
}
|
||||
|
||||
$result = mysqli_query($dbconn, "SELECT a.org_id, b.org
|
||||
FROM kfz_fms a
|
||||
LEFT JOIN organisation b ON b.id = a.org_id") or die (mysqli_error());
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
if( $row["org"] == 'RD' ) $count_rd_kfz++;
|
||||
elseif( $row["org"] != 'RD' ) $count_ff_kfz++;
|
||||
}
|
||||
|
||||
$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 = 'FF' AND alarm_count != 0 OR org = 'KBM' AND alarm_count != 0 OR org = 'BF' 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_ff .= '
|
||||
<tr>
|
||||
<td bgcolor="'.$orgcolor[6].'"> '.$row["org"].' '.$row["org_name"].'</td>
|
||||
<td align="center" bgcolor="'.$orgcolor[6].'"> '.$row["alarm_count"].'</td>
|
||||
<td align="center" bgcolor="'.$orgcolor[6].'"> '.get_date($row["last_alarm"]).'</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
$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 .= '
|
||||
<tr>
|
||||
<td bgcolor="'.$orgcolor[8].'"> '.$row["org"].' '.$row["org_name"].'</td>
|
||||
<td align="center" bgcolor="'.$orgcolor[8].'"> '.$row["alarm_count"].'</td>
|
||||
<td align="center" bgcolor="'.$orgcolor[8].'"> '.get_date($row["last_alarm"]).'</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
$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 .= '
|
||||
<tr>
|
||||
<td bgcolor="'.$orgcolor[7].'"> '.$row["org"].' '.$row["org_name"].'</td>
|
||||
<td align="center" bgcolor="'.$orgcolor[7].'"> '.$row["alarm_count"].'</td>
|
||||
<td align="center" bgcolor="'.$orgcolor[7].'"> '.get_date($row["last_alarm"]).'</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
$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 .= '
|
||||
<tr>
|
||||
<td bgcolor="'.$orgcolor[4].'"> '.$row["org"].' '.$row["org_name"].'</td>
|
||||
<td align="center" bgcolor="'.$orgcolor[4].'"> '.$row["alarm_count"].'</td>
|
||||
<td align="center" bgcolor="'.$orgcolor[4].'"> '.get_date($row["last_alarm"]).'</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
// Seiteninhalt ausgeben
|
||||
eval ("\$page_middle .= \"".gettemplate($template_dir."body_stats")."\";");
|
||||
|
||||
/**************************/
|
||||
// Ausgabe Rahmen
|
||||
//
|
||||
eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");");
|
||||
|
||||
/**************************/
|
||||
// Datenbank schliessen
|
||||
//
|
||||
mysqli_close($dbconn);
|
||||
?>
|
49
suche.php
49
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 = '
|
||||
<select name="search_ric" id="search_ric">';
|
||||
|
||||
$result = mysql_query("SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysql_error());
|
||||
while($row = mysql_fetch_array($result))
|
||||
$result = mysqli_query($dbconn, "SELECT id, org_name, org FROM organisation WHERE org != '' ORDER BY org ASC, org_name ASC") or die (mysqli_error($dbconn));
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
$select_search_ric .= '
|
||||
<option value="'.$row["id"].'"'; if($_REQUEST["search_ric"]==$row["id"]) {$select_search_ric.=' selected';}else{$select_search_ric.='';} $select_search_ric.='>'.$row["org"].' '.$row["org_name"].'</option>
|
||||
@ -118,20 +134,20 @@ require('config.inc.php');
|
||||
{
|
||||
if( $_REQUEST["search_word"] )
|
||||
{
|
||||
$show_filter = 'WHERE a.text LIKE "%'.$_REQUEST[search_word].'%"';
|
||||
$show_filter = 'WHERE a.text LIKE "%'.$_REQUEST["search_word"].'%"';
|
||||
|
||||
if( $_REQUEST["search_word_org"] )
|
||||
{
|
||||
$show_filter .= 'AND d.org_name LIKE "%'.$_REQUEST[search_word_org].'%"';
|
||||
$show_filter .= 'AND d.org_name LIKE "%'.$_REQUEST["search_word_org"].'%"';
|
||||
}
|
||||
}
|
||||
else{
|
||||
$show_filter = 'WHERE d.org_name LIKE "%'.$_REQUEST[search_word_org].'%"';
|
||||
$show_filter = 'WHERE d.org_name LIKE "%'.$_REQUEST["search_word_org"].'%"';
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
$show_filter = 'WHERE d.id = "'.$_REQUEST[search_ric].'"';
|
||||
$show_filter = 'WHERE d.id = "'.$_REQUEST["search_ric"].'"';
|
||||
}
|
||||
|
||||
if( $_REQUEST["search_org"] != '0' )
|
||||
@ -153,7 +169,7 @@ require('config.inc.php');
|
||||
// Auslesen pocsag
|
||||
if( $_REQUEST["search_what"] == 'ric' && $_REQUEST["search_ric"] != '' || $_REQUEST["search_what"] == 'word' && $_REQUEST["search_word"] != '' || $_REQUEST["search_what"] == 'word' && $_REQUEST["search_word_org"] != '' )
|
||||
{
|
||||
$result = mysql_query("SELECT a.adresse AS adresse_neu, a.bezeichnung AS bezeichnung_neu, a.rec_typ, a.text, DATE_FORMAT(a.zeit, '%Y%m%d%H%i%s') AS zeit, a.funktion,
|
||||
$result = mysqli_query($dbconn, "SELECT a.adresse AS adresse_neu, a.bezeichnung AS bezeichnung_neu, a.rec_typ, a.text, DATE_FORMAT(a.zeit, '%Y%m%d%H%i%s') AS zeit, a.funktion,
|
||||
b.adresse, b.formatierung_id, b.bezeichnung,
|
||||
c.id, c.bg_farbe, c.text_farbe, c.text_format, c.text_groesse, c.text_groesse_text,
|
||||
d.org_name, d.org
|
||||
@ -162,12 +178,13 @@ if( $_REQUEST["search_what"] == 'ric' && $_REQUEST["search_ric"] != '' || $_REQU
|
||||
LEFT JOIN formatierung c ON c.id = b.formatierung_id
|
||||
LEFT JOIN organisation d ON d.id = b.org_id
|
||||
$show_filter
|
||||
ORDER BY a.zeit DESC LIMIT 0,$_REQUEST[search_max_results]") or die (mysql_error());
|
||||
while($row = mysql_fetch_array($result))
|
||||
ORDER BY a.zeit DESC LIMIT 0,$_REQUEST[search_max_results]") or die (mysqli_error($dbconn));
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
$bezeichnung = $row["bezeichnung"];
|
||||
|
||||
// Tageswechsel ausgeben
|
||||
if (!isset($lastday)) $lastday="";
|
||||
if( get_day($row["zeit"]) != $lastday )
|
||||
{
|
||||
$nextday = '
|
||||
@ -186,12 +203,12 @@ if( $_REQUEST["search_what"] == 'ric' && $_REQUEST["search_ric"] != '' || $_REQU
|
||||
if( !$bezeichnung && !$row["org_name"] ) $bezeichnung = 'Unbekannt';
|
||||
|
||||
// default Farben bestimmen
|
||||
if( !$row["bg_farbe"] ) $row["bg_farbe"] = 'white';
|
||||
if( !$row["text_farbe"] ) $row["text_farbe"] = 'black';
|
||||
if( !$row["text_farbe_text"] ) $row["text_farbe_text"] = 'black';
|
||||
if( !$row["bg_farbe_text"] ) $row["bg_farbe_text"] = '#CCCCCC';
|
||||
if( !$row["text_groesse"] ) $row["text_groesse"] = '13';
|
||||
if( !$row["text_groesse_text"] )$row["text_groesse_text"] = '12';
|
||||
if( !isset($row["bg_farbe"]) ) $row["bg_farbe"] = 'white';
|
||||
if( !isset($row["text_farbe"]) ) $row["text_farbe"] = 'black';
|
||||
if( !isset($row["text_farbe_text"]) ) $row["text_farbe_text"] = 'black';
|
||||
if( !isset($row["bg_farbe_text"]) ) $row["bg_farbe_text"] = '#CCCCCC';
|
||||
if( !isset($row["text_groesse"]) ) $row["text_groesse"] = '13';
|
||||
if( !isset($row["text_groesse_text"]) )$row["text_groesse_text"] = '12';
|
||||
|
||||
/* // pocsag in Array schreiben
|
||||
$thisday = $nextday.'
|
||||
@ -260,5 +277,5 @@ eval ("dooutput(\"".gettemplate($template_dir."rahmen")."\");");
|
||||
/**************************/
|
||||
// Datenbank schliessen
|
||||
//
|
||||
mysql_close($dbconn);
|
||||
mysqli_close($dbconn);
|
||||
?>
|
||||
|
@ -20,13 +20,13 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
$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) && $_GET["nooutput"] == 1 )
|
||||
{
|
||||
// if( $lines = file('http://www.dwd.de/de/WundK/Warnungen/zeige.php?ID='.$uw_landkreis.'#O') )
|
||||
if( $lines = file('http://www.dwd.de/dyn/app/ws/html/reports/'.$uw_landkreis.'_warning_de.html') )
|
||||
if( $lines = file('https://www.dwd.de/DE/wetter/warnungen/warnWetter_node.html?ort=Leipzig') )
|
||||
{
|
||||
// Durchgehen des Arrays und Anzeigen des HTML Source inkl. Zeilennummern
|
||||
if( is_array($lines) )
|
||||
@ -50,7 +50,7 @@ if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) && $_GET["noou
|
||||
$unwetter_meldung .= $line;
|
||||
}
|
||||
|
||||
// Zum Prüfen der Ausgabe deaktivieren
|
||||
// Zum Pr<EFBFBD>fen der Ausgabe deaktivieren
|
||||
//echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br>\n";
|
||||
}
|
||||
|
||||
@ -67,27 +67,27 @@ if( ($timestampnow - $row["u_lastcheck"]) > ($uw_checktime * 100) && $_GET["noou
|
||||
{
|
||||
$unwetter_status = 'keine Verbindung !!!';
|
||||
$unwetter_farbe = '#FFFFFF';
|
||||
$unwetter_meldung = 'Verbindung zu dwd.de nicht möglich !';
|
||||
$unwetter_meldung = 'Verbindung zu dwd.de nicht m<EFBFBD>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));
|
||||
}
|
||||
}
|
||||
|
||||
// Ausgabe für User erzeugen
|
||||
// Ausgabe f<EFBFBD>r User erzeugen
|
||||
if( !empty($row["u_meldung"]) && $_GET["nooutput"] != '1' )
|
||||
{
|
||||
$uw_show_link = '<a href="javascript:animatedcollapse.toggle(\'wetter\')"><font style="background-color:#FFFFFF;"> toggle </font></a>';
|
||||
|
Loading…
Reference in New Issue
Block a user