//error_reporting(-1);
//phpinfo();
//print $_SERVER['HTTP_HOST'];
//$a = explode('www.',$_SERVER['HTTP_HOST']);
$str = $_SERVER['HTTP_HOST'];
$get = explode("/",$_GET['p']);
if(end($get)) $_GET['p'] = end($get);
if (strpos($str, 'www.') !== false) {
$dom = explode('www.',$_SERVER['HTTP_HOST']);
$redirect = 'https://' . $dom[1] . $_SERVER['REQUEST_URI'];
//print $redirect;
header('Location: ' . $redirect);
}
if(empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "off"){
// $redirect = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
// header('HTTP/1.1 301 Moved Permanently');
// header('Location: ' . $redirect);
// exit();
}
/*
ini_set('display_errors',1);
ini_set('display_startup_erros',1);
*/
//error_reporting(E_ALL);
// Turn off all error reporting
session_start();
include_once("autoLoad.php");
include ('menuover.php');
//print_r($_SESSION);
if($_SESSION["usuario"])
{
//print 'ook';
$ObjUsuario = new AssociadosAbac;
$ObjUsuario->regra = "idAssociado = '".$_SESSION["usuario"]."'";
$ObjUsuario->carregaMetodo("pegarDados");
// print_r($ObjUsuario);
}
//print_r($_GET);
//print $_GET['p'];
//print '
';
//print $_SERVER["REQUEST_URI"];
if($_GET['p']!='login')
{
$_SESSION['paginaAnterior'] = $_SERVER["REQUEST_URI"];
}
if($_GET['p']=='')
{
$_GET['p'] = 'home';
}
if(strstr("www", $_GET['p']) or strstr("http", $_GET['p']) or file_exists($_GET['p'].".php"))
{
}
else
{
$_GET['p'] = 'home';
}
if(is_file("seo/".$_GET['p'].'.inc.php'))
{
include("seo/".$_GET['p'].'.inc.php');
}
?>