if (@$_REQUEST["viewAMP"]){
?>
{AMP_LIBRARIES}
">
}?>
}
$TEMPLATE = realpath(dirname(__FILE__)."/../../");
$logo = $TEMPLATE."/images/logo.png?t=1";
if (@$configuracionTienda["logo"]){
$logo = $configuracionTienda["logo"][0]['urlPath'];
}
if (!@$ocultar_metas_og) {
echo '';
echo '';
if (!class_exists("CustomCode")) require_once __DIR__."/../../../../cms/lib/plugins/builder_saas/replace_code.php";
// ESTO HAY QUE MEJORARLO PORQUE SI LA IMAGEN ES DE IDIOMA MOSTRARA LA IMAGEN EN ESPAÑOL
// Buscamos en el campo 'meta_image' del registro
$imageExists = @mysql_fetch_assoc(mysql_query("SELECT urlPath FROM ".$TABLE_PREFIX."uploads WHERE tableName='".str_replace($TABLE_PREFIX,"",$tabla)."' and recordNum=".intval(@$_REQUEST["num"])." and urlPath not like '%.pdf%' and fieldName='meta_image' ORDER BY `order` ASC LIMIT 1"));
if (!@$imageExists) {
// Buscamos en el primer upload del registro
$imageExists = @mysql_fetch_assoc(mysql_query("SELECT urlPath FROM ".$TABLE_PREFIX."uploads WHERE tableName='".str_replace($TABLE_PREFIX,"",$tabla)."' and recordNum=".intval(@$_REQUEST["num"])." and urlPath not like '%.pdf%' ORDER BY `order` ASC LIMIT 1"));
}
if (!@$imageExists) {
// Buscamos en el campo 'meta_imagen' de configuración
$imageExists = @mysql_fetch_assoc(mysql_query("SELECT urlPath FROM ".$TABLE_PREFIX."uploads WHERE tableName='configuracion' and fieldName='meta_image' ORDER BY `order` ASC LIMIT 1"));
}
if (@$imageExists) {
$image = CustomCode::imagec_inv($imageExists['urlPath'], 1200);
} else {
$image = CustomCode::imagec_inv($logo, 1200);
}
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
}
?>
">
if (@$configuracionRecord["pwa_theme_color"]) {?>
">
}?>
global $otros_metas,$modulosParaAMP,$redirectToAMP;?>
=@$otros_metas;?>
=$titulo_de_pagina;?>
if (@$redirectToAMP){?>">}?>
if (@$configuracionRecord["usar_service_worker"]) {?>
}?>
$dummy = []; addPlugins("tpl_head",$dummy);?>
if (@$configuracionTienda["favicon"]){
foreach($configuracionTienda["favicon"] as $favicon){
if (strpos(strtolower($favicon["urlPath"]),".ico")){
?>" type="image/x-icon" />
}else{
?> href="=$favicon["urlPath"];?>" />
}
}
}else{
?>
}
if (@$alternate) {
foreach ($alternate as $alt):
?>
" hreflang="=$alt["prefix"];?>" />
endforeach;
}
// Add self-referenced hreflang
if(false) { // Desactivado el 30/03/2026 porque no tenía sentido que se repita.
$current_lang = @$_REQUEST["idioma"] ?: "es";
$current_url = protocol()."://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
?>
}
if (!@$_REQUEST["viewAMP"]){
?>
{TOP_LIBRARIES}
}
if (@$configuracionRecord["otros_scripts"] && !@$_REQUEST["viewAMP"]) {
echo base64_decode($configuracionRecord["otros_scripts"]);
}
$idioma = ["url" => RUTA_RAIZ];
$idiomas = ["es" => "Español","en" => "English","de" => "Deutsch","fr" => "Français","ru" => "Pусский","it" => "Italiano"];
$idioma_actual = ["corto" => @$_REQUEST["idioma"] ?: "es"];
$idioma_actual["largo"] = @$idiomas[$idioma_actual['corto']];
$session = @$_SESSION;
$get = @$_GET;
$GLOBALS["session"] = @$session;
$GLOBALS["get"] = $get;
global $thisrecord,$root,$request;
$thisrecord = @$GLOBALS["apartado"];
$root = $GLOBALS;
$request = @$_REQUEST;
if (!@$_REQUEST["viewAMP"]){
?>
}else{
?>
}
?>
if (empty($_REQUEST["enlace"]) || $_REQUEST["enlace"] == "/") $index = true;?>
if (!@$_REQUEST["viewAMP"]){?>
{CODE}
}else{ ?>
$apartados = dame_registros("apartados", "visible_en_el_menu=1", "globalOrder ASC");
$logo_information = getimagesize($logo);
$logo_ratio = @$logo_information ? $logo_information[1] / $logo_information[0] : 1;
?>
foreach ($apartados as $apartado):
$hijo = dame_registros("apartados", "parentNum=$apartado[num] AND visible_en_el_menu=1", "siblingOrder ASC", 1);
$hijo = @$hijo[0];
?>