Exemplo n.º 1
0
} 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.
    $capitulos = getCapitulos($idTit);
} else {
    $idCap = getIdCapActivo($cap, $tit);
    if ($idCap) {
        $capitulos[0] = getInfoCap($idCap);
    } else {
        header('Location: ../404.html');
    }
}
for ($j = 0; $j < sizeof($capitulos); ++$j) {
    escribirCapitulo($capitulos[$j]);
}
?>
	</section>	

Exemplo n.º 2
0
for ($i = 0; $i < sizeof($titulos); ++$i) {
    ?>
	<div class="seccion-titulo">
		<h3>Título <?php 
    echo $titulos[$i][2];
    ?>
: <?php 
    echo $titulos[$i][1];
    ?>
</h3>
		<a class="link" href="fragmento.php?tit=<?php 
    echo $titulos[$i][2];
    ?>
">Imprimir</a>
<?php 
    $capitulos = getCapitulos($titulos[$i][0]);
    for ($j = 0; $j < sizeof($capitulos); ++$j) {
        ?>
			<div class="capitulo">
				<h4>Capítulo <?php 
        echo $capitulos[$j][2];
        ?>
: <?php 
        echo $capitulos[$j][1];
        ?>
</h4>
				<a class="link" href="fragmento.php?tit=<?php 
        echo $titulos[$i][2];
        ?>
&cap=<?php 
        echo $capitulos[$j][2];
Exemplo n.º 3
0
<?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';