From b10268ca95b930ca2bda29016fcb32ec8eb7aa3e Mon Sep 17 00:00:00 2001 From: Joecowboy Date: Thu, 5 Jan 2012 21:30:16 -0600 Subject: Fixed the get_time() out put fixed. Tweaked my changes made a tighter code. --- usr/local/www/includes/functions.inc.php | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'usr/local/www/includes/functions.inc.php') diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php index 041fd55..961f925 100644 --- a/usr/local/www/includes/functions.inc.php +++ b/usr/local/www/includes/functions.inc.php @@ -96,21 +96,15 @@ function get_uptime() { $uptimestr .= "1 Day "; if ($uphours > 1) - $hours = "Hours"; - else if ($uphours > 0) - $hours = "Hour"; - + $hours = "s"; + if ($upmins > 1) - $minutes = "Minutes"; - else if ($uphours > 0) - $minutes = "Minute"; - + $minutes = "s"; + if ($upmins > 1) - $seconds = "Seconds"; - else if ($uphours > 0) - $seconds = "Second"; - - $uptimestr .= sprintf("%02d $hours %02d $minutes %02d $seconds", $uphours, $upmins, $upsecs); + $seconds = "s"; + + $uptimestr .= sprintf("%02d Hour$hours %02d Minute$minutes %02d Second$seconds", $uphours, $upmins, $upsecs); return $uptimestr; } -- cgit v1.1