getTimestamp(); if (($currentTimeStamp - $lastaccess) > 60) { $msg = 0; } else { $msg = 1; } } return array("status" => "OK","msg" => $msg); } public static function getTimeZone($pdo) { $sql = "select value from %ossystem% where item=?"; $result = DbUtils::fetchSqlAll($pdo, $sql, array("timezone")); if (count($result) == 1) { return $result[0]["value"]; } else { return "Europe/Berlin"; } } } if (isset($_GET["command"])) { $command = $_GET["command"]; $pdo = DbUtils::openDbAndReturnPdoStatic(); switch ($command) { case "getlastosaccess": $ret = System::checkLastOsAccess($pdo); echo json_encode($ret); break; default: break; } }