<?php
/**
 * @intranet-file base/links/common/header.php
 * @intranet-file-version 2026.03.13.1
 * @intranet-file-date 2026-03-13
 * @intranet-file-owner CSIF Intranet
 */
$defaultTitle = function_exists('intranet_unit_name') ? intranet_unit_name() : "Intranet";
?>
<header>
    <div class="titulo">
        <h4><?php if (isset($titulo))
            echo htmlspecialchars($titulo);
        else
            echo htmlspecialchars($defaultTitle); ?></h4>
        <h5><?php if (isset($subtitulo))
            echo htmlspecialchars($subtitulo); ?></h5>
    </div>
    <div class="grafica">
        <a href="http://desarrollo">
            <img src="/images/home.png" alt="Home" class="home">
        </a>
        <?php $linksWebsite = function_exists('intranet_website_url') ? intranet_website_url() : ''; ?>
        <a href="<?php echo htmlspecialchars($linksWebsite !== '' ? $linksWebsite : '#'); ?>">
            <img src="/images/logob.png" alt="Logo">
        </a>
    </div>
</header>
<?php
if (isset($_SESSION['username'])) {
    ?>
    <h3>Bienvenid@, <?php echo htmlspecialchars($_SESSION['username']); ?></h3>
    <?php
}
?>
