Added TimeAgo Function to convert mysql DataTime to a human readable time like 2 weeks ago similar to other apps like facebook do it. Added to function to Recent Activity under client overview

This commit is contained in:
johnnyq
2023-06-05 12:25:39 -04:00
parent ca61556c4f
commit f64ab630fd
2 changed files with 28 additions and 3 deletions

View File

@@ -114,13 +114,12 @@ $sql_asset_retire = mysqli_query(
<?php
while ($row = mysqli_fetch_array($sql_recent_activities)) {
$log_id = intval($row['log_id']);
$log_created_at = nullable_htmlentities($row['log_created_at']);
$log_created_at_time_ago = timeAgo($row['log_created_at']);
$log_description = nullable_htmlentities($row['log_description']);
?>
<tr>
<td><?php echo $log_created_at; ?></td>
<td><?php echo $log_created_at_time_ago; ?></td>
<td><?php echo $log_description; ?></td>
</tr>