<?php
define('BRAND', 'Trade Station');
define('BRAND_ICON', '<i class="fa fa-square-poll-vertical fa-xl text-dark"></i>');
define('VERSION', '3.5.0');
define('DEBUG', true);

if (DEBUG) {
	ini_set('display_errors', '1');
	ini_set('display_startup_errors', '1');
	error_reporting(E_ALL);
}

ini_set('max_execution_time', 300);
ini_set('memory_limit', '512M');
ini_set('zlib.output_compression', '0');

if (!empty($_SERVER['SCRIPT_NAME']) && basename($_SERVER['SCRIPT_NAME']) === 'scan_start.php') {
	header('Content-Type: text/plain; charset=utf-8');
	header('X-Accel-Buffering: no'); 
	header('Content-Encoding: none');
}

header("X-Frame-Options: DENY");
header("X-Content-Type-Options: nosniff");
header("X-XSS-Protection: 1; mode=block");

try {
	$pdo = new PDO(
		'mysql:host=db;dbname=trade-station;charset=utf8',
		'user',
		'pass',
		[
			PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
			PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
		]
	);
} catch (PDOException $e) {
	die("DB-Verbindung fehlgeschlagen: " . $e->getMessage());
}