status === ReportStatus::DOWNLOAD_ERROR) { continue; } $old = $new; $new = $report; if ($old === null) { $old = $report; } } if ($resource->checkedAt !== null) : $type = ''; if ($new !== null) { $newBasePath = __DIR__ . '/../../Files/' . $resource->path . '/' . $new->versionPath; $newWebPath = 'Modules/OnlineResourceWatcher/Files/' . $resource->path . '/' . $new->versionPath; if (\is_file($newBasePath . '/index.jpg')) { $type = 'img'; $newWebPath .= '/index.jpg'; } else { $files = \scandir($newBasePath); if ($files !== false) { foreach ($files as $file) { if ($file === '.' || $file === '..') { continue; } $newWebPath .= '/' . $file; if (\stripos($file, '.jpg') !== false || \stripos($file, '.jpeg') !== false || \stripos($file, '.png') !== false || \stripos($file, '.gif') !== false ) { $type = 'img'; break; } elseif (\stripos($file, '.pdf') !== false) { $type = 'pdf'; break; } } } } } if ($old !== null) { $oldBasePath = __DIR__ . '/../../Files/' . $resource->path . '/' . $old->versionPath; $oldWebPath = 'Modules/OnlineResourceWatcher/Files/' . $resource->path . '/' . $old->versionPath; if (\is_file($oldBasePath . '/index.jpg')) { $type = 'img'; $oldWebPath .= '/index.jpg'; } else { $files = \scandir($oldBasePath); if ($files !== false) { foreach ($files as $file) { if ($file === '.' || $file === '..') { continue; } $oldWebPath .= '/' . $file; if (\stripos($file, '.jpg') !== false || \stripos($file, '.jpeg') !== false || \stripos($file, '.png') !== false || \stripos($file, '.gif') !== false ) { $type = 'img'; break; } elseif (\stripos($file, '.pdf') !== false) { $type = 'pdf'; break; } } } } } ?>
<?= $this->printHtml($resource->title); ?>
<?= $this->printHtml($resource->title); ?>