<% 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") sSQLCat = "SELECT * FROM vid ORDER BY texto1" set RsCat=Server.CreateObject("ADODB.Recordset") RsCat.Open sSQLCat, sDSN, adOpenKeySet, adLockPessimistic 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 b=0 then b=50 End if a=0 Do Until Rsop.Eof or a>b %> "> <%= RsOp("titulo") %>
<% a=a+1 RsOp.MoveNext Loop RsOp.Close Set RsOp = Nothing %> <% End if %>
 
<%= RsCat("texto1") %>
  " width="249" height="300">
<% 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 RsCat.close Set RsCat = Nothing %>