<% preview = request("preview") if preview = "modo" then str_ativo = "" else str_ativo = " ativo=1 and " end if id_menu = valida_num(request("id_menu")) if len(id_menu)=0 then id_menu = 0 end if id_conteudo = valida_num(request("id_conteudo")) if len(id_conteudo)>0 then strsql = "select cod_menu,restrito from tbl_conteudo where "&str_ativo&" id_conteudo="&id_conteudo set consulta = conexao.execute(strsql) id_menu = consulta("cod_menu") restrito = consulta("restrito") set consulta = nothing end if strsql = "select nome,restrito from tbl_menu where "&str_ativo&" id_menu="&id_menu set consulta2 = conexao.execute(strsql) if not consulta2.eof then menu_principal = consulta2("nome") restrito = consulta2("restrito") end if set consulta2 = nothing if len(restrito) = 0 or isnull(restrito) then restrito = 0 end if if valida_num(restrito) = 1 and len(session("news_log")) = 0 then call titulo_box(menu_principal) call acesso_restrito("conteudo",id_menu) else if len(id_conteudo)>0 then strsql_cont = "select * from tbl_conteudo where "&str_ativo&" id_conteudo="&id_conteudo itens_pag = 1 else strsql_cont = "select * from tbl_conteudo where "&str_ativo&" cod_menu="&id_menu&" order by ordem" strsql = "select itens from tbl_menu where id_menu="&id_menu set consulta3 = conexao.execute(strsql) if not consulta3.eof then itens_pag = consulta3("itens") else itens_pag = 1 end if set consulta3 = nothing end if 'conteudo > 0 if len(strsql_cont)>0 then '************* SISTEMA DE PAGINACAO dim Conn dim RS dim intPageSize intPageSize=itens_pag dim intCurrPage dim a set Conn=Server.CreateObject("adodb.connection") set rs=server.CreateObject("adodb.recordset") Conn.CursorLocation=3 Conn.Open endereco_fisico_banco strsql = strsql_cont RS.Open strsql,conn intCurrPage=valida_num(Request.QueryString("CurrPage")) if not rs.eof then if intCurrPage=0 then intCurrPage=1 RS.PageSize=intPageSize RS.AbsolutePage=intCurrPage a=0 while a < intPageSize and not RS.EOF a=a+1 '************************** COMPUTA OS VIEWS call computa_views("tbl_conteudosXviews","cod_conteudo",RS.Fields("id_conteudo")) '************************** COMPUTA OS VIEWS %> <%call titulo_box(RS.Fields("titulo"))%> <% cod_menu_zero = acha_zero(rs.fields("cod_menu")) '******* INICIO DO MENU INTERNO - SUPERIOR strsql = "select tipo from tbl_menu where id_menu="&cod_menu_zero set consulta2 = conexao.execute(strsql) if not consulta2.eof then strsql = "select id_menu,nome from tbl_menu where "&str_ativo&" cod_menu="&cod_menu_zero& " order by ordem" set consulta = conexao.execute(strsql) if not consulta.eof then%> <%do while not consulta.eof%> &cod_site=<%=cod_site%>"> <% if valida_num(consulta("id_menu")) = valida_num(cod_menu_zero) then response.write ucase(consulta("nome")) else response.write consulta("nome") end if %> <% consulta.movenext if not consulta.eof then %>  |   <% end if loop %> <% set consulta = nothing end if 'consulta.eof end if 'consulta.eof set consulta2 = nothing '******* FIM DO MENU INTERNO - SUPERIOR if a = 1 and id_menu > 0 then strsql = "select cod_menu from tbl_menu where id_menu = "&Rs.Fields("cod_menu") set consulta = conexao.execute(strsql) if not consulta.eof then if consulta("cod_menu") = 0 then menu_interno = "inferior" else menu_interno = "superior" end if end if set consulta = nothing %>

<%=RS.Fields("texto")%>


<% end if RS.MoveNext wend %>
<% if RS.PageCount > 1 then for a = 1 to RS.PageCount if a <> intCurrPage then Response.Write "[" & a & "] " else Response.Write a & " " end if next Response.Write "
" if intCurrPage > 1 then Response.Write "<< Página Anterior" end if Response.Write " " if intCurrPage < RS.PageCount then Response.Write "Próxima Página >>" end if end if %>
<% end if 'rs = nothing RS.Close Conn.Close set rs=nothing set conn=nothing '********* FIM SISTEMA DE PAGINAÇÃO end if 'strsql_count > 0 end if 'restrito %>