login=$login; } function doStuff () { return (centroDAO::getCentroByLogin($this->connection,$this->login)); } } ?> connection)); } } ?> centro=$centro; } function doStuff () { // Miramos si existe un usuario con el mismo login if (usuarioDAO::exists($this->connection,$this->centro->getLogin())) { return FALSE; } // Miramos si existe otro centro con el mismo login if (centroDAO::existsByLogin($this->connection,$this->centro->getLogin())) { return FALSE; } // Contrastamos el tipo de centro y la listade actividades prohibidas // indicados con los posibles, para pasarle al DAO un VO válido $newTipo=$this->checkTipo($this->centro->getTipo()); $newProhibidas=$this->checkProhibidas($this->centro->getProhibidas()); $this->centro->setTipo($newTipo); $this->centro->setProhibidas($newProhibidas); return (centroDAO::createCentro($this->connection,$this->centro)); } function checkTipo($tipo) { global $perfil_centro; $newTipos=array(); $tipos=explode(",", $tipo); foreach ($tipos as $tipoActual) { $u_tipo=strtoupper($tipoActual); if (array_key_exists($u_tipo, $perfil_centro)) { // añadimos el tipo si no existe ya if (!in_array($u_tipo, $newTipos)) { $newTipos[] = $u_tipo; } } } $newTipo=implode(",",$newTipos); return $newTipo; } function checkProhibidas($prohibidas) { // TODO return $prohibidas; } } ?> login=$login; } function doStuff () { return (centroDAO::existsByLogin($this->connection,$this->login)); } } ?> centro=$centro; } function doStuff () { return (centroDAO::updateCentro($this->connection,$this->centro)); } } ?> centroId=$centroId; } function doStuff () { return (centroDAO::deleteCentro($this->connection,$this->centroId)); } } ?> nomeDocente = $nomeDocente; $this->correoDocente = $correoDocente; $this->idCentro = $idCentro; $this->idUsuario = $idUsuario; } function doStuff() { return (centroDAO::rexistrarHistoricoCentroContrasinal($this->connection, $this->nomeDocente, $this->correoDocente, $this->idCentro, $this->idUsuario)); } } ?> idCentro = $idCentro; } function doStuff() { return (centroDAO::getHistoricoCentroContrasinal($this->connection, $this->idCentro)); } } ?> login=$login; } function doStuff () { return(usuarioDAO::getUsuario($this->connection,$this->login)); } } ?> connection)); } } ?> usuario=$usuario; } function doStuff () { if (usuarioDAO::exists($this->connection,$this->usuario->getLogin())) { return FALSE; } else { if (centroDAO::existsByLogin($this->connection,$this->usuario->getLogin())) { return FALSE; } return (usuarioDAO::createUsuario($this->connection,$this->usuario)); } } } ?> usuario=$usuario; } function doStuff () { return (usuarioDAO::updateUsuario($this->connection,$this->usuario)); } } ?> login=$login; } function doStuff () { return (usuarioDAO::deleteUsuario($this->connection,$this->login)); } } ?> login=$login; } function doStuff () { return (usuarioDAO::exists($this->connection,$this->login)); } } ?> idUsuario = $idUsuario; } function doStuff() { return (usuarioDAO::getUsuarioById($this->connection, $this->idUsuario)); } } ?> id = $id; $this->nombre = $nombre; $this->url = $url; $this->perfil = $perfil; $this->observaciones = $observaciones; $this->abierto = $abierto; $this->tabla = $tabla; $this->orden = $orden; $this->grupo = $grupo; } function getId() { return ($this->id); } function setId($id) { $this->id = $id; } function getNombre() { return ($this->nombre); } function setNombre($nombre) { $this->nombre = $nombre; } function getUrl() { return ($this->url); } function setUrl($url) { $this->url = $url; } function getObservaciones() { return ($this->observaciones); } function setObservaciones($observaciones) { $this->observaciones = $observaciones; } function getPerfil() { return ($this->perfil); } function setPerfil($perfil) { $this->perfil = $perfil; } function getAbierto() { //global $sessionFacade; // //$centro = $sessionFacade->getCentro(); //if (!empty($centro)) { // if (strcmp($centro->getLogin(), "pruebasx") == 0) // return (false); // // MARCOS: Estas dos lineas son una chapuza, para abrir el plazo del IMCE a todo el mundo, simplemente bórralas. // //elseif (($this->getId()==23) && (trim(strstr($centro->getTipo(), 'F'))=='F')) // //return(true); //} return ($this->abierto); } function setAbierto($abierto) { $this->abierto = $abierto; } function getTabla() { return ($this->tabla); } function setTabla($tabla) { $this->tabla = $tabla; } function getOrden() { return ($this->orden); } function setOrden($orden) { $this->orden = $orden; } public function getGrupo() { return $this->grupo; } public function setGrupo($grupo) { $this->grupo = $grupo; } public function actividadeCubertaFichaXeral($idCentro) { if (!isset($actividadFacade)) { $actividadFacade = new actividadFacade(); } return $actividadFacade->actividadeCubertaFichaXeral($this->id, $idCentro); } /** * @return bool */ public function isResumoPechado() { return $this->resumoPechado; } } // Aviso de cuenta compartida en cambio de password // Mensajes de error están en castellano // ?> doExecute()); } function getActividad($actividadId) { $action=new getActividadAction($actividadId); return ($action->doExecute()); } function getActividadFromTable($tabla) { $action=new getActividadFromTableAction($tabla); return ($action->doExecute()); } function existsActividad($actividadId) { $action=new existsActividadAction($actividadId); return ($action->doExecute()); } function deleteActividad($actividadId) { $action=new deleteActividadAction($actividadId); return ($action->doExecute()); } function getAllActividades() { $action=new getAllActividadesAction(); return ($action->doExecute()); } function updateActividad($actividad) { $action=new updateActividadAction($actividad); return ($action->doExecute()); } function abrirPlazo($actividadId) { $action=new abrirPlazoAction($actividadId); return ($action->doExecute()); } function cerrarPlazo($actividadId) { $action=new cerrarPlazoAction($actividadId); return ($action->doExecute()); } function actividadeCubertaFichaXeral($actividadId, $centroId) { $action=new actividadeCubertaFichaXeral($actividadId, $centroId); return ($action->doExecute()); } } ?> doExecute()); } function tenFichaXeralAction($centroId,$tabla) { $action=new tenFichaXeralAction($centroId,$tabla); return ($action->doExecute()); } } ?> login=$login; } function doStuff () { return (empresaDAO::getEmpresaByLogin($this->connection,$this->login)); } } ?>login=$login; } function doStuff () { return (empresaDAO::existsEmpresa($this->connection,$this->login)); } } ?>