20 include_once (
"FDL/Lib.Dir.php");
 
   21 include_once (
"FDL/Class.QueryDir.php");
 
   22 include_once (
"FDL/freedom_util.php");
 
   30     $dirid = GetHttpVars(
"dirid", 0); 
 
   31     $dbaccess = $action->dbaccess;
 
   33     include_once (
"FDL/popup_util.php");
 
   35     $homefld = 
new Dir($dbaccess);
 
   36     $homefld = $homefld->GetHome();
 
   41     $action->lay->rSet(
"dirid", urlencode(
$doc->id));
 
   42     $action->lay->rSet(
"reptitle", json_encode(sprintf(
"<i>%s</i>", 
$doc->getHTMLTitle())));
 
   43     $action->lay->rSet(
"icon", json_encode(
$doc->getIcon()));
 
   63     $appfld->Set(
"FDL", $action->parent->parent);
 
   64     $pexport = $appfld->HasPermission(
"EXPORT");
 
   66     if ($pexport) 
popupActive(
"popfld", $nbfolders, 
'export');
 
   77     $iconfolder = $action->parent->getImageLink(
"ftv2folderopen1.gif");
 
   78     $pathicon = explode(
"/", $iconfolder);
 
   79     if (count($pathicon) == 4) $action->lay->rSet(
"iconFolderPath", json_encode($pathicon[0] . 
"/" . $pathicon[1]));
 
   80     else $action->lay->rSet(
"iconFolderPath", json_encode(
"FREEDOM"));
 
   83     $action->lay->rSet(
"subtree", $stree);
 
   85     $action->lay->rSet(
"idHomeFolder", (
int)$nbfolders);
 
   87     $htree = 
addfolder($homefld, 0, 
"fldtop");
 
   88     $action->lay->rSet(
"hometree", $htree);
 
   90     $action->parent->AddJsRef($action->GetParam(
"CORE_JSURL") . 
"/subwindow.js");
 
  106         if ($level == 0) $levelp = 
"";
 
  107         else $levelp = $level - 1;
 
  108         if ($doc->owner < 0) $ftype = 3;
 
  109         else if ($doc->id == 14) $ftype = 5;
 
  110         else if ($doc->doctype == 
'D') $ftype = 1;
 
  111         else if ($doc->doctype == 
'S') $ftype = 2;
 
  116         if (
hasChildFld($dbaccess, $doc->initid, ($doc->doctype == 
'S'))) $hasChild = 
true;
 
  119         $ltree = sprintf(
"%s%s = insFld(%s, gFld(%s, \"#\", %d, %s, %s))\n", $treename, $level, $treename . $levelp, json_encode($doc->
getHTMLTitle()) , $doc->initid, json_encode($ftype) , ($hasChild ? 
'true' : 
'false'));
 
  123         if ($pexport) 
popupActive(
"popfld", $nbfolders, 
'export');
 
  125         if ($doc->doctype == 
'D') {
 
  132         popupActive(
"poppaste", $nbfolders, 
'staticpaste');
 
  133         popupActive(
"poppaste", $nbfolders, 
'pastelatest');
 
  137     if ($doc->doctype == 
'D') {
 
  142             if (count(
$ldir) > 0) {
 
  144                 foreach (
$ldir as $k => $v) {
 
  145                     $ltree.= 
addfolder($v, $level + 1, $treename);
 
addfolder(Doc $doc, $level, $treename, $thisfld=true)
getIcon($idicon="", $size=null, $otherId=null)
getChildDir($dbaccess, $userid, $dirid, $notfldsearch=false, $restype="LIST")
hasChildFld($dbaccess, $dirid, $issearch=false)
getHTMLTitle($id="-1", $def="", $latest=false)
new_Doc($dbaccess, $id= '', $latest=false)