Пример #1
0
function CheckCookies()
{
    if (!is_numeric(session('user_id'))) {
        if (ReadCookies("LogedIn14Days") == "on") {
            $_SESSION['user_id'] = ReadCookies("user_id");
            $_SESSION['role_id'] = ReadCookies("role_id");
            $_SESSION['client_id'] = ReadCookies("client_id");
            $_SESSION['user_fullname'] = ReadCookies("user_fullname");
            $_SESSION['company'] = ReadCookies("company");
        }
    }
}
Пример #2
0
            addlog(1, '');
            if ($directlive == '0') {
                header('Location: ../?l=' . $cLang);
            } else {
                header('Location: ../tracking/?l=' . $cLang);
            }
        }
    }
}
closedb();
if ($ShowMessage == 0 && $isActive == 1) {
    $errorString = "style=\"display:none\"";
} else {
    $errorString = "";
}
if (ReadCookies("LogedIn14DaysChecked") == "on") {
    $r14Chk = "Checked='checked'";
}
if ($cLang == "al") {
    $language = 'Shqip';
} else {
    if ($cLang == "en") {
        $language = 'English';
    } else {
        if ($cLang == "fr") {
            $language = 'Français';
        } else {
            $language = 'Македонски';
        }
    }
}
Пример #3
0
    //$errors = $ipLite->getError();
    //Getting the result
    if (!empty($locations) && is_array($locations)) {
        foreach ($locations as $field => $val) {
            if ($field == "countryCode") {
                $defLang = $val;
            }
        }
    }
    if ($defLang == "US") {
        $defLang = "en";
    }
    $defLang = strtolower($defLang);
    WriteCookies("DefaultLanguage", $defLang, 14);
} else {
    $defLang = strtolower(ReadCookies("DefaultLanguage"));
}
if ($_SERVER['HTTP_HOST'] == "panorama.gps-ks.com" || $_SERVER['HTTP_HOST'] == "gps-ks.com") {
    $defLang = "al";
}
if ($_SERVER['HTTP_HOST'] == "panorama.bominet.com" || $_SERVER['HTTP_HOST'] == "bominet.com") {
    $defLang = "en";
}
if (isset($_GET["l"])) {
    if ($_GET["l"] != "mk" && $_GET["l"] != "en" && $_GET["l"] != "fr" && $_GET["l"] != "al") {
        $cLang = $defLang;
    } else {
        $cLang = $_GET["l"];
    }
} else {
    $cLang = $defLang;
Пример #4
0
require_once './Code/Sessions.php';
//GlobalFail('E1009 - Essential Session library not found.');
require_once './Code/DB.php';
//GlobalFail('E1010 - Essential DB library not found.');
require_once './Code/Cookies.php';
//GlobalFail('E1011 - Essential Cookie library not found.');
require_once './Code/Languages.php';
//GlobalFail('E1012 - Essential Language library not found.');
require_once './Code/Validator.php';
//GlobalFail('E1012 - Essential Language library not found.');
require_once './Code/cURL.php';
require_once './Code/Logging.php';
require_once './Code/Sources.php';
/* Commands */
OpenDB();
ReadCookies();
if ($UserFlags >= 32) {
    require_once './Code/Administration.php';
}
if (is_numeric($_SERVER['QUERY_STRING'])) {
    GetSingleDeal();
} else {
    switch (strtolower(ProcessURL())) {
        case '':
            DisplayMainScreen();
            break;
        case 'account':
            ProcessCommand('DisplayAccount', 'ProcessAccount', true);
            break;
        case 'administration':
            ProcessCommand('DisplayAdministration', null, true);