Fondear

07 jul. 2026 · Fomento DGMM

La DGMM facilita los trámites del abanderamiento y la matriculación de embarcaciones

La DGMM facilita los trámites del abanderamiento y la matriculación de embarcaciones
<% dim strVolver ' Almacenamos la direccion para la vuelta desde la Galeria Session("REFERER2")=Request.ServerVariables("URL") if Request.Form<>"" then Session("REFERERPARAMETROS2")=Request.Form else Session("REFERERPARAMETROS2")=Request.QueryString end if ' Construimos el enlace de vuelta a la pagina de la que vinimos if Session("REFERER1")<>"" then strVolver="     Volver" end if 'Miramos los parametros que nos han llegado dim intIDNoticia intIDNoticia=Trim(Request.Form("IDNoticia")) if (intIDNoticia="" and Request.Querystring("IDNoticia")<>"") then intIDNoticia=Request.Querystring("IDNoticia") end if 'Construimos la consulta SQL dim strSelect strSelect="SELECT IDNOTICIA, TITULO, FECHA, ANIO, NOTICIA, URLAMPLIACION FROM NOTICIAS WHERE IDNOTICIA=" & intIdNoticia dim strResultado, rsBusqueda strResultado="" 'Hacemos ahora el recordset para extraer la informacion del resultado set rsBusqueda=CreaRecordset(cnDataBase, strSelect, 0) if Err.number<>0 then cnDataBase.Close set cnDataBase=nothing Response.Redirect "/Boats/Error.asp?IdError=50007" end if if rsBusqueda.BOF and rsBusqueda.EOF then rsBusqueda.close set rsBusqueda=nothing cnDataBase.Close set cnDataBase=nothing Response.Redirect "/Boats/Error.asp?IdError=50018" end if 'Ahora construimos la tabla de resultado, y la almacenamos en la variable strResultado dim strRutaImagen, FileSystem, DirectorioRaiz, DirectorioFotos, strIdNoticia, strEnlaceMas, strFechaNoticia 'Construimos el texto de la fecha, tenemos que extraer el mes y año de la fecha de la noticia Select Case Month(rsBusqueda("FECHA")) Case 1: strFechaNoticia="Enero " & rsBusqueda("ANIO") Case 2: strFechaNoticia="Febrero " & rsBusqueda("ANIO") Case 3: strFechaNoticia="Marzo " & rsBusqueda("ANIO") Case 4: strFechaNoticia="Abril " & rsBusqueda("ANIO") Case 5: strFechaNoticia="Mayo " & rsBusqueda("ANIO") Case 6: strFechaNoticia="Junio " & rsBusqueda("ANIO") Case 7: strFechaNoticia="Julio " & rsBusqueda("ANIO") Case 8: strFechaNoticia="Agosto " & rsBusqueda("ANIO") Case 9: strFechaNoticia="Septiembre " & rsBusqueda("ANIO") Case 10: strFechaNoticia="Octubre " & rsBusqueda("ANIO") Case 11: strFechaNoticia="Noviembre " & rsBusqueda("ANIO") Case 12: strFechaNoticia="Diciembre " & rsBusqueda("ANIO") End Select 'Construimos el enlace de ampliacion de la noticia if (rsBusqueda("URLAMPLIACION")<>"") then strEnlaceMas="Mas Informacion..." else strEnlaceMas="" end if dim strGaleriaFotos, Enlace, intNumeroFoto dim Directorio, Archivo, Archivos, Nombre, strNumFoto DirectorioRaiz=Server.MapPath("/Fondear.mdb") DirectorioRaiz=Mid(DirectorioRaiz,1,Len(DirectorioRaiz)-11) Set FileSystem=Server.CreateObject("Scripting.FileSystemObject") 'Construimos el nombre del fichero de la foto grande, a partir del IDNOTICIA con 8 cifras completadas 'con ceros por la izda hasta tener 8 digitos, un guion bajo y el número 00p.jpg Ej: 00004236_00p.jpg strIdNoticia="00000000" & intIdNoticia strIdNoticia=Mid(strIdNoticia, Len(strIdNoticia)-7, 8) DirectorioFotos=DirectorioRaiz &"images\Noticias\"& strIdNoticia strRutaImagen="" 'Constriumos la Galeria de fotos strGaleriaFotos="" if FileSystem.FolderExists(DirectorioFotos) then if FileSystem.FileExists(DirectorioFotos& "\" & intIdNoticia & "_00g.jpg") then strRutaImagen="" else strRutaImagen="" end if strGaleriaFotos="" Set Directorio=FileSystem.Getfolder(DirectorioFotos) Set Archivos=Directorio.files intNumeroFoto=1 For Each Archivo in Archivos 'Asumimos que en esta carpeta solo hay fotos, y que todas acaban el p o g Nombre = Archivo.Name 'Si es g, vemos si tiene su correspondiente p y de no ser asi ponemos la g 'Si es p, la ponemos en la galeria if (UCase(Mid(Nombre,Len(Nombre)-4,1))="P") or ((UCase(Mid(Nombre,Len(Nombre)-4,1))="G") and (not FileSystem.FileExists(Mid(Archivo.Path,1,Len(Archivo.Path)-5) &"p.jpg"))) then Enlace = Archivo.Path Enlace = Replace(Enlace, DirectorioRaiz,"/") Enlace = Replace(Enlace,"\","/") strNumFoto=Mid(Nombre,Len(Nombre)-6,2) if intNumeroFoto=1 then strGaleriaFotos=strGaleriaFotos & "" end if strGaleriaFotos=strGaleriaFotos & "" if intNumeroFoto=6 then strGaleriaFotos=strGaleriaFotos & "" intNumeroFoto=0 end if intNumeroFoto=intNumeroFoto + 1 end if Next strGaleriaFotos=strGaleriaFotos & "
 
" end if 'Comenzamos a construir la tabla de la noticia strResultado=strResultado & "" strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " if strGaleriaFotos<>"" then strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " strResultado=strResultado & " " end if 'Finalizamos la tabla de las noticias encontradas strResultado=strResultado & "
 " strResultado=strResultado & "

" & strFechaNoticia & "

" strResultado=strResultado & "
" strResultado=strResultado & " " strResultado=strResultado & "" & rsBusqueda("TITULO") & "" strResultado=strResultado & "
" strResultado=strResultado & "  " strResultado=strResultado & "
" strResultado=strResultado & " " strResultado=strResultado & " " & strRutaImagen strResultado=strResultado & "
" strResultado=strResultado & "  " strResultado=strResultado & "
" 'strResultado=strResultado & " " strResultado=strResultado & "" & rsBusqueda("NOTICIA") & "" strResultado=strResultado & "
" strResultado=strResultado & strEnlaceMas strResultado=strResultado & "
" strResultado=strResultado & " " strResultado=strResultado & "
" strResultado=strResultado & strGaleriaFotos strResultado=strResultado & "
" strResultado=strResultado & " " strResultado=strResultado & "
" rsBusqueda.close set rsBusqueda=nothing cnDataBase.Close set cnDataBase=nothing %> Noticias y novedades de nautica (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-NQHMZQJB');

e-Magazine       Home         

Art. Barcos

Catálogo Boats

Ocasión

Financiación

Seguros

Megayates

InfoNáutic

Charter

Empresas

Motos Agua

Tienda

Eco-Náutica

Noticias

Regatas

Tablón

 Club Fondear

¿Tienes dudas? Escríbenos

Artículos relacionados