126 lines
No EOL
4.8 KiB
PHP
126 lines
No EOL
4.8 KiB
PHP
<meta name="robots" content="noindex,nofollow">
|
|
<meta http-equiv="refresh" content="1200; url=displayx.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(0); ini_set('display_errors',0);
|
|
|
|
|
|
$ip = array("84.134.29.97", "79.211.175.101", "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)) {
|
|
//-----------------------------------------------------
|
|
|
|
$tage = array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag");
|
|
$jahr = (int)date('Y');
|
|
$monat=(int)date('m');
|
|
$tag=(int)date('j');
|
|
$wochentag=date('w');
|
|
|
|
|
|
if(date('G')>18) {
|
|
$tt1=strtotime("+1 day");
|
|
} else {
|
|
$tt1=time();
|
|
}
|
|
$tag=(int)date('j',$tt1); $monat=(int)date('m',$tt1); $jahr = (int)date('Y',$tt1); $kw_1 = (int)date('W',$tt1);
|
|
|
|
//--------- 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."</br>".$tag.".".$monat.".".$jahr;
|
|
$template->assign('normdate',$normdate); $template->assign('nplan',$data_norm);
|
|
//--------- Ende Normplan LVZ
|
|
//-------------------------------------------------------------------------------------------------------------
|
|
/*
|
|
114713000 Stadt Leipzig Leipzig (Stadt) LXX
|
|
114729000 Kreis Leipzig Leipzig LLK
|
|
114730000 Kreis Nordsachsen Nordsachsen TOX
|
|
|
|
*/
|
|
//-------------------------------------------------------------------------------------------------------------
|
|
// Tankkoeng: 29e0b621-5ac4-52c0-1e12-723fbcf6fba0
|
|
//------------------------------------------------------------------------------
|
|
$data = json_decode(file_get_contents('http://api.openweathermap.org/data/2.5/weather?q=Leipzig,DE&units=metric&lang=de&APPID=e1fbd5096c088db7a388f3a582c99b02'));
|
|
$night=0;
|
|
$wetter['w_id']=$data->weather[0]->id;
|
|
$wetter['cist']=round($data->main->temp);
|
|
$wetter['cmin']=round($data->main->temp_min);
|
|
$wetter['cmax']=round($data->main->temp_max);
|
|
$wetter['text']=$data->weather[0]->description;
|
|
$sunset = $data->sys->sunset;
|
|
$sunrise= $data->sys->sunrise;
|
|
if ($sunrise>time()) { $night=1; }
|
|
if ($sunrise<time() && $sunset>time()) { $night=0; }
|
|
if ($sunrise<time() && $sunset<time()) { $night=1; }
|
|
$template->assign('night', $night);
|
|
$template->assign('wetter', $wetter);
|
|
// echo'<pre>'; print_r($wetter); echo'</pre>';
|
|
//------------------------------------------------------------------------------
|
|
|
|
$GLOBALS['template']->display('index_displayx.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
|
|
}
|
|
//----------------------------------------------------------------------------------------------
|
|
?>
|