';
echo $HTML->listTableTop($tabletop);
$time_new = 604800;
$rowid = 0;
foreach ($nested_docs[$dirid] as $d) {
echo '
boxGetAltRowStyle($rowid).'>';
switch ($d->getFileType()) {
case "URL":
$docurl=$d->getFileName();
break;
default:
$docurl=util_make_url ('/docman/view.php/'.$group_id.'/'.$d->getID().'/'.urlencode($d->getFileName()));
}
echo '';
switch ($d->getFileType()) {
case "image/png":
case "image/jpeg":
case "image/gif":
case "image/tiff":
echo html_image('docman/file_type_image.png',22,22,array('alt'=>$d->getFileType()));
break;
case "application/pdf":
echo html_image('docman/file_type_pdf.png',22,22,array('alt'=>$d->getFileType()));
break;
case "text/html":
case "URL":
echo html_image('docman/file_type_html.png',22,22,array('alt'=>$d->getFileType()));
break;
case "text/plain":
echo html_image('docman/file_type_plain.png',22,22,array('alt'=>$d->getFileType()));
break;
case "application/msword":
case "application/vnd.oasis.opendocument.text":
echo html_image('docman/file_type_writer.png',22,22,array('alt'=>$d->getFileType()));
break;
case "application/vnd.ms-excel":
case "application/vnd.oasis.opendocument.spreadsheet":
echo html_image('docman/file_type_spreadsheet.png',22,22,array('alt'=>$d->getFileType()));
break;
case "application/vnd.oasis.opendocument.presentation":
case "application/vnd.ms-powerpoint":
echo html_image('docman/file_type_presentation.png',22,22,array('alt'=>$d->getFileType()));
break;
case "application/zip":
case "application/x-tar":
case "application/x-rpm":
echo html_image('docman/file_type_archive.png',22,22,array('alt'=>$d->getFileType()));
break;
default:
echo html_image('docman/file_type_unknown.png',22,22,array('alt'=>$d->getFileType()));
}
echo ' | ';
echo '';
if (($d->getUpdated() && $time_new > (time() - $d->getUpdated())) || $time_new > (time() - $d->getCreated())) {
echo html_image('docman/new.png',14,14,array('alt'=>'new'));
}
echo ' '.$d->getFileName();
echo ' | ';
echo ''.$d->getName().' | ';
echo ''.$d->getDescription().' | ';
echo ''.make_user_link($d->getCreatorUserName(),$d->getCreatorRealName()).' | ';
echo '';
if ( $d->getUpdated() ) {
echo date(_('Y-m-d H:i'),$d->getUpdated());
} else {
echo date(_('Y-m-d H:i'),$d->getCreated());
}
echo ' | ';
echo ''.$d->getStateName().' | ';
echo '';
switch ($d->getFileType()) {
case "URL":
echo "--";
break;
default:
$metric = 'B';
$size = $d->getFileSize();
if ($size > 1024 ) {
$metric = 'KB';
$size = floor ($size/1024);
if ($size > 1024 ) {
$metric = 'MB';
$size = floor ($size/1024);
}
}
echo $size . $metric;
echo ' | ';
}
if (forge_check_perm ('docman', $group_id, 'approve')) {
echo '';
echo ''.html_image('docman/trash-empty.png',22,22,array('alt'=>'trashfile')). '';
echo ''.html_image('docman/edit-file.png',22,22,array('alt'=>'editfile')). '';
echo ' | ';
}
echo '