Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function indexAction()
- {
- if(!Zend_Auth::getInstance()->hasIdentity()){
- $this->redirect("/");die;
- }
- $form = new Application_Form_TramtAsociacion();
- if($this->getRequest()->isPost()){
- $datos = $this->_request->getParams();
- if ( $form->isValid( $datos ) ){
- if ( $this->guardar($datos['idrs'],$datos['tasoci'],$datos['nroresg'],$datos['fresg'],$datos['domcleg'],$datos['estado'],
- $datos['not_mem'],$datos['cert_aprob'],$datos['poder'],$datos['act_fun'],
- $datos['act_elec'],$datos['est_org'],$datos['act_aest'],$datos['list_asc'],$datos['cd_respl']) ){
- $Reserva=$this->entityManager->getRepository("Sistema\Entity\ResvNom")->find($datos['idrs']);
- $id_tr=$Reserva->getTramiteTrmte()->getTrmteId();
- $nrotramt=$this->entityManager->getRepository("Sistema\Entity\Tramite")->find($id_tr);
- $upload = $form->resimg->getTransferAdapter();
- $upload->addFilter('Rename', array(
- 'target' => APPLICATION_PATH . '/../public/archivos/asociacion/'.$nrotramt->getNroTrmte().'.pdf',
- 'overwrite' => true
- ));
- var_dump( $upload->receive() );
- $upload2 = $form->info->getTransferAdapter();
- $upload2->addFilter('Rename', array(
- 'target' => APPLICATION_PATH . '/../public/archivos/asociacion/'.$nrotramt->getNroTrmte().'.docx',
- 'overwrite' => true
- ));
- var_dump( $upload->receive() );
- $this->_helper->flashMessenger->addMessage('Ficha personal almacenada correctamente');
- $this->_redirect('/tramtAsociacion/listar');
- }else{
- $this->_helper->flashMessenger->addMessage('Ocurrio un error, intentelo nuevamente');
- $this->_redirect('/tramtAsociacion');
- }
- }
- }
- $this->view->formulario = $form;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement