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

62 lines
2 KiB
PHP

<?php
//error_reporting(E_ALL); ini_set('display_errors', 0);
//
// if(!isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'on') {
// header('Location: https://'.$_SERVER['SERVER_NAME']);
// exit();
// }
require('lib/config.php');
include('lib/class.mysms.php');
include('lib/mysql.class.php');
require('lib/sms.class.php');
//require('lib/email.class.php');
//require('lib/phpmailer/phpmailer.inc.php');
require('lib/core.class.php');
session_name(CONFIG_SESSION);
session_start();
date_default_timezone_set('Europe/Berlin'); // Default Time Zone
define('SITE_ACCESS',true);
//Mysql
$GLOBALS['mysql'] = new mysql(CONFIG_MYSQL_HOST,CONFIG_MYSQL_USER,CONFIG_MYSQL_PW,CONFIG_MYSQL_DB); mysqli_set_charset($mysql, 'utf8');
$GLOBALS['sms'] = new sms;
require('lib/smarty/Smarty.class.php');
if(isset($_GET['tpl'])) {
if(!isset($_SESSION['arrayload'])){
$GLOBALS['arrayload']=1;
$GLOBALS['a_touren'] = $GLOBALS['mysql']->query_array("SELECT * FROM touren ORDER BY id");
$GLOBALS['a_fahrzg'] = $GLOBALS['mysql']->query_array("SELECT * FROM fahrzeuge ORDER BY id");
$GLOBALS['a_fahrer'] = $GLOBALS['mysql']->query_array("SELECT * FROM mitarbeiter ORDER BY id");
$GLOBALS['a_planbz'] = $GLOBALS['mysql']->query_array("SELECT * FROM planer_bez ORDER BY id");
$GLOBALS['a_planbf'] = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner_bez ORDER BY id");
}
$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;
}
//Email
//$GLOBALS['email'] = new email;
$GLOBALS['core'] = new core;
// $GLOBALS['browser'] = new Browser();
// $GLOBALS['sms'] = new sms;
if(isset($_GET['s']) AND file_exists('scripts/ajax/'.$_GET['s'].'.php')){
require('scripts/ajax/'.$_GET['s'].'.php');
}
if(isset($_GET['tpl'])) { $GLOBALS['template']->display('pia.tpl'); }
?>