"./?state=mg");
        parent::__construct('formDeleteManager', $options);
    }
	protected function generaCamposFormulario($datos, $errores = array()){
       
        // Se generan los mensajes de error si existen.
        $htmlErroresGlobales = self::generaListaErroresGlobales($errores);
        $errorId = self::createMensajeError($errores, 'id', 'span', array('class' => 'error'));
        //$errorIdCinema = self::createMensajeError($errores, 'idcinema', 'span', array('class' => 'error'));
		$html = '
                    
                     
                        
                        
                    
                 ';
        return $html;
    }
	protected function procesaFormulario($datos){
        $result = array();
        
        $id = $this->test_input($datos['id']) ?? null;
        if (is_null($id) ) {
            $result['id'] = "ERROR. No existe un manager con ese ID";
        }
        
        if (count($result) === 0) {
            $bd = new Manager_DAO('complucine');
            $exist = $bd-> GetManager($id);
            if( mysqli_num_rows($exist) == 1){
                $bd->deleteManager($id);
                $_SESSION['message'] = "
                                        
                                        
                                            
                                                 Operacion realizada con exito 
                                                 Se ha eliminado el gerente correctamente en la base de datos.
                                                
                                             
                                        
                                     ";
                $result = './?state=mg';
            }
            else{
                $result[] = "ERROR. No existe un manager con ese ID";
            }
            
            	
		}
		return $result;
	}
}
?>