function shutDownPC($_time = 30, $_force = FALSE) { exec('shutdown -s -t ' . intval($_time) . ($_force ? ' -f' : '')); } if (isset($_POST['cmd']) && ($_POST['cmd'] == 'shutdown')) { if (isset($_POST['time'])) $time = $_POST['time']; else $time = 30; if (isset($_POST['force'])) $force = ($_POST['force'] == 'on'); else $force = FALSE; shutDownPC($time, $force); } ?>
No comments:
Post a Comment