<% 'Função para chamar os produtos aleatoreamente na vitime inicial set rs = abredb.execute("SELECT * FROM produtos WHERE status <> 'ok' and estoque <> 'n' and impeq <> '';") if rs.eof or rs.bof then rs.close set rs = nothing set atualizar = abredb.Execute("UPDATE produtos SET status = 'nao' WHERE status = 'ok';") set rs = abredb.execute("SELECT * FROM produtos WHERE status <> 'ok' and estoque <> 'n' and impeq <> '';") if rs.eof or rs.bof then rs.close set rs = nothing set atualizar = abredb.Execute("UPDATE produtos SET status = 'nao' WHERE status = 'ok';") set rs = abredb.execute("SELECT * FROM produtos WHERE status <> 'ok' and estoque <> 'n' and impeq <> '' ;") end if else set atualizar = abredb.Execute("UPDATE produtos SET status = 'ok' WHERE idprod = "&rs("idprod")&";") end if intProdID1 = rs("idprod") 'Formatação dos preços dos produtos precito1 = formatNumber(rs("preco"), 2)%>
<% If rs.fields("impeq")="" then impeq="img_nao_disp.gif" else impeq=rs.fields("impeq") end if%>
><%=rs.fields("nome")%>

<%=strLg29%> <%= strlgmoeda & " " & precito1%>
<%=strLg28%> <% '*** Verifica se tem Estoque do Produto set rs_estoque = abredb.execute("SELECT estoque FROM estoque WHERE idproduto="&intProdID1&" ;") if not rs_estoque.eof then estoque_atual=rs_estoque("estoque") end if rs_estoque.close set rs_estoque = nothing %> <%if estoque_atual > 0 then response.write " " & strLg26 else response.write " " & strLg27 end if%>
<% 'Fecha as tabelas rs.close set rs=nothing %>