isAdmin()) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } UI::htmlStartPage(getMLText("folders_and_documents_statistic")); UI::globalNavigation(); UI::pageNavigation(getMLText("admin_tools"), "admin_tools"); ?> inheritsAccess() ? "black" : getAccessColor($folder->getDefaultAccess()); print "
  • "; print "getID()."\">".$folder->getName() .""; $owner = $folder->getOwner(); $color = getAccessColor(M_ALL); print " [".$owner->getFullName()."] "; if (! $folder->inheritsAccess()) printAccessList($folder); $subFolders = $folder->getSubFolders(); $documents = $folder->getDocuments(); print ""; print "".formatted_size($folder_size).", ".$doc_count." ".getMLText("documents")."\n"; print "
  • "; return $folder_size; } function printDocument($document) { global $document_count,$file_count,$settings,$storage_size; $document_count++; $local_file_count=0; $folder_size=0; if (file_exists($settings->_contentDir.$document->getDir())){ $handle = opendir($settings->_contentDir.$document->getDir()); while ($entry = readdir($handle) ) { if (is_dir($settings->_contentDir.$document->getDir().$entry)) continue; else{ $local_file_count++; $folder_size += filesize($settings->_contentDir.$document->getDir().$entry); } } closedir($handle); } $storage_size += $folder_size; $color = $document->inheritsAccess() ? "black" : getAccessColor($document->getDefaultAccess()); print "
  • "; print "getID()."\">".$document->getName().""; $owner = $document->getOwner(); $color = getAccessColor(M_ALL); print " [".$owner->getFullName()."] "; if (! $document->inheritsAccess()) printAccessList($document); print "".formatted_size($folder_size).", ".$local_file_count." ".getMLText("files")."\n"; print "
  • "; $file_count += $local_file_count; return $folder_size; } function printAccessList($obj) { $accessList = $obj->getAccessList(); if (count($accessList["users"]) == 0 && count($accessList["groups"]) == 0) return; print " ("; for ($i = 0; $i < count($accessList["groups"]); $i++) { $group = $accessList["groups"][$i]->getGroup(); $color = getAccessColor($accessList["groups"][$i]->getMode()); print "".$group->getName().""; if ($i+1 < count($accessList["groups"]) || count($accessList["users"]) > 0) print ", "; } for ($i = 0; $i < count($accessList["users"]); $i++) { $user = $accessList["users"][$i]->getUser(); $color = getAccessColor($accessList["users"][$i]->getMode()); print "".$user->getFullName().""; if ($i+1 < count($accessList["users"])) print ", "; } print ")"; } UI::contentHeading(getMLText("folders_and_documents_statistic")); UI::contentContainerStart(); print ""; print ""; print "
    \n"; print "
      \n"; print "
    • ".getMLText("access_inheritance")."
    • "; print "
    • ".getMLText("access_mode_all")."
    • "; print "
    • ".getMLText("access_mode_readwrite")."
    • "; print "
    • ".getMLText("access_mode_read")."
    • "; print "
    • ".getMLText("access_mode_none")."
    • "; print "
    \n"; print "
    \n"; print "
      \n"; printFolder($dms->getFolder($settings->_rootFolderID)); print "
    \n"; print "
    "; print "
      \n"; print "
    • ".getMLText("folders").": ".$folder_count."
    • \n"; print "
    • ".getMLText("documents").": ".$document_count."
    • \n"; print "
    • ".getMLText("files").": ".$file_count."
    • \n"; print "
    • ".getMLText("storage_size").": ".formatted_size($storage_size)."
    • \n"; print "
    \n"; print "
    \n"; UI::contentContainerEnd(); UI::htmlEndPage(); ?>