Beispiel #1
0
/*
 First I read the permissions of our user. 
*/
if (!defined("COMMON_PERMISSIONS_INC")) {
    include "commonapi/common_permissions.inc";
}
if (!defined("PERMISSIONS_INC")) {
    include "dbapi/permissions.inc";
}
page_open(array("sess" => "Linktrail_Session", "auth" => "Linktrail_Auth", "perm" => "Linktrail_Perm", "user" => "Linktrail_User"));
$mytrail = get_node_info($PATH_INFO);
if ($mytrail == -1) {
    $mytrail = get_node_info($PATH_INFO . "?");
}
if ($auth->auth['uid'] != $mytrail['userid']) {
    page_close();
    Header("Location: " . $sess->url($PATH_INFO));
    exit;
}
$caps = get_caps($perm);
//used to read the superuser-capability of users with perm->have-perm("admin");
$trailperms = relevant_perms($mytrail, $auth->auth["uid"], $caps);
if (!class_exists("Template")) {
    include "template.inc";
}
if ($action == "exec") {
    doit();
} else {
    form();
}
page_close();
Beispiel #2
0
if (!defined("TRAILFUNCS_INC")) {
    include "commonapi/trailfuncs.inc";
}
if (!defined("COMMON_PERMISSIONS_INC")) {
    include "commonapi/common_permissions.inc";
}
$trail = $PATH_INFO;
//$sqltrail = addslashes($trail);
//echo($trail);
$nodeinfo = get_node_info($trail);
if ($nodeinfo == -1) {
    $nodeinfo = get_node_info($trail . '?');
    $trail = $trail . '?';
}
$links = get_links($trail);
$mytrail = $nodeinfo;
$hilight_words = explode("|", base64_decode($hilight));
/*
 First I read the permissions of our user. 
*/
$caps = get_caps($perm);
//used to read the superuser-capability of users with perm->have-perm("admin");
$trailperms = relevant_perms($nodeinfo, $auth->auth["uid"], $caps);
//die("Perms: $trailperms");
//$sess->register("mytrail");
$auth->login_if($dologin == "1" and empty($password));
print_trail_direct($links, $nodeinfo, $trailperms);
/*echo("sid: ".$sess->id." uid: ".$auth->auth['uid']."<p>");
echo("Test ist: $test<p>");*/
page_close();
//echo("Test ist: $test");