Ejemplo n.º 1
0
    if ($res === -2) {
        $errors->addError(new Error(2, sprintf($siteContext->getLocale('errDamagedDatasource'), $stier->getOption('name_of_service'))));
    } elseif (!$res or $res === 0) {
        $errors->addError(new Error(2, sprintf($siteContext->getLocale('errDatasourceInaccessible'), $stier->getOption('name_of_service'))));
    }
}
//Instantierer klassen med standardkode
$lib = new Html($ind, $datafil);
$siteContext = new SiteContext($lib, $stier, $ind, 'da');
$lib->setSiteContext($siteContext);
$lib->setStier($stier);
//Set the cookie for users area type
$uaUtils = new UsersAreaUtils($siteContext);
$uaUtils->setUAType();
if (!isset($ind) or !isset($password) or !isset($username)) {
    $uaUtils->doLoginForm($lib, $stier, $ind, $siteContext, 1);
    exit;
} else {
    if (!$datafil->authenticate($username, $password)) {
        $uaUtils->doLoginForm($lib, $stier, $ind, $siteContext, 2);
        exit;
    } else {
        if ($errors->isOccured()) {
            //$uaUtils = new UsersAreaUtils($siteContext);
            $uaUtils->showErrors($errors);
            exit;
        }
    }
}
//If the stat site is password protected
if (strlen($datafil->getLine(57)) > 0) {
Ejemplo n.º 2
0
    $siteContext = new ShortSiteContext($stier, $ind, 'da');
    //Was the datafile fetched successfully
    if ($res === -2) {
        $errors->addError(new Error(2, sprintf($siteContext->getLocale('errDamagedDatasource'), $stier->getOption('name_of_service'))));
    } elseif (!$res or $res === 0) {
        $errors->addError(new Error(2, sprintf($siteContext->getLocale('errDatasourceInaccessible'), $stier->getOption('name_of_service'))));
    }
}
//Instantierer klassen med standardkode
$lib = new Html($ind, $datafil);
$siteContext = new SiteContext($lib, $stier, $ind, 'da');
$lib->setSiteContext($siteContext);
$lib->setStier($stier);
$utils = new UsersAreaUtils($siteContext);
if (!isset($ind) or !isset($password) or !isset($ind) or !isset($username)) {
    $utils->doLoginForm(1, $siteContext->getOption('urlUserAreaMain'));
    exit;
} else {
    if (!$datafil->authenticate($username, $password)) {
        $utils->doLoginForm(2, $siteContext->getOption('urlUserAreaMain'));
        exit;
    } else {
        if ($errors->isOccured()) {
            $uaUtils = new UsersAreaUtils($siteContext);
            $uaUtils->showErrors($errors);
            exit;
        }
    }
}
//Set the latest use with username and password
$datafil->setLine(110, time());
Ejemplo n.º 3
0
        $errors->addError(new Error(2, sprintf($siteContext->getLocale('errDatasourceInaccessible'), $stier->getOption('name_of_service'))));
    }
}
//Instantierer klassen med standardkode
$lib = new Html($ind, $datafil);
$siteContext = new SiteContext($lib, $stier, $ind, 'da');
$lib->setSiteContext($siteContext);
$lib->setStier($stier);
if (!isset($ind) or !isset($password) or !isset($username)) {
    $uaUtils = new UsersAreaUtils($siteContext);
    $uaUtils->doLoginForm(1, $stier->getOption('urlUserArea'));
    exit;
} else {
    if (!$datafil->authenticate($username, $password)) {
        $uaUtils = new UsersAreaUtils($siteContext);
        $uaUtils->doLoginForm(2, $stier->getOption('urlUserArea'));
        exit;
    } else {
        if ($errors->isOccured()) {
            $uaUtils = new UsersAreaUtils($siteContext);
            $uaUtils->showErrors($errors);
            exit;
        }
    }
}
//Find out what page to start with
if (isset($ind['start']) and isset($ind['start_type'])) {
    if ($ind['start_type'] === "adminmain") {
        $main = $stier->getOption('urlUserAreaMain') . "?username="******"&password="******"&type=" . $ind['start'];
    } elseif ($ind['start_type'] === "kodegen") {
        $main = $stier->getOption('urlUserAreaCodegen') . "?username="******"&password="******"&type=" . $ind['start'];