Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
- <%Response.Expires=0%>
- <%Response.Buffer=True%>
- <%Session.lcid=1046%>
- <!--#include virtual="/comum/biblioteca/banco_dados/f_bd_conexao.asp"-->
- <!--#include virtual="/comum/biblioteca/arquivo/f_ler_escrever_arquivo_ini.asp"-->
- <!--#include virtual="/comum/biblioteca/url/f_redirecionar_url.asp"-->
- <!--#include virtual="/comum/biblioteca/data/f_formatacao_data.asp"-->
- <!--#include virtual="/comum/biblioteca/email/f_envio_email.asp"-->
- <!--#include virtual="/comum/biblioteca/geral/f_setProtocols.asp"-->
- <!--#include virtual="/comum/biblioteca/geral/f_getFiles.asp"-->
- <!--#include virtual="/site/anuncio/scripts/s_anuncio.asp"-->
- <%
- '/////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ' ANP - AGENCIA NACIONAL DO PETROLEO, GAS NATURAL E BIOCOMBUSTIVEIS
- '
- ' PROGRAMA: INDEX
- ' AUTOR: RODRIGO JUNQUEIRA DE OLIVEIRA
- ' DATA: 16/02/2009
- ' ACAO: PAGINA PRINCIPAL DO SITE
- '
- ' INCLUDES: /comum/biblioteca/arquivo/f_ler_escrever_arquivo_ini.asp
- ' /comum/biblioteca/url/f_redirecionar_url.asp
- ' /comum/biblioteca/data/f_formatacao_data.asp
- ' /comum/biblioteca/geral/f_setProtocols.asp
- '
- ' HISTORICO:
- '
- '/////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ' DETERMINAR A URL DO SITE, INDEPENDENTEMENTE DO AMBIENTE EM QUE A PÁGINA ESTEJA
- ' FREEDY CARVALHO
- ' ------------------------------------------------------------------------------------------------------------
- Dim rootProtocol : rootProtocol = setProtocols ( Request.ServerVariables("HTTPS") )
- Dim rootDomain : rootDomain = Request.ServerVariables("SERVER_NAME")
- Dim rootURL : rootURL = rootProtocol & rootDomain
- On Error Resume Next
- ' CHECAR VARIAVEL DE DESATIVACAO
- '----------------------------------------------------------
- If ( fstrLerArquivoINI("Disponibilizacao", "LIGADO", "S", "site.ini") = "N" ) Then
- Session( "strErro" ) = "O SITE ESTÁ TEMPORARIAMENTE FORA DO AR."
- End If
- ' DOWNLOAD DIRETO DE ARQUIVOS
- '----------------------------------------------------------
- If ( Trim(Request.QueryString("dw")) <> "" ) Then
- Response.Redirect "/SITE/acao/download/?id=" & Trim(Request.QueryString("dw"))
- Response.End
- End If
- ' ROTINA DE TRATAMENTO DE ERRO DO SITE
- ' CHECAR VARIAVEL DE SESSAO STRERRO
- '----------------------------------------------------------
- If ( Session("strErro") <> "" ) Then
- If ( Session("strErro") = "404" ) then
- %>
- <!--#include virtual = "/SITE/incHome/404.asp" -->
- <%
- Session("strErro") = ""
- objConexao.Close
- Set objConexao = Nothing
- Response.End
- Else
- %>
- <!--#include virtual = "/SITE/incHome/erroProcessamento.asp"-->
- <%
- If ( fstrLerArquivoINI("LogErro", "LIGADO", "", "site.ini") = "S" And _
- fstrLerArquivoINI("Disponibilizacao", "LIGADO", "", "site.ini") = "S") Then
- Dim strAutor
- Dim strEmail
- Dim strMensagem
- strAutor = "INTERNET"
- strEmail = fstrLerArquivoINI("LogErro", "EMAIL", "", "site.ini")
- strMensagem = Session("strErro") & vbCrLf & _
- "--------------------------------------------------------------" & vbCrLf & _
- "INTERNET - " & fstrLerArquivoINI("Conexao", "INSTANCIA", "", "site.ini")
- 'fStrEnvioEmail strAutor , "INTERNET", strEmail, "INTERNET - " & fstrLerArquivoINI("Conexao", "INSTANCIA", "", "site.ini") & " - LOG DE ERRO", strMensagem
- End If
- Session("strErro") = ""
- objConexao.Close
- Set objConexao = Nothing
- Response.End
- End If
- End If
- If ( Trim(Request.QueryString("v")) <> "" ) Then
- If ( Session("strUsuarioGCI") = "" ) Then
- Response.Redirect "/GCI/login/?s=" & Session.SessionID & "&r=" & Server.URLEncode(Request.ServerVariables("PATH_INFO") & "?pg=" & Trim(Request.QueryString("pg")) & "&v=true")
- Response.End
- End If
- End If
- If ( Mid( Request.ServerVariables("QUERY_STRING"),1,3 ) ) = "404" Then
- strNomePagina = Mid( Request.ServerVariables("QUERY_STRING"), 5, Len( Request.ServerVariables("QUERY_STRING") ) - 4)
- fstrRedirecionarPagina ( strNomePagina )
- Response.End
- End If
- If ( Trim(Session("strSessao")) = "" ) Then
- Session("strSessao") = Cstr(Request.ServerVariables("INSTANCE_ID"))
- End If
- %>
- <!--#include virtual = "/SITE/incHome/home.asp" -->
- <%
- objConexao.Close
- Set objConexao = Nothing
- If ( Err.Number <> 0 ) Then
- Session("strErro") = "ERRO: " & Cstr(err.number) & " - " & Cstr(err.Description) & "[/]"
- Response.Write("ERRO:")
- Response.End
- End If
- %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement