<?php
$retiros = "retiros.txt";
$depositos = "depositos.txt";

$recurso = false;
if (file_exists($depositos)|| file_exists($retiros)) {
    $recurso = fopen($retiros,"r");
    $recurso = fopen($depositos,"r");
}
if ($recurso == false) {
    echo "<p>No existen datos</p>";
} else {

    echo "<h3>DEPOSITOS</h3>";
    echo "<table border = '1'>";
    echo "<tr>";
    echo "<th>Carnet</th>";
    echo "<th>Hora del deposito</th>";
    echo "<th>Fecha del deposito</th>";
    echo "<th>Nombre</th>";
    echo "<th>Nombre del depositante</th>";
    echo "<th>Monto del deposito</th>";
    echo "</tr>";
    echo "</table>";
    $nota1 = trim($registro[5]);
    $nota2 = trim($registro[6]);
    $nota3 = trim($registro[7]);
    $nota4 = trim($registro[8]);
    echo "<h3>RETIROS</h3>";
    echo "<table border = '1'>";
    echo "<tr>";
    echo "<th>Carnet</th>";
    echo "<th>Hora del deposito</th>";
    echo "<th>Fecha del deposito</th>";
    echo "<th>Monto del retiro</th>";
    echo "</tr>";
    echo "</table>";
    fclose($recurso);
}
?>