districts

This commit is contained in:
Walter Hupfeld 2024-02-18 13:37:18 +01:00
parent 6cdad9be24
commit 46ad703473
66 changed files with 196 additions and 21 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

10
.htaccess Normal file
View File

@ -0,0 +1,10 @@
#php_value upload_max_filesize 10M
#php_value post_max_size 10M
RedirectMatch 404 /\.git
# RedirectMatch 404 /db
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.*)$ index.php?d=$1 [QSA]

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,5 @@
<?php
$dbFilename="../db/locations.db";
require_once("../config.db.php");
require_once("../config.php");
require_once("../lib/functions.php");
@ -16,6 +15,7 @@ $numTopic = (isset($_POST['topic'])) ? $_POST['topic'] : 1;
$numDefect = (isset($_POST['defect'])) ? $_POST['defect'] : 0;
$numLng = $_POST['lng'];
$numLat = $_POST['lat'];
$strDistrict = $_POST['district'];
$boolUploadOk=false;
if ($boolUpload && !empty($_FILES['uploadfile']['name'])) {
@ -40,8 +40,8 @@ if ($boolUpload && !empty($_FILES['uploadfile']['name'])) {
}
}
$stmt = $db->prepare("INSERT INTO location (username,age,transport,description,defect,topic,lng,lat)
VALUES (:username,:age,:transport,:description,:defect,:topic,:lng,:lat)");
$stmt = $db->prepare("INSERT INTO location (username,age,transport,description,defect,topic,lng,lat,district)
VALUES (:username,:age,:transport,:description,:defect,:topic,:lng,:lat,:district)");
$stmt->bindValue(':username', $strUsername);
$stmt->bindValue(':age', $strAge);
@ -51,6 +51,7 @@ $stmt->bindValue(':topic', $numTopic);
$stmt->bindValue(':lng', $numLng);
$stmt->bindValue(':lat', $numLat);
$stmt->bindValue(':defect', $numDefect);
$stmt->bindValue(':district',$strDistrict);
$stmt->execute();
// fetch last_id - sqlite

View File

@ -33,9 +33,6 @@
case "InfoLng":
$numInfoLng=$row['value'];
break;
case "zoom":
$numZoom=$row['value'];
break;
case "logo":
$strLogo=$row['value'];
break;
@ -51,9 +48,6 @@
case "UrlBez":
$strUrlBez =$row['value'];
break;
case "IntroText":
$strIntroText=$row['value'];
break;
case "boolActive":
$boolActive = ($row['value']=="1");
break;
@ -82,6 +76,47 @@
}
$result= $db->prepare("SELECT count(*) FROM district WHERE district=:district");
$result->bindParam(":district",$strDistrict);
$result->execute();
if ($row=$result->fetch(PDO::FETCH_NUM)) {
if ($row[0]==0) $strDistrict="hamm";
}
//$result = $db->query($strSQL);
$result= $db->prepare("SELECT * FROM district WHERE district=:district");
$result->bindParam(":district",$strDistrict);
$result->execute();
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$strDistrict = $row['district'];
$strTitle = $row['title'];
$strGeojson = $row['geojson'];
$numULAND=$row['ULAND'];
$numUREGBEZ=$row['UREGBEZ'];
$numUKREIS=$row['UKREIS'];
$numUGEMEINDE=$row['UGEMEINDE'];
$numInfoLat=$row['lat'];
$numInfoLng=$row['lng'];
$numZoom=$row['zoom'];
$strTitle = "ADFC Meldeportal $strTitle ";
$strIntroText = "$strTitle";
$fileGeojson ="geojson/$strGeojson";
$strLocation = " AND ULAND=$numULAND AND UREGBEZ=$numUREGBEZ AND UKREIS=$numUKREIS ";
if ($numUGEMEINDE>0) {
$strLocation .= "AND UGEMEINDE=$numUGEMEINDE";
}
}
$arrDisctrict = array ();
$strSQL = "SELECT district,title FROM district ORDER BY title ASC";
$result=$db->query($strSQL);
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$arrDistrict[$row['district']]=$row['title'];
}
$arrTopic = array (

40
docker-compose.sample.yml Normal file
View File

@ -0,0 +1,40 @@
version: '3'
services:
dev-unfallkarte:
image: php81:v1
container_name: dev-unfallkarte
volumes:
- ./:/var/www/html
labels:
- "traefik.enable=true"
- "traefik.http.routers.dev-unfallkarte.entrypoints=https"
- "traefik.http.routers.dev-unfallkarte.rule=Host(`unfallkarte.hpadm.de`)"
- "traefik.http.routers.dev-unfallkarte.tls=true"
- "traefik.http.routers.dev-unfallkarte.tls.certresolver=http"
- "traefik.http.routers.dev-unfallkarte.middlewares=default@file"
- "traefik.http.routers.dev-unfallkarte.service=dev-unfallkarte"
- "traefik.http.services.dev-unfallkarte.loadbalancer.server.port=80"
- "traefik.docker.network=proxy"
networks:
- default
- proxy
restart: always
dev-unfallkarte-db:
image: mariadb
container_name: dev-unfallkarte-db
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=geheim #SQL root Passwort eingeben
- MYSQL_INITDB_SKIP_TZINFO=1
- MARIADB_AUTO_UPGRADE=1
volumes:
- ./database:/var/lib/mysql
networks:
- default
- proxy
networks:
proxy:
external: true

1
geojson/aachen.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/bochum.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/bonn.geojson Normal file
View File

@ -0,0 +1 @@
{"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"source":"© GeoBasis-DE / BKG 2013 (Daten verändert)","features":[{"type":"Feature","properties":{"ADE":6,"GF":4,"BSG":1,"RS":"053140000000","AGS":"05314000","SDV_RS":"053140000000","GEN":"Bonn","BEZ":"Stadt","IBZ":60,"BEM":"kreisfrei","NBD":"ja","SN_L":"05","SN_R":"3","SN_K":"14","SN_V1":"00","SN_V2":"00","SN_G":"000","FK_S3":"R","NUTS":"DEA22","RS_0":"053140000000","AGS_0":"05314000","WSK":"1969/08/01","DEBKG_ID":"DEBKGDL20000E68L","destatis":{"RS":"053140000000","area":141.06,"population":327258,"population_m":156328,"population_w":170930,"population_density":2320,"zip":"53111","center_lon":"7,099187","center_lat":"50,734245","travel_key":"H08","travel_desc":"Bonn und Rhein-Sieg-Kreis","density_key":"01","density_desc":"dicht besiedelt"}},"geometry":{"type":"Polygon","coordinates":[[[7.132213394039788,50.77185443739246],[7.152489927594295,50.76003796337455],[7.155983590259973,50.754678680559444],[7.162994368355575,50.75637051877679],[7.182585677623933,50.751733766369284],[7.194960773577046,50.74376603543042],[7.198575927382817,50.74756380182978],[7.20910622998039,50.73693102717291],[7.191262592081347,50.726594673433645],[7.196577745090615,50.7130563294482],[7.193541439110321,50.710012393850185],[7.174971638244906,50.707700013488015],[7.168237685457546,50.70348964304006],[7.1765638785753,50.68711446963069],[7.210871863698139,50.649543623738644],[7.198485710421079,50.64820873534376],[7.194148580910258,50.6426736488602],[7.18116837749576,50.652288167493076],[7.173445325656328,50.651120430150364],[7.15643069028438,50.65468256281552],[7.128048493072586,50.647264874977225],[7.124027633004187,50.6550737196975],[7.105341569449689,50.65969235994616],[7.076663672841533,50.642760008402774],[7.068919533825222,50.633108920542085],[7.05609828674614,50.631866029833155],[7.060008559766234,50.63888119869577],[7.050659280245579,50.63962725835669],[7.032482040737388,50.65430012421407],[7.026879245740147,50.654951590872],[7.024341991574657,50.66200938123456],[7.027070449016237,50.66560981294732],[7.037746658332092,50.66181177164791],[7.044293391365028,50.67427663298293],[7.031343309555161,50.67783887649247],[7.039260745560407,50.688740242877515],[7.023486323873603,50.70472497390789],[7.028916532785742,50.713147993396],[7.040284265647784,50.71921720534047],[7.0297930349597,50.72607449828582],[7.040359268496386,50.75321392021528],[7.036550905389681,50.757648920032246],[7.048730628272715,50.764227616334246],[7.05652528427954,50.764261395293055],[7.06565827909231,50.77176542618915],[7.098686033671106,50.76161572856992],[7.106758396344291,50.76348274787046],[7.112695173851539,50.771096360584664],[7.125265297984144,50.77443546646668],[7.132213394039788,50.77185443739246]]]}}]}

1
geojson/borken.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/bottrop.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/coesfeld.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/dortmund.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/dueren.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/duisburg.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/erk.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/essen.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/hagen.geojson Normal file
View File

@ -0,0 +1 @@
{"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"source":"© GeoBasis-DE / BKG 2013 (Daten verändert)","features":[{"type":"Feature","properties":{"ADE":6,"GF":4,"BSG":1,"RS":"059140000000","AGS":"05914000","SDV_RS":"059140000000","GEN":"Hagen","BEZ":"Stadt","IBZ":60,"BEM":"kreisfrei","NBD":"ja","SN_L":"05","SN_R":"9","SN_K":"14","SN_V1":"00","SN_V2":"00","SN_G":"000","FK_S3":"R","NUTS":"DEA53","RS_0":"059140000000","AGS_0":"05914000","WSK":"1999/02/01","DEBKG_ID":"DEBKGDL20000E1OI","destatis":{"RS":"059140000000","area":160.45,"population":188814,"population_m":92168,"population_w":96646,"population_density":1177,"zip":"58095","center_lon":"7,467406","center_lat":"51,360171","travel_key":"H11","travel_desc":"Ruhrgebiet","density_key":"01","density_desc":"dicht besiedelt"}},"geometry":{"type":"Polygon","coordinates":[[[7.487180157978995,51.4175713541405],[7.494981538204188,51.415579792683026],[7.50845290761574,51.417941185400174],[7.503289242163876,51.41433649178164],[7.536099101462289,51.406839770129054],[7.531194371111916,51.399413626481866],[7.533588710110251,51.39532321642819],[7.552173040744323,51.39909549824828],[7.566703372640056,51.39854077940354],[7.587816490427026,51.390390414497666],[7.591119030715294,51.38441174857934],[7.584787761770762,51.37779580444411],[7.585948685789316,51.36985134143014],[7.59921540075653,51.346360480917944],[7.593604550633001,51.34414174816323],[7.592891859157715,51.33903687732268],[7.577269302464942,51.33060817276322],[7.584458143631519,51.3196213182544],[7.578517183321369,51.316424104154606],[7.585183801499066,51.30662033601747],[7.583192927430671,51.295865012965216],[7.568924116284109,51.29079092398232],[7.565594470159893,51.281289256960505],[7.550450063143155,51.276008757263625],[7.548881676385763,51.269641234348924],[7.534749304508524,51.27043693186073],[7.517252811795387,51.26486924655582],[7.516854880387277,51.27656487047204],[7.508629353510384,51.2721306301895],[7.498853929563956,51.27316714602382],[7.482015378124063,51.279739054780066],[7.478956825788077,51.28606432023978],[7.486113822213927,51.29513993205325],[7.495644389461222,51.29304027572242],[7.50577880721564,51.3023142099215],[7.503893294291405,51.31586794746874],[7.494522792781022,51.31719871233309],[7.488852789995215,51.313154318418164],[7.482476305029466,51.31661922347857],[7.462273139061231,51.31858289230272],[7.460540934002616,51.31238784829293],[7.454314803818415,51.31745800191746],[7.440118235737004,51.316151941029936],[7.436289862069482,51.30652494591916],[7.427566460235099,51.299894235678536],[7.430051149753901,51.2975280326983],[7.438684149376301,51.2979519183366],[7.433184396385069,51.29490860953218],[7.437831028867999,51.2915542482783],[7.432431688738816,51.28981920150964],[7.429745195405739,51.29457544238171],[7.414470038005143,51.29383213345958],[7.399589221423887,51.30004009086831],[7.400098202524928,51.30229578811203],[7.40942248141175,51.301848601581284],[7.405481752710674,51.30812013329184],[7.418759344371153,51.31087412208424],[7.415110133780876,51.31365972545372],[7.423997685872059,51.31978235313059],[7.421789947571045,51.33088138277895],[7.410074125691876,51.32682733252756],[7.409993514891905,51.3305982462039],[7.398566147151893,51.331665411465124],[7.395236386480828,51.326687646457636],[7.396105863742457,51.332978091318864],[7.390473779146586,51.340384084730026],[7.383738711920587,51.33772001551538],[7.376307999576076,51.34341168172934],[7.378665945627194,51.34998503936672],[7.394195437526633,51.3544762874281],[7.3871034680561,51.357692257752625],[7.395409680409701,51.36035258187323],[7.392631930773249,51.36889674978736],[7.406634813983781,51.379513994175525],[7.402912339506664,51.39333726949466],[7.406274672515681,51.39748701484085],[7.418518643567708,51.40079837712386],[7.435288971330722,51.390438278790725],[7.435963987706289,51.39364429554049],[7.451147581067456,51.39937152196627],[7.454459743387426,51.40891213786608],[7.462752804188664,51.41501567847017],[7.487180157978995,51.4175713541405]]]}}]}

File diff suppressed because one or more lines are too long

1
geojson/herford.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/herne.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/hoexter.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/kleve.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/koeln.geojson Normal file
View File

@ -0,0 +1 @@
{"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"source":"© GeoBasis-DE / BKG 2013 (Daten verändert)","features":[{"type":"Feature","properties":{"ADE":6,"GF":4,"BSG":1,"RS":"053150000000","AGS":"05315000","SDV_RS":"053150000000","GEN":"Köln","BEZ":"Stadt","IBZ":60,"BEM":"kreisfrei","NBD":"ja","SN_L":"05","SN_R":"3","SN_K":"15","SN_V1":"00","SN_V2":"00","SN_G":"000","FK_S3":"R","NUTS":"DEA23","RS_0":"053150000000","AGS_0":"05315000","WSK":"1976/06/01","DEBKG_ID":"DEBKGDL20000E006","destatis":{"RS":"053150000000","area":405.01,"population":1085664,"population_m":529368,"population_w":556296,"population_density":2681,"zip":"50667","center_lon":"6,957068","center_lat":"50,938107","travel_key":"H09","travel_desc":"Köln und Rhein-Erft-Kreis","density_key":"01","density_desc":"dicht besiedelt"}},"geometry":{"type":"Polygon","coordinates":[[[6.914502590301775,51.05635779785663],[6.966668146692467,51.03055783771473],[6.973091503701357,51.02363114805622],[6.975462108880114,51.01091720885419],[6.997063271390999,51.011893171347445],[6.99629006289842,51.0166439457062],[7.013899531622805,51.02307220324898],[7.015867625124374,51.0174113253933],[7.021966505637375,51.01587316223706],[7.041455576515597,51.020885064045515],[7.067905843090977,51.0187399792585],[7.061873789836927,51.01342798540017],[7.076542861278531,51.00178104525814],[7.066570538076888,50.99416499293125],[7.067564800102571,50.9900049716309],[7.095587746219517,50.98520837851833],[7.096175844515996,50.980695022984136],[7.099895601777321,50.98094785442352],[7.096129336701266,50.97710458750757],[7.101279656418287,50.96790104172823],[7.086278178364717,50.95795037459573],[7.115999307009579,50.9413181036291],[7.120300012024967,50.944514539285976],[7.144457342844774,50.946006600549055],[7.136667599367226,50.9277953491645],[7.139926081394659,50.922785024240035],[7.138069637409676,50.90664221575512],[7.133217299170487,50.90218777940359],[7.13835596939718,50.89677893899908],[7.137555728974112,50.883038257537834],[7.152731369957507,50.874588418489765],[7.159623341549616,50.874596215408985],[7.163497358824067,50.86934845893292],[7.090617567689435,50.83327427828334],[7.06235484641336,50.82963003268685],[7.061270096197677,50.8441739821413],[7.057926072815622,50.84912583578063],[7.051048560716534,50.85015568500765],[7.027095184478728,50.84700037000049],[7.023335571814935,50.839256349313175],[7.015523947001136,50.8380210604099],[7.011766927380063,50.83993873404802],[6.995180675086827,50.836253016585275],[6.987075659525692,50.839220199183224],[6.984081152790405,50.84412860281874],[6.980936266864355,50.84091588405724],[6.973903254774891,50.84390110686892],[6.956038056933309,50.83524969940873],[6.94669080166975,50.84551222953603],[6.93809639123518,50.84403266595244],[6.940997998059792,50.83902311984847],[6.931213488941947,50.837497485174445],[6.91726190019596,50.85610188243921],[6.920929346659095,50.871321745669604],[6.912960907859209,50.88289463764232],[6.918886120595273,50.891932526257456],[6.879426193288471,50.909572928221884],[6.867708974726131,50.90435170270643],[6.866173235060526,50.90668192316809],[6.856956248903656,50.90430333648614],[6.844307767624318,50.910058952646736],[6.837948248639353,50.91734490130922],[6.83981112128866,50.92444833154472],[6.822461308560777,50.927729436443094],[6.808810164343487,50.94864764728128],[6.824018731255084,50.95782017051452],[6.818989568213391,50.96526946633883],[6.82929817602789,50.971229861518324],[6.827446640998111,50.974452903893535],[6.845046741311863,50.988492817918285],[6.83524937006978,50.999801912872826],[6.840709591417999,51.00366209000226],[6.845489098185578,51.00316357925185],[6.834954862927487,51.0187671575088],[6.841979844831965,51.02465583975792],[6.820292889561406,51.03800828976222],[6.81280188800033,51.034645482807875],[6.805409755227545,51.03946703490677],[6.798291285476728,51.03695289256185],[6.787832530271252,51.0501172173283],[6.773969786307351,51.05806754034137],[6.773632464385643,51.06439001218816],[6.78736059231218,51.06880985623917],[6.791437185800002,51.06741117662739],[6.800867023188823,51.05945691572737],[6.804759525124521,51.048417292041314],[6.813204041478269,51.04610823528489],[6.816842542901293,51.05378686557239],[6.830983814262506,51.05850394093012],[6.822986484226822,51.073864692523166],[6.838640961862522,51.07793536152142],[6.843085261154439,51.08394830304359],[6.853487489168644,51.084255940345955],[6.859863224970212,51.07407773297486],[6.893596723644555,51.06673012313233],[6.914502590301775,51.05635779785663]]]}}]}

1
geojson/krefeld.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/lippe.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/marl.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/mettmann.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/muenster.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/neuss.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/obk.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/olpe.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/rbk.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/rek.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/rsk.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/soest.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/solingen.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/viersen.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/wesel.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 KiB

View File

@ -8,10 +8,14 @@
* Datum: 16.02.2024
******************************** */
/*
if (!file_exists("db/locations.db")) {
header("Location: setup.php");
}
*/
$strDistrict = (isset($_GET['d'])) ? $_GET['d'] : "hamm";
require("config.db.php");
require("config.php");
require_once("lib/functions.php");
@ -92,13 +96,23 @@
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="index.php?ref=1">Karte <span class="sr-only">(current)</span></a>
<a class="nav-link" href="index.php?ref=1?d=<?=$strDistrict?>">Karte <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="liste.php">Liste</a>
<a class="nav-link" href="liste.php?d=<?=$strDistrict?>">Liste</a>
</li>
<!-- District -->
<form method="GET" action="index.php">
<select name="d" style="float:left;margin-top:0.5em;margin-right:0.5em;" onchange="this.form.submit()">
<?php foreach ($arrDistrict as $key => $strTitle):
$strActive = ($strDistrict==$key) ? "selected=\"selected\"" : ""; ?>
<option value="<?=$key?>" <?=$strActive?>><?=$strTitle?></option>
<?php endforeach; ?>
</select>
</form>
</ul>
<div>
<ul class="navbar-nav mr-auto right">
<li class="nav-item">
@ -108,7 +122,7 @@
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
</li>
<li class="nav-item">
<a class="nav-link" href="admin/login.php">Login</a>
<a class="nav-link" href="admin/login.php?d=".$strDistrict>Login</a>
</li>
</ul>
</div>
@ -163,7 +177,7 @@
// ocmlink = '<a href="http://thunderforest.com/">Thunderforest</a>';
var ocmLink = '<a href="https://www.mapbox.com/">Mapbox</a>';
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token='.$mapbox_key, {
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=<?=$mapbox_key?>', {
maxZoom: 18,
minZoom:<?=$numZoom ?>,
attribution: 'Map data &copy; '+ mapLink +' contributors, ' +
@ -301,6 +315,7 @@
$("#newobjectform").submit(function(event){
$("#lat").val(lat);
$("#lng").val(lng);
$("#district").val("<?=$strDistrict?>");
topic=$('input[name=topic]:checked').val();
newMarker = getMarker(topic);
event.preventDefault();

View File

@ -84,6 +84,7 @@
<input type="hidden" id="lng" name="lng" value="0" />
<input type="hidden" id="lat" name="lat" value="0" />
<input type="hidden" id="district" name="district" value="<?=$strDistrict?>" />
<!-- Dateiupload ---------------------------------- -->

View File

@ -11,6 +11,7 @@
require("../config.db.php");
function getAddress($lat,$lng) {
global $location_key;
$key = $location_key;
$url = "https://us1.locationiq.com/v1/reverse.php?key=".$key."&lat=".$lat."&lon=".$lng."&format=json";

View File

@ -9,9 +9,11 @@
******************************** */
if (!file_exists("config.php")) {
if (!file_exists("config.db.php")) {
header("Location: setup.php");
}
$strDistrict = (isset($_GET['d'])) ? $_GET['d'] : "hamm";
require("config.php");
?>
<!DOCTYPE html>
@ -59,11 +61,21 @@
<div class="collapse navbar-collapse" id="navbars">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="index.php?ref=1">Karte</a>
<a class="nav-link" href="index.php?ref=1&d=<?=$strDistrict?>">Karte</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="liste.php">Liste <span class="sr-only">(current)</span></a>
<a class="nav-link" href="liste.php?d=<?=$strDistrict?>">Liste <span class="sr-only">(current)</span></a>
</li>
<!-- District -->
<form method="GET" action="index.php">
<select name="d" style="float:left;margin-top:0.5em;margin-right:0.5em;" onchange="this.form.submit()">
<?php foreach ($arrDistrict as $key => $strTitle):
$strActive = ($strDistrict==$key) ? "selected=\"selected\"" : ""; ?>
<option value="<?=$key?>" <?=$strActive?>><?=$strTitle?></option>
<?php endforeach; ?>
</select>
</form>
</ul>
</ul>
<div>
@ -84,7 +96,7 @@
<div class="container-fluid main" style="max-width:1360px;">
<p>&nbsp;</p>
<h2>Liste der Einträge</h2>
<h2>Liste der Einträge für <?=$strTitle?></h2>
<table id="list" class="table table-bordered table-striped">
<thead>
@ -102,9 +114,11 @@
<tbody>
<?php
require_once("config.php");
$strSQL="SELECT loc.*,f.filename FROM location loc LEFT JOIN files f ON loc.id=f.loc_id ORDER BY created_at DESC";
$strSQL="SELECT loc.*,f.filename
FROM location loc LEFT JOIN files f ON loc.id=f.loc_id
WHERE district='$strDistrict'
ORDER BY created_at DESC";
$result = $db->query($strSQL);
$numCounter=1;
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {

7
php81-apache/Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM php:8.1-apache
RUN apt-get update && docker-php-ext-install pdo_mysql calendar mysqli
RUN a2enmod rewrite headers
COPY . /var/www
EXPOSE 80

BIN
vendor/.DS_Store vendored Normal file

Binary file not shown.