mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update functions.php
This commit is contained in:
@@ -850,6 +850,16 @@ function format_string ($format, $data) {
|
||||
return $phone_number;
|
||||
}
|
||||
|
||||
//format seconds into hh:mm:ss
|
||||
function format_hours($seconds) {
|
||||
$hours = floor($seconds / 3600);
|
||||
$minutes = floor(($seconds / 60) % 60);
|
||||
$seconds = $seconds % 60;
|
||||
if (strlen($minutes) == 1) { $minutes = '0'.$minutes; }
|
||||
if (strlen($seconds) == 1) { $seconds = '0'.$seconds; }
|
||||
return "$hours:$minutes:$seconds";
|
||||
}
|
||||
|
||||
//browser detection without browscap.ini dependency
|
||||
function http_user_agent($info = '') {
|
||||
$u_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
|
||||
Reference in New Issue
Block a user