?> <h2>Fragmento: "Capítulo <?php echo $cap; ?> del Título <?php echo $tit; ?> "</h2> <?php } ?> </header> <?php $idTit = getIdTitActivo($tit); if ($idTit) { $infoTit = getInfoTit($idTit); } else { header('Location: ../404.html'); } ?> <section class="seccion-titulo"> <h3>Título <?php echo $infoTit[2]; ?> : <?php echo $infoTit[1]; ?> </h3> <?php if ($cap == 0) { // So pro... It works with an array or an element.
<?php include 'scripts/funciones.php'; if (haIniciadoSesion()) { if (isset($_GET['cap'])) { $nro = intval($_GET['cap']); if ($nro <= 1) { $nro = 1; } } else { $nro = 1; } $articulos = getArticulos($nro); $infoCap = getInfoCap($nro); $infoTit = getInfoTit($infoCap[4]); if (empty($infoTit)) { header('Location: 404.html'); } } else { header('Location: login.php'); } ?> <!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8"> <title>Artículos</title> <link rel="stylesheet" href="css/estilos.css"> </head> <body> <?php
<?php include 'scripts/funciones.php'; if (haIniciadoSesion()) { if (isset($_GET['title'])) { $nro = intval($_GET['title']); if ($nro <= 1) { $nro = 1; } } else { $nro = 1; } $capitulos = getCapitulos($nro); $infoTit = getInfoTit($nro); if (empty($infoTit)) { header('Location: 404.html'); } } else { header('Location: login.php'); } ?> <!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8"> <title>Capítulos</title> <link rel="stylesheet" href="css/estilos.css"> </head> <body> <?php require_once 'header.php';