示例#1
0
function Eliminar()
{
    $user = new CL_USUARIO();
    $usuarios = $user->ObtenerUsuarios();
    ?>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <h3 class="box-title">Tabla de Usuario</h3>
                    </div><!-- /.box-header -->
                    <div class="box-body">
                        <table id="example2" class="table table-bordered table-hover">
                            <thead>
                                <tr>
                                    <th align="center">Usuario</th>
                                    <th align="center">Eliminar</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php 
    for ($index = 0; $index < count($usuarios); $index++) {
        ?>
                                <tr>
                                    <td align="center"><?php 
        echo $usuarios[$index]->strUsuario;
        ?>
</td>
                                    <td align="center">
                                        <form action="./INCLUDES/Usuarios.php?act=2" method="POST">
                                            
                                            <input type="hidden" name="id" value="<?php 
        echo $usuarios[$index]->intId;
        ?>
 ">
                                            
                                            <input type="submit" value="eliminar" name="eliminar" class="btn btn-danger">
                                        </form>
                                    </td>
                                </tr>
                                <?php 
    }
    ?>
                            </tbody>
                        </table>
                    </div><!-- /.box-body -->
                </div><!-- /.box -->


            </div><!-- /.col -->
        </div><!-- /.row -->
    </section><!-- /.content -->
    <?php 
}
示例#2
0
文件: Usuarios.php 项目: keua/DeGuate
function Autenticar()
{
    $user = $_POST['usuario'];
    $pass = $_POST['password'];
    $usuario = new CL_USUARIO();
    $aut = $usuario->Autenticar($user, $pass);
    if ($aut) {
        //session_start();
        $_SESSION['user'] = $user;
        header("Location:../InfoGeneralAdmin.php?act=1");
    } else {
        header("Location:../Login.php");
    }
}