".;
//read_repository2($GLOBALS['phpgw_info']['user']['account_id']);
$acceso=0;
$folderid = (isset($_GET['folderid'])) ? (int) $_GET['folderid'] : 1;
//echo "
a".$folderid." b ".$_GET['folderid']."
";
if(!$folder = getFolder($folderid)) {
//die ("Accesso denegado!".$folderid." ".getFolder($folderid));
$acceso=0;
$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!');
}else{
$acceso=1;
}
//echo $folder->getAccessMode();
if ($folder->getAccessMode($user) < M_READ) {
//die ("accesso denegado!"." ".$folder->getAccessMode($user));
$acceso=0;
$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!');
}else{
$acceso=1;
}
printHTMLHead( getMLText("folder_title", array("foldername" => $folder->getName()) ) );
printTitleBar($folder);
printFolderPageStart($folder);
?>
1){
?>
0){
$documents = $folder->getDocuments();
//echo "user".$user;
//$documents = filterAccess($documents, $user, M_READ);
if (count($documents) > 0)
{
$rownum = (count($documents)*2)+1;
print "\n";
print " | \n";
print "".getMLText("name")." | \n";
print " | \n";
print "".getMLText("comment")." | \n";
print " | \n";
print "".getMLText("owner")." | \n";
print "
\n";
foreach($documents as $document)
{
$owner = $document->getOwner();
$comment = $document->getComment();
if (strlen($comment) > 25) $comment = substr($comment, 0, 22) . "...";
$linkData = array
(
'documentid' => $document->getID(),
'menuaction' => 'mydms.uimydms.viewDocument'
);
$editURL = $GLOBALS['phpgw']->link('/index.php',$linkData);
// the old code
#print "";
#print " | ";
#print "getID()."\">" . $document->getName() . " | \n";
#print "" . $comment . " | ";
#print "".$owner->getFullName()." | ";
#print "
";
// the new code
// onclick="window.open(this.href,this.target,'dependent=yes,width=750,height=400,scrollbars=yes,status=yes'); return false;"
print "";
print " | ";
print "" . $document->getName() . " | \n";
print "" . $comment . " | ";
print "".$owner->getFullName()." | ";
print "
";
}
} else {
print "".getMLText("no_documents")." |
";
}
}
?>