jb-data.de/display2_2021.php
2025-08-11 22:23:30 +02:00

238 lines
No EOL
8 KiB
PHP

<meta name="robots" content="noindex,nofollow">
<meta http-equiv="refresh" content="600; url=display2.php" />
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="expires" content="0">
<?php
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
error_reporting(E_ALL); ini_set('display_errors',1);
$ip = array("79.211.165.37", "84.134.19.213", "87.138.184.114");
if (in_array ($_SERVER['REMOTE_ADDR'], $ip)) {
header('Content-Type: text/html; charset=utf-8');
//
//------------------------------------------------------------------
if(!isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'on') {
header('Location: https://'.$_SERVER['SERVER_NAME']);
exit();
}
//------------------------------------------------------------------
require('lib/config.php');
include('lib/class.mysms.php');
require('lib/mysql.class.php');
require('lib/core.class.php');
session_name(CONFIG_SESSION);
session_start();
$realtime=time(); // zeit fuer fuss
$userip=$_SERVER['REMOTE_ADDR'];// ip fuer fuss
date_default_timezone_set('Europe/Berlin'); // Default Time Zone
// define('SITE_ACCESS',true);
$GLOBALS['mysql'] = new mysql(CONFIG_MYSQL_HOST,CONFIG_MYSQL_USER,CONFIG_MYSQL_PW,CONFIG_MYSQL_DB); mysqli_set_charset($mysql, 'utf8');
require('lib/smarty/Smarty.class.php');
$GLOBALS['core'] = new core;
$template = new smarty();
$template->template_dir = './template/';
$template->compile_dir = './template/compile';
$template->compile_check = TRUE;
$template->debugging = false;
$template->debug_output = "html";
$template->plugins_dir[] = 'lib/smarty/plugins/';
$template->force_compile = true;
//-----------------------------------------------------
//------------------ iptest
$check_ip = $GLOBALS['mysql']->query("SELECT * FROM ipcheck");
while($row = $check_ip->fetch_assoc()) {
if(isset($ipvgl)) { array_push($ipvgl,$row['ip4']); } else { $ipvgl=array($row['ip4']); }
}
//if (in_array ($_SERVER['REMOTE_ADDR'], $ipvgl)) {
//-----------------------------------------------------
$wochentag=date('w');
$tagname = array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag");
$jahr_aktuell = (int)date('Y');
$kw_aktuell = (int)date('W');
//-------------------------------------------------------------------------------------------------------------
/*
114713000 Stadt Leipzig Leipzig (Stadt) LXX
114729000 Kreis Leipzig Leipzig LLK
114730000 Kreis Nordsachsen Nordsachsen TOX
*/
//-------------------------------------------------------------------------------------------------------------
// Tankkoeng: 29e0b621-5ac4-52c0-1e12-723fbcf6fba0
//------------------------------------------------------------------------------
//----------------------------------------------------- offene Rundschau auslesen
/*
$rs_tour_test = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE kw='".$kw_aktuell."' and jahr='".$jahr_aktuell."' and typ=7 and fahrer=0");
if($rs_tour_test['num_rows'] != 0) {
$template->assign('anz1',1);
$rs_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE kw='".$kw_aktuell."' and jahr='".$jahr_aktuell."' and typ=7 and fahrer=0"); $key=0;
while($row = $rs_tour->fetch_assoc()) {
$rskw[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
$rskw[$key]['id']=$row['id'];
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
$rskw[$key]['tour']=$row_tour['tour'];
$key++;
}
$template->assign('rs_tour',$rskw);
}
*/
//-------------------------------------------------------------------------------------------------------------
/*
$page='https://www.verkehrslage.de/Leipzig/mobile+Blitzer';
$tag='posts-widget-5';
$html = file_get_contents($page);
mb_convert_encoding($html,"UTF-8","auto");
$xp = new DOMDocument();
$xp->loadHTML($html);
$xp = new DOMXPath($xp);
foreach($xp->query("//aside[@id='".$tag."']") as $node) {
$node->nodeValue;
};
$blitzeranz=0;
$innerHTML= '';
$children = $node->childNodes;
foreach ($children as $child) {
$innerHTML .= $child->ownerDocument->saveXML( $child );
}
//echo "<pre>"; print_r(json_decode($innerHTML)); echo "</pre>";
$pos = strpos($innerHTML,'Zur');
if ($pos === false) {
$blitzeranz=1;
} else { $blitzeranz=0;
}
$template->assign('blitzeranz',$blitzeranz);
$strs="mobile";
$innerHTML= str_replace($strs,"",$innerHTML) ;
$strs="Blitzer";
$innerHTML= str_replace($strs,"",$innerHTML) ;
$strs="Karte";
$innerHTML= str_replace($strs,"",$innerHTML) ;
$strs=")";
$innerHTML= str_replace($strs,"",$innerHTML) ;
$strs="(";
$innerHTML= str_replace($strs,"",$innerHTML) ;
$strs="in Leipzig";
$innerHTML= str_replace($strs,"</br><span style='color:white'>",$innerHTML) ;
$template->assign('blitzer',$innerHTML);
//-------------------------------------------------------------------------------------------------------------
$page='https://www.verkehrslage.de/Sachsen/Stau';
$tag='posts-widget-5';
$html = file_get_contents($page);
mb_convert_encoding($html,"UTF-8","auto");
$xp = new DOMDocument();
$xp->loadHTML($html);
$xp = new DOMXPath($xp);
foreach($xp->query("//aside[@id='".$tag."']") as $node) {
$node->nodeValue;
};
$innerHTML= '';
$children = $node->childNodes;
foreach ($children as $child) {
$innerHTML2 .= $child->ownerDocument->saveXML( $child );
}
//echo "<pre>"; print_r(json_decode($innerHTML)); echo "</pre>";
$pos = strpos($innerHTML2,'Zur');
if ($pos === false) {
$stauanz=1;
} else { $stauanz=0;
}
$template->assign('stauanz',$stauanz);
$strs="Stau";
$innerHTML= str_replace($strs,"",$innerHTML2) ;
$strs="Karte";
$innerHTML= str_replace($strs,"",$innerHTML) ;
$strs=")";
$innerHTML= str_replace($strs,"",$innerHTML) ;
$strs="(";
$innerHTML= str_replace($strs,"",$innerHTML) ;
$strs="in Sachsen";
$innerHTML= str_replace($strs,"</br>",$innerHTML) ;
$template->assign('stau',$innerHTML);
*/
//-------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------
//echo'<pre>'; print_r($tag_tour1); echo'</pre>';
//------------------------------------------------------------
$GLOBALS['template']->display('index_display2.tpl');
//------------------------------------------------------------
} else {
?>
<html>
<head>
<title>Datenschutz-Grundverordnung der EU DSGVO</title>
</head>
<body text=#F88607 bgcolor=#000000 link=#FF0000 alink=#FF0000 vlink=#FF0000>
<div style="text-align: center;">
<img src=https://www.latori.com/assets/images/blogpost/dsgvo.jpg width=844 height=563 border=0>
</div>
<p align="center"> Am 25.05.2018 tritt die "Die EU-Datenschutzgrundverordnung (DSGVO)" in Kraft. </p>
<p align="center"> Daher ist es zur Zeit nicht möglich Ihnen hier Informationen anzubieten.</p>
</body>
</html>
<?php
}
//----------------------------------------------------------------------------------------------
/*
function read_content($page,$tag) {
$html = file_get_contents($page);
mb_convert_encoding($html,"UTF-8","auto");
$xp = new DOMDocument();
$xp->loadHTML($html);
$xp = new DOMXPath($xp);
foreach($xp->query("//aside[@id='".$tag."']") as $node) {
$node->nodeValue;
};
return get_inner_html($node);
};
function get_inner_html($node) {
$innerHTML= '';
$children = $node->childNodes;
foreach ($children as $child) {
$innerHTML .= $child->ownerDocument->saveXML( $child );
}
//echo "<pre>"; print_r(json_decode($innerHTML)); echo "</pre>";
return $innerHTML;
};
*/
?>
<?php
//echo read_content('https://www.verkehrslage.de/Leipzig/mobile+Blitzer','posts-widget-5');
?>