Update functions.php
This commit is contained in:
parent
caaa4e5689
commit
1b0438dd8f
|
|
@ -850,6 +850,16 @@ function format_string ($format, $data) {
|
||||||
return $phone_number;
|
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
|
//browser detection without browscap.ini dependency
|
||||||
function http_user_agent($info = '') {
|
function http_user_agent($info = '') {
|
||||||
$u_agent = $_SERVER['HTTP_USER_AGENT'];
|
$u_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue