{$title}" . "{$indent}

{$description}

" . "{$indent}

Microsoft Windows XP Service Pack 3 and newer are supported, provided .NET Framework 4.0 is installed.

" . "{$indent}"; foreach($files as $fileName) { $folderName = dirname($fileName); $changlogName = $folderName . DIRECTORY_SEPARATOR . 'changelog.txt'; $changelog = fopen($changlogName, 'rb'); if(!$changelog) continue; $versionInfo = fgets($changelog); fclose($changelog); if($versionInfo === false) continue; $versionInfo = trim($versionInfo); if(empty($versionInfo)) continue; $buttonClasses = []; if(empty($hadLatest)) { $hadLatest = true; $isLatest = true; $latestText = ' Latest!'; $buttonClasses[] = 'tmf-button-latest'; } else { $isLatest = false; $latestText = ''; } [$version, $date] = explode(' - ', $versionInfo, 2); $versionId = $version; $date = strtotime($date); $sourceArchive = $folderName . '/topmostfriend-' . substr($version, 1) . '.zip'; $sha256File = $fileName . '.sha256'; $sha256Hash = is_file($sha256File) ? trim(file_get_contents($sha256File)) : ''; $body .= sprintf('%s

%s — %s

', $indent, $versionId, $versionId, $version, date('c', $date), date('Y-m-d', $date), $latestText); if(empty($sha256Hash)) $body .= '

SHA256 hash is missing.

'; else { $sha256HashFile = hash_file('sha256', $fileName); $sha256HashMatches = hash_equals($sha256Hash, $sha256HashFile) ? '' : ' (does not match with actual file)'; $body .= sprintf('

SHA256: %s%s

', $sha256Hash, $sha256HashMatches); } $body .= $indent . '' . $indent . '
'; } $indent = substr($indent, 0, -4); $body .= $indent; require_once __DIR__ . '/_inc/out.php';