getErrorMessage())); } ?> Directory : '.$DocGroupName.' '; if (forge_check_perm ('docman', $group_id, 'approve')) { echo ''. html_image('docman/configure-directory.png',22,22,array('alt'=>'edit')). ''; echo ''. html_image('docman/insert-directory.png',22,22,array('alt'=>'addsubdir')). ''; //echo ''. html_image('docman/trash-empty.png',22,22,array('alt'=>'trashdir')). ''; if (!isset($nested_docs[$dirid]) && !isset($nested_groups[$dirid])) echo ''. html_image('docman/delete-directory.png',22,22,array('alt'=>'deldir')). ''; } echo ''. html_image('docman/insert-file.png',22,22,array('alt'=>'addfile')). ''; echo ''; echo ''; echo ''; echo ''; if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) { $tabletop = array('','Filename','Title','Description','Author','Last time','Status','Size'); if (forge_check_perm ('docman', $group_id, 'approve')) $tabletop[] = 'Actions'; echo '
'; echo $HTML->listTableTop($tabletop); $time_new = 604800; $rowid = 0; foreach ($nested_docs[$dirid] as $d) { echo 'boxGetAltRowStyle($rowid).'>'; $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": 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 ''; $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 ''; $rowid++; } echo $HTML->listTableBottom(); echo '
'; echo '
'.html_image('docman/new.png',14,14,array('alt'=>'new')).' : ' . _('Created or updated since less than 7 days') .'
'; include 'docman/views/editfile.php'; } ?>