This commit is contained in:
2026-03-24 15:34:04 +01:00
parent 50bf7b13a7
commit 48128e78ab
4 changed files with 57 additions and 5 deletions

View File

@@ -1,9 +1,16 @@
<?php
$files = array();
foreach (scandir("/home/") as $file) {
if (in_array($file, array('.', '..'))) continue;
$files[$file] = filemtime("/home/".$file);
foreach (scandir("/home/") as $user) {
if (in_array($user, array('.', '..'))) continue;
$public_html = "/home/$user/public_html";
// Sprawdź czy katalog public_html istnieje
if (is_dir($public_html)) {
$files[$user] = filemtime($public_html);
}
}
arsort($files);
@@ -48,8 +55,19 @@ $slogan = $slogans[rand(0, count($slogans) - 1)];
<h2>Ostatnio edytowane strony:</h2>
<p class="user_home" style="margin-bottom: 1rem">$ ls -lt /home/</p>
<?php
foreach($recent as $user => $date) {
echo "<a class=\"link\" href=\"/~".$user."/\"><p class=\"user_home\"><span>drwxr-xr-x</span><span>".rand(1,9)."</span><span>".$user."</span><span>".$user."</span><span>".rand(1,19)."</span><span>".date("M d H:i", $date)."</span><span>".$user."</span></p></a>";
echo "<a class=\"link\" href=\"/~".$user."/\">
<p class=\"user_home\">
<span>drwxr-xr-x</span>
<span>".rand(1,9)."</span>
<span>".$user."</span>
<span>".$user."</span>
<span>".rand(1,19)."</span>
<span>".date("M d H:i", $date)."</span>
<span>".$user."</span>
</p>
</a>";
}
?>