This commit is contained in:
Jordan
2026-04-15 19:53:33 +01:00
parent bd1386890b
commit e5948007da
2 changed files with 25 additions and 11 deletions

View File

@@ -298,19 +298,33 @@ function muestra_breadcrumb($record = array(), $previousLinks = array(),$class =
echo '</nav>';
}
function error_html($error){
function error_html($error, $a404 = false) {
$result = '';
$icon = '
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 24 24" fill="none" stroke="#607d8b" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 8v-2a2 2 0 0 1 2 -2h2" />
<path d="M4 16v2a2 2 0 0 0 2 2h2" />
<path d="M16 4h2a2 2 0 0 1 2 2v2" />
<path d="M16 20h2a2 2 0 0 0 2 -2v-2" />
<path d="M9 10h.01" />
<path d="M15 10h.01" />
<path d="M9.5 15.05a3.5 3.5 0 0 1 5 0" />
</svg>
';
if ($a404){
$icon = '
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 24 24" fill="none" stroke="#607d8b" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 7v4a1 1 0 0 0 1 1h3" />
<path d="M7 7v10" />
<path d="M10 8v8a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-8a1 1 0 0 0 -1 -1h-2a1 1 0 0 0 -1 1z" />
<path d="M17 7v4a1 1 0 0 0 1 1h3" />
<path d="M21 7v10" />
</svg>
';
}
$result.='<div style="display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-family:Arial, sans-serif;">
<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;color:#607d8b;">
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 24 24" fill="none" stroke="#607d8b" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 8v-2a2 2 0 0 1 2 -2h2" />
<path d="M4 16v2a2 2 0 0 0 2 2h2" />
<path d="M16 4h2a2 2 0 0 1 2 2v2" />
<path d="M16 20h2a2 2 0 0 0 2 -2v-2" />
<path d="M9 10h.01" />
<path d="M15 10h.01" />
<path d="M9.5 15.05a3.5 3.5 0 0 1 5 0" />
</svg>
'.$icon.'
<p>Se han encontrado errores en la página. </p>
<small style="margin-top:10px;display:block;">Por favor, contacte con el administrador del sitio.</small>