2024-04-25 21:55:08 +02:00
|
|
|
<?php session_start();
|
|
|
|
|
|
|
|
require_once 'site-config.php';
|
|
|
|
|
|
|
|
ini_set('display_errors', ($debugging == false ? 0 : 1));
|
|
|
|
ini_set('display_startup_errors', ($debugging == false ? 0 : 1));
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
|
|
|
date_default_timezone_set($config_timezone);
|
|
|
|
|
|
|
|
$host = $_SERVER['HTTP_HOST'];
|
|
|
|
$uri = $_SERVER['REQUEST_URI'];
|
|
|
|
$is_local = (($host == 'localhost' OR strpos($host, '192.168') !== false) ? true : false);
|
|
|
|
|
|
|
|
$filename = basename($_SERVER['PHP_SELF']);
|
|
|
|
$filename_get = (!empty($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : null);
|
|
|
|
|
|
|
|
$google = ['notranslate','nositelinkssearchb'];
|
|
|
|
$robots = ['nofollow','nosnippet','noarchive','noimageindex'];
|
|
|
|
|
2024-04-25 21:57:34 +02:00
|
|
|
$dir_files = $config_root.'/files/'.$config_folder;
|
2024-04-28 14:31:08 +02:00
|
|
|
$dir_css = 'css';
|
2024-04-25 21:55:08 +02:00
|
|
|
$dir_functions = 'functions';
|
|
|
|
$dir_images = 'images';
|
2024-04-28 14:31:08 +02:00
|
|
|
$dir_js = 'js';
|
2024-04-25 21:55:08 +02:00
|
|
|
$dir_languages = 'languages';
|
|
|
|
|
2024-04-28 14:31:08 +02:00
|
|
|
if(file_exists('vendor/autoload.php')) {
|
2024-04-25 21:55:08 +02:00
|
|
|
require_once 'vendor/autoload.php';
|
|
|
|
$Parsedown = new Parsedown();
|
|
|
|
}
|
|
|
|
|
|
|
|
require_once 'site-functions.php';
|
2024-04-28 14:31:08 +02:00
|
|
|
require_once 'languages/'.(isset($_GET['lang']) ? safetag($_GET['lang']) : 'se').'.php';
|
2024-04-25 21:55:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!empty($database_host) AND !empty($database_name) AND !empty($database_user) AND !empty($database_pass)) {
|
|
|
|
try {
|
|
|
|
$sql = new PDO('mysql:host='.$database_host.';dbname='.$database_name, $database_user, $database_pass);
|
|
|
|
$sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|
|
|
}
|
|
|
|
|
|
|
|
catch(PDOException $e) {
|
|
|
|
echo $e;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|