function ConvertSeconds($seconds) {
$tmpseconds = substr("00".$seconds % 60, -2);
if ($seconds > 59) {
if ($seconds > 3599) {
$tmphours = substr("0".intval($seconds / 3600), -2);
$tmpminutes = substr("0".intval($seconds / 60 - (60 * $tmphours)), -2);
return ($tmphours.":".$tmpminutes.":".$tmpseconds);
} else {
return ("00:".substr("0".intval($seconds / 60), -2).":".$tmpseconds);
}
} else {
return ("00:00:".$tmpseconds);
}
}