81 lines
3.3 KiB
PHP
81 lines
3.3 KiB
PHP
<?php /* Name: parameters.php
|
|
Beschreibung: Generelle Parameter
|
|
- inkl. Pfade und Standardbuttons */
|
|
require_once __DIR__ . '/runtime_env.php';
|
|
$publicHost = $_SERVER['HTTP_HOST'] ?? intranet_env('INTRANET_FQDN');
|
|
|
|
$p_version = "v0.6.0"; // {Release}.{Update}.{Hotfix/Commit}
|
|
|
|
|
|
$p_nac_base = "bln-rd"; // Gemeinde
|
|
$p_project = "Intranet"; // Systemname des Projekts
|
|
$p_status = "#dev"; // Entwicklungsstatus: #dev #test #live
|
|
|
|
|
|
// Lokalisierung
|
|
date_default_timezone_set('Europe/Berlin'); //Mitteleuropäische Zeitzone
|
|
$g_locale = setlocale(LC_TIME, 'de_DE', 'de_DE.UTF-8'); //Deutsche UTF-8 Kodierung
|
|
|
|
|
|
// Zusammenfassungen von Informationen für Administratoren und Entwickler
|
|
$array_admin = [
|
|
'Projekt' => $p_project,
|
|
'Gemeinde' => $p_nac_base,
|
|
'Version' => $p_version,
|
|
'Status' => $p_status,
|
|
];
|
|
$array_dev = [
|
|
'Host' => $_SERVER['HTTP_HOST'],
|
|
'IPv4-Adresse' => $_SERVER['SERVER_ADDR'],
|
|
'PHP-Version' => phpversion(),
|
|
'Server-Software' => $_SERVER['SERVER_SOFTWARE'],
|
|
'Betriebssystem' => php_uname('s'),
|
|
'Zeitzone' => date_default_timezone_get(),
|
|
'Locale-Einstellung' => $g_locale,
|
|
'Aktivierte PHP-Erweiterungen' => implode(', ', get_loaded_extensions()),
|
|
'Maximale Upload-Dateigröße' => ini_get('upload_max_filesize'),
|
|
'Speicherlimit für PHP-Skripte' => ini_get('memory_limit'),
|
|
];
|
|
|
|
|
|
// Prefixe
|
|
$isHttps = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
|
|
|| (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])
|
|
&& strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https');
|
|
$g_httpPrefix = ($isHttps ? 'https' : 'http') . '://';
|
|
|
|
// Absolute Pfade
|
|
$g_generalFilePath = $_SERVER['DOCUMENT_ROOT']."/intranet_repo/general_files/";
|
|
$g_projectsPath = $_SERVER['DOCUMENT_ROOT']."/intranet_repo/projects/";
|
|
|
|
$g_httpCurrentUrl = $g_httpPrefix.$publicHost.$_SERVER['REQUEST_URI'];
|
|
$g_httpCurrentCleanUrl = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
|
$g_httpCurrentUrl = $g_httpPrefix.$publicHost.$_SERVER['REQUEST_URI'];
|
|
$g_httpHomePath = $g_httpPrefix.$publicHost."/intranet_repo/projects/intranet/index.php";
|
|
$g_httpLoginPath = $g_httpPrefix.$publicHost."/intranet_repo/projects/authorization/login.php";
|
|
$g_httpLogoutPath = $g_httpPrefix.$publicHost."/intranet_repo/projects/authorization/logout.php";
|
|
|
|
|
|
$g_imagePath = $g_projectsPath."_central/img/";
|
|
$g_imageButtonPath = $g_projectsPath."_central/img/picto/";
|
|
$g_phpSnippetsPath = $g_projectsPath."_central/php/snippets/";
|
|
$g_profilePicturePath = $g_generalFilePath."profile_pictures/";
|
|
|
|
// Relative Pfade
|
|
$g_imageRelativePath = "/intranet_repo/projects/_central/img/";
|
|
$g_imageButtonRelativePath = "/intranet_repo/projects/_central/img/picto/";
|
|
$g_profilePictureRelativePath = "/intranet_repo/general_files/profile_pictures/";
|
|
|
|
|
|
// Buttons verwalten (SVG-Grafiken)
|
|
$p_buttons = array(
|
|
'add' => $g_imageButtonPath.'add.svg',
|
|
'arrow_left' => $g_imageButtonPath.'arrow_left.svg',
|
|
'arrow_right' => $g_imageButtonPath.'arrow_right.svg',
|
|
'arrow_up' => $g_imageButtonPath.'arrow_up.svg',
|
|
'cancel' => $g_imageButtonPath.'cancel.svg',
|
|
'edit' => $g_imageButtonPath.'edit.svg',
|
|
'calendar' => $g_imageButtonPath.'calendar.svg'
|
|
);
|
|
?>
|