if (file_exists($SSIfile)) {
    include $SSIfile;
}
//////////////////////////////////////////////////////////////
require $Root_Path . "bin/CR3DCQuery.php";
require $Root_Path . "bin/CTipOfTheDay.php";
require $Root_Path . "bin/CBilling.php";
require $Root_Path . "includes/siteconfig.php";
require $Root_Path . "bin/config.php";
//////////////////////////////////////////////////////////////
//Instantiate the Classes
$oR3DCQuery = new CR3DCQuery($config);
$oBilling = new CBilling($config);
$bCronEnabled = $oR3DCQuery->IsCronManagementEnabled();
//////////////////////////////////////////////////////////////
$RequiresPayment = $oBilling->IsPaymentEnabled();
if (!$bCronEnabled) {
    if ($oR3DCQuery->ELOIsActive()) {
        $oR3DCQuery->ELOCreateRatings();
    }
    $oR3DCQuery->MangeGameTimeOuts();
}
if (!isset($_SESSION['sid']) && !isset($_SESSION['user']) && !isset($_SESSION['id'])) {
    $user = trim($_POST['txtName']);
    $pass = trim($_POST['txtPassword']);
    if ($user != "" && $pass != "") {
        $sid = $oR3DCQuery->Login($user, $pass);
        $id = $oR3DCQuery->GetIDByUserID($config, $user);
        if ($sid != "") {
            $_SESSION['sid'] = $sid;
            $_SESSION['user'] = $user;