<?php

session_start();
?>

<?php 
if (isset($_SESSION['user_sessao']) && isset($_SESSION['user_senha'])) {
    /* TODO::Acho que vou ter que trabalhar com sessão aqui.*/
    /*incluir classe Banco_crud.php*/
    require_once './Banco_Crud.php';
    /*incluir classe Aluno.php*/
    require_once './Alunos.php';
    $obj_aluno = new Alunos(require_once './conexao.php');
    /*Rapaz que ganbiarra eu fin aqui KKKKKKKKK*/
    $obj_aluno->listar();
} else {
    echo 'Por favor realizar seu login no sistema!';
    echo '<br/><a href=index.php?page=login>Login</>';
}
예제 #2
0
파일: index.php 프로젝트: perrony/PHPPdo
           
               <table class="table">
                <thead class="table-bordered">
                    <tr >
                        <th class="table-bordered text-center" >ID</th>
                        <th class="table-bordered">Nome</th>
                        <th class="table-bordered text-center">Nota</th>
                        <th colspan="2" class="text-center">Ações</th>
                    </tr>
                    
                </thead> 
           
                
            <?php 
echo "<tbody>";
foreach ($alunos->listar($ordem, $busca, $range) as $aluno) {
    if ($log) {
        $ea = "EditAluno.php?id=" . $aluno['id'];
        $da = "DelAluno.php?id=" . $aluno['id'];
    } else {
        $ea = "#";
        $da = "#";
    }
    echo "<tr>";
    echo "<td class='table-bordered  text-center'>" . $aluno['id'] . "</td>";
    echo "<td class='table-bordered'>" . $aluno['nome'] . "</td>";
    echo "<td class='table-bordered text-center'>" . $aluno['nota'] . "</td>";
    echo "<td class='table-bordered text-center'><button class='btn btn-default'><a href={$ea}>Editar</a></button></td>";
    echo "<td class='table-bordered text-center'><button class='btn btn-danger'><a href={$da}>Del</a></button></td>";
    echo "</tr>";
}