function form($predef = "") { global $mytrail, $i, $trailperms, $caps; if (is_array($predef)) { print_trail_direct(array(), $mytrail, $trailperms, -1, $predef, has_caps($caps, CAP_SUPERUSER)); } else { $links = get_links($mytrail['path']); if (is_array($links)) { print_trail_direct($links, $mytrail, $trailperms, $i, "", has_caps($caps, CAP_SUPERUSER)); //the output is printed directly for usability reasons when //hanling big trails under slow response time conditions } } }
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");