<% Dim sPath, sScriptDir, sDSN Const adOpenKeyset = 1 Const adLockPessimistic = 2 sScriptDir = Request.ServerVariables("SCRIPT_NAME") sScriptDir = StrReverse(sScriptDir) sScriptDir = Mid(sScriptDir, InStr(1, sScriptDir, "/")) sScriptDir = StrReverse(sScriptDir) sPath = Server.MapPath(sScriptDir) & "\" sDSN="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/dados/mcruz3z.mdb") Dim RsCat, sSQLCat,v_ordem,RsOp,sSQLop,RsRot,sSQLRot,Rr,RsCatx sSQLCatx = "SELECT * FROM home ORDER BY ordem" set RsCatx=Server.CreateObject("ADODB.Recordset") RsCatx.Open sSQLCatx, sDSN, adOpenKeySet, adLockPessimistic If Not RsCatx.Bof then RsCatx.Movefirst End if %> MARCOS CRUZ || || Últ.Atual.em Jul 2011 <% if RsCatx("imgfundo")<>"" then %> bgcolor="#000000"<% else %>bgcolor="<%= RsCatx("cor") %>"<% end if %> leftmargin="0" topmargin="0"> <% else %> bgcolor="#000000"<% else %>bgcolor="<%= RsCatx("cor") %>"<% end if %> background="../upload/<%= RsCatx("imgfundo") %>" leftmargin="0" topmargin="0"> <% end if %>
 
<% tabela=request.QueryString("tb") ' videos nome da tabela if tabela=null or tabela="" then tabela="videos" End if b=request.QueryString("b") ' 5 qdade de linhas numer="" numer=request.QueryString("nm") ' num da noticia princ cat=request.QueryString("Cat") 'categoria menu esq. if cat="" or cat=null or cat="99" then if cat<>"99" then cat="" End if sSQLop = "SELECT * FROM "& tabela &" ORDER BY numero" else sSQLop = "SELECT * FROM "& tabela &" WHERE Categoria='"& Cat &"' ORDER BY numero" b=5 End if set RsOp=Server.CreateObject("ADODB.Recordset") RsOp.Open sSQLop, sDSN, adOpenKeySet, adLockPessimistic if not RsOp.Eof then RsOp.Movefirst a=RsOp("numero") End if if RsOp.Eof or numer="" then a=1 numer="1" End if if cat<>"" then numer=a End if Do Until RsOp.Eof or (a/numer)=1 RsOp.MoveNext if Not RsOp.Eof then a=RsOp("numero") End if Loop if not RsOp.Eof then %>
<% if RsOp("titulo")<>"v" then %> <%= RsOp("titulo") %> <% End if %> <% if RsOp("data")<>"v" then %>
Publicado em <%= RsOp("data") %> <% End if %> <% if RsOp("hora")<>"v" then %> - <%= RsOp("hora") %> <% End if %>


<%= RsOp("texto2") %>

  <%= RsOp("texto") %>  
<% if RsCatx("imagem1")<>"" then %> " target="blank">" border="0" alt="<%= RsCatx("alt1") %>"> <% end if %> <% if RsCatx("imagem2")<>"" then %> " target="blank">" border="0" alt="<%= RsCatx("alt2") %>"> <% end if %> <% if RsCatx("imagem3")<>"" then %> " target="blank">" border="0" alt="<%= RsCatx("alt3") %>"> <% end if %> <% if RsCatx("imagem4")<>"" then %> " target="blank">" border="0" alt="<%= RsCatx("alt4") %>"> <% end if %>   
<% RsCatx.close Set RsCatx = Nothing RsOp.Close Set RsOp = Nothing %> <% End if %> %>