initial commit
This commit is contained in:
851
r41/luxembourg/de/_core/index.php
Normal file
851
r41/luxembourg/de/_core/index.php
Normal file
@ -0,0 +1,851 @@
|
||||
<?php
|
||||
/**
|
||||
* Main file
|
||||
*
|
||||
* @package co2rechner v4.1
|
||||
* @filesource
|
||||
* @author Jochen Seiter <info@bfig.de>
|
||||
* @copyright 2016, Buero fuer Internet Gestaltung
|
||||
* @version 4.1
|
||||
*/
|
||||
/**
|
||||
* Define variables
|
||||
*/
|
||||
define("DEBUG_FORMDATA", false);
|
||||
// error_reporting(-1);
|
||||
error_reporting(0);
|
||||
|
||||
// $time_start = microtime(true);
|
||||
|
||||
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
|
||||
|
||||
$customerID = "";
|
||||
if(isset($_POST['customerID'])) define("CUSTOMER_DIR", $_POST['customerID']);
|
||||
if(isset($_GET['customerID'])) define("CUSTOMER_DIR", $_GET['customerID']);
|
||||
if(defined('CUSTOMER_DIR') === false) die("No client ID!");
|
||||
// define("CUSTOMER_DIR", "klimaktiv");
|
||||
|
||||
|
||||
/**
|
||||
* Include individual customer settings or die!
|
||||
* Dependencies:
|
||||
*/
|
||||
if(file_exists('../'.CUSTOMER_DIR.'/settings/settings.inc.php'))
|
||||
{
|
||||
include_once('../'.CUSTOMER_DIR.'/settings/settings.inc.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
die('Keine Settings-Datei im Ordner "'.CUSTOMER_DIR.'" vorhanden!');
|
||||
}
|
||||
|
||||
/* Language */
|
||||
if(isset($_POST['langID']) && file_exists("languages/".$_POST['langID'])) define("CONTENT_LANGUAGE", $_POST['langID']);
|
||||
if(isset($_GET['langID']) && file_exists("languages/".$_GET['langID'])) define("CONTENT_LANGUAGE", $_GET['langID']);
|
||||
if(defined('CONTENT_LANGUAGE') === false)
|
||||
{
|
||||
header("Location: ".$protocol.$_SERVER['SERVER_NAME']."/".$customer_settings['display']['languages'][0]."/");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Include functions
|
||||
* Dependencies:
|
||||
*/
|
||||
include_once('includes/_functions.inc.php');
|
||||
|
||||
/**
|
||||
* Include functions for login
|
||||
* Dependencies:
|
||||
*/
|
||||
include_once('includes/_functions_login.inc.php');
|
||||
|
||||
/**
|
||||
* Input variables validation
|
||||
* Dependencies: includes/_functions.inc.php
|
||||
*/
|
||||
include_once('includes/_input_data.inc.php');
|
||||
|
||||
/**
|
||||
* Include database config data
|
||||
* Dependencies: ../'.CUSTOMER_DIR.'/settings/settings.inc.php
|
||||
*/
|
||||
include_once('includes/_db_configure.inc.php');
|
||||
|
||||
/**
|
||||
* Include ezSQL core
|
||||
* Dependencies:
|
||||
*/
|
||||
include_once("classes/ezsql2/shared/ez_sql_core.php");
|
||||
|
||||
/**
|
||||
* Include ezSQL database specific component
|
||||
* Dependencies:
|
||||
*/
|
||||
include_once("classes/ezsql2/pdo/ez_sql_pdo.php");
|
||||
|
||||
/**
|
||||
* Include session
|
||||
* Dependencies: ../'.CUSTOMER_DIR.'/settings/settings.inc.php
|
||||
*/
|
||||
include_once('includes/_session.inc.php');
|
||||
|
||||
|
||||
/**
|
||||
* Include common language file
|
||||
* Dependencies: includes/_input_data.inc.php
|
||||
* Dependencies: ../'.CUSTOMER_DIR.'/settings/settings.inc.php
|
||||
*/
|
||||
if(isset($customer_settings['overwrite']['languages']['index']) && $customer_settings['overwrite']['languages']['index'] === true && file_exists('../'.CUSTOMER_DIR.'/languages/'.CONTENT_LANGUAGE.'/index.inc.php'))
|
||||
{
|
||||
require_once('../'.CUSTOMER_DIR.'/languages/'.CONTENT_LANGUAGE.'/index.inc.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once('languages/'.CONTENT_LANGUAGE.'/index.inc.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set "living_year"
|
||||
*/
|
||||
// if(!isset($_SESSION['data']['living_year'])) $_SESSION['data']['living_year'] = date("Y");
|
||||
|
||||
/**
|
||||
* Include values language file for co2 calculation
|
||||
* Dependencies: includes/_input_data.inc.php
|
||||
* Dependencies: ../'.CUSTOMER_DIR.'/settings/settings.inc.php
|
||||
*/
|
||||
if(isset($customer_settings['overwrite']['languages']['values']) && $customer_settings['overwrite']['languages']['values'] === true)
|
||||
{
|
||||
file_exists('../'.CUSTOMER_DIR.'/languages/'.CONTENT_LANGUAGE.'/_values.inc.php') ? require_once('../'.CUSTOMER_DIR.'/languages/'.CONTENT_LANGUAGE.'/_values.inc.php') : require_once('../'.CUSTOMER_DIR.'/languages/'.CONTENT_LANGUAGE.'/_values.inc.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
file_exists('languages/'.CONTENT_LANGUAGE.'/_values.inc.php') ? require_once('languages/'.CONTENT_LANGUAGE.'/_values.inc.php') : require_once('languages/'.CONTENT_LANGUAGE.'/_values.inc.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Include values for evaluation
|
||||
* Dependencies: includes/_input_data.inc.php
|
||||
* Dependencies: ../'.CUSTOMER_DIR.'/settings/settings.inc.php
|
||||
*/
|
||||
if(isset($customer_settings['overwrite']['values']['evaluation']) && $customer_settings['overwrite']['values']['evaluation'] === true && file_exists('../'.CUSTOMER_DIR.'/values/_evaluation.inc.php'))
|
||||
{
|
||||
file_exists('../'.CUSTOMER_DIR.'/values/_evaluation.inc.php') ? include_once('../'.CUSTOMER_DIR.'/values/_evaluation.inc.php') : include_once('../'.CUSTOMER_DIR.'/values/_evaluation.inc.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
file_exists('values/_evaluation.inc.php') ? include_once('values/_evaluation.inc.php') : include_once('values/_evaluation.inc.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Include values for co2 calculation
|
||||
* Dependencies: includes/_input_data.inc.php
|
||||
* Dependencies: ../'.CUSTOMER_DIR.'/settings/settings.inc.php
|
||||
*/
|
||||
if(isset($customer_settings['overwrite']['values']['values']) && $customer_settings['overwrite']['values']['values'] === true)
|
||||
{
|
||||
file_exists('../'.CUSTOMER_DIR.'/values/_values.inc.php') ? include_once('../'.CUSTOMER_DIR.'/values/_values.inc.php') : include_once('../'.CUSTOMER_DIR.'/values/_values.inc.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
file_exists('values/_values.inc.php') ? include_once('values/_values.inc.php') : include_once('values/_values.inc.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Include language files
|
||||
*/
|
||||
include_once('includes/_language_files.inc.php');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Process POST data
|
||||
*/
|
||||
if(isset($_POST['ajax_data']))
|
||||
{
|
||||
JSsessionData($_POST['ajax_data']);
|
||||
}
|
||||
elseif(isset($_POST))
|
||||
{
|
||||
JSsessionData($_POST);
|
||||
}
|
||||
|
||||
/* Fahrzeug hinzufügen */
|
||||
if($do == "increase_mobility_cars_amount")
|
||||
{
|
||||
// $temp_increase_mobility_cars_amount = count($_SESSION['data']['mobility_cars_values']) + 1;
|
||||
|
||||
$_SESSION['data']['mobility_cars_values'][] = array(
|
||||
'name' => '',
|
||||
'type' => 'mittelklasse',
|
||||
'age' => '11_15', // 2020-06-15. Mantis 1766
|
||||
'energy_source' => 'benzin',
|
||||
'consumption' => $factor_mobility_cars_consumption_default["benzin"]["mittelklasse"]
|
||||
);
|
||||
}
|
||||
|
||||
/* Scenario: Fahrzeug hinzufügen */
|
||||
if($do == "increase_sc_mobility_cars_amount")
|
||||
{
|
||||
// $temp_increase_mobility_cars_amount = count($_SESSION['data']['mobility_cars_values']) + 1;
|
||||
|
||||
$_SESSION['data']['sc_mobility_cars_values'][] = array(
|
||||
'name' => '',
|
||||
'type' => 'mittelklasse',
|
||||
'age' => '11_15', // 2020-06-15. Mantis 1766
|
||||
'energy_source' => 'benzin',
|
||||
'consumption' => $factor_mobility_cars_consumption_default["benzin"]["mittelklasse"]
|
||||
);
|
||||
}
|
||||
|
||||
/* Fahrzeug löschen */
|
||||
if($do == "delete_mobility_cars" && isset($key) && $key >= 0)
|
||||
{
|
||||
unset($_SESSION['data']['mobility_cars_values'][$key]);
|
||||
unset($_SESSION['data']['mobility_travel_general_performance'][$key]);
|
||||
|
||||
// Scenario
|
||||
if(isset($_SESSION['data']['sc_mobility_cars_values'][$key])) unset($_SESSION['data']['sc_mobility_cars_values'][$key]);
|
||||
if(isset($_SESSION['data']['sc_mobility_travel_general_performance'][$key])) unset($_SESSION['data']['sc_mobility_travel_general_performance'][$key]);
|
||||
|
||||
}
|
||||
|
||||
/* 2020-07-02: Scenario: Fahrzeug löschen */
|
||||
if($do == "delete_sc_mobility_cars" && isset($key) && $key >= 0)
|
||||
{
|
||||
unset($_SESSION['data']['sc_mobility_cars_values'][$key]);
|
||||
unset($_SESSION['data']['sc_mobility_travel_general_performance'][$key]);
|
||||
}
|
||||
|
||||
|
||||
/* Fahrt hinzufügen */
|
||||
if($do == "increase_mobility_travel_amount")
|
||||
{
|
||||
// $temp_increase_mobility_travel_amount = count($_SESSION['data']['mobility_travel_values']) + 1;
|
||||
|
||||
$_SESSION['data']['mobility_travel_values'][] = array(
|
||||
'name' => '',
|
||||
'vehicle' => 'oepnv',
|
||||
'road_performance' => 0,
|
||||
'days' => 1,
|
||||
'person' => 1
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/* Fahrt löschen */
|
||||
if($do == "delete_mobility_travel" && isset($key) && $key >= 0)
|
||||
{
|
||||
unset($_SESSION['data']['mobility_travel_values'][$key]);
|
||||
|
||||
$_SESSION['data']['mobility_travel_values'] = array_values($_SESSION['data']['mobility_travel_values']);
|
||||
|
||||
// Scenario
|
||||
if(isset($_SESSION['data']['sc_mobility_travel_values'][$key]))
|
||||
{
|
||||
unset($_SESSION['data']['sc_mobility_travel_values'][$key]);
|
||||
|
||||
$_SESSION['data']['sc_mobility_travel_values'] = array_values($_SESSION['data']['sc_mobility_travel_values']);
|
||||
}
|
||||
}
|
||||
|
||||
/* Delete from flight data */
|
||||
if($do == "delete_mobility_flight" && isset($key) && $key >= 0)
|
||||
{
|
||||
unset($_SESSION['data']['mobility_air'][$key]);
|
||||
unset($_SESSION['emission']['td']['mobility_air']);
|
||||
$_SESSION['data']['mobility_air'] = array_values($_SESSION['data']['mobility_air']);
|
||||
|
||||
unset($_SESSION['data']['sc_mobility_air'][$key]);
|
||||
unset($_SESSION['emission']['td']['sc_mobility_air']);
|
||||
$_SESSION['data']['sc_mobility_air'] = array_values($_SESSION['data']['sc_mobility_air']);
|
||||
|
||||
}
|
||||
|
||||
/* Haustier hinzufügen / 2020-06-19 - Mantis 1769 */
|
||||
if($do == "increase_consumption_animal_amount")
|
||||
{
|
||||
$_SESSION['data']['consumption_animal'][] = array(
|
||||
'type' => ''
|
||||
);
|
||||
}
|
||||
if($do == "increase_sc_consumption_animal_amount")
|
||||
{
|
||||
$_SESSION['data']['sc_consumption_animal'][] = array(
|
||||
'type' => ''
|
||||
);
|
||||
}
|
||||
|
||||
/* Haustier löschen / 2020-06-19 - Mantis 1769 */
|
||||
if($do == "delete_consumption_animal" && isset($key) && $key >= 0)
|
||||
{
|
||||
unset($_SESSION['data']['consumption_animal'][$key]);
|
||||
}
|
||||
if($do == "delete_sc_consumption_animal" && isset($key) && $key >= 0)
|
||||
{
|
||||
unset($_SESSION['data']['sc_consumption_animal'][$key]);
|
||||
}
|
||||
|
||||
/* Reset input */
|
||||
if($do == "reset") JSkillSessionData();
|
||||
|
||||
/* Reset input for new calculation without a base year */
|
||||
if($do == "new" && $new_calculation_year == "") JSkillSessionData();
|
||||
|
||||
/* Log out */
|
||||
if($do == "logout") $_SESSION = "";
|
||||
|
||||
|
||||
/**
|
||||
* Include default values
|
||||
* Dependencies: ../'.CUSTOMER_DIR.'/settings/settings.inc.php
|
||||
* Dependencies: ../'.CUSTOMER_DIR.'/values/_values.inc.php
|
||||
*/
|
||||
include('includes/_application_init.inc.php');
|
||||
|
||||
|
||||
/* Edit data */
|
||||
if($do == "edit")
|
||||
{
|
||||
$loaded_user_data = getUserData($_SESSION['user']['user_id'], $data_id = "", $year);
|
||||
|
||||
if(is_array($loaded_user_data) && !empty($loaded_user_data))
|
||||
{
|
||||
$_SESSION['data'] = $loaded_user_data[0]['data'];
|
||||
|
||||
$_SESSION['status']['edit'] = true;
|
||||
$_SESSION['status']['year'] = $year;
|
||||
|
||||
unset($loaded_user_data);
|
||||
}
|
||||
}
|
||||
|
||||
/* Create new data */
|
||||
if($do == "new")
|
||||
{
|
||||
$loaded_user_data = "";
|
||||
|
||||
if($new_calculation_year != "") $loaded_user_data = getUserData($_SESSION['user']['user_id'], $data_id = "", $new_calculation_year);
|
||||
|
||||
if(is_array($loaded_user_data) && !empty($loaded_user_data))
|
||||
{
|
||||
$_SESSION['data'] = $loaded_user_data[0]['data'];
|
||||
|
||||
$_SESSION['status']['edit'] = false;
|
||||
$_SESSION['status']['data_id'] = "";
|
||||
|
||||
unset($loaded_user_data);
|
||||
}
|
||||
|
||||
$_SESSION['data']['living_year'] = $new_calculation_base_year;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bookmark_data
|
||||
*/
|
||||
if($customer_settings['display']['bookmark_data'] && isset($bookmark) && !empty($bookmark))
|
||||
{
|
||||
$loaded_user_data = getBookmarkData($bookmark);
|
||||
|
||||
if(is_array($loaded_user_data) && !empty($loaded_user_data))
|
||||
{
|
||||
JSkillSessionData();
|
||||
|
||||
$_SESSION['data'] = $loaded_user_data[0]['data'];
|
||||
$_SESSION['status']['bookmark']['last_modified'] = $loaded_user_data[0]['last_modified'];
|
||||
$_SESSION['status']['bookmark']['loaded'] = true;
|
||||
$_SESSION['status']['bookmark']['email'] = $loaded_user_data[0]['email'];
|
||||
$_SESSION['status']['bookmark']['name'] = $loaded_user_data[0]['name'];
|
||||
$_SESSION['status']['bookmark']['address'] = $loaded_user_data[0]['address'];
|
||||
$_SESSION['status']['bookmark']['zip'] = $loaded_user_data[0]['zip'];
|
||||
$_SESSION['status']['bookmark']['city'] = $loaded_user_data[0]['city'];
|
||||
$_SESSION['status']['bookmark']['district'] = $loaded_user_data[0]['district'];
|
||||
$_SESSION['status']['bookmark']['school'] = $loaded_user_data[0]['school'];
|
||||
|
||||
unset($loaded_user_data);
|
||||
$bookmark = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['status']['bookmark']['failed'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Include functions for emission calculating
|
||||
*/
|
||||
include_once('includes/_functions_calc_living_hs.php');
|
||||
include_once('includes/_functions_calc_living_pt.php');
|
||||
include_once('includes/_functions_calc_mobility.php');
|
||||
include_once('includes/_functions_calc_food.php');
|
||||
include_once('includes/_functions_calc_consumption.php');
|
||||
include_once('includes/_functions_calc_streaming.php');
|
||||
include_once('includes/_functions_calc.php');
|
||||
/**
|
||||
* Neuer Berechnungsansatz nach EuroControl (EC)
|
||||
*
|
||||
* 2019-12-20
|
||||
*
|
||||
* Funktionen für den neuen Berechnungsansatz haben die Erweiterung '_EC'
|
||||
*
|
||||
*/
|
||||
include_once('includes/_functions_airports_ec.php');
|
||||
|
||||
/**
|
||||
* Include functions for emission improvement calculating
|
||||
*/
|
||||
// include_once('includes/_functions_improve.inc.php');
|
||||
include_once('includes/_functions_scenario.inc.php');
|
||||
|
||||
/**
|
||||
* Include functions for emission calculating
|
||||
*/
|
||||
include_once('includes/_functions_layout.inc.php');
|
||||
|
||||
|
||||
/**
|
||||
* P3P Policy: see also http://www.p3pwriter.com/LRN_111.asp
|
||||
* Required if calculator is embedded as an iframe (via different domain) on Internet Explorer
|
||||
* Otherwise cookies are not accepted
|
||||
*/
|
||||
header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND NAV"');
|
||||
|
||||
/* Login process */
|
||||
if($login_sent == true) userLogin($login_user_name, $login_user_password);
|
||||
|
||||
/* Create account process */
|
||||
if($register_sent == true) userRegister($login_user_name, $login_user_password, $login_user_password_repeat, $login_user_as, $login_user_as_result, $login_user_campaign);
|
||||
|
||||
/* Password reminder */
|
||||
if($password_sent == true) $password_error_message = passwordReminder($login_user_name);
|
||||
|
||||
|
||||
/* Guest user handling */
|
||||
if(isset($customer_settings['display']['save_guest_user']) && $customer_settings['display']['save_guest_user'] === true && $do != "logout")
|
||||
{
|
||||
/* Check guest user. If not available create account
|
||||
* Conditions: User is not logged in AND Guest User has no account
|
||||
*/
|
||||
if((!isset($_SESSION['user']['user_logged_in']) || $_SESSION['user']['user_logged_in'] === false) && (!isset($_SESSION['guest']['account_exists']) || $_SESSION['guest']['account_exists'] === false))
|
||||
{
|
||||
checkGuestAccount();
|
||||
}
|
||||
/* Save guest user data
|
||||
* Conditions: User is not logged in AND Guest User has an account
|
||||
*/
|
||||
if((!isset($_SESSION['user']['user_logged_in']) || $_SESSION['user']['user_logged_in'] === false) && (isset($_SESSION['guest']['account_exists']) && $_SESSION['guest']['account_exists'] === true))
|
||||
{
|
||||
saveGuestData();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set calculation mode for graph
|
||||
*/
|
||||
if(isset($_POST['person_calc_mode_display']) && !empty($_POST['person_calc_mode_display'])) $_SESSION['data']['person_calc_mode_display'] = $_POST['person_calc_mode_display'];
|
||||
if(isset($_GET['person_calc_mode_display']) && !empty($_GET['person_calc_mode_display'])) $_SESSION['data']['person_calc_mode_display'] = $_GET['person_calc_mode_display'];
|
||||
|
||||
|
||||
/**
|
||||
* Form controller
|
||||
*/
|
||||
/*
|
||||
if(isset($_POST['submit_target']) && !empty($_POST['submit_target']))
|
||||
{
|
||||
header("Location: ".$protocol.$_SERVER['SERVER_NAME']."/".CONTENT_LANGUAGE."/".key($_POST['submit_target'])."#panel-calc");
|
||||
exit;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/* Save input */
|
||||
if($do == "save") saveUserData();
|
||||
|
||||
/* Save bookmark data */
|
||||
if($customer_settings['display']['bookmark_data'] && $do == "bookmark") $bookmark_id = saveBookmarkData();
|
||||
|
||||
/**
|
||||
* Front controller
|
||||
*/
|
||||
include_once('includes/_front_controller.php');
|
||||
|
||||
?><!DOCTYPE html>
|
||||
<html lang="<?php echo substr(CONTENT_LANGUAGE, 0, 2); ?>">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title><?php echo strip_tags($title.' '.TXT_APPLICATION_HEADLINE); ?></title>
|
||||
|
||||
<base href="<?php echo $protocol.$_SERVER['SERVER_NAME'].'/'.CONTENT_LANGUAGE.'/'; ?>">
|
||||
<meta name="description" content="CO2-Rechner von klimAktiv">
|
||||
<meta name="keywords" content="<?php echo strip_tags($title.' '.TXT_APPLICATION_HEADLINE); ?>">
|
||||
<meta name="robots" content="index,nofollow">
|
||||
<meta name="author" content="KlimAktiv gGmbH">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
<?php
|
||||
/* Link für Social Media */
|
||||
if(isset($customer_settings['social']['recommend']) && $customer_settings['social']['recommend'] == true)
|
||||
{
|
||||
if(isset($customer_settings['social']['link']) && !empty($customer_settings['social']['link']))
|
||||
{
|
||||
echo '
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
var social_link = "'.$customer_settings['social']['link'].'";
|
||||
</script>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
var social_link = "'.$protocol.$_SERVER['SERVER_NAME'].'/'.CONTENT_LANGUAGE.'/";
|
||||
</script>';
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($customer_settings['css']['font_link']) && !empty($customer_settings['css']['font_link']))
|
||||
echo $customer_settings['css']['font_link'];
|
||||
|
||||
echo '<link rel="stylesheet" href="/_core/css/bootstrap.min.css" media="all">';
|
||||
echo '<link rel="stylesheet" href="/_core/css/bootstrap-slider.css">';
|
||||
echo '<link rel="stylesheet" href="/_core/css/font-awesome.min.css" />';
|
||||
echo '<link rel="stylesheet" href="/_core/css/animate.min.css" />';
|
||||
echo '<link rel="stylesheet" href="/_core/css/enhanced.css.php?dir='.CUSTOMER_DIR.'" />';
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($customer_settings['css']['background']['images'])
|
||||
{
|
||||
?>
|
||||
<style>
|
||||
|
||||
@media screen and (min-width:768px) {
|
||||
|
||||
#fixed-bg {
|
||||
height:100%;
|
||||
width:100%;
|
||||
position:fixed;
|
||||
top:0;
|
||||
background-size: cover;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
z-index:-10;
|
||||
opacity: <?php echo $customer_settings['css']['background']['opacity']; ?>;
|
||||
/*overflow-x:hidden;*/
|
||||
}
|
||||
|
||||
#fixed-bg.home, #fixed-bg.start, #fixed-bg.footprint {
|
||||
background-image:url("/<?php echo $customer_settings['css']['background']['customer-images'] == true ? CUSTOMER_DIR : '_core'; ?>/images/bg-home.jpg");
|
||||
}
|
||||
|
||||
#fixed-bg.living-hs {
|
||||
background-image:url("/<?php echo $customer_settings['css']['background']['customer-images'] == true ? CUSTOMER_DIR : '_core'; ?>/images/bg-living-hs.jpg");
|
||||
}
|
||||
|
||||
#fixed-bg.living-pt {
|
||||
background-image:url("/<?php echo $customer_settings['css']['background']['customer-images'] == true ? CUSTOMER_DIR : '_core'; ?>/images/bg-living-pt.jpg");
|
||||
}
|
||||
|
||||
#fixed-bg.mobility {
|
||||
background-image:url("/<?php echo $customer_settings['css']['background']['customer-images'] == true ? CUSTOMER_DIR : '_core'; ?>/images/bg-mobility.jpg");
|
||||
}
|
||||
|
||||
#fixed-bg.food {
|
||||
background-image:url("/<?php echo $customer_settings['css']['background']['customer-images'] == true ? CUSTOMER_DIR : '_core'; ?>/images/bg-food.jpg");
|
||||
}
|
||||
#fixed-bg.consumption {
|
||||
background-image:url("/<?php echo $customer_settings['css']['background']['customer-images'] == true ? CUSTOMER_DIR : '_core'; ?>/images/bg-consumption.jpg");
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
|
||||
if($customer_settings['css']['color']['touch-background'])
|
||||
{
|
||||
?>
|
||||
<style>
|
||||
html.touchevents body {
|
||||
<?php echo $customer_settings['css']['color']['touch-background']; ?>
|
||||
}
|
||||
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
|
||||
// custom.css
|
||||
if(isset($customer_settings['overwrite']['css']) && $customer_settings['overwrite']['css'] === true)
|
||||
echo '<link rel="stylesheet" href="/'.CUSTOMER_DIR.'/css/custom.css.php?dir='.CUSTOMER_DIR.'" />';
|
||||
|
||||
?>
|
||||
|
||||
<!-- IE Hack -->
|
||||
<style>
|
||||
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
||||
#logo-co2rechner {
|
||||
width: 100%;
|
||||
max-width: 297px;
|
||||
}
|
||||
#logo-client[src$=".svg"], #logo-client-xs[src$=".svg"] {
|
||||
width: 100%;
|
||||
max-width: 2600px;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
var js_cat = "<?php echo $display_js_cat; ?>";
|
||||
var js_base_href = "<?php echo $protocol.$_SERVER['SERVER_NAME'].'/'.CONTENT_LANGUAGE.'/'; ?>";
|
||||
|
||||
var js_emission_td_mobility_daily = '<?php echo getMyResultChart($_SESSION['emission']['td']['mobility_daily']); ?>';
|
||||
var js_emission_td_mobility_car_total = '<?php echo getMyResultChart($_SESSION['emission']['td']['mobility_car_total']); ?>';
|
||||
var js_emission_td_mobility_air_total = '<?php echo getMyResultChart($_SESSION['emission']['td']['mobility_air_total']); ?>';
|
||||
|
||||
<?php
|
||||
echo (isset($customer_settings['display']['section_help_visibility_mobile']) && $customer_settings['display']['section_help_visibility_mobile'] == true) ? 'var js_section_help_visibility_mobile = "1";' : 'var js_section_help_visibility_mobile = "0";';
|
||||
echo (isset($customer_settings['display']['section_help_visibility_desktop']) && $customer_settings['display']['section_help_visibility_desktop'] == true) ? 'var js_section_help_visibility_desktop = "1";' : 'var js_section_help_visibility_desktop = "0";';
|
||||
?>
|
||||
</script>
|
||||
|
||||
<script src="/_core/scripts/modernizr-custom.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
// Background images
|
||||
if($customer_settings['css']['background']['images']) echo '<div id="fixed-bg" class="'.$display_js_cat.' hidden-print"></div>';
|
||||
|
||||
// Modals
|
||||
require_once('_modals.php');
|
||||
|
||||
// Settings
|
||||
// if(!$_SESSION['data']['flag_settings']) require_once('_settings.php');
|
||||
|
||||
// Öffentliche Emissionen
|
||||
require_once('_public_consumption.php');
|
||||
// EOF Modals
|
||||
|
||||
// Login-Button / Sprachen
|
||||
if($customer_settings['display']['co2account'] === true || count($customer_settings['display']['languages']) > 1) include_once('includes/_navigation_top.php');
|
||||
|
||||
// Login / Account
|
||||
if($include_file_login != "") include_once($include_file_login);
|
||||
|
||||
// Header
|
||||
if($customer_settings['display']['header'] === true) include_once('_header.php');
|
||||
|
||||
// Content
|
||||
include_once('_content.php');
|
||||
|
||||
echo '<div style="height:50px"></div>';
|
||||
|
||||
// Google Analytics
|
||||
if(isset($customer_settings['analytics']['active']) && $customer_settings['analytics']['active'] === true)
|
||||
{
|
||||
if(isset($customer_settings['analytics']['code']) && !empty($customer_settings['analytics']['code'])) echo $customer_settings['analytics']['code'];
|
||||
}
|
||||
|
||||
// Piwik
|
||||
if(isset($customer_settings['piwik']['active']) && $customer_settings['piwik']['active'] === true)
|
||||
{
|
||||
if(isset($customer_settings['piwik']['code']) && !empty($customer_settings['piwik']['code'])) echo $customer_settings['piwik']['code'];
|
||||
}
|
||||
|
||||
?>
|
||||
<script src="/_core/scripts/jquery-1.11.1.min.js"></script>
|
||||
<script src="/_core/scripts/bootstrap.min.js"></script>
|
||||
<script src="/_core/scripts/bootstrap-slider.js"></script>
|
||||
<script src="/_core/scripts/bootbox.min.js"></script>
|
||||
<script src="/_core/scripts/jquery.socialshareprivacy.min.js"></script>
|
||||
<script src="/_core/scripts/jquery.cookiebar.min.js"></script>
|
||||
<script src="/_core/scripts/js.cookie.js"></script>
|
||||
<script src="/_core/scripts/clipboard.min.js"></script>
|
||||
<script src="/_core/classes/amcharts/amcharts.js"></script>
|
||||
<script src="/_core/classes/amcharts/serial.js"></script>
|
||||
<script src="/_core/classes/amcharts/plugins/responsive/responsive.min.js"></script>
|
||||
<?php if(isset($customer_settings['display']['qr_code']) && $customer_settings['display']['qr_code']): ?>
|
||||
<script src="/_core/scripts/kjua-0.9.0.min.js"></script>
|
||||
<?php endif; ?>
|
||||
<script src="/_core/scripts/enhancement.js"></script>
|
||||
<?php
|
||||
// custom.js
|
||||
if(isset($customer_settings['overwrite']['js']) && $customer_settings['overwrite']['js'] === true)
|
||||
echo '<script src="/'.CUSTOMER_DIR.'/scripts/custom.js"></script>';
|
||||
|
||||
require_once('includes/_chart_js.php');
|
||||
require_once('includes/_chart_section_js.php');
|
||||
// if($cat == "footprint") require_once('includes/_chart_complete_js.php');
|
||||
if($cat == "footprint") require_once('includes/_chart_compare_js.php');
|
||||
if($cat == "sc-footprint"):
|
||||
require_once('includes/_chart_scenario_js.php');
|
||||
require_once('includes/_chart_scenario_complete_js.php');
|
||||
endif;
|
||||
// require_once('includes/_chart_avoidance_js.php');
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
/* Cookie law */
|
||||
$.cookieBar({
|
||||
message: '<?php echo TXT_JS_COOKIE_NOTICE; ?>',
|
||||
acceptText: '<?php echo TXT_OK; ?>',
|
||||
});
|
||||
|
||||
/* Reset to default values */
|
||||
$(document).on("click", ".js-reset", function(e) {
|
||||
var confirm_link = $(this).attr("href");
|
||||
e.preventDefault();
|
||||
bootbox.dialog({
|
||||
message: "<?php echo TXT_JS_RESET_DEFAULTS; ?>",
|
||||
title: "<?php echo TXT_NOTE; ?>",
|
||||
buttons: {
|
||||
danger: {
|
||||
label: "<?php echo TXT_OK; ?>",
|
||||
className: "btn-primary",
|
||||
callback: function() {
|
||||
// window.location.href = js_base_href + confirm_link;
|
||||
window.location.href = confirm_link;
|
||||
}
|
||||
},
|
||||
main: {
|
||||
label: "<?php echo TXT_NAV_ABBRECHEN; ?>",
|
||||
className: "btn-default",
|
||||
callback: function() {
|
||||
//do something else
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
<?php
|
||||
if($customer_settings['display']['bookmark_data'] && isset($_SESSION['status']['bookmark']['loaded']))
|
||||
{
|
||||
echo '$("#modal-bookmark").modal("show");';
|
||||
|
||||
unset($_SESSION['status']['bookmark']['loaded']);
|
||||
}
|
||||
|
||||
if($customer_settings['display']['bookmark_data'] && isset($_SESSION['status']['bookmark']['failed']))
|
||||
{
|
||||
echo '$("#modal-bookmark-failed").modal("show");';
|
||||
|
||||
unset($_SESSION['status']['bookmark']['failed']);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
/*
|
||||
echo '
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
';
|
||||
|
||||
|
||||
$data_session = $_POST;
|
||||
ksort($data_session);
|
||||
echo '<br style="clear:both" /><pre>';
|
||||
print_r($data_session);
|
||||
echo '</pre>';
|
||||
|
||||
|
||||
// $time_end = microtime(true);
|
||||
// $time = $time_end - $time_start;
|
||||
// echo "<p>Skriptausführung: ".$time." s</p>";
|
||||
|
||||
|
||||
$data_session = $_SESSION['debug'];
|
||||
ksort($data_session);
|
||||
echo '<h3>[debug]</h3><pre>';
|
||||
print_r($data_session);
|
||||
echo '</pre>';
|
||||
|
||||
|
||||
$data_session = $_SESSION['emission']['td'];
|
||||
ksort($data_session);
|
||||
echo '<h3>[emission][td]</h3><pre>';
|
||||
print_r($data_session);
|
||||
echo '</pre>';
|
||||
|
||||
|
||||
$data_session = $_SESSION['emission_self'];
|
||||
ksort($data_session);
|
||||
echo '<h3>[emission_self]</h3><pre>';
|
||||
print_r($data_session);
|
||||
echo '</pre>';
|
||||
|
||||
$data_session = $_SESSION['emission_other'];
|
||||
ksort($data_session);
|
||||
echo '<h3>[emission_other]</h3><pre>';
|
||||
print_r($data_session);
|
||||
echo '</pre>';
|
||||
|
||||
$data_session = $_SESSION['kwh'];
|
||||
ksort($data_session);
|
||||
echo '<h3>[kwh]</h3><pre>';
|
||||
print_r($data_session);
|
||||
echo '</pre>';
|
||||
|
||||
$data_session = $_SESSION['performance'];
|
||||
ksort($data_session);
|
||||
echo '<h3>[performance]</h3><pre>';
|
||||
print_r($data_session);
|
||||
echo '</pre>';
|
||||
|
||||
|
||||
$data_session = $_SESSION['emission_before'];
|
||||
ksort($data_session);
|
||||
echo '<h3>[emission_before]</h3><pre>';
|
||||
print_r($data_session);
|
||||
echo '</pre>';
|
||||
|
||||
echo '</div>';
|
||||
echo '<div class="col-sm-6">';
|
||||
|
||||
|
||||
$data_session = $_SESSION['data'];
|
||||
ksort($data_session);
|
||||
echo '<h3>[data]</h3><pre>';
|
||||
print_r($data_session);
|
||||
echo '</pre>';
|
||||
|
||||
|
||||
echo '<pre>';
|
||||
print_r(get_included_files());
|
||||
echo '</pre>';
|
||||
|
||||
|
||||
echo '<pre>';
|
||||
print_r($_SESSION['user']);
|
||||
print_r($_SESSION['guest']);
|
||||
echo '</pre>';
|
||||
|
||||
|
||||
echo '
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
*/
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user