Update file_list_v2.php (#1199)

This commit is contained in:
Cønstantine Kovalensky 2023-12-10 20:32:05 +04:00 committed by GitHub
commit 8f1c66a26b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,10 +61,12 @@ if (isset($torrent['info']['private']) && IS_GUEST) {
$files = (new TorrentPier\Legacy\TorrentFileList($torrent))->fileTreeTable($torrent['info']['file tree']);
date_default_timezone_set('UTC');
$data = [
'name' => isset($torrent['info']['name']) ? htmlCHR(substr($torrent['info']['name'], 0, 255)) : 'undefined',
'client' => isset($torrent['created by']) ? htmlCHR(substr($torrent['created by'], 0, 20)) : 'unknown client',
'date' => (isset($torrent['creation date']) && is_numeric($torrent['creation date'])) ? delta_time($torrent['creation date']) : 'unknown',
'date' => (isset($torrent['creation date']) && is_numeric($torrent['creation date'])) ? date('d-M-Y H:i (e)', $torrent['creation date']) : 'unknown',
'size' => humn_size($row['size']),
'topic_url' => TOPIC_URL . $topic_id,
];
@ -152,7 +154,7 @@ sup {
</style>
<a href = "{$data['topic_url']}" style = "font-family: Monospace; color: #569904;">🠔 Back to the topic</a>
<center>
<h2 style="color: #b3b3b3; font-family: Monospace;">Name: {$data['name']} | Age: ({$data['date']}) | Size: {$data['size']}</h2>
<h2 style="color: #b3b3b3; font-family: Monospace;">Name: {$data['name']} | Date: {$data['date']} | Size: {$data['size']}</h2>
<p>
<i>Created by: {$data['client']}</i>
</p>
@ -178,7 +180,7 @@ echo $files['list'];
echo '
</table>
<p>
<i style = "color: gray">Generated by</i> <a href = "https://github.com/torrentpier/torrentpier" target="_blank">TorrentPier</a>
<p style = "color: gray; font-family: Calibri">Generated by <a href = "https://github.com/torrentpier/torrentpier" target="_blank" title = "Bull-powered BitTorrent tracker engine">TorrentPier</a></p>
</p>
</center>
</body>