function GetSolutionTime($solution) { $contest = WT_contest_by_id($solution['contest_id']); if ($contest['settings']['duration'] == 0) { return format_date_time($solution['timestamp']); } else { return Timer($solution['timestamp'] - $contest['settings']['timestamp']); } }
function WT_contest_finished($id = -1) { $cnt = WT_spawn_new_contest_container(); $c = WT_contest_by_id($id); return $cnt->ReNewOneStatus($c) == 2; }
function Subnav_Info() { $WT_contest_id = $_SESSION['WT_contest_id']; if (!isset($WT_contest_id) || $WT_contest_id == '') { return; } $data = WT_contest_by_id($WT_contest_id); return $this->Template('subnav_info', array('data' => $data, 'lib' => $this)); }