// $tmp = Tasks::getActiveTasksBlockForPreview($id); // if (!empty($tmp)) { // $top = '<div class="obj-preview-h pt10">'.L\get('ActiveTasks').'</div>'.$tmp; // } if (!empty($top)) { echo $top . '<hr />'; } if (!empty($preview['filename'])) { $fn = $filesPreviewDir . $preview['filename']; if (file_exists($fn)) { echo file_get_contents($fn); $res = DB\dbQuery('UPDATE file_previews SET ladate = CURRENT_TIMESTAMP WHERE id = $1', $id) or die(DB\dbQueryError()); } } elseif (!empty($preview['html'])) { echo $preview['html']; } // $dbNode = new TreeNode\Dbnode(); // echo '<!-- NodeName:'.$dbNode->getName($id).' -->'; } break; default: $o = new Objects(); $preview = $o->getPreview($id); echo implode("\n", $preview); break; } if (empty($_GET['i'])) { echo '</body></html>'; }