/**
  * get tree bookmark list for personal desktop
  */
 function getPDBookmarkListHTMLTree()
 {
     global $ilCtrl, $ilUser;
     include_once "./Services/Bookmarks/classes/class.ilBookmarkExplorer.php";
     $showdetails = $this->getCurrentDetailLevel() > 2;
     $exp = new ilBookmarkExplorer($ilCtrl->getLinkTargetByClass("ilpersonaldesktopgui", "show"), $_SESSION["AccountId"]);
     $exp->setAllowedTypes(array('dum', 'bmf', 'bm'));
     $exp->setEnableSmallMode(true);
     $exp->setTargetGet("bmf_id");
     $exp->setSessionExpandVariable('mexpand');
     $ilCtrl->setParameter($this, "bmf_id", $this->id);
     $exp->setExpandTarget($ilCtrl->getLinkTargetByClass("ilpersonaldesktopgui", "show"));
     if ($_GET["mexpand"] == "") {
         $expanded = $this->id;
     } else {
         $expanded = $_GET["mexpand"];
     }
     $exp->setExpand($expanded);
     $exp->setShowDetails($showdetails);
     // build html-output
     $exp->setOutput(0);
     return $exp->getOutput();
 }
 /**
  * output explorer tree with bookmark folders
  */
 function explorer()
 {
     global $tpl;
     $etpl = new ilTemplate("tpl.bookmark_explorer.html", true, true, "Services/Bookmarks");
     $exp = new ilBookmarkExplorer($this->ctrl->getLinkTarget($this), $this->user_id);
     $exp->setAllowedTypes(array('dum', 'bmf'));
     $exp->setTargetGet("bmf_id");
     $exp->setSessionExpandVariable('mexpand');
     $exp->setExpand($this->id);
     $this->ctrl->setParameter($this, "bmf_id", $this->id);
     $exp->setExpandTarget($this->ctrl->getLinkTarget($this));
     if ($_GET["mexpand"] == "") {
         $mtree = new ilTree($this->user_id);
         $mtree->setTableNames('bookmark_tree', 'bookmark_data');
         $expanded = $mtree->readRootId();
     } else {
         $expanded = $_GET["mexpand"];
     }
     $exp->setExpand($expanded);
     $exp->highlightNode($_GET["bmf_id"]);
     // build html-output
     $exp->setOutput(0);
     $exp->highlightNode($this->id);
     $output = $exp->getOutput();
     //		$etpl->setCurrentBlock("adm_tree_content");
     $etpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("bookmarks"));
     $this->ctrl->setParameter($this, "bmf_id", 1);
     if ($_REQUEST['bm_link']) {
         $link = $_SERVER['REQUEST_URI'];
         $link = ereg_replace('bmf_id=[0-9]*', 'bmf_id=1', $link);
         $etpl->setVariable("LINK_EXPLORER_HEADER", $link);
     } else {
         $etpl->setVariable("LINK_EXPLORER_HEADER", $this->ctrl->getLinkTarget($this));
     }
     $etpl->setVariable("EXPLORER", $output);
     $tpl->setLeftNavContent($etpl->get());
 }