Files
luos/workflow/public_html/fonts/styles.php

25 lines
1.0 KiB
PHP
Raw Normal View History

2020-08-31 19:29:26 +00:00
<?php
// Get the Home Directory, snippet adapted from sysGeneric.php
$documentRoot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
$sections = explode('/', $documentRoot);
array_pop($sections);
$pathHome = implode('/', $sections) . '/';
// Include the "paths_installed.php" file
2025-04-22 17:39:18 +00:00
$documentRoot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
$pathParts = explode('/', $documentRoot);
array_pop($pathParts); // Remove the last part (usually the project folder)
$pathTrunk = implode('/', array_slice($pathParts, 0, -1)) . '/'; // Remove last part again
define('PATH_DATA', isset($_SERVER['PATH_DATA']) ? $_SERVER['PATH_DATA'] : $pathTrunk . 'shared' . '/' );
require_once PATH_DATA . '/config/paths_installed.php';
2020-08-31 19:29:26 +00:00
2020-08-31 22:55:44 +00:00
// Set the fonts styles file, for now the value is fixed (Maybe later we have another PDF engine)
2020-08-31 19:29:26 +00:00
$fileName = 'fonts.css';
2020-08-31 22:55:44 +00:00
// Stream the requested css file if exists and if is accessible
header('Content-Type: text/css');
if (file_exists(PATH_DATA . 'fonts/tcpdf/' . $fileName)) {
2020-08-31 19:29:26 +00:00
readfile(PATH_DATA . 'fonts/tcpdf/' . $fileName);
}