+$entity_type = $file['entity_type'];
+if ($entity_type == 'time') {
+ if (!(ttAccessAllowed('track_own_time') || ttAccessAllowed('track_time')) || !ttTimeHelper::getRecord($file['entity_id'])) {
+ header('Location: access_denied.php');
+ exit();
+ }
+}
+if ($entity_type == 'project') {