<%@LCID=1034%><% PathXLS = Server.MapPath("noticias_vistas.log") Set fso = Server.CreateObject("Scripting.FileSystemObject") Set txtfile = fso.OpenTextFile(PathXLS,1, True) texto=txtfile.readall txtfile.close Set txtfile = fso.OpenTextFile(PathXLS,2, True) txtfile.writeline request("noticia") & " " & date() txtfile.writeline texto txtfile.close Set txtfile = nothing Set fso = nothing %> La Red: Noticias <% Conexion2 Set rs=Server.CreateObject("ADODB.Recordset") sSQL="SELECT link, url FROM links WHERE idnoticia=" & request("noticia") & " order by idlink " rs.open sSQL, cn if not rs.eof then hay_links = 1 links = rs.getrows else hay_links = 0 end if rs.close sSQL="SELECT link, url FROM archivos WHERE idnoticia=" & request("noticia") & " order by idlink " rs.open sSQL, cn if not rs.eof then hay_archivos = 1 archivos = rs.getrows else hay_archivos = 0 end if rs.close sSQL="SELECT * FROM secciones INNER JOIN noticias ON secciones.idseccion = noticias.idseccion WHERE idnoticia=" & request("noticia") rs.Open sSQL, cn imagen=rs("imagen2") contenido=rs("contenido") titulo=rs("titulo") nombre=rs("nombre") copete=rs("copete") formatohtml=rs("formatohtml") pie=rs("piedefoto") idnoticia=rs("idnoticia") if isnull(rs("vistas")) then vistas=1 else vistas = rs("vistas") + 1 end if rs.close set rs=nothing cn.execute "update noticias set vistas=" & vistas & " where idnoticia=" & idnoticia cn.close set cn=nothing %> <%if hay_links = 1 then%> <%end if%> <%if hay_archivos = 1 then%> <%end if%>
<%=nombre%>
<%if imagen<>"" then%> <%end if%> <%if pie<>"" then%> <%if imagen<>"" then%> <%end if%> <%end if%>
<%=Ucase(titulo)%>
<%=copete%>

<%=pie%>

<% if formatohtml=1 then response.write replace(contenido,vbcrlf,"
") else response.write contenido end if%>
<%for i=0 to Ubound(links,2)%><%=trim(links(0,i))%><%if i
<%end if%><%next%>
<%for i=0 to Ubound(archivos,2)%><%=trim(archivos(0,i))%><%if i
<%end if%><%next%>