mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Code re-formatting (#1065)
This commit is contained in:
parent
3ac1a835d0
commit
5298f16d47
2 changed files with 22 additions and 10 deletions
|
@ -35,14 +35,13 @@ $torrent = new TorrentPier\Legacy\TorrentFileList($tor);
|
||||||
$file_list = $torrent->fileTreeTable($tor['info']['file tree']);
|
$file_list = $torrent->fileTreeTable($tor['info']['file tree']);
|
||||||
|
|
||||||
$date = '';
|
$date = '';
|
||||||
$name = $tor['info']['name'] ?? '';
|
$name = htmlCHR($tor['info']['name'] ?? '');
|
||||||
if (isset($tor['creation date']) && is_numeric($tor['creation date'])) {
|
if (isset($tor['creation date']) && is_numeric($tor['creation date'])) {
|
||||||
$date = date("d M Y | G:i:s T", $tor['creation date']);
|
$date = date("d M Y | G:i:s T", $tor['creation date']);
|
||||||
}
|
}
|
||||||
$size = humn_size($file_list['size']);
|
$size = humn_size($file_list['size']);
|
||||||
|
|
||||||
echo "
|
echo "<html>
|
||||||
<html>
|
|
||||||
<head>
|
<head>
|
||||||
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />
|
||||||
<meta name=\"robots\" content=\"index, follow\">
|
<meta name=\"robots\" content=\"index, follow\">
|
||||||
|
@ -50,7 +49,7 @@ echo "
|
||||||
|
|
||||||
<title>File list — $name ($size)</title>
|
<title>File list — $name ($size)</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body style=\"background-color: #1f1f1f; color: #ffffff;\">
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
table {
|
table {
|
||||||
|
@ -59,28 +58,41 @@ echo "
|
||||||
width: auto;
|
width: auto;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
font-family: -apple-system,BlinkMacSystemFont,\"Segoe UI\",\"Noto Sans\",Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\";
|
font-family: -apple-system,BlinkMacSystemFont,\"Segoe UI\",\"Noto Sans\",Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\";
|
||||||
|
background-color: #2c2c2c;
|
||||||
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
th, td {
|
th, td {
|
||||||
border: 2px solid black;
|
border: 2px solid #00ff00;
|
||||||
border-color: green;
|
border-color: #646464;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
color: #acacac;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
background-color: #f2f2f2;
|
background-color: #1f1f1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
color: #b3b3b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #187700;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<center>
|
<center>
|
||||||
<h2 style = \"color: black;font-family: Monospace\">Document name: $name | Date: ($date) | Size: $size</h2><hr>
|
<h2 style = \"color: #b3b3b3;font-family: Monospace\">Document name: $name | Date: ($date) | Size: $size</h2><hr>
|
||||||
|
|
||||||
<table><tr><th>Location</th><th>Size</th><th title=\"BitTorrent Merkle Root — The hash of the file, which is embedded in metafiles with BitTorrent v2 support, tracker users can extract, calculate them, also deduplicate torrents using desktop tools such as Torrent Merkle Root Reader.\">BTMR hash <sup>?</sup></th></tr>";
|
<table><tr><th>Path</th><th>Size</th><th title=\"BitTorrent Merkle Root — The hash of the file, which is embedded in torrents with BitTorrent v2 support, tracker users can extract, calculate them, also deduplicate torrents using desktop tools such as Torrent Merkle Root Reader.\">Hash <sup>?</sup></th></tr>";
|
||||||
|
|
||||||
echo implode('', $file_list['list']);
|
echo implode('', $file_list['list']);
|
||||||
|
|
||||||
echo '</center>
|
echo '</center>
|
||||||
</table>
|
</table>
|
||||||
|
<p>Generated by <a href = "https://github.com/torrentpier/torrentpier" target="_blank">TorrentPier</a></p>
|
||||||
</body>
|
</body>
|
||||||
</html>';
|
</html>';
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@
|
||||||
<p class="small">{postrow.attach.tor_reged.FILESIZE}</p>
|
<p class="small">{postrow.attach.tor_reged.FILESIZE}</p>
|
||||||
<p style="padding-top: 6px;"><input id="tor-filelist-btn" type="button" class="lite" value="{L_FILELIST}" /></p>
|
<p style="padding-top: 6px;"><input id="tor-filelist-btn" type="button" class="lite" value="{L_FILELIST}" /></p>
|
||||||
<!-- IF postrow.attach.tor_reged.HASH_V2 -->
|
<!-- IF postrow.attach.tor_reged.HASH_V2 -->
|
||||||
<p><a href="{PAGE_URL}&filelist=1" target="_blank">...</a></p>
|
<p><a href="{PAGE_URL}&filelist=1" title = "File hashes" target="_blank">...</a></p>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue