Init
This commit is contained in:
32
backend/resources/library/process/process.function.php
Normal file
32
backend/resources/library/process/process.function.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
if (!defined('PICONTROL')) exit();
|
||||
|
||||
function getReadableStatus($status)
|
||||
{
|
||||
switch (substr($status, 0, 1))
|
||||
{
|
||||
case 'D':
|
||||
return _t('Ununterbrechbar');
|
||||
case 'R':
|
||||
return _t('Läuft');
|
||||
case 'S':
|
||||
return _t('Schläft');
|
||||
case 'T':
|
||||
return _t('Gestoppt');
|
||||
case 'Z':
|
||||
return _t('Zombie');
|
||||
}
|
||||
}
|
||||
|
||||
function getSecondsFromTime($time)
|
||||
{
|
||||
$split = preg_split('#[-:]+#', $time);
|
||||
|
||||
if (count($split) == 4)
|
||||
return $split[0]*86400 + $split[1]*3600 + $split[2]*60 + $split[3];
|
||||
elseif (count($split) == 3)
|
||||
return $split[0]*3600 + $split[1]*60 + $split[2];
|
||||
|
||||
return $split[0]*60 + $split[1];
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user