slice number of users to 10
This commit is contained in:
@@ -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>";
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user