<?php

if($_SERVER['SERVER_PORT'] != '443') {
header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
exit();
}

session_start();

include("admin/inc/conecta.php");
include("conecta-pdo.php");
include("admin/inc/funcoes.php");

$pagina = query_string('0');

$porta = $_GET["porta"];
if($porta != ""){
include"play.php";
exit;
}

if ($pagina == "") {
include("login.php");
} elseif (!file_exists($pagina.".php")) {
include("login.php");
} else {
include("".$pagina.".php");
}
?>