slice number of users to 10

This commit is contained in:
2026-06-23 01:14:42 +02:00
parent f02a616b54
commit 11f199e84e
2 changed files with 4 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ foreach (scandir("/home/") as $user) {
}
arsort($files);
$recent = $files;
$recent = array_slice($files, 0, 10);
include 'header.php';
@@ -71,10 +71,11 @@ if (!empty($activeUsers)) {
<article id="content">
<h2>Ostatnio edytowane strony:</h2>
<p class="user_home" style="margin-bottom: 1rem">$ ls -lt /home/</p>
<p class="user_home" style="margin-bottom: 1rem">$ ls -lt /home/ | head -n 10</p>
<?php
foreach($recent as $user => $date) {
echo "<a class=\"link\" href=\"/~".$user."/\">
<p class=\"user_home\">
<span>drwxr-xr-x</span>
@@ -86,6 +87,7 @@ foreach($recent as $user => $date) {
<span>".$user."</span>
</p>
</a>";
}
?>

BIN
stats.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB