function edit() { global $sess, $title, $level, $description, $int_node, $thisnode, $glob_language; if (is_trail($title)) { $title = $title . "/"; } if (level_count($title) > 0) { include "directory/edit/err_invalidslash.html"; } else { $obj['name'] = parent_path($thisnode['path']) . $title; $obj['name'] = str_replace(' ', '_', $obj['name']); $obj['level'] = $level; $obj['description'] = $description; $obj['useraccess'] = 0; $obj['friendaccess'] = 0; $obj['owner'] = ''; $obj['language'] = $glob_language; $intid = path2id_ex($int_node, 1); $obj['intnode'] = $intid != -1 ? $intid : ""; if ($obj['name'] != $thisnode['path']) { sub_rename($thisnode['path'], $obj['name']); } edit_object($thisnode['id'], $obj); // die("Fertig: ".$obj['name']); header("Location: " . $sess->url($obj['name'])); } }
include "dbapi/edit_directory.inc"; } if (!defined("COMUTILS_INC")) { include "dbapi/comutils.inc"; } //die($PATH_INFO); $in_trail = 1; page_open(array("sess" => "Linktrail_Session", "auth" => "Linktrail_Auth", "perm" => "Linktrail_Perm", "user" => "Linktrail_User")); if (isset($action)) { $sess->unregister("action"); $sess->unregister("kat"); } else { $action = $HTTP_POST_VARS['action'] != "" ? $HTTP_POST_VARS['action'] : $HTTP_GET_VARS['action']; } $auth->login_if($auth->auth["uid"] == "nobody"); if ($action != "addform" and is_trail($PATH_INFO)) { $caps = get_caps($perm); $mytrail = get_node_info($PATH_INFO); if ($auth->auth['uid'] != $mytrail['userid'] and !has_caps($caps, CAP_SUPERUSER)) { die(sprintf("keine berechtigung.<br>uid ist: %s<br>trail geh÷rt: %s", $auth->auth['uid'], $mytrail['userid'])); page_close(); Header("Location: " . $sess->url(build_good_url($PATH_INFO))); exit; } } else { $kat = $PATH_INFO; } include "template.inc"; switch ($action) { case "": editform();
if (!defined("COMUTILS_INC")) { include "dbapi/comutils.inc"; } if (!defined("DIRECTORY_INC")) { include "dbapi/directory.inc"; } if (!defined("LAY_LOGIN_INC")) { include "layout/lay_login.inc"; } if (!defined("LAY_TRAIL_INC")) { include "layout/lay_trail.inc"; } global $username, $ltrstr, $sess, $HTTP_POST_VARS, $HTTP_GET_VARS, $mytrail, $PHP_SELF, $PATH_INFO; $failed = isset($username); if (is_trail($PHP_SELF)) { $mytrail = get_node_info($PHP_SELF); } if (!is_array($mytrail)) { $mytrail = get_node_info($PATH_INFO); } if ($in_trail == 1) { //die(class_exists("Template")); if (!class_exists("Template")) { include "template.inc"; } $tpl = new Template(APPLICATION_HOME . "/templates/trail", "keep"); $tpl->set_file(array("simpleframe" => "simpleframe.html")); $tpl->set_var("CONTENT", print_loginform_trail($PHP_SELF, $this->auth["uname"], $ltrstr['Trail_Login'], $failed)); $tpl->parse("simpleframe", "simpleframe"); /* global $action, $kat;
} $kat = trim($kat); $capabilities = get_caps($perm, $kat); // this is used at many places /* Mod_rewrite directs us all the queries to the directory to this file. Now we will have to find out whether we have to display a node, or a trail. If it's a trail, we must find out, if we can only redirect to the Trail-Window (we got called from the correct directory-node) or if we have to display the correct node (parent of Trail) and open the Trail in a new Window */ if (preg_match('/^\\/Experts\\/(.+)/', $kat, $found)) { display_mypage($found[1]); } else { if (!is_trail($kat) or $kat == "/") { display_directory(); } else { $autoopen = $kat; $sess->register("autoopen"); header("Location: " . $sess->url(parent_path($kat))); } } page_close(); //echo("<p>"); /*foreach($auth->auth as $key => $value) echo("$key = $value<br>"); */ /*foreach($GLOBALS as $key => $value) echo("$key = $value<br>");*/ ?>