"./?state=mf");
        parent::__construct('formDeleteFilm', $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'));
        //$errorTittle = self::createMensajeError($errores, 'tittle', 'span', array('class' => 'error'));
        //$errorDuration = self::createMensajeError($errores, 'duration', 'span', array('class' => 'error'));
        //$errorLanguage = self::createMensajeError($errores, 'language', 'span', array('class' => 'error'));
		//$errorDescription = self::createMensajeError($errores, 'description', 'span', array('class' => 'error'));
		//$errorImage = self::createMensajeError($errores, 'image', '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'] = "La pelicula seleccionada no existe.";
		}
        
        if (count($result) === 0) {
        	$bd = new Film_DAO("complucine");
			$exist = $bd-> existFilm($id);
			if( mysqli_num_rows($exist) == 1){
				$bd->deleteFilm($id);
				$_SESSION['message'] = "
										
										
										
										 Operacion realizada con exito 
										 Se ha eliminado la pelicula correctamente en la base de datos.
										
										 
										 
										
										 
					";
					$result = './?state=mf';
			}
			else{
				$result[] = "La pelicula seleccionada no existe.";
			}
			$exist->free();
		}
		return $result;
	}
}
?>