Пример #1
0
 public function listar()
 {
     $model = new Pedido();
     $listar = $model->listar('pedido');
     return $listar;
 }
Пример #2
0
        $filtro .= " AND p.id = " . $_POST['id'];
    }
    if (isPost($_POST['de'])) {
        $filtro .= " AND p.data >= '" . data_to_mysql($_POST['de']) . "'";
    }
    if (isPost($_POST['ate'])) {
        $filtro .= " AND p.data <= '" . data_to_mysql($_POST['ate']) . "'";
    }
    if (isPost($_POST['cliente'])) {
        $nomePost = str_replace(" ", "%", $_POST['cliente']);
        $filtro .= "AND c.nome LIKE '%" . $nomePost . "%' ";
    }
    if (isPost($_POST['status'])) {
        $filtro .= "AND p.id_status = " . $_POST['status'] . " ";
    }
    $listar = Pedido::listar($filtro . " ORDER BY id DESC");
    if (is_array($listar)) {
        //echoArray($listar);
        ?>
				
            <div class="table-responsive">
                <table class="table table-bordered table-hover table-striped table-condensed mb-none">
                    <thead>
                        <tr>
                            <th>Id</th>
                            <th>Nome</th>
                            <th>E-mail</th>
                            <th>Total</th>
                            <th class="text-center">Data</th>
                            <th class="text-center">Status</th>
                            <th class="text-center">Ação</th>