public function index_action($pagina = 1) { $session = new session(); $session->sessao_valida(); $_SESSION['pagina'] = $pagina; $this->smarty->assign('paginador', $this->mostraGrid()); $this->smarty->assign('title', 'Departamentos'); $this->smarty->display('departamento/index.tpl'); }
public function index_action($pagina = 1) { $session = new session(); $session->sessao_valida(); $_SESSION['pagina'] = $pagina; $this->smarty->assign('paginador', $this->mostraGrid()); $this->smarty->assign('title', 'Estados'); //call the smarty $this->smarty->display('estado/index.tpl'); }
public function index_action() { $session = new session(); $session->sessao_valida(); $modelEvento = new eventoModel(); $resEvento = $modelEvento->getEvento('stat<>0'); //send the records to template sytem $this->smarty->assign('evento', $resEvento); $this->smarty->assign('title', 'Emissão de Crachá'); $this->smarty->assign('listacliente', null); //call the smarty $this->smarty->display('cracha/index.tpl'); }
public function index_action($pagina = 1) { $session = new session(); $session->sessao_valida(); $_SESSION['pagina'] = $pagina; //list all records $cidade_model = new cidadeModel(); //send the records to template sytem $this->smarty->assign('title', 'Cidades'); $this->smarty->assign('paginador', $this->mostraGrid()); //call the smarty $this->smarty->display('cidade/index.tpl'); }
public function relatorio() { $session = new session(); $session->sessao_valida(); $model = new model(); $this->smarty->assign('listacliente', null); if (isset($_POST['nome_cliente']) && isset($_POST['des_evento'])) { $sql = "" . " SELECT " . " ec . *," . " c.nome_cliente," . " e.des_evento" . " FROM evento_cliente ec " . " LEFT JOIN cliente c ON (c.id_cliente = ec.id_cliente) " . " LEFT JOIN evento e ON (e.id_evento = ec.id_evento) " . " WHERE ec.stat <> 0 "; if ($_POST['nome_cliente'] != '') { $nome_cliente = $_POST['nome_cliente']; $sql .= " AND c.nome_cliente LIKE '%{$nome_cliente}%'"; } if ($_POST['des_evento'] != '') { $des_evento = $_POST['des_evento']; $sql .= " AND e.des_evento LIKE '%{$des_evento}%'"; } $resBusca = $model->readSQL($sql); $this->smarty->assign('listacliente', $resBusca); } $this->smarty->assign('title', 'Participantes'); $this->smarty->display('participacao/relatorio.tpl'); }
public function relatorio() { $session = new session(); $session->sessao_valida(); $this->smarty->assign('title', 'Busca Clientes'); $this->smarty->assign('listacliente', null); if (isset($_POST['nome_cliente']) && isset($_POST['cpf_cliente']) && isset($_POST['rg_cliente']) && isset($_POST['cracha_stat'])) { $modelCliente = new clienteModel(); $nome_cliente = $_POST['nome_cliente']; $cpf_cliente = $_POST['cpf_cliente']; $rg_cliente = $_POST['rg_cliente']; $cracha_stat = $_POST['cracha_stat']; $where = "stat<>0"; if ($nome_cliente != '') { $where .= " AND nome_cliente like '%{$nome_cliente}%' "; } if ($rg_cliente != '') { $where .= " AND rg_cliente like '%{$rg_cliente}%' "; } if ($cpf_cliente != '') { $where .= " AND cpf_cliente like '%{$cpf_cliente}%' "; } if ($cracha_stat != '') { $where .= " AND cracha_stat like '%{$cracha_stat}%' "; } $resCliente = $modelCliente->getCliente($where); $this->smarty->assign('listacliente', $resCliente); } $this->smarty->display('cliente/relatorio.tpl'); }