Beispiel #1
0
            $_SESSION['user_fullname'] = pg_fetch_result($ruser, 0, 'fullname');
            $directlive = pg_fetch_result($ruser, 0, 'directlive');
            //echo odbc_result($ruser,"FullName");
            //exit();
            //die();
            //flush();
            $_SESSION['company'] = dlookup("select name from clients where id in (select clientID from users where id=" . pg_fetch_result($ruser, 0, 'id') . " limit 1) limit 1");
            $ShowMessage = 0;
            if ($rem14 == "on") {
                WriteCookies("LogedIn14Days", "on", 14);
                WriteCookies("LogedIn14DaysChecked", "on", 14);
                WriteCookies("user_id", $_SESSION['user_id'], 14);
                WriteCookies("role_id", $_SESSION['role_id'], 14);
                WriteCookies("client_id", $_SESSION['client_id'], 14);
                WriteCookies("user_fullname", $_SESSION['user_fullname'], 14);
                WriteCookies("company", $_SESSION['company'], 14);
            }
        }
        if ($HaveUser == 1) {
            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\"";
Beispiel #2
0
    $locations = $ipLite->getCountry("217.16.79.81");
    //$locations = $ipLite->getCountry(getIP());
    //$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"];
    }
Beispiel #3
0
<?php

include "../include/functions.php";
include "../include/db.php";
include "../include/params.php";
include "../include/dictionary2.php";
session_start();
session_destroy();
WriteCookies("LogedIn14Days", "off", 14);
header('Location: ../login/?l=' . $cLang);
exit;