| Server IP : 172.67.191.97 / Your IP : 104.23.197.209 Web Server : Apache/2.4.63 (Ubuntu) System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.4.5 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/biblioteca/includes/ |
Upload File : |
<?php
declare(strict_types=1);
require_once __DIR__ . '/nav.php';
$masServicios = require __DIR__ . '/../data/mas_servicios.php';
$equipoBiblioteca = require __DIR__ . '/../data/equipo_biblioteca.php';
$branchesById = [];
foreach (($equipoBiblioteca['branches'] ?? []) as $branch) {
if (!isset($branch['id'])) {
continue;
}
$branchesById[(string) $branch['id']] = $branch;
}
$barcelonaPhone = trim((string) ($branchesById['barcelona']['phone'] ?? '(608) 6611623'));
$sanAntonioPhone = trim((string) ($branchesById['san-antonio']['phone'] ?? '(608) 6611623'));
$boquemontePhone = trim((string) ($branchesById['boquemonte']['phone'] ?? '(608) 6616800'));
$footerMainLinks = [
[
'href' => 'https://www.unillanos.edu.co/',
'text' => 'Universidad de los Llanos',
'external' => true,
],
];
foreach ($NAV_ITEMS as $item) {
$footerMainLinks[] = [
'href' => (string) $item['href'],
'text' => (string) $item['text'],
'external' => !empty($item['external']),
];
}
$footerCampuses = [
[
'eyebrow' => 'Sede principal',
'title' => 'Barcelona',
'address' => 'Km. 12 vía Puerto López',
'phone' => $barcelonaPhone . ' · Ext. 116',
'email' => '[email protected]',
'schedule' => 'Lunes a viernes · 7:30 a. m. a 11:30 a. m. · 2:00 p. m. a 5:30 p. m.',
],
[
'eyebrow' => 'Sede',
'title' => 'San Antonio',
'address' => 'Calle 37 No. 41-02 Barzal',
'phone' => $sanAntonioPhone,
'schedule' => 'Atención académica y servicios de apoyo bibliotecario.',
],
[
'eyebrow' => 'Sede',
'title' => 'Boquemonte',
'address' => 'Km. 2 vía San Juan de Arama - Granada, Meta',
'phone' => $boquemontePhone,
'schedule' => 'Servicios de consulta, apoyo en sala y acompañamiento a usuarios.',
],
];
$footerSocialLinks = [
[
'label' => 'X',
'href' => 'https://x.com/unillanos_',
'icon' => 'x',
'network' => 'x',
],
[
'label' => 'YouTube',
'href' => 'https://www.youtube.com/@bibliotecajorgeboshellmanr4592',
'icon' => 'youtube',
'network' => 'youtube',
],
[
'label' => 'Facebook',
'href' => 'https://www.facebook.com/UnillanosOficial/',
'icon' => 'facebook',
'network' => 'facebook',
],
[
'label' => 'Instagram',
'href' => 'https://instagram.com/unillanos_/',
'icon' => 'instagram',
'network' => 'instagram',
],
];
function footerIcon(string $name): string
{
$icons = [
'location' => '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 21s-6-4.35-6-10a6 6 0 1 1 12 0c0 5.65-6 10-6 10Z"/><circle cx="12" cy="11" r="2.5"/></svg>',
'phone' => '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.4 19.4 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7l.5 3a2 2 0 0 1-.6 1.8l-1.3 1.3a16 16 0 0 0 6.4 6.4l1.3-1.3a2 2 0 0 1 1.8-.6l3 .5A2 2 0 0 1 22 16.9Z"/></svg>',
'mail' => '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 6h16v12H4z"/><path d="m4 7 8 6 8-6"/></svg>',
'clock' => '<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>',
'facebook' => '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M13.12 21v-7.17h2.4l.36-2.8h-2.76V9.24c0-.81.22-1.36 1.39-1.36H16V5.36c-.65-.07-1.31-.1-1.97-.1-1.95 0-3.29 1.19-3.29 3.38v1.89H8.5v2.8h2.24V21h2.38Z"/></svg>',
'instagram' => '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7.5 2h9A5.5 5.5 0 0 1 22 7.5v9A5.5 5.5 0 0 1 16.5 22h-9A5.5 5.5 0 0 1 2 16.5v-9A5.5 5.5 0 0 1 7.5 2Zm0 2A3.5 3.5 0 0 0 4 7.5v9A3.5 3.5 0 0 0 7.5 20h9a3.5 3.5 0 0 0 3.5-3.5v-9A3.5 3.5 0 0 0 16.5 4h-9Zm10.75 1.5a1.25 1.25 0 1 0 .001 2.501A1.25 1.25 0 0 0 18.25 5.5ZM12 7a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0 2a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z"/></svg>',
'youtube' => '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M23 12c0 2.1-.24 3.86-.52 4.92a3.2 3.2 0 0 1-2.26 2.26C19.16 19.46 17.41 19.7 12 19.7s-7.16-.24-8.22-.52a3.2 3.2 0 0 1-2.26-2.26C1.24 15.86 1 14.1 1 12c0-2.1.24-3.86.52-4.92a3.2 3.2 0 0 1 2.26-2.26C4.84 4.54 6.59 4.3 12 4.3s7.16.24 8.22.52a3.2 3.2 0 0 1 2.26 2.26C22.76 8.14 23 9.9 23 12Zm-14.5 3.95L16 12 8.5 8.05v7.9Z"/></svg>',
'x' => '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M18.9 2H22l-6.77 7.74L23.2 22h-6.24l-4.88-6.77L6.16 22H3.05l7.24-8.27L.8 2h6.39l4.41 6.2L18.9 2Zm-1.09 18h1.72L6.26 3.9H4.42L17.81 20Z"/></svg>',
];
return $icons[$name] ?? '';
}
function footerLinkAttributes(bool $external): string
{
return $external ? ' target="_blank" rel="noopener noreferrer"' : '';
}
function footerIsExternal(string $url): bool
{
return str_starts_with($url, 'http://') || str_starts_with($url, 'https://');
}
function renderFooterInfoLine(string $text): void
{
if ($text === '') {
return;
}
?>
<p class="footer-info__text"><?= htmlspecialchars($text, ENT_QUOTES, 'UTF-8') ?></p>
<?php
}
function renderFooterCampus(array $campus, bool $compact = false): void
{
$campusClass = $compact ? 'footer-campus footer-campus--compact' : 'footer-campus';
?>
<article class="<?= $campusClass ?>">
<div class="footer-campus__head">
<p class="footer-campus__eyebrow"><?= htmlspecialchars((string) $campus['eyebrow'], ENT_QUOTES, 'UTF-8') ?></p>
<h4 class="footer-campus__title"><?= htmlspecialchars((string) $campus['title'], ENT_QUOTES, 'UTF-8') ?></h4>
</div>
<div class="footer-info-list">
<?php renderFooterInfoLine((string) ($campus['address'] ?? '')); ?>
<?php renderFooterInfoLine((string) ($campus['phone'] ?? '')); ?>
<?php renderFooterInfoLine((string) ($campus['email'] ?? '')); ?>
<?php renderFooterInfoLine((string) ($campus['schedule'] ?? '')); ?>
</div>
</article>
<?php
}
?>
<footer class="u-footer">
<div class="footer-shell">
<div class="footer-container">
<section class="footer-col footer-col--links" aria-labelledby="footer-nav-title">
<div class="footer-col__head">
<p class="footer-col__eyebrow">Navegación</p>
<h3 id="footer-nav-title">Enlaces del inicio</h3>
</div>
<ul class="footer-link-list footer-link-list--double">
<?php foreach ($footerMainLinks as $link): ?>
<li>
<a
class="footer-link"
href="<?= htmlspecialchars((string) $link['href'], ENT_QUOTES, 'UTF-8') ?>"
<?= footerLinkAttributes((bool) $link['external']) ?>
>
<span class="footer-link__text"><?= htmlspecialchars((string) $link['text'], ENT_QUOTES, 'UTF-8') ?></span>
</a>
</li>
<?php endforeach; ?>
</ul>
</section>
<section class="footer-col footer-col--barcelona" aria-labelledby="footer-barcelona-title">
<div class="footer-col__head">
<p class="footer-col__eyebrow">Sede principal</p>
<h3 id="footer-barcelona-title">Barcelona</h3>
</div>
<?php renderFooterCampus($footerCampuses[0]); ?>
</section>
<section class="footer-col footer-col--campus-group" aria-labelledby="footer-sedes-title">
<div class="footer-col__head">
<p class="footer-col__eyebrow">Otras sedes</p>
<h3 id="footer-sedes-title">San Antonio y Boquemonte</h3>
</div>
<div class="footer-campus-grid">
<?php renderFooterCampus($footerCampuses[1], true); ?>
<?php renderFooterCampus($footerCampuses[2], true); ?>
</div>
</section>
<section class="footer-col footer-col--services" aria-labelledby="footer-services-title">
<div class="footer-col__head">
<p class="footer-col__eyebrow">Accesos directos</p>
<h3 id="footer-services-title">Más servicios</h3>
</div>
<div class="footer-service-list">
<?php foreach ($masServicios as $servicio): ?>
<?php
$serviceUrl = (string) $servicio['url'];
$serviceExternal = footerIsExternal($serviceUrl);
?>
<a
class="footer-service footer-service--<?= htmlspecialchars((string) $servicio['icono'], ENT_QUOTES, 'UTF-8') ?>"
href="<?= htmlspecialchars($serviceUrl, ENT_QUOTES, 'UTF-8') ?>"
<?= footerLinkAttributes($serviceExternal) ?>
>
<span class="footer-service__copy">
<strong><?= htmlspecialchars((string) $servicio['titulo'], ENT_QUOTES, 'UTF-8') ?></strong>
<span><?= htmlspecialchars((string) $servicio['descripcion'], ENT_QUOTES, 'UTF-8') ?></span>
</span>
</a>
<?php endforeach; ?>
</div>
</section>
<section class="footer-col footer-col--social" aria-labelledby="footer-social-title">
<div class="footer-col__head">
<p class="footer-col__eyebrow">Redes sociales</p>
<h3 id="footer-social-title">Síguenos</h3>
</div>
<div class="footer-socials" aria-label="Canales oficiales">
<?php foreach ($footerSocialLinks as $social): ?>
<a
class="footer-social footer-social--<?= htmlspecialchars((string) $social['network'], ENT_QUOTES, 'UTF-8') ?>"
href="<?= htmlspecialchars((string) $social['href'], ENT_QUOTES, 'UTF-8') ?>"
target="_blank"
rel="noopener noreferrer"
aria-label="<?= htmlspecialchars((string) $social['label'], ENT_QUOTES, 'UTF-8') ?>"
title="<?= htmlspecialchars((string) $social['label'], ENT_QUOTES, 'UTF-8') ?>"
>
<span class="footer-social__icon"><?= footerIcon((string) $social['icon']) ?></span>
<span class="footer-social__label"><?= htmlspecialchars((string) $social['label'], ENT_QUOTES, 'UTF-8') ?></span>
</a>
<?php endforeach; ?>
</div>
</section>
</div>
</div>
<div class="footer-bottom">
<div class="footer-bottom__inner">
<p>© <?= date('Y') ?> Universidad de los Llanos - Sistema de Bibliotecas</p>
<p>Villavicencio, Meta - Colombia</p>
</div>
</div>
</footer>