<?php 

$personal=new Personal;
$result=$personal->mostrar();
foreach ($result as $fila) {
    ?>
    <tr id="mover">
        <td><?php print $fila['id_per'];  ?></td>
        <td><?php print $fila['numDoc_per']." ".$fila['expeditoDoc_per']; ?></td>
        <td><?php print $fila['gradoAcad_per']." ".$fila['nom_per']." ".$fila['primerAp_per']." ".$fila['segundoAp_per']; ?></td>
        <td><?php print $fila['numCelu_per']; ?></td>
        <td><?php print $fila['nom_dir']; ?></td>
        <td><?php print $fila['nom_uni']; ?></td>
        <td><?php print $fila['cargo']; ?></td>
        <?php 
        if($fila['estado_per']=='ACTIVO'){
        ?>
        <td>
            <form name="" action="" method="POST">
                <input type="hidden" name="id_per" value="<?php print $fila['id_per']; ?>">
                <input type="hidden" name="estado_per" value="PASIVO">
                <button name="estado" class="btn btn-outline-success btn-sm" title="Hacer clic para PASIVO">ACTIVO</button>
            </form>
        </td>
        <?php 
        }else{
        ?>
        <td>
            <form name="" action="" method="POST">
                <input type="hidden" name="id_per" value="<?php print $fila['id_per']; ?>">
                <input type="hidden" name="estado_per" value="ACTIVO">
                <button type="submit" name="estado" class="btn btn-outline-danger btn-sm" title="Hacer clic para ACTIVO">PASIVO</button>
            </form>
        </td>
        <?php 
        }
        ?>
        <td>
            <form name="" action="personalEditar.php" method="POST">
                <input type="hidden" name="id_per" value="<?php print $fila['id_per']; ?>">
                <input type="hidden" name="numDoc_per" value="<?php print $fila['numDoc_per'];  ?>">
                <input type="hidden" name="expeditoDoc_per" value="<?php print $fila['expeditoDoc_per']; ?>">
                <input type="hidden" name="nom_per" value="<?php print $fila['nom_per']; ?>">
                <input type="hidden" name="primerAp_per" value="<?php print $fila['primerAp_per']; ?>">
                <input type="hidden" name="segundoAp_per" value="<?php print $fila['segundoAp_per']; ?>">
                <input type="hidden" name="fechaNac_per" value="<?php print $fila['fechaNac_per']; ?>">
                <input type="hidden" name="correo_per" value="<?php print $fila['correo_per']; ?>">
                <input type="hidden" name="numCelu_per" value="<?php print $fila['numCelu_per']; ?>">
                <input type="hidden" name="id_dir" value="<?php print $fila['id_dir']; ?>">
                <input type="hidden" name="nom_dir" value="<?php print $fila['nom_dir']; ?>">
                <input type="hidden" name="id_uni" value="<?php print $fila['id_uni'];  ?>">
                <input type="hidden" name="nom_uni" value="<?php print $fila['nom_uni'];  ?>">
                <input type="hidden" name="cargo" value="<?php print $fila['cargo']; ?>">
                <input type="hidden" name="gradoAcad_per" value="<?php print $fila['gradoAcad_per']; ?>">
                <button type="submit" name="editarP" class="btn btn-outline-primary btn-sm"><i class="far fa-edit"></i>E</button>
            </form>
        </td>
        <td>
            <form name="" action="viajesRegistro.php" method="POST">
                <input type="hidden" name="id_per" value="<?php print $fila['id_per']; ?>">
                <input type="hidden" name="numDoc_per" value="<?php print $fila['numDoc_per'];  ?>">
                <input type="hidden" name="expeditoDoc_per" value="<?php print $fila['expeditoDoc_per']; ?>">
                <input type="hidden" name="nom_per" value="<?php print $fila['nom_per']; ?>">
                <input type="hidden" name="primerAp_per" value="<?php print $fila['primerAp_per']; ?>">
                <input type="hidden" name="segundoAp_per" value="<?php print $fila['segundoAp_per']; ?>">
                <input type="hidden" name="fechaNac_per" value="<?php print $fila['fechaNac_per']; ?>">
                <input type="hidden" name="numCelu_per" value="<?php print $fila['numCelu_per']; ?>">
                <input type="hidden" name="id_dir" value="<?php print $fila['id_dir']; ?>">
                <input type="hidden" name="nom_dir" value="<?php print $fila['nom_dir']; ?>">
                <input type="hidden" name="id_uni" value="<?php print $fila['id_uni'];  ?>">
                <input type="hidden" name="nom_uni" value="<?php print $fila['nom_uni'];  ?>">
                <input type="hidden" name="cargo" value="<?php print $fila['cargo']; ?>">
                <input type="hidden" name="gradoAcad_per" value="<?php print $fila['gradoAcad_per']; ?>">
                <button  type="submit" name="viaje" class="btn btn-outline-success btn-sm"><i class="fas fa-long-arrow-alt-right"></i>CV</button>
            </form>
        </td>
        <td>
            <form name="" action="permisosLicRegistro.php" method="POST">
                <input type="hidden" name="id_per" value="<?php print $fila['id_per']; ?>">
                <input type="hidden" name="numDoc_per" value="<?php print $fila['numDoc_per'];  ?>">
                <input type="hidden" name="expeditoDoc_per" value="<?php print $fila['expeditoDoc_per']; ?>">
                <input type="hidden" name="nom_per" value="<?php print $fila['nom_per']; ?>">
                <input type="hidden" name="primerAp_per" value="<?php print $fila['primerAp_per']; ?>">
                <input type="hidden" name="segundoAp_per" value="<?php print $fila['segundoAp_per']; ?>">
                <input type="hidden" name="fechaNac_per" value="<?php print $fila['fechaNac_per']; ?>">
                <input type="hidden" name="numCelu_per" value="<?php print $fila['numCelu_per']; ?>">
                <input type="hidden" name="id_dir" value="<?php print $fila['id_dir']; ?>">
                <input type="hidden" name="nom_dir" value="<?php print $fila['nom_dir']; ?>">
                <input type="hidden" name="id_uni" value="<?php print $fila['id_uni'];  ?>">
                <input type="hidden" name="nom_uni" value="<?php print $fila['nom_uni'];  ?>">
                <input type="hidden" name="cargo" value="<?php print $fila['cargo']; ?>">
                <input type="hidden" name="gradoAcad_per" value="<?php print $fila['gradoAcad_per']; ?>">
                <button type="submit" name="perLic" class="btn btn-outline-info btn-sm"><i class="fas fa-chevron-right"></i>P/L</button>
            </form>
            
        </td>
    </tr>
    <?php 
}

?>