public function getUsuariById() { $request = $this->getAjaxData(); if ($request['isNew']) { $CTO = new ClientTableObject(NULL, ClientTableObject::FROM_EMPTY); echo json_encode($CTO); } else { $CTO = new ClientTableObject(NULL, ClientTableObject::FROM_EMPTY); $CTO->loadById($request['idU']); echo json_encode($CTO); } }
public function ajaxGetClientEspectacles() { if ($this->isAuth()) { $CTO = new ClientTableObject(); $CTO->loadById($this->idU); echo json_encode($CTO->getComandes()); } else { throw new MyException("Permisos insuficients"); } }