server/onyx/include/admin/chrono.php

22 lines
356 B
PHP

<?php
if(!defined('ONYX')) exit;
$p = $out[0];
if (count($p) > 2)
{
switch($p[2])
{
case "start":
file_put_contents($VAR["misc_dir"]."/challenge_started", time() + (intval($_POST["time"]) - 240) * 60);
break;
case "init":
unlink($VAR["misc_dir"]."/challenge_started");
break;
}
}
header("Location: /".SALT_ADMIN."/");
exit();