1 2 3 4 5 6 7 8 9
<?php if ($type === '~poweron') { Database::exec("UPDATE remoteaccess_machine SET password = NULL WHERE machineuuid = :uuid", ['uuid' => $uuid]); } elseif ($type === '~poweroff') { Database::exec("UPDATE remoteaccess_machine SET woltime = 0 WHERE machineuuid = :uuid", ['uuid' => $uuid]); }