コード例 #1
0
            break;
        case 2:
            $cat_nome = 'Evento';
            break;
        case 3:
            $cat_nome = 'Ingresso';
            break;
    }
    $lowcat = strtolower($cat_nome);
    include_once 'include/categoria.php';
    $categoria = new TipoCategoria($db, $lowcat);
    $order = $_GET['ordem'];
    $stmt = $categoria->readAll($page, $from_record_num, $records_per_page, $order);
    $num = $categoria->countAll();
    if ($_POST) {
        $stmt = $categoria->searchAll($page, $from_record_num, $records_per_page, $_GET['ordem'], $_POST['pesquisa']);
        $num = $categoria->countSearchAll($_POST['pesquisa']);
    } else {
        $stmt = $categoria->readAll($page, $from_record_num, $records_per_page, $_GET['ordem']);
        $num = $categoria->countAll();
    }
    $url = 'categorias.php?ordem=1&tipo=' . $_GET['tipo'];
}
?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
        <title>Área Restrita - Categorias</title>
        <meta name="keywords" content="" />