Exemplo n.º 1
0
 public function imageAction()
 {
     $this->_helper->layout()->disableLayout();
     $this->_helper->viewRenderer->setNoRender(true);
     $paramFolder = $this->_getParam('folder', null);
     try {
         $rpta = parent::uploadImage($paramFolder);
     } catch (Exception $ex) {
         $rpta = array('state' => 0, 'msj' => $ex->getMessage());
     }
     parent::response(200, $rpta);
 }
Exemplo n.º 2
0
 public function deleteAction()
 {
     $this->_helper->layout()->disableLayout();
     $this->_helper->viewRenderer->setNoRender(true);
     $id = $this->_getParam('id', 0);
     try {
         if (empty($id)) {
             throw new Exception('wrong params');
         }
         $obj = new Application_Entity_RunSql(self::_TABLECLASS);
         $obj->edit = array($obj->getPK() => $id, 'flagactive' => 0);
         $rpta = array('state' => 1, 'msg' => 'Item eliminado');
     } catch (Exception $exc) {
         $rpta = array('state' => 0, 'msj' => $exc->getMessage());
     }
     parent::response(200, $rpta);
 }
Exemplo n.º 3
0
 public function preDispatch()
 {
     parent::preDispatch();
 }
Exemplo n.º 4
0
 public function init()
 {
     parent::init();
     $this->_helper->layout->setLayout('layout-login');
 }