ini_set("log_errors", "Off"); ini_set("display_errors", "On"); ini_set("error_reporting", E_ERROR); if(!$_SESSION) session_start(); $root = dirname($_SERVER["PHP_SELF"]) == DIRECTORY_SEPARATOR ? "" : dirname($_SERVER["PHP_SELF"]); define("ROOT", $root); define("HOST", preg_replace("/\/central/", "", $root)); $md5 = md5(ROOT); $hoje = date("Y-m-d"); $agora = date("Y-m-d H:i:s"); $root_plugins = "https://i.premiumart.com.br/wconfig"; $root_components = $_SESSION['PLUGINS'] = "./wconfig/"; define("PLUGINS", $root_plugins); $db_table_config = "config"; require_once $root_components."/includer_front.php"; include_once "default/default.php"; include_once "../gerenciamento/default/default.php"; $titulo_site = getConfig("titulo"); $titulo_site = !empty($titulo_site) ? $titulo_site : "Lojas Giga"; $nome_site = getConfigJSON("identificacao_email", "empresa"); $host = host($_SERVER['HTTP_HOST']).ROOT; $host_email = hostEmail($_SERVER['HTTP_HOST']); $email_nome = $nome_site; $email_from = getConfigJSON("identificacao_email", "email"); $email_host = host($_SERVER['HTTP_HOST']).HOST; $host = HOST; define(TITULO, $titulo_site); /* adicionar funções pertinentes a este projeto, abaixo */ $permitido = array("sorteio"); $logado = !empty($_SESSION[$md5]['id']) && $_SESSION[$md5]['sessao'] === session_id() && $_SESSION[$md5]['user_agent'] === $_SERVER['HTTP_USER_AGENT'] ? TRUE : FALSE; $sess = $_SESSION[$md5]; $var_usuario_id = $sess['id']; $var_usuario_nome = $sess['nome']; $usuario = getDados("SELECT id, email FROM cadastros WHERE id = '$var_usuario_id'");