Guest User

Untitled

a guest
Apr 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 2.22 KB | None | 0 0
  1. <!--#include file="js/conexao.asp"-->
  2. <script src="js/open.js"></script>
  3. <%
  4. ed = Cint(Request.QueryString("ed"))
  5. artigos = 1
  6. noticias = 1
  7.  
  8. if (ed = "") or (isnull(ed)) or (ed <= 0) then
  9.     ed = Cint(db.Execute("SELECT COUNT(edicao) FROM sergio_edicao").Fields(0).Value)
  10. end if
  11.  
  12. set rs = db.execute("SELECT * FROM sergio_paginas WHERE edicao = '"&ed&"'")
  13. ultimaEdicaoSQL = db.Execute("SELECT COUNT(edicao) FROM sergio_edicao").Fields(0).Value
  14.  
  15. if ed = Cint(ultimaEdicaoSQL) then
  16.     response.Write "<span style='color:#F90; font: 20px Verdana, Geneva, sans-serif;' ><b>Última Edição</b></span>"
  17.     response.Write "<hr color='#F90' />"
  18. end if
  19. %>
  20.  
  21. <h1>Sum&aacute;rio</h1>
  22.  
  23. <h2>Edi&ccedil;&atilde;o <%=rs("edicao")%></h2>
  24. <hr noshade="noshade" color="#FFF" style="border: 1px #666 dotted;"/>
  25.  
  26. <h2>A Revista</h2>
  27.     <a href="carta_leitor.asp?ed=<%=ed%>" class="link3"><h3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;Carta ao leitor</h3></a>
  28.  
  29. <%
  30. if rs.eof or rs.bof then
  31.     response.Write("A PÁGINA NÃO EXISTE")
  32. end if
  33.  
  34. Do while not rs.eof
  35. cabecario = rs("cabecario")
  36.     if cInt(rs("tipo")) = 2 then
  37.         if artigos = 1 then
  38.            artigos = 0
  39.             response.write "<h2>Artigos</h2>"
  40.             response.write "<a href='edicao_paginas.asp?ed="&rs("edicao")&"&pAtual="&rs("pagina")&"' class='link3'><h3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;"&cabecario&"</h3></a>"
  41.         else
  42.             response.write "<a href='edicao_paginas.asp?ed="&rs("edicao")&"&pAtual="&rs("pagina")&"' class='link3'><h3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;"&cabecario&"</h3></a>"
  43.         end if
  44.     end if
  45.    
  46.     if cInt(rs("tipo")) = 1 then
  47.         if noticias = 1 then
  48.            noticias = 0
  49.             response.write "<h2>Noticías</h2>"
  50.             response.write "<a href='edicao_paginas.asp?ed="&rs("edicao")&"&pAtual="&rs("pagina")&"' class='link3'><h3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;"&cabecario&"</h3></a>"
  51.         else
  52.             response.write "<a href='edicao_paginas.asp?ed="&rs("edicao")&"&pAtual="&rs("pagina")&"' class='link3'><h3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;"&cabecario&"</h3></a>"
  53.         end if
  54.     end if
  55.     rs.moveNext
  56. Loop
  57. db.close
  58. %>
  59. <script src="js/close.js"></script>
Add Comment
Please, Sign In to add comment