request->uri->fragment) || $this->request->uri->fragment === 'c-tab-1' ? ' checked' : ''; ?>>
status === ReportStatus::DOWNLOAD_ERROR) { continue; } $old = $new ?? $report; $new = $report; } if ($resource->checkedAt !== null) : $type = ''; 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'; } elseif (\is_dir($oldBasePath)) { $files = \scandir($oldBasePath); if ($files !== false) { foreach ($files as $file) { if ($file === '.' || $file === '..' || \str_starts_with($file, '_')) { continue; } $oldWebPath .= '/' . $file; if (\stripos($file, '.jpg') !== false || \stripos($file, '.jpeg') !== false || \stripos($file, '.png') !== false || \stripos($file, '.gif') !== false || \stripos($file, '.webp') !== false ) { $type = 'img'; break; } elseif (\stripos($file, '.pdf') !== false) { $type = 'pdf'; break; } elseif (\stripos($file, '.htm') !== false) { $type = 'htm'; break; } } } } else { $oldWebPath = '../../../../Web/Backend/img/404.svg'; $type = 'img'; } } 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'; } elseif (\is_dir($newBasePath)) { $files = \scandir($newBasePath); if ($files !== false) { foreach ($files as $file) { if ($file === '.' || $file === '..' || \str_starts_with($file, '_')) { continue; } $newWebPath .= '/' . $file; if (\stripos($file, '.jpg') !== false || \stripos($file, '.jpeg') !== false || \stripos($file, '.png') !== false || \stripos($file, '.gif') !== false || \stripos($file, '.webp') !== false ) { $type = 'img'; break; } elseif (\stripos($file, '.pdf') !== false) { $type = 'pdf'; break; } elseif (\stripos($file, '.htm') !== false) { $type = 'htm'; break; } } } } else { $newWebPath = $oldWebPath; } } $base = __DIR__ . '/../../../../'; $newDiffPath = ''; if ($new !== null) { if ($type === 'pdf') { $newDiffPath = \dirname($newWebPath) . '/_' . \basename($newWebPath, '.pdf') . '.htm'; } else { $newDiffPath = \dirname($newWebPath) . '/_' . \basename($newWebPath); } } ?>
request->uri->fragment === 'c-tab-2' ? ' checked' : ''; ?>>