Esempio n. 1
0
        <th>Nome Completo</th>
        <th>E-mail</th>
        <th>UF</th>
        <th>Status</th>
        <th>Tipo</th>
        <th>Sexo</th>
        <th colspan="2">Ações</th>
    </tr>

    <?php 
$conexao = new Consultas();
$conexao->conecta();
$txt = "";
$q = $conexao->query("SELECT * FROM usuario ORDER BY COD_USUARIO DESC");
$conexao->exibeRegistros();
$pg = $conexao->setPage(5, "index.php?link=5", "/cat/teste");
$i = 0;
while ($rs = $conexao->resultados("<center><br><br><br><br>Não existem registros nesta consulta<br><br><br><br></center>", 1)) {
    ?>
        <tr>
            <td><?php 
    echo $rs['COD_USUARIO'];
    ?>
</td>
            <td><?php 
    echo $rs['NOME_USUARIO'] . $rs['SOBRENOME_USUARIO'];
    ?>
</td>
            <td><?php 
    echo $rs['EMAIL_USUARIO'];
    ?>
Esempio n. 2
0
    ?>

            <table border="1px">
                <tr>
                    <th>Nome da categoria</th>
                    <th>Cor da categoria</th>
                    <th>Status da categoria</th>
                    <th colspan="2">Ações</th>
                </tr>
                <?php 
    $conexao = new Consultas();
    $conexao->conecta();
    $txt = "";
    $q = $conexao->query("SELECT * FROM categoria ORDER BY COD_CATEGORIA DESC");
    $conexao->exibeRegistros();
    $pg = $conexao->setPage(5, "index.php?link=1&l", "");
    $i = 0;
    while ($res = $conexao->resultados("<center><br><br><br><br>Não existem registros nesta consulta<br><br><br><br></center>", 1)) {
        if ($res['STATUS_CATEGORIA'] == 1) {
            $txtStatus = "Ativa";
        } else {
            $txtStatus = "Inativa";
        }
        ?>
                    <tr style="background-color: <?php 
        echo $res['COR_CATEGORIA'];
        ?>
">
                        <td><?php 
        echo $res['NOME_CATEGORIA'];
        ?>