<?
//session_start();
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

if (!headers_sent()) {

    // HSTS (HTTPS only)
    if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
        header("Strict-Transport-Security: max-age=31536000; includeSubDomains; preload");
    }

    // Prevent MIME type sniffing
    header("X-Content-Type-Options: nosniff");

    // Prevent clickjacking
    header("X-Frame-Options: SAMEORIGIN");

    // Control referrer information
    header("Referrer-Policy: strict-origin-when-cross-origin");

    // Disable unused browser features
    header("Permissions-Policy: geolocation=(), microphone=(), camera=(), payment=(), usb=()");

    // Restrict resource sharing
    header("Cross-Origin-Resource-Policy: same-origin");

    // Basic CSP (adjust if needed)
    header(
        "Content-Security-Policy: ".
        "default-src 'self' https: data: blob: 'unsafe-inline' 'unsafe-eval'; ".
        "img-src 'self' https: data: blob:; ".
        "font-src 'self' https: data:; ".
        "style-src 'self' https: 'unsafe-inline'; ".
        "script-src 'self' https: 'unsafe-inline' 'unsafe-eval'; ".
        "frame-ancestors 'self';"
    );

}
//error_reporting(E_ALL); 
error_reporting(E_ALL ^ E_STRICT ^ E_WARNING ^ E_NOTICE ^ E_DEPRECATED);
date_default_timezone_set('Europe/London');
ini_set('session.gc_probability',1);
ini_set('session.gc_divisor',1);
ini_set('session.gc_maxlifetime', 7*60*60);
include('conf_property01.php');

if($_SERVER['HTTP_HOST'] != "localhost"){
include('database_pdo.php');
$dbh = new database_pdo();
}
include('config.class.php');
include('fck.class.php');
include('utility.class.php');
$config = new config();
include('page.class.php');
$page = new page();
include('pages.class.php');
$pages = new pages();


include('functions.class.php');
$functions = new functions();

include('admin.class.php');
include('user.class.php');
include('keycode.class.php');
include('mobiledirect.class.php');
$mobiledetect = new mobiledetect();
include('gsi.class.php');
$gsi = new gsi();
include('krscrm.class.php');
$krscrm = new krscrm();

$gsi->setSendingTriggerArray();
$gsi->setSalesStepArray();
require 'barcode_generator/vendor/autoload.php';
?>