public function edit()
 {
     //die();
     $id = $this->getParam('id_cidade');
     $modelCidade = new cidadeModel();
     $resCidade = $modelCidade->getCidade('id_cidade=' . $id);
     $estado_model = new estadoModel();
     $estado_res = $estado_model->getEstado('stat<>0');
     $this->smarty->assign('registro', $resCidade[0]);
     $this->smarty->assign('estado', $estado_res);
     $this->smarty->assign('id_choosen', $resCidade[0]['id_estado']);
     $this->smarty->assign('title', 'Atualizar Cidade');
     //call the smarty
     $this->smarty->display('cidade/update.tpl');
 }
 public function edit()
 {
     //die();
     $id = $this->getParam('id');
     $modelevento = new eventoModel();
     $resevento = $modelevento->getEvento('e.codigo=' . $id);
     $this->smarty->assign('registro', $resevento[0]);
     $model_statuseventos = new statuseventoModel();
     $statuseventos_res = $model_statuseventos->getStatusEvento();
     //Full table Scan :( or :)
     //send the records to template sytem
     $this->smarty->assign('liststatusevento', $statuseventos_res);
     //list all records
     $model_cidade = new cidadeModel();
     $cidade_res = $model_cidade->getCidade();
     //Full table Scan :( or :)
     //send the records to template sytem
     $this->smarty->assign('listscidade', $cidade_res);
     $this->smarty->assign('title', 'Detalhes dos Eventos');
     //call the smarty
     $this->smarty->display('evento/edit.tpl');
 }
 public function edit()
 {
     //die();
     $id = $this->getParam('id');
     $modelcidade = new cidadeModel();
     $rescidade = $modelcidade->getCidade('c.codigo=' . $id);
     $this->smarty->assign('registro', $rescidade[0]);
     //chama estado
     $model_estados = new estadoModel();
     $estados_res = $model_estados->getEstado('');
     //Full table Scan :( or :)
     //send the records to template sytem
     $this->smarty->assign('listestado', $estados_res);
     //list all records
     $model_cidade = new cidadeModel();
     $cidade_res = $model_cidade->getCidade();
     //Full table Scan :( or :)
     //send the records to template sytem
     $this->smarty->assign('listscidade', $cidade_res);
     $this->smarty->assign('title', 'Detalhes Cidade');
     //call the smarty
     $this->smarty->display('cidade/edit.tpl');
 }
 public function edit()
 {
     $model_estado = new estadoModel();
     $model_cidade = new cidadeModel();
     $model = new clienteModel();
     $id = $this->getParam('id_cliente');
     $res = $model->getCliente('id_cliente=' . $id . ' AND stat<>0');
     $resEstado = $model_estado->getEstado('stat<>0');
     $resCidade = $model_cidade->getCidade('stat<>0');
     $this->smarty->assign('cliente', $res[0]);
     $this->smarty->assign('cidade', $resCidade);
     $this->smarty->assign('estado', $resEstado);
     $this->smarty->assign('id_choosen_cidade', $res[0]['id_cidade']);
     $this->smarty->assign('id_choosen_estado', $res[0]['id_estado']);
     $this->smarty->assign('title', 'Atualizar cliente');
     //call the smarty
     $this->smarty->display('cliente/update.tpl');
 }
 public function edit()
 {
     $cidadeModel = new cidadeModel();
     $id = $this->getParam('id_evento');
     $model = new model();
     $modelCidade = new cidadeModel();
     $resCidade = $modelCidade->getCidade('stat<>0');
     $res = $model->readSQL('SELECT e.*,c.des_cidade FROM evento e LEFT JOIN cidade c ON (c.id_cidade=e.id_cidade) WHERE e.stat<>0 AND e.id_evento=' . $id);
     $this->smarty->assign('evento', $res[0]);
     $this->smarty->assign('title', 'Atualizar evento');
     $this->smarty->assign('cidade', $resCidade);
     //call the smarty
     $this->smarty->display('evento/update.tpl');
 }