Subversion Repositories ALCASAR

Rev

Rev 324 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 324 Rev 1805
Line 4... Line 4...
4
	$time = floor($time);
4
	$time = floor($time);
5
	if (!$time)
5
	if (!$time)
6
		return "0 seconds";
6
		return "0 seconds";
7
	$d = $time/86400;
7
	$d = $time/86400;
8
	$d = floor($d);
8
	$d = floor($d);
-
 
9
	$str = '';
9
	if ($d){
10
	if ($d){
10
		$str .= "$d days, ";
11
		$str .= "$d days, ";
11
		$time = $time % 86400;
12
		$time = $time % 86400;
12
	}
13
	}
13
	$h = $time/3600;
14
	$h = $time/3600;
Line 22... Line 23...
22
		$str .= "$m minutes, ";
23
		$str .= "$m minutes, ";
23
		$time = $time % 60;
24
		$time = $time % 60;
24
	}
25
	}
25
	if ($time)
26
	if ($time)
26
		$str .= "$time seconds, ";
27
		$str .= "$time seconds, ";
-
 
28
 
27
	$str = ereg_replace(', $','',$str);
29
	$str = preg_replace('/, $/','',$str);
28
 
30
 
29
	return $str;
31
	return $str;
30
}
32
}
31
 
33
 
32
function time2strclock($time)
34
function time2strclock($time)
Line 113... Line 115...
113
{
115
{
114
	return $ret;
116
	return $ret;
115
}
117
}
116
function check_defaults($val,$op,$def)
118
function check_defaults($val,$op,$def)
117
{
119
{
118
	for($i=0;$i<$def[count];$i++){
120
	for($i=0;$i<$def['count'];$i++){
119
		if ($val == $def[$i] && ($op == '' || $op == $def[operator][$i]))
121
		if ($val == $def[$i] && ($op == '' || $op == $def['operator'][$i]))
120
			return 1;
122
			return 1;
121
	}
123
	}
122
 
124
 
123
	return 0;
125
	return 0;
124
}
126
}