コード例 #1
0
ファイル: foreign.php プロジェクト: poef/ariadne
 function login()
 {
     $user = $this->getUser($this->config["ar:userPrefix"]);
     if (!$user) {
         if ($_GET["params"]) {
             ldStartSession();
             $userInfo = $this->getUserInfo($_GET["params"]);
             if (!$userInfo['userID']) {
                 $this->error = "Not logged on!";
             } else {
                 $login = $this->config["ar:userPrefix"] . $userInfo["userID"];
                 $user = $this->setUser($login, $userInfo);
             }
         } else {
             if (headers_sent()) {
                 $this->error = "rcas_foreign: could not authenticate user since headers are already sent.";
             } else {
                 ldRedirect($this->config["url:login"]);
                 exit;
             }
         }
     }
     return $user;
 }
コード例 #2
0
ファイル: loader.php プロジェクト: poef/ariadne
                        $subtarget[$targetkey] = array();
                    }
                    $subtarget =& $subtarget[$targetkey];
                    $kpos = strpos($key, '.', $kendpos + 1);
                } while ($kpos !== false);
                debug("soap::unpack_array_names   setting value\n");
                $subtarget = $val;
            } else {
                unpack_array_names($val, $target);
            }
        }
    }
}
$AR_PATH_INFO = $_SERVER["PATH_INFO"];
if (!$AR_PATH_INFO) {
    ldRedirect($_SERVER["PHP_SELF"] . "/");
    exit;
} else {
    @ob_end_clean();
    // just in case the output buffering is set on in php.ini, disable it here, as Ariadne's cache system gets confused otherwise.
    // go check for a sessionid
    $root = $AR->root;
    // set the default user (public)
    $AR->login = "******";
    // look for the template
    $split = strrpos($AR_PATH_INFO, "/");
    $path = substr($AR_PATH_INFO, 0, $split + 1);
    /* remove template from PATH_INFO */
    if (substr($AR_PATH_INFO, $split + 1)) {
        $AR_PATH_INFO = substr($AR_PATH_INFO, 0, $split);
    }
コード例 #3
0
ファイル: logoff.php プロジェクト: poef/ariadne
	</div>
</body>
</html>
';
$loginForm = '
<form action="' . $AR->dir->www . '">
	<div class="field">
		<input type="submit" value="' . $ARnls["login"] . '">
	</div>
</form>
';
$ARCurrent->arLoginSilent = 1;
if ($this->CheckLogin("read")) {
    if ($AR->user->data->login == $data->login || $this->CheckAdmin($AR->user)) {
        if (!$checkedlocks) {
            ldRedirect("dialog.locks.php?arReturnPage=logoff.php?checkedlocks=true");
        } else {
            $ARCurrent->session->kill();
            unset($ARCurrent->session);
            echo $pageStart;
            ar::call('ariadne.logo.html');
            echo $pageSubHeader;
            // Add nls for this phrase
            echo "Session closed for " . $AR->user->data->name;
            echo $loginForm;
            echo $pageEnd;
        }
    } else {
        // Add nls for this phrase
        echo "<h2>Sorry, you can only logoff yourself.</h2>";
    }
コード例 #4
0
ファイル: dialog.locks.php プロジェクト: poef/ariadne
<?php

$ARCurrent->nolangcheck = true;
if ($this->CheckLogin("read") && $this->CheckConfig()) {
    include $this->store->get_config("code") . "widgets/wizard/code.php";
    $wgWizFlow = array(array("current" => $this->getdata("wgWizCurrent", "none"), "template" => "dialog.locks.form.php", "cancel" => "window.close.js", "save" => "dialog.locks.save.php"));
    $wgWizAction = $this->getdata("wgWizAction");
    $locks = $this->store->mod_lock->get_locks($this->data->login);
    if (!count($locks)) {
        // no locks, lets return where we came from
        ldRedirect($arReturnPage);
    }
    if ($wgWizAction == "save") {
        $wgWizButtons = array("cancel" => array("value" => $ARnls["ok"]));
    } else {
        $wgWizButtons = array("cancel" => array("value" => $ARnls["cancel"]), "save" => array("value" => $ARnls["apply"]));
    }
    $spath = $AR->dir->www . "js/yui/";
    $wgWizStyleSheets = array($spath . "datatable/assets/skins/sam/datatable.css", $AR->dir->www . "styles/locks.css");
    $wgWizScripts = array($spath . "element/element-min.js", $spath . "datasource/datasource-min.js", $spath . "datatable/datatable-min.js");
    $wgWizTitle = sprintf($ARnls["openlocks"], $nlsdata->name);
    $wgWizHeader = $wgWizTitle;
    $wgWizHeaderIcon = $AR->dir->images . 'icons/large/grants.png';
    include $this->store->get_config("code") . "widgets/wizard/yui.wizard.html";
}
コード例 #5
0
ファイル: login.redirect.php プロジェクト: poef/ariadne
<?php

if ($this->CheckConfig()) {
    $query = "";
    if (count($_GET)) {
        $query = "?" . http_build_query($_GET);
    }
    ldRedirect($this->make_local_url() . $arRequestedTemplate . $query);
}
コード例 #6
0
ファイル: dialog.su.save.php プロジェクト: poef/ariadne
<?php

if (!$this->validateFormSecret()) {
    error($ARnls['ariadne:err:invalidsession']);
    exit;
}
if ($this->CheckLogin("admin") && $this->CheckConfig()) {
    global $AR;
    $userpath = $this->getvar('target');
    if ($this->exists($userpath)) {
        $userob = current($this->get($userpath, "system.get.phtml"));
        $ARCurrent->session = false;
        // Make sure a new session ID is generated for the new user;
        ldSetCredentials($userob->data->login, $userob->parent);
    }
    ldRedirect($this->make_url());
}