init
This commit is contained in:
commit
72a26edcff
22092 changed files with 2101903 additions and 0 deletions
49
monitor/scripts/ajax/blitzer.php
Normal file
49
monitor/scripts/ajax/blitzer.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------- Polizeimeldungen
|
||||
/*
|
||||
$tmpdata = $GLOBALS['mysql']->query_single("SELECT * FROM verkehr_polizei");
|
||||
$datapol=$tmpdata['num_rows'];
|
||||
if($tmpdata['num_rows'] != 0) {
|
||||
$tempdata = $GLOBALS['mysql']->query("SELECT * FROM verkehr_polizei"); $key=0;
|
||||
while($row = $tempdata->fetch_assoc()) {
|
||||
$pdata[$key]['adresse1']=$row['adresse1'];
|
||||
$pdata[$key]['adresse2']=$row['adresse2'];
|
||||
$pdata[$key]['reason']=$row['reason'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 23-behinderung
|
||||
// 21-Unfall
|
||||
// 20-Stau
|
||||
// 0-6 mobile blitzer
|
||||
// 22
|
||||
// 24-Glätte
|
||||
// 25-Nebel
|
||||
// 26- Baustellen 2
|
||||
|
||||
$tmpdata = $GLOBALS['mysql']->query_single("SELECT * FROM verkehr");
|
||||
$dataanz=$tmpdata['num_rows'];
|
||||
if($tmpdata['num_rows'] != 0) {
|
||||
$tmpdata = $GLOBALS['mysql']->query("SELECT * FROM verkehr ORDER BY type DESC"); $key=0;
|
||||
while($row = $tmpdata->fetch_assoc()) {
|
||||
$bdata[$key]['typ']=$row['type'];
|
||||
$bdata[$key]['vmax']=$row['vmax'];
|
||||
$bdata[$key]['adresse1']=$row['adresse1'];
|
||||
$bdata[$key]['adresse2']=$row['adresse2'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
$template->assign('dataanz', $dataanz);
|
||||
// $template->assign('datapol', $datapol);
|
||||
$template->assign('time', time());
|
||||
if(isset($bdata)) { $template->assign('bdata', $bdata); }
|
||||
// if(isset($pdata)) { $template->assign('pdata', $pdata); }
|
||||
$template->assign('content', 'tpl/ajax/blitzer1.tpl');
|
||||
120
monitor/scripts/ajax/blitzer1.php
Normal file
120
monitor/scripts/ajax/blitzer1.php
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',1);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
/*
|
||||
stdClass Object
|
||||
(
|
||||
[id] => 5940062167
|
||||
[lat] => 51.644040
|
||||
[lat_s] => 51.6
|
||||
[lng] => 12.258422
|
||||
[lng_s] => 12.3
|
||||
[street] => B183
|
||||
[content] => 5645289063
|
||||
[backend] => 0-12993403
|
||||
[type] => 1
|
||||
[vmax] => 100
|
||||
[counter] => 0
|
||||
[create_date] => 2020-02-03 03:36:38
|
||||
[confirm_date] => 0000-00-00 00:00:00
|
||||
[gps_status] => -
|
||||
[info] => {"count_180d":"0"}
|
||||
[polyline] =>
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
stdClass Object
|
||||
(
|
||||
[place_id] => 92100685
|
||||
[licence] => Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright
|
||||
[osm_type] => way
|
||||
[osm_id] => 25815620
|
||||
[lat] => 51.64401147390837
|
||||
[lon] => 12.25841893049767
|
||||
[display_name] => B 183, Sandersdorf, Bitterfeld-Wolfen, Anhalt-Bitterfeld, Sachsen-Anhalt, 06803, Deutschland
|
||||
[address] => stdClass Object
|
||||
(
|
||||
[road] => B 183
|
||||
[city_district] => Sandersdorf
|
||||
[town] => Bitterfeld-Wolfen
|
||||
[county] => Anhalt-Bitterfeld
|
||||
[state] => Sachsen-Anhalt
|
||||
[postcode] => 06803
|
||||
[country] => Deutschland
|
||||
[country_code] => de
|
||||
)
|
||||
|
||||
[boundingbox] => Array
|
||||
(
|
||||
[0] => 51.6374534
|
||||
[1] => 51.6444531
|
||||
[2] => 12.2521345
|
||||
[3] => 12.27533
|
||||
)
|
||||
|
||||
)
|
||||
*/
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 23-behinderung
|
||||
// 21-Unfall
|
||||
// 20-Stau
|
||||
// 0-6 mobile blitzer
|
||||
// 22
|
||||
// 24-Glätte
|
||||
// 25-Nebel
|
||||
// 26- Baustellen 2
|
||||
$key=0;
|
||||
$page='https://cdn2.atudo.net/api/1.0/vl.php?type=0,1,2,3,4,5,6,20,21,23,24,25&box=51.276736290728685,12.058525085449217,51.383995224782886,12.711868286132812';
|
||||
|
||||
$html = file_get_contents($page);
|
||||
$jsonrow=json_decode($html);
|
||||
for($i=0; $i < 100; $i++) {
|
||||
if(isset($jsonrow->pois[$i])) {
|
||||
$lat=($jsonrow->pois[$i]->lat);
|
||||
$lng=($jsonrow->pois[$i]->lng);
|
||||
$bdata[$key]['typ']=($jsonrow->pois[$i]->type);
|
||||
$bdata[$key]['street']=($jsonrow->pois[$i]->street);
|
||||
$bdata[$key]['vmax']=($jsonrow->pois[$i]->vmax);
|
||||
$bdata[$key]['create_date']=($jsonrow->pois[$i]->create_date);
|
||||
/*
|
||||
$page1='http://nominatim.openstreetmap.org/reverse?format=json&lat='.$lat.'&lon='.$lng.'&email=frank@first-mp.de';
|
||||
$html2 = file_get_contents($page1);
|
||||
$jsonrow2=json_decode($html2);
|
||||
$bdata[$key]['road']=($jsonrow2->address->road);
|
||||
if(isset($jsonrow2->address->city_district)) {
|
||||
$bdata[$key]['ort']=($jsonrow2->address->city_district);
|
||||
} else {
|
||||
if(isset($jsonrow2->address->suburb)) { $bdata[$key]['ort']=($jsonrow2->address->suburb); }
|
||||
}
|
||||
if(isset($jsonrow2->address->town)) {
|
||||
$bdata[$key]['town']=($jsonrow2->address->town);
|
||||
} else {
|
||||
if(isset($jsonrow2->address->city)) { $bdata[$key]['town']=($jsonrow2->address->city); }
|
||||
}
|
||||
if(isset($jsonrow2->address->house_number)) {
|
||||
$bdata[$key]['hnr']=($jsonrow2->address->house_number);
|
||||
} else {
|
||||
$bdata[$key]['hnr']=" ";
|
||||
}
|
||||
*/
|
||||
|
||||
$key++;
|
||||
|
||||
//echo'<pre>'; print_r($jsonrow2->address->road); echo'</pre>';
|
||||
//$bdata[$key]['typ']=($jsonrow->pois[$i]->type);
|
||||
//echo'<pre>'; print_r($jsonrow->pois[0]); echo'</pre>';
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
$template->assign('time', time());
|
||||
$template->assign('bdata', $bdata);
|
||||
$template->assign('content', 'tpl/ajax/blitzer1.tpl');
|
||||
31
monitor/scripts/ajax/blitzer2.php
Normal file
31
monitor/scripts/ajax/blitzer2.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',1);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 23-behinderung
|
||||
// 21-Unfall
|
||||
// 20-Stau
|
||||
// 0-6 mobile blitzer
|
||||
// 22
|
||||
// 24-Glätte
|
||||
// 25-Nebel
|
||||
// 26- Baustellen 2
|
||||
|
||||
$tmpdata = $GLOBALS['mysql']->query("SELECT * FROM verkehr ORDER BY type"); $key=0;
|
||||
while($row = $tmpdata->fetch_assoc()) {
|
||||
$bdata[$key]['typ']=$row['type'];
|
||||
$bdata[$key]['street']=$row['street'];
|
||||
|
||||
|
||||
$bdata[$key]['vmax']=$row['vmax'];
|
||||
$key++;
|
||||
}
|
||||
$template->assign('time', time());
|
||||
if(isset($bdata)) { $template->assign('bdata', $bdata); }
|
||||
$template->assign('content', 'tpl/ajax/blitzer1.tpl');
|
||||
21
monitor/scripts/ajax/corona.php
Normal file
21
monitor/scripts/ajax/corona.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 1- Leipzig Stadt
|
||||
$corona1 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=1"); $template->assign('cdata1', $corona1);
|
||||
// 1- Leipzig Stadt
|
||||
$corona3 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=3"); $template->assign('cdata3', $corona3);
|
||||
// 1- Leipzig Stadt
|
||||
$corona5 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=5"); $template->assign('cdata5', $corona5);
|
||||
// 1- Leipzig Stadt
|
||||
$corona6 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=6"); $template->assign('cdata6', $corona6);
|
||||
|
||||
|
||||
$template->assign('content', 'tpl/ajax/corona.tpl');
|
||||
21
monitor/scripts/ajax/corona2022.php
Normal file
21
monitor/scripts/ajax/corona2022.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 1- Leipzig Stadt
|
||||
$corona1 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=1"); $template->assign('cdata', $corona1);
|
||||
// 1- Leipzig Stadt
|
||||
//$corona3 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=3"); $template->assign('cdata3', $corona3);
|
||||
// 1- Leipzig Stadt
|
||||
//$corona5 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=5"); $template->assign('cdata5', $corona5);
|
||||
// 1- Leipzig Stadt
|
||||
//$corona6 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=6"); $template->assign('cdata6', $corona6);
|
||||
|
||||
|
||||
$template->assign('content', 'tpl/ajax/corona2022.tpl');
|
||||
8
monitor/scripts/ajax/corona2022_1.php
Normal file
8
monitor/scripts/ajax/corona2022_1.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 1- Leipzig Stadt
|
||||
$corona1 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=1"); $template->assign('cdata', $corona1);
|
||||
$template->assign('content', 'tpl/ajax/corona2022.tpl');
|
||||
8
monitor/scripts/ajax/corona2022_3.php
Normal file
8
monitor/scripts/ajax/corona2022_3.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 3- Halle Stadt
|
||||
$corona = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=3"); $template->assign('cdata', $corona);
|
||||
$template->assign('content', 'tpl/ajax/corona2022.tpl');
|
||||
8
monitor/scripts/ajax/corona2022_5.php
Normal file
8
monitor/scripts/ajax/corona2022_5.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// LK Leipzig
|
||||
$corona = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=5"); $template->assign('cdata', $corona);
|
||||
$template->assign('content', 'tpl/ajax/corona2022.tpl');
|
||||
8
monitor/scripts/ajax/corona2022_6.php
Normal file
8
monitor/scripts/ajax/corona2022_6.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// LK Nordsachsen
|
||||
$corona = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=6"); $template->assign('cdata', $corona);
|
||||
$template->assign('content', 'tpl/ajax/corona2022.tpl');
|
||||
8
monitor/scripts/ajax/coronax_1.php
Normal file
8
monitor/scripts/ajax/coronax_1.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 1- Leipzig Stadt
|
||||
$corona1 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=1"); $template->assign('cdata', $corona1);
|
||||
$template->assign('content', 'tpl/ajax/coronax.tpl');
|
||||
8
monitor/scripts/ajax/coronax_3.php
Normal file
8
monitor/scripts/ajax/coronax_3.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 3- Halle Stadt
|
||||
$corona = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=3"); $template->assign('cdata', $corona);
|
||||
$template->assign('content', 'tpl/ajax/coronax.tpl');
|
||||
8
monitor/scripts/ajax/coronax_5.php
Normal file
8
monitor/scripts/ajax/coronax_5.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// LK Leipzig
|
||||
$corona = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=5"); $template->assign('cdata', $corona);
|
||||
$template->assign('content', 'tpl/ajax/coronax.tpl');
|
||||
8
monitor/scripts/ajax/coronax_6.php
Normal file
8
monitor/scripts/ajax/coronax_6.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// LK Nordsachsen
|
||||
$corona = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=6"); $template->assign('cdata', $corona);
|
||||
$template->assign('content', 'tpl/ajax/coronax.tpl');
|
||||
34
monitor/scripts/ajax/covid.php
Normal file
34
monitor/scripts/ajax/covid.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
$page='https://hotspotornot.de/s/Leipzig'; $child=''; $node=''; $html= '';
|
||||
$tag='Header__Wrapper-sc-1lkmh1x-1 bdBQKM';
|
||||
$html3 = file_get_contents($page);
|
||||
mb_convert_encoding($html,"UTF-8","auto");
|
||||
$xp3 = new DOMDocument();
|
||||
$xp3->loadHTML($html3);
|
||||
$xp3 = new DOMXPath($xp3);
|
||||
foreach($xp3->query("//div[@class='".$tag."']") as $node) {
|
||||
$node->nodeValue;
|
||||
break;
|
||||
};
|
||||
$children = $node->childNodes;
|
||||
foreach ($children as $child) {
|
||||
$tanke1 .= $child->ownerDocument->saveXML( $child );
|
||||
}
|
||||
|
||||
// Einlesen der gesamten Seite in ein Array
|
||||
$lines = file ("http://www.spiegel.de/schlagzeilen/");
|
||||
for ($i = 227; $i <= 327; $i++) {
|
||||
$bereinigt = strip_tags($lines[$i],"");
|
||||
echo $bereinigt."
|
||||
\n";
|
||||
}
|
||||
?>
|
||||
|
||||
// $template->assign('tanke', $tanke1);
|
||||
// $template->assign('content', 'tpl/ajax/covid.tpl');
|
||||
|
||||
?>
|
||||
146
monitor/scripts/ajax/dwd.php
Normal file
146
monitor/scripts/ajax/dwd.php
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
<?php
|
||||
|
||||
|
||||
/*
|
||||
114713000 Stadt Leipzig Leipzig (Stadt) LXX
|
||||
114729000 Kreis Leipzig Leipzig LLK
|
||||
114730000 Kreis Nordsachsen Nordsachsen TOX
|
||||
115002000 Stadt Halle (Saale) Halle/Saale HAL
|
||||
116077000 Kreis Altenburger Land Altenburg. Land ABG
|
||||
|
||||
*/
|
||||
$key=0;
|
||||
|
||||
$jsonp = file_get_contents("https://www.dwd.de/DWD/warnungen/warnapp/json/warnings.json");
|
||||
$json = extract_unit($jsonp, 'warnWetter.loadWarnings(', ');');
|
||||
$alert_list1 = json_decode($json, true);
|
||||
$alert_list2 = json_decode($json, true);
|
||||
//$alert_list3 = json_decode($json, true);
|
||||
//$alert_list4 = json_decode($json, true);
|
||||
//$alert_list5 = json_decode($json, true);
|
||||
|
||||
$relevant_alerts = $alert_list1["warnings"]["114713000"]; // leipzig Stadt
|
||||
$relevant_prealerts = $alert_list1["vorabInformation"]["114713000"];
|
||||
if($relevant_alerts == null) $relevant_alerts = array();
|
||||
if($relevant_prealerts == null) $relevant_prealerts = array();
|
||||
$relevant_alerts = array_merge($relevant_prealerts, $relevant_alerts);
|
||||
//-------------------------------------------------------------------------------------
|
||||
foreach($relevant_alerts as $alert) {
|
||||
if ($alert['level']>1) {
|
||||
$uww[$key]['name']=$alert['event'];
|
||||
$uww[$key]['text']=$alert['headline'];
|
||||
$uww[$key]['info']=$alert['description'];
|
||||
$uww[$key]['stadt']=$alert['regionName'];
|
||||
$uww[$key]['level']=$alert['level'];
|
||||
$uww[$key]['start']=utf8_decode(date('d.m.Y H:i', substr($alert['start'], 0, 10)));
|
||||
$uww[$key]['ende']=utf8_decode(date('d.m.Y H:i', substr($alert['end'], 0, 10)));
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
$relevant_alerts2 = $alert_list2["warnings"]["114729000"]; // Kreis Leipzig
|
||||
$relevant_prealerts2 = $alert_list2["vorabInformation"]["114729000"];
|
||||
if($relevant_alerts2 == null) $relevant_alerts2 = array();
|
||||
if($relevant_prealerts2 == null) $relevant_prealerts2 = array();
|
||||
$relevant_alerts2 = array_merge($relevant_prealerts2, $relevant_alerts2);
|
||||
foreach($relevant_alerts2 as $alert) {
|
||||
if ($alert['level']>2) {
|
||||
$uww[$key]['name']=$alert['event'];
|
||||
$uww[$key]['text']=$alert['headline'];
|
||||
$uww[$key]['info']=$alert['description'];
|
||||
$uww[$key]['stadt']=$alert['regionName'];
|
||||
$uww[$key]['level']=$alert['level'];
|
||||
$uww[$key]['start']=utf8_decode(date('d.m.Y H:i', substr($alert['start'], 0, 10)));
|
||||
$uww[$key]['ende']=utf8_decode(date('d.m.Y H:i', substr($alert['end'], 0, 10)));
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
/*
|
||||
//------------------------------------------------
|
||||
$relevant_alerts3 = $alert_list3["warnings"]["115002000"]; // Halle
|
||||
$relevant_prealerts3 = $alert_list3["vorabInformation"]["115002000"];
|
||||
if($relevant_alerts3 == null) $relevant_alerts3 = array();
|
||||
if($relevant_prealerts3 == null) $relevant_prealerts3 = array();
|
||||
$relevant_alerts3 = array_merge($relevant_prealerts3, $relevant_alerts3);
|
||||
foreach($relevant_alerts3 as $alert) {
|
||||
if ($alert['level']>2) {
|
||||
$uww[$key]['name']=$alert['event'];
|
||||
$uww[$key]['text']=$alert['headline'];
|
||||
$uww[$key]['info']=$alert['description'];
|
||||
$uww[$key]['stadt']=$alert['regionName'];
|
||||
$uww[$key]['level']=$alert['level'];
|
||||
$uww[$key]['start']=utf8_decode(date('d.m.Y H:i', substr($alert['start'], 0, 10)));
|
||||
$uww[$key]['ende']=utf8_decode(date('d.m.Y H:i', substr($alert['end'], 0, 10)));
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
//------------------------------------------------
|
||||
$relevant_alerts4 = $alert_list4["warnings"]["114730000"]; //Nordsachsen
|
||||
$relevant_prealerts4 = $alert_list4["vorabInformation"]["114730000"];
|
||||
if($relevant_alerts4 == null) $relevant_alerts4 = array();
|
||||
if($relevant_prealerts4 == null) $relevant_prealerts4 = array();
|
||||
$relevant_alerts4 = array_merge($relevant_prealerts4, $relevant_alerts4);
|
||||
foreach($relevant_alerts4 as $alert) {
|
||||
if ($alert['level']>2) {
|
||||
$uww[$key]['name']=$alert['event'];
|
||||
$uww[$key]['text']=$alert['headline'];
|
||||
$uww[$key]['info']=$alert['description'];
|
||||
$uww[$key]['stadt']=$alert['regionName'];
|
||||
$uww[$key]['level']=$alert['level'];
|
||||
$uww[$key]['start']=utf8_decode(date('d.m.Y H:i', substr($alert['start'], 0, 10)));
|
||||
$uww[$key]['ende']=utf8_decode(date('d.m.Y H:i', substr($alert['end'], 0, 10)));
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
//------------------------------------------------
|
||||
$relevant_alerts5 = $alert_list5["warnings"]["116077000"]; //116077000 Altenburg
|
||||
$relevant_prealerts5 = $alert_list5["vorabInformation"]["116077000"];
|
||||
if($relevant_alerts5 == null) $relevant_alerts5 = array();
|
||||
if($relevant_prealerts5 == null) $relevant_prealerts5 = array();
|
||||
$relevant_alerts5 = array_merge($relevant_prealerts5, $relevant_alerts5);
|
||||
foreach($relevant_alerts5 as $alert) {
|
||||
if ($alert['level']>2) {
|
||||
$uww[$key]['name']=$alert['event'];
|
||||
$uww[$key]['text']=$alert['headline'];
|
||||
$uww[$key]['info']=$alert['description'];
|
||||
$uww[$key]['stadt']=$alert['regionName'];
|
||||
$uww[$key]['level']=$alert['level'];
|
||||
$uww[$key]['start']=utf8_decode(date('d.m.Y H:i', substr($alert['start'], 0, 10)));
|
||||
$uww[$key]['ende']=utf8_decode(date('d.m.Y H:i', substr($alert['end'], 0, 10)));
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
if ($key>0) { $template->assign('uww', $uww); }
|
||||
$template->assign('wert', $key);
|
||||
$template->assign('time', time());
|
||||
//------------------------------------------------
|
||||
|
||||
function extract_unit($string, $start, $end) {
|
||||
$pos = stripos($string, $start);
|
||||
$str = substr($string, $pos);
|
||||
$str_two = substr($str, strlen($start));
|
||||
$second_pos = stripos($str_two, $end);
|
||||
$str_three = substr($str_two, 0, $second_pos);
|
||||
$unit = trim($str_three); // remove whitespaces
|
||||
|
||||
return $unit;
|
||||
}
|
||||
$template->assign('content', 'tpl/ajax/dwd.tpl');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
268
monitor/scripts/ajax/pi_hallo2.php
Normal file
268
monitor/scripts/ajax/pi_hallo2.php
Normal file
|
|
@ -0,0 +1,268 @@
|
|||
<?php
|
||||
ini_set('display_errors',0);
|
||||
|
||||
$tage = array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag");
|
||||
$anlage = $GLOBALS['mysql']->query_single("SELECT * FROM kartenlog ORDER BY logID DESC LIMIT 1"); $anz=0;
|
||||
|
||||
|
||||
|
||||
$jahr = (int)date('Y');
|
||||
$monat=(int)date('m');
|
||||
$tag=(int)date('j');
|
||||
$wochentag=date('w');
|
||||
|
||||
if($wochentag==0 && date('G')>10) { $tag++; if($tag>date('t')) { $monat++; $tag=1; } if($monat==13) { $jahr++; $monat=1; }}
|
||||
if($wochentag!=0 && date('G')>17) { $tag++; if($tag>date('t')) { $monat++; $tag=1; } if($monat==13) { $jahr++; $monat=1; }}
|
||||
//--------- Polizeimeldungen
|
||||
//---------------------------------------------------------------------------- Polizeimeldungen
|
||||
$tmpdata = $GLOBALS['mysql']->query_single("SELECT * FROM verkehr_polizei");
|
||||
$datapol=$tmpdata['num_rows'];
|
||||
if($tmpdata['num_rows'] != 0) {
|
||||
$tempdata = $GLOBALS['mysql']->query("SELECT * FROM verkehr_polizei"); $key=0;
|
||||
while($row = $tempdata->fetch_assoc()) {
|
||||
$pdata[$key]['adresse1']=$row['adresse1'];
|
||||
$pdata[$key]['adresse2']=$row['adresse2'];
|
||||
$pdata[$key]['reason']=$row['reason'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
$template->assign('datapol', $datapol);
|
||||
$template->assign('time', time());
|
||||
if(isset($pdata)) { $template->assign('pdata', $pdata); }
|
||||
//--------- Normplan LVZ
|
||||
// $data_norm = $GLOBALS['mysql']->query_single("SELECT * FROM normplan WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
// $normdate2=$tage[date("w",mktime(0, 0, 0,$monat,$tag,$jahr))]; $normdate=$normdate2.", den ".$tag.".".$monat.".".$jahr;
|
||||
// $template->assign('normdate',$normdate); $template->assign('nplan',$data_norm);
|
||||
//--------- Ende Normplan LVZ
|
||||
|
||||
if(time()-$anlage['zeit']<80) { //99
|
||||
$ma1 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$anlage['user']."'");
|
||||
$ma=$ma1['name'];
|
||||
$manr=$ma1['id'];
|
||||
$template->assign('ma',$ma);
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
//---------- Tag 1 ------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
$tmptime=mktime(0,0,0,$monat,$tag,$jahr);
|
||||
$test = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and fahrer='".$anlage['user']."'");
|
||||
$template->assign('anz',1);
|
||||
if($test['num_rows'] == 0) {
|
||||
$tag_tour1[$key]['noplan']=1;
|
||||
$tag_tour1[$key]['datum']=$tag.".".$monat.".".$jahr;
|
||||
} else {
|
||||
$key=0;
|
||||
$tag_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and fahrer='".$anlage['user']."'");
|
||||
while($row = $tag_tour->fetch_assoc()) {
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
//--------------------------------- Personalabfrage
|
||||
$tag_tour1[$key]['$fahrernichtda']=0;
|
||||
$row_nichtda = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$row['fahrer']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($row_nichtda['num_rows'] > 0) {
|
||||
$row_gnichtda = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row_nichtda['grund']."'");
|
||||
if($row_gnichtda['nichtda']==1) { $tag_tour1[$key]['fahrernichtda']=1; //- fahrer den ganzen tag nicht da
|
||||
} else {
|
||||
if($row['fahrer']!=$row_tour['s_fahrer']) { $tag_tour1[$key]['fahrernichtda']=2; }
|
||||
if($row_gnichtda['nichtda']==$row['typ']) { $tag_tour1[$key]['fahrernichtda']=1; } //-- kein dieser touren typ nicht der fahrer da
|
||||
}
|
||||
} else {
|
||||
if($row['fahrer']!=$row_tour['s_fahrer']) { $tag_tour1[$key]['fahrernichtda']=2; }
|
||||
if((int)$row['smsid']<1) {$tag_tour1[$key]['fahrernichtda']=3; }
|
||||
if($row['fahrer']<1) {$tag_tour1[$key]['fahrernichtda']=1; }
|
||||
}
|
||||
$tag_tour1[$key]['autonichtda']=0;//----------- auto
|
||||
$row_anichtda = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($row_anichtda['num_rows'] != 0) { $tag_tour1[$key]['autonichtda']=1; }
|
||||
if($tag_tour1[$key]['autonichtda']!=1) { if($row['auto']!=$row_tour['s_auto']) { $tag_tour1[$key]['autonichtda']=2; }}
|
||||
//----------
|
||||
$tag_tour1[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
$tmptime=mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr']);
|
||||
$tag_tour1[$key]['zeit']=$row['zeit'];
|
||||
$tag_tour1[$key]['key']=$key;
|
||||
$tag_tour1[$key]['tour']=$row_tour['tour'];
|
||||
$tag_tour1[$key]['aktiv']=$row_tour['aktiv'];
|
||||
$data_auto1 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tag_tour1[$key]['kennz']=$data_auto1['kz'];
|
||||
if($row['typ']== 7) { $tag_tour1[$key]['info']=$row['gewicht']." kg"; $tag_tour1[$key]['ianz']=1; }
|
||||
if($row['typ']== 8) { $tag_tour1[$key]['info']=$row['gewicht']." kg"; $tag_tour1[$key]['ianz']=1; }
|
||||
if($row['typ']==11) { $tag_tour1[$key]['info']=$row['gewicht']." kg"; $tag_tour1[$key]['ianz']=1; }
|
||||
if($row['typ']==12) { $tag_tour1[$key]['info']=$row['gewicht']." kg"; $tag_tour1[$key]['ianz']=1; }
|
||||
if($row['typ']==13) { $tag_tour1[$key]['info']=$row['gewicht']." kg"; $tag_tour1[$key]['ianz']=1; }
|
||||
if($row['typ']==14) { $tag_tour1[$key]['info']=$row['gewicht']." kg"; $tag_tour1[$key]['ianz']=1; }
|
||||
if($row['typ']==19) { $tag_tour1[$key]['info']=$row['gewicht']." kg"; $tag_tour1[$key]['ianz']=1; }
|
||||
if($row['typ']==15) { $tag_tour1[$key]['info']=$row['exemplare']." St."; $tag_tour1[$key]['ianz']=1; }
|
||||
$key++;
|
||||
}
|
||||
$template->assign('tag_tour1',$tag_tour1);
|
||||
}
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
//---------- Tag 2 ------------------------------------------------------------------------------------------------------------------------------------------
|
||||
$temptime=strtotime("+1 day",$tmptime); $jahr2 = (int)date('Y',$temptime); $monat2=(int)date('m',$temptime); $tag2=(int)date('j',$temptime);
|
||||
$test = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag2."' and monat='".$monat2."' and jahr='".$jahr2."' and fahrer='".$anlage['user']."'");
|
||||
if($test['num_rows'] == 0) {
|
||||
$tag_tour2[$key]['noplan']=1;
|
||||
$tag_tour2[$key]['datum']=$tag2.".".$monat2.".".$jahr2;
|
||||
} else {
|
||||
$key=0; //$template->assign('anz',$tag2);
|
||||
$tag_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag2."' and monat='".$monat2."' and jahr='".$jahr2."' and fahrer='".$anlage['user']."'");
|
||||
while($row = $tag_tour->fetch_assoc()) {
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
//----------
|
||||
$tag_tour2[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
//$tmptime=mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr']);
|
||||
$tag_tour2[$key]['zeit']=$row['zeit'];
|
||||
$tag_tour2[$key]['key']=$key;
|
||||
$tag_tour2[$key]['tour']=$row_tour['tour'];
|
||||
$tag_tour2[$key]['aktiv']=$row_tour['aktiv'];
|
||||
$data_auto1 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tag_tour2[$key]['kennz']=$data_auto1['kz'];
|
||||
if($row['typ']== 7) { $tag_tour2[$key]['info']=$row['gewicht']." kg"; $tag_tour2[$key]['ianz']=1; }
|
||||
if($row['typ']== 8) { $tag_tour2[$key]['info']=$row['gewicht']." kg"; $tag_tour2[$key]['ianz']=1; }
|
||||
if($row['typ']==11) { $tag_tour2[$key]['info']=$row['gewicht']." kg"; $tag_tour2[$key]['ianz']=1; }
|
||||
if($row['typ']==12) { $tag_tour2[$key]['info']=$row['gewicht']." kg"; $tag_tour2[$key]['ianz']=1; }
|
||||
if($row['typ']==13) { $tag_tour2[$key]['info']=$row['gewicht']." kg"; $tag_tour2[$key]['ianz']=1; }
|
||||
if($row['typ']==14) { $tag_tour2[$key]['info']=$row['gewicht']." kg"; $tag_tour2[$key]['ianz']=1; }
|
||||
if($row['typ']==19) { $tag_tour2[$key]['info']=$row['gewicht']." kg"; $tag_tour2[$key]['ianz']=1; }
|
||||
if($row['typ']==15) { $tag_tour2[$key]['info']=$row['exemplare']." St."; $tag_tour2[$key]['ianz']=1; }
|
||||
$key++;
|
||||
}
|
||||
$template->assign('tag_tour2',$tag_tour2);
|
||||
}
|
||||
//---------- Tag 3 ------------------------------------------------------------------------------------------------------------------------------------------
|
||||
$temptime=strtotime("+2 day",$tmptime); $jahr3 = (int)date('Y',$temptime); $monat3=(int)date('m',$temptime); $tag3=(int)date('j',$temptime);
|
||||
$test = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag3."' and monat='".$monat3."' and jahr='".$jahr3."' and fahrer='".$anlage['user']."'");
|
||||
if($test['num_rows'] == 0) {
|
||||
$tag_tour3[$key]['noplan']=1;
|
||||
$tag_tour3[$key]['datum']=$tag3.".".$monat3.".".$jahr3;
|
||||
} else {
|
||||
$key=0; //$template->assign('anz',$tag2);
|
||||
$tag_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag3."' and monat='".$monat3."' and jahr='".$jahr3."' and fahrer='".$anlage['user']."'");
|
||||
while($row = $tag_tour->fetch_assoc()) {
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
//----------
|
||||
$tag_tour3[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
//$tmptime=mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr']);
|
||||
$tag_tour3[$key]['zeit']=$row['zeit'];
|
||||
$tag_tour3[$key]['key']=$key;
|
||||
$tag_tour3[$key]['tour']=$row_tour['tour'];
|
||||
$tag_tour3[$key]['aktiv']=$row_tour['aktiv'];
|
||||
$data_auto1 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tag_tour3[$key]['kennz']=$data_auto1['kz'];
|
||||
if($row['typ']== 7) { $tag_tour3[$key]['info']=$row['gewicht']." kg"; $tag_tour3[$key]['ianz']=1; }
|
||||
if($row['typ']== 8) { $tag_tour3[$key]['info']=$row['gewicht']." kg"; $tag_tour3[$key]['ianz']=1; }
|
||||
if($row['typ']==11) { $tag_tour3[$key]['info']=$row['gewicht']." kg"; $tag_tour3[$key]['ianz']=1; }
|
||||
if($row['typ']==12) { $tag_tour3[$key]['info']=$row['gewicht']." kg"; $tag_tour3[$key]['ianz']=1; }
|
||||
if($row['typ']==13) { $tag_tour3[$key]['info']=$row['gewicht']." kg"; $tag_tour3[$key]['ianz']=1; }
|
||||
if($row['typ']==14) { $tag_tour3[$key]['info']=$row['gewicht']." kg"; $tag_tour3[$key]['ianz']=1; }
|
||||
if($row['typ']==19) { $tag_tour3[$key]['info']=$row['gewicht']." kg"; $tag_tour3[$key]['ianz']=1; }
|
||||
if($row['typ']==15) { $tag_tour3[$key]['info']=$row['exemplare']." St."; $tag_tour3[$key]['ianz']=1; }
|
||||
$key++;
|
||||
}
|
||||
$template->assign('tag_tour3',$tag_tour3);
|
||||
}
|
||||
//---------- Tag 4 ------------------------------------------------------------------------------------------------------------------------------------------
|
||||
$temptime=strtotime("+3 day",$tmptime); $jahr4 = (int)date('Y',$temptime); $monat4=(int)date('m',$temptime); $tag4=(int)date('j',$temptime);
|
||||
$test = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag4."' and monat='".$monat4."' and jahr='".$jahr4."' and fahrer='".$anlage['user']."'");
|
||||
if($test['num_rows'] == 0) {
|
||||
$tag_tour4[$key]['noplan']=1;
|
||||
$tag_tour4[$key]['datum']=$tag4.".".$monat4.".".$jahr4;
|
||||
} else {
|
||||
$key=0; //$template->assign('anz',$tag2);
|
||||
$tag_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag4."' and monat='".$monat4."' and jahr='".$jahr4."' and fahrer='".$anlage['user']."'");
|
||||
while($row = $tag_tour->fetch_assoc()) {
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
//----------
|
||||
$tag_tour4[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
//$tmptime=mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr']);
|
||||
$tag_tour4[$key]['zeit']=$row['zeit'];
|
||||
$tag_tour4[$key]['key']=$key;
|
||||
$tag_tour4[$key]['tour']=$row_tour['tour'];
|
||||
$tag_tour4[$key]['aktiv']=$row_tour['aktiv'];
|
||||
$data_auto1 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tag_tour4[$key]['kennz']=$data_auto1['kz'];
|
||||
if($row['typ']== 7) { $tag_tour4[$key]['info']=$row['gewicht']." kg"; $tag_tour4[$key]['ianz']=1; }
|
||||
if($row['typ']== 8) { $tag_tour4[$key]['info']=$row['gewicht']." kg"; $tag_tour4[$key]['ianz']=1; }
|
||||
if($row['typ']==11) { $tag_tour4[$key]['info']=$row['gewicht']." kg"; $tag_tour4[$key]['ianz']=1; }
|
||||
if($row['typ']==12) { $tag_tour4[$key]['info']=$row['gewicht']." kg"; $tag_tour4[$key]['ianz']=1; }
|
||||
if($row['typ']==13) { $tag_tour4[$key]['info']=$row['gewicht']." kg"; $tag_tour4[$key]['ianz']=1; }
|
||||
if($row['typ']==14) { $tag_tour4[$key]['info']=$row['gewicht']." kg"; $tag_tour4[$key]['ianz']=1; }
|
||||
if($row['typ']==19) { $tag_tour4[$key]['info']=$row['gewicht']." kg"; $tag_tour4[$key]['ianz']=1; }
|
||||
if($row['typ']==15) { $tag_tour4[$key]['info']=$row['exemplare']." St."; $tag_tour4[$key]['ianz']=1; }
|
||||
$key++;
|
||||
}
|
||||
$template->assign('tag_tour4',$tag_tour4);
|
||||
}
|
||||
//---------- Tag 5 ------------------------------------------------------------------------------------------------------------------------------------------
|
||||
$temptime=strtotime("+4 day",$tmptime); $jahr5 = (int)date('Y',$temptime); $monat5=(int)date('m',$temptime); $tag5=(int)date('j',$temptime);
|
||||
$test = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag5."' and monat='".$monat5."' and jahr='".$jahr5."' and fahrer='".$anlage['user']."'");
|
||||
if($test['num_rows'] == 0) {
|
||||
$tag_tour5[$key]['noplan']=1;
|
||||
$tag_tour5[$key]['datum']=$tag5.".".$monat5.".".$jahr5;
|
||||
} else {
|
||||
$key=0; //$template->assign('anz',$tag2);
|
||||
$tag_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag5."' and monat='".$monat5."' and jahr='".$jahr5."' and fahrer='".$anlage['user']."'");
|
||||
while($row = $tag_tour->fetch_assoc()) {
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
//----------
|
||||
$tag_tour5[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
//$tmptime=mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr']);
|
||||
$tag_tour5[$key]['zeit']=$row['zeit'];
|
||||
$tag_tour5[$key]['key']=$key;
|
||||
$tag_tour5[$key]['tour']=$row_tour['tour'];
|
||||
$tag_tour5[$key]['aktiv']=$row_tour['aktiv'];
|
||||
$data_auto1 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tag_tour5[$key]['kennz']=$data_auto1['kz'];
|
||||
if($row['typ']== 7) { $tag_tour5[$key]['info']=$row['gewicht']." kg"; $tag_tour5[$key]['ianz']=1; }
|
||||
if($row['typ']== 8) { $tag_tour5[$key]['info']=$row['gewicht']." kg"; $tag_tour5[$key]['ianz']=1; }
|
||||
if($row['typ']==11) { $tag_tour5[$key]['info']=$row['gewicht']." kg"; $tag_tour5[$key]['ianz']=1; }
|
||||
if($row['typ']==12) { $tag_tour5[$key]['info']=$row['gewicht']." kg"; $tag_tour5[$key]['ianz']=1; }
|
||||
if($row['typ']==13) { $tag_tour5[$key]['info']=$row['gewicht']." kg"; $tag_tour5[$key]['ianz']=1; }
|
||||
if($row['typ']==14) { $tag_tour5[$key]['info']=$row['gewicht']." kg"; $tag_tour5[$key]['ianz']=1; }
|
||||
if($row['typ']==19) { $tag_tour5[$key]['info']=$row['gewicht']." kg"; $tag_tour5[$key]['ianz']=1; }
|
||||
if($row['typ']==15) { $tag_tour5[$key]['info']=$row['exemplare']." St."; $tag_tour5[$key]['ianz']=1; }
|
||||
$key++;
|
||||
}
|
||||
$template->assign('tag_tour5',$tag_tour5);
|
||||
}
|
||||
} else {
|
||||
$GLOBALS['door']=0;
|
||||
|
||||
$key=0;
|
||||
// $test = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and fahrer='".$anlage['user']."' ORDER BY logID ");
|
||||
// if($test['num_rows'] != 0) {
|
||||
//------------------------------------------------ Zeitumrechnung nach bedarf
|
||||
$testb1 = $GLOBALS['mysql']->query_single("SELECT * FROM baustellen WHERE startts=0");
|
||||
if($testb1['num_rows'] != 0) {
|
||||
$testbx = $GLOBALS['mysql']->query("SELECT * FROM baustellen WHERE startts=0");
|
||||
while($row = $testbx->fetch_assoc()) {
|
||||
$st = explode(".", $row['start']);
|
||||
$startzeit=mktime(0,0,0, $st[1],$st[0],$st[2]);
|
||||
$GLOBALS['mysql']->insert("UPDATE baustellen SET startts='".$startzeit."' WHERE id='".$row['id']."'");
|
||||
|
||||
$et = explode(".", $row['ende']);
|
||||
$endzeit=mktime(0,0,0, $et[1],$et[0],$et[2]); //echo $endzeit;
|
||||
$GLOBALS['mysql']->insert("UPDATE baustellen SET endts='".$endzeit."' WHERE id='".$row['id']."'");
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------ baustellen auslesen
|
||||
|
||||
$time=time();
|
||||
$testb2 = $GLOBALS['mysql']->query_single("SELECT * FROM baustellen WHERE startts<'".$time."' and endts>'".$time."'");
|
||||
if($testb2['num_rows'] != 0) {
|
||||
$tour = $GLOBALS['mysql']->query("SELECT * FROM baustellen WHERE startts<'".$time."' and endts>'".$time."'");
|
||||
while($row = $tour->fetch_assoc()) {
|
||||
$bdata[$key]['ort']= $row['ort']; //echo "-".$row['ort'];
|
||||
$bdata[$key]['grund']= $row['grund'];
|
||||
$bdata[$key]['bezeichnung']= $row['bezeichnung'];
|
||||
$bdata[$key]['ende']= $row['ende'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
$template->assign('bdata',$bdata);
|
||||
}
|
||||
$template->assign('content', 'tpl/ajax/pi_hallo2.tpl');
|
||||
|
||||
|
||||
?>
|
||||
61
monitor/scripts/ajax/pi_werbung19.php
Normal file
61
monitor/scripts/ajax/pi_werbung19.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
// echo'<pre>'; print_r($row_nichtda); echo'</pre>';
|
||||
|
||||
error_reporting(0);
|
||||
ini_set('display_errors',0);
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
//-----------------------------------------------------
|
||||
$wochentag=date('w');
|
||||
$jahr = (int)date('Y');
|
||||
$kw = (int)date('W');
|
||||
//-----------------------------------------------------
|
||||
//-----------------------------------------------------
|
||||
//-------------------- wiederkehrende abfragen -------------------------------------------------
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
//-----------------------------------------------------
|
||||
//-----------------------------------------------------
|
||||
//-----------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
//-------- Sachsen-Sonntag 2019 neu -----------------------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------------------------------------------------------
|
||||
if($wochentag==4 || $wochentag==5 || $wochentag==6 || $wochentag==0) { //------------------------- donnerstag bis Sonntag Saso laden
|
||||
//--------------------------------------------------------------------------------------------------------------------------------------
|
||||
//---------------------------------------- Halle Block
|
||||
$key=0;
|
||||
$saso_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE kw='".$kw."' and jahr='".$jahr."' and typ=19 ORDER BY tour");
|
||||
while($row = $saso_tour->fetch_assoc()) {
|
||||
$saso_tour1[$key]['binfo']='Block: '.$row['utyp'].' geplant: '.$row['zeit']." Uhr";
|
||||
$wechsel=$row['utyp'];
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
$aa_id= array_search($row['auto'], array_column($a_fahrzg, 'id'));
|
||||
$ma_id= array_search($row['fahrer'], array_column($a_fahrer, 'id'));
|
||||
$saso_tour1[$key]['start']=$key;
|
||||
$saso_tour1[$key]['aktiv']=$a_touren[$ta_id]['aktiv'];
|
||||
$saso_tour1[$key]['tour']=$a_touren[$ta_id]['tour3'];
|
||||
$saso_tour1[$key]['auto']=$a_fahrzg[$aa_id]['kz'];
|
||||
$saso_tour1[$key]['status']=$row['status'];
|
||||
$saso_tour1[$key]['fahrerid']=$row['fahrer'];
|
||||
$saso_tour1[$key]['zeit']=$row['zeit'];
|
||||
$saso_tour1[$key]['autoid']=$row['auto'];
|
||||
$saso_tour1[$key]['fahrer']=$a_fahrer[$ma_id]['name'];
|
||||
$saso_tour1[$key]['look']=$row['fertig'];
|
||||
$saso_tour1[$key]['gewicht']=$row['gewicht'];
|
||||
$saso_tour1[$key]['gewicht4']=$row['gewicht4'];
|
||||
$sasonorm=$row['Norm'];
|
||||
$key++;
|
||||
}
|
||||
$template->assign('saso_tour',$saso_tour1);
|
||||
$template->assign('sasoanzeige',$key);
|
||||
$template->assign('sasonorm',$sasonorm);
|
||||
}
|
||||
|
||||
|
||||
$template->assign('kw', $kw);
|
||||
|
||||
$template->assign('content', 'tpl/ajax/pi_werbung19.tpl');
|
||||
?>
|
||||
37
monitor/scripts/ajax/tankebillig.php
Normal file
37
monitor/scripts/ajax/tankebillig.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
$tankxx = $GLOBALS['mysql']->query("SELECT * FROM tanken WHERE open=1 ORDER BY diesel ASC LIMIT 3"); $key=0;
|
||||
while($tank = $tankxx->fetch_assoc()) {
|
||||
|
||||
$tankex[$key]['open']=$tank['open'];
|
||||
$tankex[$key]['kname']=$tank['kname'];
|
||||
$tankex[$key]['adr1']=$tank['name'];
|
||||
$tankex[$key]['adr2']=$tank['street'];
|
||||
$tankex[$key]['adr3']=$tank['plz'];
|
||||
$tankex[$key]['adr4']=$tank['ort'];
|
||||
$tankex[$key]['diesel']=substr($tank['diesel'], 0, -1);
|
||||
$tankex[$key]['dieselx']=substr($tank['diesel'], -1, 1);
|
||||
$key++;
|
||||
}
|
||||
|
||||
$tanktx = $GLOBALS['mysql']->query("SELECT * FROM tanken WHERE open=1 ORDER BY diesel DESC LIMIT 3"); $key=0;
|
||||
while($tankxx = $tanktx->fetch_assoc()) {
|
||||
|
||||
$tankt[$key]['open']=$tankxx['open'];
|
||||
$tankt[$key]['kname']=$tankxx['kname'];
|
||||
$tankt[$key]['adr1']=$tankxx['name'];
|
||||
$tankt[$key]['adr2']=$tankxx['street'];
|
||||
$tankt[$key]['adr3']=$tankxx['plz'];
|
||||
$tankt[$key]['adr4']=$tankxx['ort'];
|
||||
$tankt[$key]['diesel']=substr($tankxx['diesel'], 0, -1);
|
||||
$tankt[$key]['dieselx']=substr($tankxx['diesel'], -1, 1);
|
||||
$key++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$template->assign('tanke', $tankex);
|
||||
$template->assign('tanket', $tankt);
|
||||
$template->assign('content', 'tpl/ajax/tankebillig.tpl');
|
||||
|
||||
?>
|
||||
11
monitor/scripts/ajax/tankeneu1.php
Normal file
11
monitor/scripts/ajax/tankeneu1.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
$tank = $GLOBALS['mysql']->query_single("SELECT * FROM tanken WHERE id=1");
|
||||
|
||||
$tankex['open']=$tank['open'];
|
||||
$tankex['diesel']=substr($tank['diesel'], 0, -1);
|
||||
$tankex['dieselx']=substr($tank['diesel'], -1, 1);
|
||||
|
||||
$template->assign('tanke', $tankex);
|
||||
$template->assign('content', 'tpl/ajax/tankeneu.tpl');
|
||||
|
||||
?>
|
||||
12
monitor/scripts/ajax/tankeneu2.php
Normal file
12
monitor/scripts/ajax/tankeneu2.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
$tank = $GLOBALS['mysql']->query_single("SELECT * FROM tanken WHERE id=37");
|
||||
|
||||
$tankex['open']=$tank['open'];
|
||||
$tankex['diesel']=substr($tank['diesel'], 0, -1);
|
||||
$tankex['dieselx']=substr($tank['diesel'], -1, 1);
|
||||
|
||||
|
||||
$template->assign('tanke', $tankex);
|
||||
$template->assign('content', 'tpl/ajax/tankeneu.tpl');
|
||||
|
||||
?>
|
||||
12
monitor/scripts/ajax/tankeneu3.php
Normal file
12
monitor/scripts/ajax/tankeneu3.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
$tank = $GLOBALS['mysql']->query_single("SELECT * FROM tanken WHERE id=4");
|
||||
|
||||
$tankex['open']=$tank['open'];
|
||||
$tankex['diesel']=substr($tank['diesel'], 0, -1);
|
||||
$tankex['dieselx']=substr($tank['diesel'], -1, 1);
|
||||
|
||||
|
||||
$template->assign('tanke', $tankex);
|
||||
$template->assign('content', 'tpl/ajax/tankeneu.tpl');
|
||||
|
||||
?>
|
||||
13
monitor/scripts/ajax/tankeneu4.php
Normal file
13
monitor/scripts/ajax/tankeneu4.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
$tank = $GLOBALS['mysql']->query_single("SELECT * FROM tanken WHERE id=8");
|
||||
|
||||
|
||||
$tankex['open']=$tank['open'];
|
||||
$tankex['diesel']=substr($tank['diesel'], 0, -1);
|
||||
$tankex['dieselx']=substr($tank['diesel'], -1, 1);
|
||||
|
||||
|
||||
$template->assign('tanke', $tankex);
|
||||
$template->assign('content', 'tpl/ajax/tankeneu.tpl');
|
||||
|
||||
?>
|
||||
13
monitor/scripts/ajax/tankeneu5.php
Normal file
13
monitor/scripts/ajax/tankeneu5.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
$tank = $GLOBALS['mysql']->query_single("SELECT * FROM tanken WHERE id=6");
|
||||
|
||||
|
||||
$tankex['open']=$tank['open'];
|
||||
$tankex['diesel']=substr($tank['diesel'], 0, -1);
|
||||
$tankex['dieselx']=substr($tank['diesel'], -1, 1);
|
||||
|
||||
|
||||
$template->assign('tanke', $tankex);
|
||||
$template->assign('content', 'tpl/ajax/tankeneu.tpl');
|
||||
|
||||
?>
|
||||
13
monitor/scripts/ajax/tankeneu6.php
Normal file
13
monitor/scripts/ajax/tankeneu6.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
$tank = $GLOBALS['mysql']->query_single("SELECT * FROM tanken WHERE id=5");
|
||||
|
||||
|
||||
$tankex['open']=$tank['open'];
|
||||
$tankex['diesel']=substr($tank['diesel'], 0, -1);
|
||||
$tankex['dieselx']=substr($tank['diesel'], -1, 1);
|
||||
|
||||
|
||||
$template->assign('tanke', $tankex);
|
||||
$template->assign('content', 'tpl/ajax/tankeneu.tpl');
|
||||
|
||||
?>
|
||||
13
monitor/scripts/ajax/tankeneu7.php
Normal file
13
monitor/scripts/ajax/tankeneu7.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
$tank = $GLOBALS['mysql']->query_single("SELECT * FROM tanken WHERE id=7");
|
||||
|
||||
|
||||
$tankex['open']=$tank['open'];
|
||||
$tankex['diesel']=substr($tank['diesel'], 0, -1);
|
||||
$tankex['dieselx']=substr($tank['diesel'], -1, 1);
|
||||
|
||||
|
||||
$template->assign('tanke', $tankex);
|
||||
$template->assign('content', 'tpl/ajax/tankeneu.tpl');
|
||||
|
||||
?>
|
||||
13
monitor/scripts/ajax/tankeneu8.php
Normal file
13
monitor/scripts/ajax/tankeneu8.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
$tank = $GLOBALS['mysql']->query_single("SELECT * FROM tanken WHERE id=41");
|
||||
|
||||
|
||||
$tankex['open']=$tank['open'];
|
||||
$tankex['diesel']=substr($tank['diesel'], 0, -1);
|
||||
$tankex['dieselx']=substr($tank['diesel'], -1, 1);
|
||||
|
||||
|
||||
$template->assign('tanke', $tankex);
|
||||
$template->assign('content', 'tpl/ajax/tankeneu.tpl');
|
||||
|
||||
?>
|
||||
3
monitor/scripts/ajax/time.php
Normal file
3
monitor/scripts/ajax/time.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
$template->assign('content', 'tpl/ajax/time.tpl');
|
||||
?>
|
||||
10
monitor/scripts/ajax/zeit.php
Normal file
10
monitor/scripts/ajax/zeit.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
//-----------------------------------------------------
|
||||
$uhrzeit = date("H:i");
|
||||
$datum = date("d.m.Y");
|
||||
$template->assign('zeit', $uhrzeit);
|
||||
$template->assign('date', $datum);
|
||||
$template->assign('content', 'tpl/ajax/zeit.tpl');
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue