<?php
if (function_exists('session_status')) {
    if (session_status() === PHP_SESSION_NONE) {
        @session_start();
    }
} elseif (session_id() === '') {
    @session_start();
}


function limpiar_html_nota($html) {
    $html = (string)$html;

    // basura típica de encoding / nbsp roto
    $html = str_replace(array("Â ", "\xC2\xA0"), ' ', $html);
    $html = str_replace('Â', '', $html);

    // opcional: compacta espacios repetidos
    $html = preg_replace('/[ \t]+/u', ' ', $html);

    return trim($html);
}

$tablet_browser = 0;
$mobile_browser = 0;
$body_class = 'desktop';

$http_user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
$http_accept     = isset($_SERVER['HTTP_ACCEPT']) ? strtolower($_SERVER['HTTP_ACCEPT']) : '';

if (preg_match('/(tablet|ipad|playbook)|(android(?!.*(mobi|opera mini)))/i', $http_user_agent)) {
    $tablet_browser++;
    $body_class = 'tablet';
}
if (preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|android|iemobile)/i', $http_user_agent)) {
    $mobile_browser++;
    $body_class = 'mobile';
}
if ((strpos($http_accept, 'application/vnd.wap.xhtml+xml') !== false) || isset($_SERVER['HTTP_X_WAP_PROFILE']) || isset($_SERVER['HTTP_PROFILE'])) {
    $mobile_browser++;
    $body_class = 'mobile';
}

$mobile_ua = strtolower(substr($http_user_agent, 0, 4));
$mobile_agents = array(
    'w3c ','acs-','alav','alca','amoi','audi','avan','benq','bird','blac',
    'blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno',
    'ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-',
    'maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-',
    'newt','noki','palm','pana','pant','phil','play','port','prox',
    'qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar',
    'sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-',
    'tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp',
    'wapr','webc','winw','winw','xda ','xda-'
);
if (in_array($mobile_ua, $mobile_agents, true)) {
    $mobile_browser++;
}
if (strpos($http_user_agent, 'opera mini') !== false) {
    $mobile_browser++;
    $stock_ua = strtolower(
        isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA'])
            ? $_SERVER['HTTP_X_OPERAMINI_PHONE_UA']
            : (isset($_SERVER['HTTP_DEVICE_STOCK_UA']) ? $_SERVER['HTTP_DEVICE_STOCK_UA'] : '')
    );
    if (preg_match('/(tablet|ipad|playbook)|(android(?!.*mobile))/i', $stock_ua)) {
        $tablet_browser++;
    }
}
if ($tablet_browser > 0) {
    $es_tablet = 'si';
} elseif ($mobile_browser > 0) {
    $es_movil = 'si';
}

include 'url_amigable.php';
include 'concha.php';

if ($lang_actual == 'es' || $lang_actual == '') {
    include 'lang_es_no_panel.php';
}
if ($lang_actual == 'pt') {
    include 'langes_pt_no_panel.php';
}

$ID = isset($_GET['ID']) ? (int)$_GET['ID'] : 0;
$ID_NOTA = $ID;
if ($ID <= 0) {
    exit;
}

$sql = "SELECT * FROM notas WHERE ID = '$ID' LIMIT 1";
$consulta = $conn->query($sql);
if (!$consulta || $consulta->num_rows === 0) {
    exit;
}
while ($row = $consulta->fetch_assoc()) {
    $ID = $row['ID'];
    $ID_NOTA = $row['ID'];
    $carpetafoto = $row['carpetafoto'];
    $foto = $row['foto'];
    $ext_img = $row['ext_img'];
    $cat_no = $row['cat'];
    $titulo = $row['titulo'];
    $texto = $row['texto'];
    $texto = str_replace('<div', '<span', $texto);
    $texto = str_replace('</div>', '</span>', $texto);
    
    
    
    $bajada = $row['bajada'];
    $audio = $row['audio'];
    $d = $row['d'];
    $m = $row['m'];
    $m2 = $row['m'];
    $a = $row['a'];
    $tag1 = $row['tag1'];
    $tag2 = $row['tag2'];
    $tag3 = $row['tag3'];
    $tag4 = $row['tag4'];
    $tag5 = $row['tag5'];
    $youtube = $row['youtube'];
    $visitas = $row['visitas'];
    $html = $row['html'];
    $ext_img = $row['ext_img'];
    $ID_editor = $row['editor'];
    $pie_foto = $row['pie_foto'];
    $ejemplo_marca_de_agua = $row['ejemplo_marca_de_agua'];
}
$consulta->free_result();

$visitas = (int)$visitas + 1;
$sSQL = "UPDATE `$basedatos`.`notas` SET `visitas` = '$visitas' WHERE ID = '$ID_NOTA'";
$conn->query($sSQL);

if (!function_exists('nm_h')) {
    function nm_h($v)
    {
        return htmlspecialchars((string)$v, ENT_QUOTES, 'UTF-8');
    }
}
if (!function_exists('nm_bad_input')) {
    function nm_bad_input($s)
    {
        $s = trim((string)$s);
        if ($s === '') {
            return true;
        }
        if (stripos($s, 'http') !== false) {
            return true;
        }
        if (stripos($s, 'html') !== false) {
            return true;
        }
        if (stripos($s, '@') !== false) {
            return true;
        }
        if (strpos($s, '<') !== false || strpos($s, '>') !== false) {
            return true;
        }
        return false;
    }
}
if (!function_exists('nm_len')) {
    function nm_len($s)
    {
        return function_exists('mb_strlen') ? mb_strlen($s, 'UTF-8') : strlen($s);
    }
}
if (!function_exists('nm_sub')) {
    function nm_sub($s, $start, $len)
    {
        return function_exists('mb_substr') ? mb_substr($s, $start, $len, 'UTF-8') : substr($s, $start, $len);
    }
}
if (!function_exists('nm_generate_captcha')) {
    function nm_generate_captcha($largo)
    {
        $caracteres = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';
        $max = strlen($caracteres) - 1;
        $codigo = '';
        for ($i = 0; $i < $largo; $i++) {
            if (function_exists('random_int')) {
                $codigo .= $caracteres[random_int(0, $max)];
            } else {
                $codigo .= $caracteres[mt_rand(0, $max)];
            }
        }
        return $codigo;
    }
}
if (!function_exists('nm_current_request_uri')) {
    function nm_current_request_uri()
    {
        $uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
        if ($uri === '') {
            $query = isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] !== '' ? ('?' . $_SERVER['QUERY_STRING']) : '';
            $uri = 'nota.vintage.php' . $query;
        }
        return $uri;
    }
}
if (!function_exists('nm_build_note_url')) {
    function nm_build_note_url($dom, $id, $titulo)
    {
        return rtrim((string)$dom, '/') . '/nota/' . (int)$id . '/' . urls_amigables($titulo);
    }
}
if (!function_exists('sc_h')) {
    function sc_h($s)
    {
        return htmlspecialchars((string)$s, ENT_QUOTES, 'UTF-8');
    }
}
if (!function_exists('sc_norm_url')) {
    function sc_norm_url($u)
    {
        $u = trim((string)$u);
        if ($u === '') {
            return '';
        }
        if (!preg_match('~^https?://~i', $u)) {
            $u = 'https://' . ltrim($u, '/');
        }
        return $u;
    }
}
if (!function_exists('sc_youtube_id')) {
    function sc_youtube_id($u)
    {
        $u = trim((string)$u);
        if ($u === '') {
            return '';
        }
        if (preg_match('~^[A-Za-z0-9_-]{6,}$~', $u)) {
            return $u;
        }
        $u = sc_norm_url($u);
        if (preg_match('~youtu\.be/([A-Za-z0-9_-]{6,})~', $u, $m)) {
            return $m[1];
        }
        if (preg_match('~[?&]v=([A-Za-z0-9_-]{6,})~', $u, $m)) {
            return $m[1];
        }
        if (preg_match('~/(shorts|embed)/([A-Za-z0-9_-]{6,})~', $u, $m)) {
            return $m[2];
        }
        return '';
    }
}
if (!function_exists('sc_instagram_parts')) {
    function sc_instagram_parts($u)
    {
        $u = trim((string)$u);
        if ($u === '') {
            return array('', '');
        }
        if (preg_match('~^[A-Za-z0-9_-]+$~', $u)) {
            return array('p', $u);
        }
        $u = sc_norm_url($u);
        if (preg_match('~/(p|reel|tv)/([^/?#]+)~', $u, $m)) {
            return array($m[1], $m[2]);
        }
        return array('', '');
    }
}

$utf_activo = isset($utf) && (string)$utf == '1';
$titulo_xx = $utf_activo ? utf8_decode($titulo) : $titulo;
$nota_url = nm_build_note_url($dom, $ID, $titulo);

$comentarios = isset($comentarios) ? trim(strtolower((string)$comentarios)) : '';
if ($comentarios === '') {
    $comentarios = 'ninguna';
}
if ($comentarios !== 'facebook' && $comentarios !== 'captcha' && $comentarios !== 'ninguna') {
    $comentarios = 'ninguna';
}

$comentario_error = '';
$comentario_ok = '';
$comentario_post_nombre = '';
$comentario_post_texto = '';
$comentario_status = '';
$comentario_anchor = '#comentarios';
$captcha_session_key = 'nota_comment_captcha_' . (int)$ID_NOTA;

if (isset($_SESSION['nota_comment_flash']) && is_array($_SESSION['nota_comment_flash']) && isset($_SESSION['nota_comment_flash'][$ID_NOTA])) {
    $flash = $_SESSION['nota_comment_flash'][$ID_NOTA];
    if (isset($flash['ok']) && $flash['ok'] !== '') {
        $comentario_ok = (string)$flash['ok'];
    }
    if (isset($flash['status']) && $flash['status'] !== '') {
        $comentario_status = (string)$flash['status'];
    }
    unset($_SESSION['nota_comment_flash'][$ID_NOTA]);
}

if (
    isset($_SERVER['REQUEST_METHOD'])
    && strtoupper($_SERVER['REQUEST_METHOD']) === 'POST'
    && isset($_POST['accion_comentario'])
    && $_POST['accion_comentario'] === 'guardar_comentario'
    && isset($_POST['IDD'])
    && (int)$_POST['IDD'] === (int)$ID_NOTA
) {
    $comentario_post_nombre = trim(isset($_POST['nombre']) ? (string)$_POST['nombre'] : '');
    $comentario_post_texto = trim(isset($_POST['texto']) ? (string)$_POST['texto'] : '');

    if ($comentario_post_nombre === '') {
        $comentario_error = 'Debes escribir tu nombre.';
    } elseif ($comentario_post_texto === '') {
        $comentario_error = 'Debes escribir un comentario.';
    } elseif (nm_bad_input($comentario_post_nombre) || nm_bad_input($comentario_post_texto)) {
        $comentario_error = 'No escribas links, mails ni etiquetas HTML.';
    } else {
        if (nm_len($comentario_post_nombre) > 80) {
            $comentario_post_nombre = nm_sub($comentario_post_nombre, 0, 80);
        }
        if (nm_len($comentario_post_texto) > 1500) {
            $comentario_post_texto = nm_sub($comentario_post_texto, 0, 1500);
        }

        if ($comentarios === 'captcha') {
            $captcha_ingresado = strtoupper(trim(isset($_POST['captcha_texto']) ? (string)$_POST['captcha_texto'] : ''));
            $captcha_real = isset($_SESSION[$captcha_session_key]) ? strtoupper((string)$_SESSION[$captcha_session_key]) : '';
            if ($captcha_ingresado === '' || $captcha_real === '' || $captcha_ingresado !== $captcha_real) {
                $comentario_error = 'El captcha no coincide.';
            }
        }
    }

    if ($comentario_error === '') {
        $IP_c = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
        $sub = 0;
        $ver = 'si';
        $comentario_status = 'publicado';

        if ($comentarios === 'facebook') {
            $ver = 'no';
            $comentario_status = 'moderado';
        } elseif ($comentarios === 'captcha') {
            $ver = 'si';
            $comentario_status = 'publicado';
        } else {
            $ver = 'si';
            $comentario_status = 'publicado';
        }

        $stmtIns = $conn->prepare('INSERT INTO comentarios (nombre, texto, IDD, ver, IP, sub_comentario) VALUES (?, ?, ?, ?, ?, ?)');
        if (!$stmtIns) {
            $comentario_error = 'Error interno al preparar el comentario.';
        } else {
            $stmtIns->bind_param('ssissi', $comentario_post_nombre, $comentario_post_texto, $ID_NOTA, $ver, $IP_c, $sub);
            if (!$stmtIns->execute()) {
                $comentario_error = 'Error interno al guardar el comentario.';
            }
            $stmtIns->close();
        }

        if ($comentario_error === '') {
            if ($comentarios === 'facebook') {
                $comentario_ok = 'Gracias. Tu comentario fue enviado y quedó pendiente de moderación.';
            } else {
                $comentario_ok = 'Gracias. Tu comentario fue publicado correctamente.';
            }

            if (isset($e_email) && $e_email === 'si') {
                $recipiente = isset($emailsitio) ? (string)$emailsitio : '';
                if ($recipiente !== '') {
                    $asunto = 'NUEVO MENSAJE EN UNA NOTA';
                    $msg = "-----------------------------------------------------\n"
                         . "NUEVO MENSAJE:\n"
                         . $comentario_post_texto . "\n"
                         . "-----------------------------------------------------\n"
                         . "PARA ACEPTARLO INGRESA AL PANEL " . (isset($dom) ? $dom : '') . "/panel\n";

                    $from = isset($email) ? (string)$email : (isset($emailsitio) ? (string)$emailsitio : '');
                    $headers = '';
                    if ($from !== '') {
                        $from = str_replace(array("\r", "\n"), '', $from);
                        $headers = 'From: ' . $from;
                    }
                    @mail($recipiente, $asunto, $msg, $headers);
                }
            }

            $_SESSION['nota_comment_flash'][$ID_NOTA] = array(
                'ok' => $comentario_ok,
                'status' => $comentario_status,
            );
            unset($_SESSION[$captcha_session_key]);

            header('Location: ' . nm_current_request_uri() . $comentario_anchor);
            exit;
        }
    }
}

$captcha_actual = '';
if ($comentarios === 'captcha') {
    $captcha_actual = nm_generate_captcha(5);
    $_SESSION[$captcha_session_key] = $captcha_actual;
}
?>
<!DOCTYPE html>
<html lang="<?php echo $lang_actual; ?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<?php $link_titulo = str_replace('http://', 'https://', $link_titulo); echo $link_titulo; ?>
<?php $link_bajada = str_replace('http://', 'https://', $link_bajada); echo $link_bajada; ?>
<?php $link_menu = str_replace('http://', 'https://', $link_menu); echo $link_menu; ?>
<title><?php echo $utf_activo ? utf8_decode($titulo) : $titulo; ?></title>
<?php $bajada1 = str_replace('"', '', $bajada); ?>
<meta name="description" content="<?php echo $utf_activo ? utf8_decode($bajada1) : $bajada1; ?>" />
<meta name="keywords" content="<?php echo $tag1; ?>, <?php echo $tag2; ?>, <?php echo $tag3; ?>, <?php echo $tag4; ?>, <?php echo $tag5; ?>">
<meta name="language" content="<?php echo $lang_actual; ?>" />
<meta property="og:type" content="article" />
<meta property="og:title" content='<?php echo str_replace('"', '&#x22;', $utf_activo ? utf8_decode($titulo) : $titulo); ?>' />
<meta property="og:description" content="<?php echo $utf_activo ? utf8_decode($bajada1) : $bajada1; ?>" />
<meta property="og:url" content="<?php echo $dom; ?>/nota/<?php echo $ID; ?>/<?php echo urls_amigables($titulo); ?>" />
<?php if ($foto == '') { ?>
<meta property="og:image" content="https://x7.com.ar/gero/nofoto.png" />
<?php } else { ?>
    <?php if (isset($domold) && $domold != '') { $dom_bandera = $dom; $dom = $domold; } ?>
    <meta property="og:image" content="<?php echo $dom; ?>/<?php echo $carpetafoto; ?>/resize_<?php echo $foto; ?><?php echo $ext_img; ?>" />
    <?php if (isset($dom_bandera)) { $dom = $dom_bandera; unset($dom_bandera); } ?>
<?php } ?>
<meta name="date" content="<?php echo $a; ?>-<?php echo str_pad($m, 2, '0', STR_PAD_LEFT); ?>-<?php echo str_pad($d, 2, '0', STR_PAD_LEFT); ?>" scheme="YYYY-MM-DD">
<?php echo isset($head_en_concha) ? $head_en_concha : ''; ?>
<?php echo isset($adsense_head) ? $adsense_head : ''; ?>
<?php
$sql2 = "SELECT * FROM audios WHERE nota = '$ID' ORDER BY ID LIMIT 1";
$consulta2 = $conn->query($sql2);
if ($consulta2) {
    while ($row2 = $consulta2->fetch_assoc()) {
        $audio = $row2['mp3'];
    }
    $consulta2->free_result();
}
$catba = isset($_GET['cat']) ? $_GET['cat'] : '';
$i_publi = 10000000;
?>
<link rel="shortcut icon" href="<?php echo $dom; ?>/icono.ico" type="image/x-icon" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link href="https://radioshosting.com/css/delalora<?php echo $estiloweb; ?>new.css" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/flickity@2/dist/flickity.min.css"/>
<link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet">
<link rel="stylesheet" href="https://radioshosting.com/css/css/lightbox.min.css">
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/es_LA/all.js#xfbml=1&appId=427523193949843";
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<style>
body {
    <?php
    $e = substr((string)$d_color_fondo, 0, 1);
    $e1 = substr((string)$d_color_fondo, 0, 4);
    if ($e == '#') {
        ?>background-color:<?php echo $d_color_fondo; ?>;<?php
    } else {
        if ($e1 == 'http') {
            ?>background-image:url(<?php echo $d_color_fondo; ?>);background-repeat:repeat;<?php
        } else {
            ?>
            background-image:url("https://recursos.radiosnethosting.com/fondos/<?php echo $d_color_fondo; ?>");
            background-attachment:fixed;
            -webkit-background-size:cover;
            -moz-background-size:cover;
            -o-background-size:cover;
            background-size:cover;
            <?php
        }
    }
    ?>
    overflow-x:hidden;
    margin:0 auto;
}
h1, h2, h3, h4, h5, h6 {
    margin-bottom:10px;
    line-height:1.1em;
    font-weight:600;
    margin-top:0;
    color:<?php echo $d_color_titulo; ?>;
    font-family:<?php echo $style_titulo; ?>;
}
p {
    font-family:<?php echo $d_fu_texto; ?>;
}
.h3, h3 { font-size:1rem; }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    display:block;
    color:<?php echo $d_color_menu; ?>;
}
a:hover { color:<?php echo $d_color_menu_sobre; ?>; }
a:link, a:visited, a:active, a:focus, a:before, a:after {
    outline:0 none;
    text-decoration:none;
    color:<?php echo $d_color_menu; ?>;
}
p > a {
    display:initial;
    color:#111;
    text-decoration:underline !important;
}
.navbar-nav .dropdown-menu {
    position:absolute;
    background-color:<?php echo $d_color_fondo_menu; ?>;
}
.dropdown:hover>ul { display:block !important; }
.dropdown ul li a { color:<?php echo $d_color_menu; ?>; }
.navbar-light .navbar-nav .nav-link:focus, .navbar-light .navbar-nav { color:<?php echo $d_color_menu; ?>; }
.nav-link:hover { color:<?php echo $d_color_menu_sobre; ?>; }
#logo { max-width:3.2rem; }
#logo:hover path { fill:<?php echo $d_color_menu; ?>; }
#logo:hover { color:<?php echo $d_color_menu_sobre; ?>; }
#logo2 { fill:<?php echo $d_color_weather2; ?>; max-width:48px; }
#logo3 { fill:<?php echo $d_color_weather2; ?>; max-width:18px; }
.color { color:<?php echo $d_color_menu; ?>; }
.btn-outline-primary.active,
.btn-outline-primary:active,
.show>.btn-outline-primary.dropdown-toggle {
    color:<?php echo $d_color_fondo_menu; ?>;
    background-color:<?php echo $d_color_menu; ?>;
    border:3px solid <?php echo $d_color_fondo_menu; ?>;
}
.btn-outline-primary:hover {
    color:<?php echo $d_color_fondo_menu; ?>;
    background-color:<?php echo $d_color_menu; ?>;
    border:3px solid <?php echo $d_color_fondo_menu; ?>;
}
.btn-outline-primary {
    color:<?php echo $d_color_menu; ?>;
    background-color:<?php echo $d_color_fondo_menu; ?>;
    border:3px solid transparent;
}
footer p {
    margin-bottom:.25rem;
    color:<?php echo $d_color_menu; ?>;
    font-weight:300;
}
.facebook {
    display:block;
    float:right;
    background:<?php echo $d_color_menu; ?>;
    margin-right:37px !important;
}
.twitter {
    display:block;
    float:right;
    background:<?php echo $d_color_menu; ?>;
}
.flickity-page-dots .dot { background:<?php echo $d_color_menu; ?>; }
.sidebar,
.sidebar2 { will-change:min-height; }
.sidebar__inner,
.sidebar__inner2 {
    transform:translate(0, 0);
    transform:translate3d(0, 0, 0);
    will-change:position, transform;
}
.sidebar .widget .widget-title { font-size:20px; }
<?php
$hexa = substr((string)$d_color_fondo_menu, 1);
$decimal = hexdec($hexa);
if ($decimal <= 10066329) {
    $color_titulo_barra = '250,250,250,0.9';
} else {
    $color_titulo_barra = '0,0,0,0.9';
}
?>
.widget-head { background-color:<?php echo $d_color_fondo_menu; ?> !important; }
.widget-title {
    font-size:25px;
    font-weight:900;
    line-height:1;
    text-transform:uppercase;
    margin-bottom:0;
    color:<?php echo $d_color_menu; ?>;
    font-family:<?php echo $style_titulo; ?>;
}
.topbar {
    border-bottom:0;
    background-color:<?php echo $d_color_fondo_menu; ?>;
    color:<?php echo $d_color_menu; ?>;
}
.header {
    <?php if ($textura == null && $logo_g == null) { ?>
    background-color:<?php echo $d_color_fondo_cabecera; ?>;
    <?php } elseif ($textura != null) { ?>
    background-position:center center;
    background-size:cover;
    background-repeat:no-repeat;
    background-image:url(<?php $textura = str_replace('www.radiosnet.com.ar', 'recursos.radiosnethosting.com', $textura); echo $textura; ?>);
    -moz-background-size:cover;
    -webkit-background-size:cover;
    <?php } else { ?>
    background-position:center center;
    background-size:cover;
    background-repeat:no-repeat;
    background-image:url(<?php echo $logo_g; ?>);
    -moz-background-size:cover;
    -webkit-background-size:cover;
    <?php } ?>
    clear:both;
}
.header-right { float:right; }
.logo { max-width:80%; }
.bg-light { background-color:#fff !important; }
article { background:transparent; }
.colorTitulo {
    color:<?php echo $d_color_titulo; ?>;
    font-weight:800;
    letter-spacing:1px;
}
.facebook {
    display:block;
    float:right;
    background-color:<?php echo isset($color_cat) ? $color_cat : $d_color_menu; ?> !important;
    margin-right:37px !important;
}
.twitter {
    display:block;
    float:right;
    background-color:<?php echo isset($color_cat) ? $color_cat : $d_color_menu; ?> !important;
}
p.displaytitulo {
    height:0;
    margin:0;
    font-family:'Montserrat', sans-serif !important;
    letter-spacing:1px;
}
.carousel-caption {
    z-index:10;
    padding:4px 20px;
    background-color:<?php echo $d_color_fondo_menu; ?>99;
}
.carousel-caption h2 {
    color:<?php echo $d_color_menu; ?> !important;
    font-weight:700;
    margin:0;
    font-size:2.5vw;
}
.localidad {
    font-family:<?php echo $style_titulo; ?>;
    color:<?php echo $d_color_weather2; ?>;
    line-height:1;
}
.titulo {
    display:none;
    position:absolute;
    bottom:0;
    height:100%;
    width:100%;
    padding:20px 15px;
    background-color:<?php echo $d_color_fondo_menu; ?>;
    opacity:0.7;
}
.cub3r-caption {
    position:absolute;
    bottom:0;
    left:0;
    background-color:<?php echo $d_color_fondo_menu; ?>99;
    width:100%;
    padding:0.5rem 0.75rem;
}
.cub3r-caption-text { color:<?php echo $d_color_menu; ?> !important; }
.html-marquee {
    font-weight:200;
    height:40px !important;
    width:100%;
    background-color:transparent !important;
    font-family:'Montserrat', sans-serif !important;
    font-size:inherit !important;
    color:<?php echo $d_color_menu; ?> !important;
    letter-spacing:0.5px;
}
marquee p { color:<?php echo $d_color_menu; ?> !important; }
.texto-fecha { color:<?php echo $d_color_menu; ?>; }
.navbar-toggler-icon { color:<?php echo $d_color_menu; ?>; }
.fb-like > span > iframe { width:100% !important; }
.share-x-icon {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:30px;
    height:30px;
    color:#111111;
}
.share-x-icon svg {
    width:24px;
    height:24px;
    fill:currentColor;
    display:block;
}
.nm-comment-help {
    font-size:13px;
    color:rgba(0,0,0,.6);
    margin-top:6px;
}
.nm-captcha-box {
    margin-top:10px;
    padding:12px;
    border:1px solid #ddd;
    background:#f8f9fa;
    border-radius:12px;
}
.nm-captcha-code {
    font-size:24px;
    font-weight:700;
    letter-spacing:6px;
    background:#fff;
    border:1px solid #ccc;
    padding:10px;
    text-align:center;
    margin-bottom:10px;
    border-radius:10px;
}
</style>
</head>
<body>
<?php if ($estiloweb == 73) { include 'menu_vintage.php'; } ?>
<div class="container bg-light border-right border-left">
    <div id="main-content" class="row main">
        <div id="content" class="col-12 col-sm-8 p-0 col-md-8 col-lg-8 content">
            <div class="col-lg-12 col-12 base-box2" style="display:flex;justify-content:space-between;">
                <?php
                $Y = $a;
                $M = $m2;
                $D = $d;
                $date = "$Y$M$D";
                if ($M == '01') { $m = 'enero'; }
                if ($M == '02') { $m = 'febrero'; }
                if ($M == '03') { $m = 'marzo'; }
                if ($M == '04') { $m = 'abril'; }
                if ($M == '05') { $m = 'mayo'; }
                if ($M == '06') { $m = 'junio'; }
                if ($M == '07') { $m = 'julio'; }
                if ($M == '08') { $m = 'agosto'; }
                if ($M == '09') { $m = 'septiembre'; }
                if ($M == '10') { $m = 'octubre'; }
                if ($M == '11') { $m = 'noviembre'; }
                if ($M == '12') { $m = 'diciembre'; }
                ?>

                <?php if ($cat_no != 0) {
                    $sql2 = "SELECT * FROM categorias WHERE ID = '$cat_no' LIMIT 1";
                    $consulta2 = $conn->query($sql2);
                    if ($consulta2) {
                        while ($row2 = $consulta2->fetch_assoc()) {
                            $cat_nom = $row2['nombre'];
                            $color_cat = $row2['color'];
                        }
                        $consulta2->free_result();
                    }
                    if ($cat_nom != '' && $cat_nom != null) {
                        ?>
                        <div style="background-color:<?php if ($color_cat == '' || $color_cat == '#FFFFFF') { echo '#666666'; } else { echo $color_cat; } ?>;">
                            <p class="m-0 py-1 px-2" style="font-family:<?php echo $style_titulo; ?>;color:#FFFFFF;">
                                <?php echo strtoupper($cat_nom); ?>
                            </p>
                        </div>
                    <?php } else { ?>
                        <div>
                            <p class="m-0 py-1 px-2"><?php echo strtoupper($cat_nom); ?></p>
                        </div>
                    <?php }
                } ?>

                <div>
                    <p class="m-0 py-1 px-2" style="font-family:<?php echo $style_titulo; ?>;font-size:14px;color:<?php echo $d_color_titulo; ?>;">
                        <?php echo $D; ?> de <?php echo $m; ?> de <?php echo $a; ?>
                    </p>
                </div>
            </div>

            <div class="col-lg-12 col-12 base-box2 p-0 px-md-3">
                <div class="mb-3">
                    <h2 style="padding:15px;font-family:<?php echo $style_titulo; ?>;color:<?php echo $d_color_titulo; ?>;"><?php echo $utf_activo ? utf8_decode($titulo) : $titulo; ?></h2>
                </div>

                <?php if ($foto != null) { ?>
                    <?php if (isset($domold) && $domold != '') { $dom_bandera = $dom; $dom = $domold; } ?>
                    <div class="col-lg-12 col-12 p-0">
                        <?php if ($ejemplo_marca_de_agua == null) { ?>
                            <div align="left">
                                <img class="<?php if ($estiloweb <= 3) { echo 'img-responsive'; } else { echo 'img-fluid'; } ?>" src="<?php $fotojj = substr($foto, 0, 4); if ($fotojj == 'http') { echo $foto; } else { echo $dom; ?>/<?php echo $carpetafoto; ?>/resize_<?php echo $foto; ?><?php echo $ext_img; ?><?php } ?>" />
                            </div>
                        <?php } else { ?>
                            <div align="left">
                                <img class="<?php if ($estiloweb <= 3) { echo 'img-responsive'; } else { echo 'img-fluid'; } ?>" src="<?php echo $dom; ?>/<?php echo $ejemplo_marca_de_agua; ?>?i=<?php echo $carpetafoto; ?>/resize_<?php echo $foto; ?><?php echo $ext_img; ?>" />
                            </div>
                        <?php } ?>
                        <?php if (isset($dom_bandera)) { $dom = $dom_bandera; unset($dom_bandera); } ?>

                        <?php if ($pie_foto != '') { ?>
                            <p style="padding:0;font-size:13px;line-height:18px;color:rgb(175, 174, 174);font-family:Roboto, sans-serif;font-weight:700;margin-left:0 !important;letter-spacing:1px;"><?php echo $pie_foto; ?></p>
                        <?php } ?>
                    </div>
                <?php } ?>

                <?php
                if ($ID_editor != 0) {
                    $sql65 = "SELECT * FROM editores WHERE ID = '$ID_editor' LIMIT 1";
                    $consulta65 = $conn->query($sql65);
                    if ($consulta65) {
                        while ($row65 = $consulta65->fetch_assoc()) {
                            $nombre_editor = $row65['nombre'];
                            $telefono_editor = $row65['telefono'];
                            $email_editor = $row65['email'];
                            $instagram_editor = $row65['instagram'];
                            $facebook_editor = $row65['facebook'];
                            $twitter_editor = $row65['twitter'];
                            $foto_editor = $row65['foto'];
                            $ID_editor = $row65['ID'];
                        }
                        $consulta65->free_result();
                    }
                    ?>
                    <div class="row">
                        <div class="col-2 col-sm-2 col-md-2 col-lg-2" style="padding:10px;">
                            <img class="img-fluid img-responsive" src="<?php echo $foto_editor; ?>" data-hidpi="#" style="max-height:60px;margin:0 auto;border-radius:50%!important;">
                        </div>
                        <div class="col-10 col-sm-10 col-md-10 col-lg-10" style="padding:10px;">
                            <b>Por: <?php echo $nombre_editor; ?></b>
                            <ul class="navbar-nav ml-auto" style="display:inline-block;">
                                <?php if ($facebook_editor != '') { ?>
                                    <li class="nav-item2" style="display:inline-flex;margin-right:10px;">
                                        <a href="<?php echo $facebook_editor; ?>" style="padding:0;" target="_blank">
                                            <h4 style="margin:0;padding:0.5em;"><i class="fab fa-facebook-square" style="font-size:1.5em;"></i></h4>
                                        </a>
                                    </li>
                                <?php } ?>
                                <?php if ($twitter_editor != '') { ?>
                                    <li class="nav-item2" style="display:inline-flex;margin-right:10px;">
                                        <a href="<?php echo $twitter_editor; ?>" style="padding:0;" target="_blank">
                                            <h4 style="margin:0;padding:0.5em;"><i class="fab fa-twitter-square" style="font-size:1.5em;"></i></h4>
                                        </a>
                                    </li>
                                <?php } ?>
                                <?php if ($instagram_editor != '') { ?>
                                    <li class="nav-item2" style="display:inline-flex;margin-right:10px;">
                                        <a href="<?php echo $instagram_editor; ?>" style="padding:0;" target="_blank">
                                            <h4 style="margin:0;padding:0.5em;"><i class="fab fa-instagram" style="font-size:1.5em;"></i></h4>
                                        </a>
                                    </li>
                                <?php } ?>
                                <?php if ($email_editor != '') { ?>
                                    <li class="nav-item2" style="display:inline-flex;margin-right:10px;">
                                        <a href="mailto:<?php echo $email_editor; ?>" style="padding:0;" target="_blank">
                                            <h4 style="margin:0;padding:0.5em;"><i class="fas fa-envelope" style="font-size:1.5em;"></i></h4>
                                        </a>
                                    </li>
                                <?php } ?>
                            </ul>
                        </div>
                    </div>
                <?php } ?>

                <div class="grid mt-3 fg">
                    <?php
                    $sql65 = "SELECT * FROM fotos_notas WHERE noticia = '$ID'";
                    $consulta65 = $conn->query($sql65);
                    if ($consulta65) {
                        while ($row65 = $consulta65->fetch_assoc()) {
                            $carpetafoto1 = $row65['carpetafoto'];
                            $ID_foto = $row65['ID'];
                            $foto_galeria = $row65['foto'];
                            ?>
                            <div class="grid-item col-lg-2 col-md-3 col-sm-12 col-12" style="margin-bottom:15px;">
                                <?php if (isset($domold) && $domold != '') { $dom_bandera = $dom; $dom = $domold; } ?>
                                <a data-lightbox="example-set" href="<?php echo $dom; ?>/<?php echo $carpetafoto1; ?>/resize_<?php echo $foto_galeria; ?>.jpg" title="<?php echo $utf_activo ? utf8_decode($titulo) : $titulo; ?>">
                                    <img src="<?php echo $dom; ?>/<?php echo $carpetafoto1; ?>/thumbnail_<?php echo $foto_galeria; ?>.jpg" class="img-fluid" />
                                </a>
                                <?php if (isset($dom_bandera)) { $dom = $dom_bandera; unset($dom_bandera); } ?>
                            </div>
                        <?php }
                        $consulta65->free_result();
                    }

                    $sql65 = "SELECT * FROM fotosnotasfull WHERE ID_nota = '$ID'";
                    $consulta65 = $conn->query($sql65);
                    if ($consulta65) {
                        while ($row65 = $consulta65->fetch_assoc()) {
                            $ID_foto = $row65['ID'];
                            $img = $row65['img'];
                            ?>
                            <div class="grid-item col-lg-2 col-md-3 col-sm-12 col-12" style="margin-bottom:15px;">
                                <a href="<?php echo $img; ?>" rel="lightbox[<?php echo $ID; ?>]" title="<?php echo $utf_activo ? utf8_decode($titulo) : $titulo; ?>"><img src="<?php echo $dom; ?>/timthumb.php?src=<?php echo $img; ?>&w=500&q=80" class="img-fluid" /></a>
                            </div>
                        <?php }
                        $consulta65->free_result();
                    } ?>
                </div>

                <div class="col-lg-12 col-12 mb-3">
                    <p style="font-family:<?php echo $style_bajada; ?>;"><?php echo $utf_activo ? utf8_decode($bajada) : $bajada; ?></p>
                </div>

                <?php if (isset($ads_bajada_1) && trim($ads_bajada_1) !== '') { echo $ads_bajada_1; } ?>

                <?php if ($audio != null) { ?>
                    <div class="col-lg-12 col-12 mb-3">
                        <?php include 'audio_new.php'; ?>
                    </div>
                <?php } ?>

                <?php if ($youtube != null) { ?>
                    <div class="col-lg-12 col-12 mb-3">
                        <div style="position:relative;padding-bottom:56.25%;">
                            <iframe style="position:absolute;width:100%;height:100%;" src="https://www.youtube.com/embed/<?php echo $youtube; ?>" frameborder="0" allowfullscreen></iframe>
                        </div>
                    </div>
                <?php } ?>

                <div class="col-lg-12 col-12 mb-3">
                    <div id="fb-root"></div>

                    <div class="col-lg-12 col-12 p-0 mb-3 d-flex justify-content-center py-3">
                        <?php include 'rotativas_random_arriba.php'; ?>
                    </div>

                    <div class="col-lg-12 col-12 p-0">
                        <?php
              $texto = str_replace('<img', '<img class="img-fluid"', $texto);
$texto = limpiar_html_nota($texto);


                        $need_x = false;
                        $need_tiktok = false;

                        $texto = preg_replace_callback('~\[\s*img\s*\](.*?)\[\s*/\s*img\s*\]~is', function($m) {
                            $u = trim($m[1]);
                            if ($u === '') return $m[0];
                            $href = sc_norm_url($u);
                            $thumb = '../../timthumb.php?src=' . $href . '&w=1000&q=80';
                            return '<a href="'.sc_h($href).'" data-lightbox="nota-img" style="display:block;">'
                                 . '<img style="display:block;width:100%;height:auto;background:#fff;padding:10px;border:1px solid rgba(0,0,0,.08);border-radius:12px;margin:18px 0 26px;box-shadow:0 10px 22px rgba(0,0,0,.10);cursor:zoom-in;" class="img-fluid" src="'.sc_h($thumb).'">'
                                 . '</a>';
                        }, $texto);

                        $texto = preg_replace('~\[\s*hr\s*\]\s*\[\s*/\s*hr\s*\]~i', '<hr>', $texto);
                        $texto = preg_replace_callback('~\[\s*alert\s*\](.*?)\[\s*/\s*alert\s*\]~is', function($m) {
                            $inner = trim($m[1]);
                            return '<div class="alert alert-info" role="alert" style="margin:18px 0 26px;">'.$inner.'</div>';
                        }, $texto);

                        $texto = preg_replace_callback('~\[\s*youtube\s*\](.*?)\[\s*/\s*youtube\s*\]~is', function($m) {
                            $id = sc_youtube_id($m[1]);
                            if ($id === '') return $m[0];
                            return '<div style="background:#fff;padding:10px;border:1px solid rgba(0,0,0,.08);border-radius:12px;margin:18px 0 26px;box-shadow:0 10px 22px rgba(0,0,0,.10);overflow:hidden;">'
                                 . '<div style="position:relative;padding-bottom:56.25%;">'
                                 . '<iframe style="position:absolute;width:100%;height:100%;border:0;" src="https://www.youtube.com/embed/'.sc_h($id).'" frameborder="0" allowfullscreen loading="lazy"></iframe>'
                                 . '</div>'
                                 . '</div>';
                        }, $texto);

                        $texto = preg_replace_callback('~\[\s*ig\s*\](.*?)\[\s*/\s*ig\s*\]~is', function($m) {
                            $code = trim($m[1]);
                            if ($code === '') return $m[0];
                            return '<div style="background:#fff;padding:10px;border:1px solid rgba(0,0,0,.08);border-radius:12px;margin:18px auto 26px;box-shadow:0 10px 22px rgba(0,0,0,.10);overflow:hidden;max-width:760px;">'
                                 . '<div style="max-width:540px;margin:0 auto;">'
                                 . '<iframe src="https://www.instagram.com/p/'.sc_h($code).'/embed/" style="display:block;width:100%;height:1060px;border:0;overflow:hidden;" frameborder="0" scrolling="no" allowtransparency="true" loading="lazy"></iframe>'
                                 . '</div>'
                                 . '</div>';
                        }, $texto);

                        $texto = preg_replace_callback('~\[\s*instagram\s*\](.*?)\[\s*/\s*instagram\s*\]~is', function($m) {
                            list($tipo, $code) = sc_instagram_parts($m[1]);
                            if ($tipo === '' || $code === '') return $m[0];
                            $permalink = 'https://www.instagram.com/' . trim($tipo) . '/' . trim($code) . '/';
                            return '<div style="background:#fff;padding:10px;border:1px solid rgba(0,0,0,.08);border-radius:12px;margin:18px auto 26px;box-shadow:0 10px 22px rgba(0,0,0,.10);overflow:hidden;max-width:760px;">'
                                 . '<div style="max-width:540px;margin:0 auto;">'
                                 . '<iframe src="'.sc_h($permalink).'embed/" style="display:block;width:100%;height:1060px;border:0;overflow:hidden;" frameborder="0" scrolling="no" allowtransparency="true" loading="lazy"></iframe>'
                                 . '</div>'
                                 . '</div>';
                        }, $texto);

                        $texto = preg_replace_callback('~\[\s*xpost\s*\](.*?)\[\s*/\s*xpost\s*\]~is', function($m) use (&$need_x) {
                            $need_x = true;
                            $url = sc_norm_url($m[1]);
                            if ($url === '') return $m[0];
                            $url = preg_replace('~^https?://(www\.)?x\.com/~i', 'https://twitter.com/', $url);
                            $url = preg_replace('~\?.*$~', '', $url);
                            return '<div style="background:#fff;padding:10px;border:1px solid rgba(0,0,0,.08);border-radius:12px;margin:18px 0 26px;box-shadow:0 10px 22px rgba(0,0,0,.10);overflow:hidden;">'
                                 . '<div style="max-width:550px;margin:0 auto;">'
                                 . '<blockquote class="twitter-tweet" data-dnt="true" style="margin:0 auto;">'
                                 . '<a href="'.sc_h($url).'"></a>'
                                 . '</blockquote>'
                                 . '</div>'
                                 . '</div>';
                        }, $texto);

                        $texto = preg_replace_callback('~\[\s*facebook\s*\](.*?)\[\s*/\s*facebook\s*\]~is', function($m) {
                            $url = sc_norm_url($m[1]);
                            return '<div style="background:#fff;padding:10px;border:1px solid rgba(0,0,0,.08);border-radius:12px;margin:18px 0 26px;box-shadow:0 10px 22px rgba(0,0,0,.10);overflow:hidden;">'
                                 . '<div style="max-width:550px;margin:0 auto;">'
                                 . '<div class="fb-post" data-href="'.sc_h($url).'" data-width="500"></div>'
                                 . '</div>'
                                 . '</div>';
                        }, $texto);

                        $texto = preg_replace_callback('~\[\s*tiktok\s*\](.*?)\[\s*/\s*tiktok\s*\]~is', function($m) use (&$need_tiktok) {
                            $need_tiktok = true;
                            $url = sc_norm_url($m[1]);
                            $vid = '';
                            if (preg_match('~/video/(\d+)~', $url, $mm)) $vid = $mm[1];
                            if ($vid !== '') {
                                return '<div style="background:#fff;padding:10px;border:1px solid rgba(0,0,0,.08);border-radius:12px;margin:18px 0 26px;box-shadow:0 10px 22px rgba(0,0,0,.10);overflow:hidden;">'
                                     . '<blockquote class="tiktok-embed" cite="'.sc_h($url).'" data-video-id="'.sc_h($vid).'" style="max-width:605px;min-width:325px;margin:0 auto;"><section></section></blockquote>'
                                     . '</div>';
                            }
                            return '<div style="background:#fff;padding:10px;border:1px solid rgba(0,0,0,.08);border-radius:12px;margin:18px 0 26px;box-shadow:0 10px 22px rgba(0,0,0,.10);overflow:hidden;">'
                                 . '<blockquote class="tiktok-embed" cite="'.sc_h($url).'" style="max-width:605px;min-width:325px;margin:0 auto;"><section><a href="'.sc_h($url).'" target="_blank" rel="noopener">Ver en TikTok</a></section></blockquote>'
                                 . '</div>';
                        }, $texto);

                        $texto = preg_replace_callback('~\[\s*spotify\s*\](.*?)\[\s*/\s*spotify\s*\]~is', function($m) {
                            $url = sc_norm_url($m[1]);
                            if (preg_match('~^https?://open\.spotify\.com/([^/?#]+)/([^/?#]+)~i', $url, $mm)) {
                                $url = 'https://open.spotify.com/embed/' . $mm[1] . '/' . $mm[2];
                            }
                            return '<div style="background:#fff;padding:10px;border:1px solid rgba(0,0,0,.08);border-radius:12px;margin:18px 0 26px;box-shadow:0 10px 22px rgba(0,0,0,.10);overflow:hidden;">'
                                 . '<iframe style="border-radius:12px;display:block;width:100%;border:0;" src="'.sc_h($url).'" width="100%" height="152" frameborder="0" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>'
                                 . '</div>';
                        }, $texto);

                        $texto = preg_replace_callback('~\[\s*soundcloud\s*\](.*?)\[\s*/\s*soundcloud\s*\]~is', function($m) {
                            $url = sc_norm_url($m[1]);
                            $src = 'https://w.soundcloud.com/player/?url=' . rawurlencode($url) . '&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true';
                            return '<div style="background:#fff;padding:10px;border:1px solid rgba(0,0,0,.08);border-radius:12px;margin:18px 0 26px;box-shadow:0 10px 22px rgba(0,0,0,.10);overflow:hidden;">'
                                 . '<iframe style="display:block;width:100%;border:0;" width="100%" height="300" scrolling="no" frameborder="no" allow="autoplay" src="'.sc_h($src).'" loading="lazy"></iframe>'
                                 . '</div>';
                        }, $texto);

                        $texto = preg_replace_callback('~\[\s*map\s*\](.*?)\[\s*/\s*map\s*\]~is', function($m) {
                            $url = sc_norm_url($m[1]);
                            if (strpos($url, '/maps/embed') !== false) {
                                $src = $url;
                            } else {
                                $src = 'https://www.google.com/maps?output=embed&q=' . rawurlencode($url);
                            }
                            return '<div style="background:#fff;padding:10px;border:1px solid rgba(0,0,0,.08);border-radius:12px;margin:18px 0 26px;box-shadow:0 10px 22px rgba(0,0,0,.10);overflow:hidden;">'
                                 . '<div style="position:relative;padding-bottom:56.25%;">'
                                 . '<iframe style="position:absolute;width:100%;height:100%;border:0;" src="'.sc_h($src).'" frameborder="0" loading="lazy"></iframe>'
                                 . '</div>'
                                 . '</div>';
                        }, $texto);
                        ?>

                        <?php if (isset($banner_adsense) && trim($banner_adsense) !== '') { echo $banner_adsense; } ?>
                        <div style="font-size:18px;line-height:1.85;color:rgba(0,0,0,.88);max-width:760px;overflow-wrap:break-word;word-wrap:break-word;font-family:<?php echo $style_bajada; ?>;"><?php echo $texto; ?></div>
                        <?php if (isset($banner_adsense) && trim($banner_adsense) !== '') { echo $banner_adsense; } ?>

                        <?php
                        if ($need_x) {
                            echo '<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>';
                            echo '<script>(function(){function renderX(){if(window.twttr&&twttr.widgets&&typeof twttr.widgets.load==="function"){twttr.widgets.load();return true;}return false;}if(!renderX()){var n=0;var t=setInterval(function(){n++;if(renderX()||n>40) clearInterval(t);},250);}})();</script>';
                        }
                        if ($need_tiktok) {
                            echo '<script async src="https://www.tiktok.com/embed.js"></script>';
                        }
                        ?>
                    </div>

                    <?php if (isset($ads_bajada_2) && trim($ads_bajada_2) !== '') { echo $ads_bajada_2; } ?>

                    <?php if ($html != null) { ?>
                        <div style="position:relative;padding-bottom:56.25%;">
                            <?php echo $html; ?>
                        </div>
                    <?php } ?>

                    <?php
                    $sql65 = "SELECT * FROM videos WHERE ID_nota = '$ID' LIMIT 1";
                    $consulta65 = $conn->query($sql65);
                    if ($consulta65) {
                        while ($row65 = $consulta65->fetch_assoc()) {
                            $ID_video = $row65['ID'];
                            $video = $row65['video'];
                            if ($video) {
                                ?>
                                <div class="col-lg-12 col-12 mb-3">
                                    <div>
                                        <video controls style="width:100%;">
                                            <source src="<?php echo $video; ?>" type="video/mp4">
                                            Su Navegador no Soporta Video
                                        </video>
                                    </div>
                                    <a href="borrar_video.php?ID=<?php echo $ID_video; ?>"><?php echo $idioma_borrar_video; ?></a>
                                </div>
                                <?php
                            }
                        }
                        $consulta65->free_result();
                    }
                    ?>

                    <div class="col-lg-12 col-12">
                        <div class="fb-like" data-href="<?php echo $dom; ?>/nota/<?php echo $ID; ?>/<?php echo urls_amigables($titulo); ?>" data-layout="button_count" data-action="like" data-size="large" data-show-faces="true" data-share="true"></div>
                    </div>

                    <div class="col-lg-12 col-12">
                        <?php
                        $sql65 = "SELECT * FROM archivos WHERE ID_nota = '$ID_NOTA'";
                        $consulta65 = $conn->query($sql65);
                        if ($consulta65) {
                            while ($row65 = $consulta65->fetch_assoc()) {
                                $ruta = $row65['ruta'];
                                $tipo = $row65['tipo'];
                                if ($tipo == 'pdf') {
                                    echo "<iframe src='$ruta' width='100%' height='500px'></iframe>";
                                }
                                ?>
                                <a class="btn" target="_blank" href="<?php echo $ruta; ?>"><img src="<?php
                                    if ($tipo == 'xls' || $tipo == 'xlsx') { echo 'https://radiosnet.com.ar/xls.png'; }
                                    if ($tipo == 'doc' || $tipo == 'docx') { echo 'https://radiosnet.com.ar/doc.png'; }
                                ?>" /></a>
                                <?php
                            }
                            $consulta65->free_result();
                        }
                        ?>
                    </div>

                    <div class="col-lg-12 col-12 p-0 mb-3 d-flex justify-content-center py-3">
                        <?php include 'rotativas_random_abajo.php'; ?>
                    </div>

                    <div class="col-lg-12 col-12">
                        <h4>COMPARTIR:</h4>
                        <?php
                        $share_url = $dom . '/nota/' . $ID . '/' . urls_amigables($titulo_xx);
                        $share_url_encoded = rawurlencode($share_url);
                        $share_title_encoded = rawurlencode($titulo_xx);
                        ?>
                        <ul class="navbar-nav flex-row ml-md-auto d-md-flex">
                            <li class="nav-item">
                                <a style="margin-left:10px;" target="_blank" href="https://www.facebook.com/sharer.php?u=<?php echo $share_url; ?>&t=<?php echo $titulo_xx; ?>">
                                    <i class="fab fa-facebook" style="font-size:30px;color:#111111;" aria-hidden="true"></i>
                                </a>
                            </li>
                            <li class="nav-item">
                                <a style="margin-left:10px;" target="_blank" href="https://twitter.com/intent/tweet?text=<?php echo $share_title_encoded; ?>&url=<?php echo $share_url_encoded; ?>" aria-label="Compartir en X" title="Compartir en X">
                                    <span class="share-x-icon" aria-hidden="true">
                                        <svg viewBox="0 0 1200 1227" xmlns="http://www.w3.org/2000/svg" role="img" focusable="false">
                                            <path d="M714.163 519.284 1160.89 0H1055.27L667.137 450.887 357.328 0H0L468.492 681.821 0 1226.37H105.618L515.239 750.218 842.672 1226.37H1200L714.137 519.284h.026ZM568.703 688.783l-47.349-67.894L144.011 80.694h162.604l304.797 436.204 47.349 67.894 395.459 566.09H891.616L568.703 688.809v-.026Z"/>
                                        </svg>
                                    </span>
                                </a>
                            </li>
                            <li class="nav-item">
                                <a style="margin-left:10px;" target="_blank" href="https://api.whatsapp.com/send?text=*<?php echo rawurlencode($titulo_xx); ?>.*%20%20<?php echo $share_url_encoded; ?>">
                                    <i class="fab fa-whatsapp" style="font-size:30px;color:#111111;" aria-hidden="true"></i>
                                </a>
                            </li>
                        </ul>
                    </div>

                    <div class="col-lg-12 col-12 px-0 my-3 py-3">
                        <div class="col-12 col-lg-12 my-3 py-3">
                            <h3 style="font-family:<?php echo $style_titulo; ?>;color:<?php echo $d_color_titulo; ?>;">Notas Relacionadas</h3>
                        </div>

                        <div class="main-carousel" data-flickity='{ "cellAlign": "left", "imagesLoaded": true, "wrapAround": true, "pageDots": false }'>
                            <?php
                            if ($cat_no == 0) {
                                $sql_rel = "SELECT ID,titulo,texto,bajada,audio,youtube,d,m,a,carpetafoto,foto,cat,home,impresiones,ext_img FROM notas WHERE ver = 'si' AND foto != '' AND ID != '$ID_NOTA' ORDER BY ID DESC LIMIT 8";
                            } else {
                                $sql_rel = "SELECT ID,titulo,texto,bajada,audio,youtube,d,m,a,carpetafoto,foto,cat,home,impresiones,ext_img FROM notas WHERE cat = '$cat_no' AND ver = 'si' AND foto != '' AND ID != '$ID_NOTA' ORDER BY ID DESC LIMIT 8";
                            }
                            $consulta_rel = $conn->query($sql_rel);
                            if ($consulta_rel) {
                                while ($rowr = $consulta_rel->fetch_assoc()) {
                                    $ID2 = $rowr['ID'];
                                    $i_publi = $i_publi + 1;
                                    $titulo2 = $rowr['titulo'];
                                    $bajada2 = $rowr['bajada'];
                                    $texto2 = $rowr['texto'];
                                    $audio_rel = $rowr['audio'];
                                    $youtube_rel = $rowr['youtube'];
                                    $d_rel = $rowr['d'];
                                    $m_rel = $rowr['m'];
                                    $a_rel = $rowr['a'];
                                    $fecha2 = "$d_rel - $m_rel - $a_rel";
                                    $carpetafoto2 = $rowr['carpetafoto'];
                                    $foto2 = $rowr['foto'];
                                    $cat11 = $rowr['cat'];
                                    $home = $rowr['home'];
                                    $ext_img2 = $rowr['ext_img'];

                                    $cat_name = '';
                                    $color_cat_rel = '#666666';
                                    if ($cat11 != 0) {
                                        $sql2 = "SELECT * FROM categorias WHERE ID = '$cat11' LIMIT 1";
                                        $consulta2 = $conn->query($sql2);
                                        if ($consulta2) {
                                            while ($row2 = $consulta2->fetch_assoc()) {
                                                $cat_name = $row2['nombre'];
                                                $color_cat_rel = $row2['color'];
                                            }
                                            $consulta2->free_result();
                                        }
                                    }
                                    if ($color_cat_rel == '' || $color_cat_rel == '#FFFFFF') {
                                        $color_cat_rel = '#666666';
                                    }
                                    ?>
                                    <div class="carousel-cell col-12 col-md-4 col-lg-4 p-0">
                                        <?php if ($cat_name != '') { ?>
                                            <div id="etiqueta_ch" style="background-color:<?php echo $color_cat_rel; ?>;">
                                                <span style="font-family:<?php echo $style_titulo; ?>;font-size:10px;color:#FFFFFF;"><?php echo $cat_name; ?></span>
                                            </div>
                                        <?php } ?>

                                        <a href="<?php echo $dom; ?>/nota/<?php echo $ID2; ?>/<?php echo urls_amigables($titulo2); ?>">
                                            <img class="img-fluid" src="<?php $fotojj = substr($foto2, 0, 4); if ($fotojj == 'http') { echo $foto2; } else { echo $dom . '/' . $carpetafoto2 . '/resize_' . $foto2 . $ext_img2; } ?>" alt="<?php echo htmlspecialchars($utf_activo ? utf8_decode($titulo2) : $titulo2, ENT_QUOTES, 'UTF-8'); ?>" width="100%" />
                                        </a>

                                        <div class="caption news-summary">
                                            <a href="<?php echo $dom; ?>/nota/<?php echo $ID2; ?>/<?php echo urls_amigables($titulo2); ?>"><h3><?php echo $utf_activo ? utf8_decode($titulo2) : $titulo2; ?></h3></a>
                                        </div>
                                    </div>
                                <?php }
                                $consulta_rel->free_result();
                            } ?>
                        </div>
                    </div>

                    <?php if (isset($adsense) && $adsense != '') { ?>
                        <div class="col-12 col-lg-12">
                            <div style="padding-left:9px;height:90px;">
                                <?php echo isset($banner_adsense) ? $banner_adsense : ''; ?>
                            </div>
                        </div>
                    <?php } ?>

                    <div class="col-12" id="comentarios">
                        <?php if ($opcion3 == 'si') { ?>
                            <div class="col-12"><h3>Comentarios</h3></div>
                            <div class="col-12">
                                <form id="formComentarioNota" name="formComentarioNota" method="post" action="<?php echo nm_h(nm_current_request_uri()); ?>#comentarios" onsubmit="return validarComentarioNota();">
                                    <input type="hidden" name="accion_comentario" value="guardar_comentario">
                                    <input type="hidden" name="IDD" value="<?php echo (int)$ID_NOTA; ?>">

                                    <?php if ($comentario_error != '') { ?>
                                        <div class="alert alert-danger" role="alert"><?php echo nm_h($comentario_error); ?></div>
                                    <?php } ?>
                                    <?php if ($comentario_ok != '') { ?>
                                        <div class="alert alert-success" role="alert"><?php echo nm_h($comentario_ok); ?></div>
                                    <?php } ?>

                                    <div class="form-group">
                                        <label for="nombre">Nombre</label>
                                        <input name="nombre" type="text" class="form-control" id="nombre" value="<?php echo nm_h($comentario_post_nombre); ?>" placeholder="Nombre" autocomplete="off" required>
                                    </div>

                                    <div class="form-group">
                                        <label for="texto">Comentario</label>
                                        <textarea name="texto" rows="4" class="form-control" id="texto" placeholder="Comentario" required><?php echo nm_h($comentario_post_texto); ?></textarea>
                                    </div>

                                    <?php if ($comentarios == 'captcha') { ?>
                                        <div class="nm-captcha-box">
                                            <label for="captcha_texto" style="display:block;margin-bottom:8px;font-weight:bold;">Escribí este código:</label>
                                            <div class="nm-captcha-code"><?php echo nm_h($captcha_actual); ?></div>
                                            <input type="text" name="captcha_texto" id="captcha_texto" class="form-control" maxlength="10" autocomplete="off" placeholder="Copiá el código" required>
                                            <div style="margin-top:8px;text-align:right;">
                                                <button type="button" class="btn btn-sm btn-outline-secondary" onclick="window.location.reload();">Recargar</button>
                                            </div>
                                        </div>
                                    <?php } ?>

                                    <div class="nm-comment-help">
                                        <?php if ($comentarios == 'facebook') { ?>
                                            Los comentarios se envían y quedan pendientes de moderación.
                                        <?php } elseif ($comentarios == 'captcha') { ?>
                                            Completá el captcha para publicar tu comentario sin salir de la nota.
                                        <?php } else { ?>
                                            Tu comentario se publica directamente al enviarlo.
                                        <?php } ?>
                                    </div>

                                    <div class="form-group" style="text-align:center;margin:20px 0;">
                                        <button name="button" type="submit" id="buttonComentarioNota" value="Enviar" class="btn btn-outline-primary">Enviar</button>
                                    </div>
                                </form>
                            </div>

                            <div class="col-12">
                                <?php
                                $c = 0;
                                $sql = "SELECT * FROM comentarios WHERE IDD = '$ID_NOTA' AND ver = 'si' ORDER BY ID DESC";
                                $consulta = $conn->query($sql);
                                if ($consulta) {
                                    while ($row = $consulta->fetch_assoc()) {
                                        $c++;
                                        $ID_comentario = $row['ID'];
                                        $nombre_comentario = $row['nombre'];
                                        $texto_comentario = $row['texto'];
                                        ?>
                                        <div class="border-top py-3">
                                            <p><b>Nombre</b><br><?php echo nl2br(nm_h($nombre_comentario)); ?></p>
                                            <p><b>Comentario</b><br><?php echo nl2br(nm_h($utf_activo ? utf8_decode($texto_comentario) : $texto_comentario)); ?></p>
                                            <a href="<?php echo $dom; ?>/responder_comentario.php?ID_comentario=<?php echo $ID_comentario; ?>" class="btn btn-outline-primary my-2">Responder</a>

                                            <?php
                                            $sql33 = "SELECT * FROM comentarios WHERE sub_comentario = '$ID_comentario' AND ver = 'si' ORDER BY ID ASC";
                                            $consulta33 = $conn->query($sql33);
                                            if ($consulta33) {
                                                while ($row33 = $consulta33->fetch_assoc()) {
                                                    $nombre33 = $row33['nombre'];
                                                    $mensaje33 = $row33['texto'];
                                                    ?>
                                                    <div class="pl-3">
                                                        <p><b>Nombre</b><br><?php echo nl2br(nm_h($nombre33)); ?></p>
                                                        <p><b>Comentario</b><br><?php echo nl2br(nm_h($utf_activo ? utf8_decode($mensaje33) : $mensaje33)); ?></p>
                                                    </div>
                                                <?php }
                                                $consulta33->free_result();
                                            }
                                            ?>
                                        </div>
                                    <?php }
                                    $consulta->free_result();
                                }

                                if ($c == 0) { ?>
                                    <p>Aun no hay comentarios, sé el primero en escribir uno.</p>
                                <?php } ?>
                            </div>
                        <?php } ?>
                    </div>
                </div>
            </div>
        </div>

        <div id="sidebar" class="col-12 col-sm-4 col-md-4 p-0 col-lg-4 sidebar">
            <div class="sidebar__inner">
                <?php include 'propagandas_div.php'; ?>
            </div>
        </div>
    </div>
</div>

<?php if ($estiloweb == 73) { include 'footer.vintage.php'; } ?>
<?php include 'clix_footer.php'; ?>
<script>
window.lazyLoadOptions = {
    elements_selector: ".lazy"
};
</script>
<script async src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.4.0/dist/lazyload.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js"></script>
<script>
// new WOW().init();
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="https://radioshosting.com/css/js/lightbox-plus-jquery.min.js"></script>
<script src="../../js/jquery.fittext.js"></script>
<script src="https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.js"></script>
<script src="https://unpkg.com/flickity@2/dist/flickity.pkgd.min.js"></script>
<script type="text/javascript">
window.setInterval(function(){
    /*$('.grid').isotope({ itemSelector: '.grid-item' });*/
});
</script>
<script type="text/javascript">
window.setInterval(function(){
    $('.grid2').isotope({ itemSelector: '.grid-item2' });
}, 2000);
</script>
<script>
function ventanaSecundaria56(URL){
    window.open(URL, "ventana1", "width=960,height=630,scrollbars=NO");
}

function validarComentarioNota() {
    var nombre = document.getElementById('nombre');
    var texto = document.getElementById('texto');
    var captcha = document.getElementById('captcha_texto');
    var boton = document.getElementById('buttonComentarioNota');

    if (!nombre || nombre.value.replace(/^\s+|\s+$/g, '') === '') {
        alert('Debes escribir tu nombre.');
        if (nombre) { nombre.focus(); }
        return false;
    }
    if (!texto || texto.value.replace(/^\s+|\s+$/g, '') === '') {
        alert('Debes escribir un comentario.');
        if (texto) { texto.focus(); }
        return false;
    }
    <?php if ($comentarios == 'captcha') { ?>
    if (!captcha || captcha.value.replace(/^\s+|\s+$/g, '') === '') {
        alert('Debes completar el captcha.');
        if (captcha) { captcha.focus(); }
        return false;
    }
    <?php } ?>
    if (boton) {
        boton.disabled = true;
        boton.innerHTML = 'Enviando...';
    }
    return true;
}
</script>
<script type="text/javascript" src="./js/rAF.js"></script>
<script type="text/javascript" src="./js/ResizeSensor.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/sticky-sidebar@3.3.1/dist/sticky-sidebar.js"></script>
<script type="text/javascript">
var TIMEOUT = null;
$(window).on('resize', function () {
    if (TIMEOUT === null) {
        TIMEOUT = window.setTimeout(function () {
            TIMEOUT = null;
            $('.fb-page').removeClass('fb_iframe_widget fb_iframe_widget_fluid');
            if (typeof FB !== 'undefined' && FB.XFBML && typeof FB.XFBML.parse === 'function') {
                FB.XFBML.parse();
            }
        }, 300);
    }
});

$(function(){
    let buttonsOnParraph = document.querySelectorAll('p a');
    buttonsOnParraph.forEach(function(element){
        element.classList.add('btn-link');
    });

    $(".carousel-captionh1").fitText(1.2, { minFontSize: '14px', maxFontSize: '18px' });
    $(".colorTitulo").fitText(1.2, { minFontSize: '14px', maxFontSize: '24px' });
    $(".carousel-caption h2").fitText(1.2, { minFontSize: '14px', maxFontSize: '30px' });
    $(".tituloVideo").fitText(1.2, { minFontSize: '14px', maxFontSize: '30px' });
    $(".tarso").fitText(1.2, { minFontSize: '20px', maxFontSize: '50px' });
    $(".tarso2").fitText(1.2, { minFontSize: '5px', maxFontSize: '11px' });

    jQuery('img.svg').each(function(){
        var $img = jQuery(this);
        var imgID = $img.attr('id');
        var imgClass = $img.attr('class');
        var imgURL = $img.attr('src');
        jQuery.get(imgURL, function(data) {
            var $svg = jQuery(data).find('svg');
            if (typeof imgID !== 'undefined') {
                $svg = $svg.attr('id', imgID);
            }
            if (typeof imgClass !== 'undefined') {
                $svg = $svg.attr('class', imgClass + ' replaced-svg');
            }
            $svg = $svg.removeAttr('xmlns:a');
            $img.replaceWith($svg);
        }, 'xml');
    });
});
</script>
<?php include 'google.php'; ?>
</body>
</html>