function InitIface() { $WT_contest_id = $_SESSION['WT_contest_id']; $manage = $this->IsContestJudge(); $started = WT_contest_running($WT_contest_id); $finished = WT_contest_finished($WT_contest_id); $c = $this->GetProblemsCountAtContest($WT_contest_id); if (WT_contest_running() || WT_contest_finished() || $this->IsContestJudge()) { $this->gateway->AppendMainMenuItem('Монитор', '.?page=monitor', 'monitor'); } if ($started || $finished || $manage) { if ($c > 0) { $this->gateway->AppendMainMenuItem('Список задач', '.?page=problems', 'problems'); } } if (($started || $finished || $manage) && $this->GetUserSolutionsCount($WT_contest_id, user_id())) { $this->gateway->AppendMainMenuItem('Статус', '.?page=status', 'status'); } if ($started || $manage) { if ($c > 0) { $this->gateway->AppendMainMenuItem('Послать решение', '.?page=submit', 'submit'); } } if ($this->GetAllowed('SOLUTIONS.MANAGE') && $this->GetAllSolutionsCount($WT_contest_id)) { $this->gateway->AppendMainMenuItem('Решения участников', '.?page=solutions', 'solutions'); } if ($this->GetAllowed('PROBLEMS.MANAGE')) { $this->gateway->AppendMainMenuItem('Управление задачами', '.?page=prbmanager', 'prbmanager'); } if ($this->GetAllowed('MONITOR.MEGAMONITOR')) { $this->gateway->AppendMainMenuItem('Мегамонитор', '.?page=megamonitor', 'megamonitor'); } }
function PAGE_Status() { global $action, $id; $manage = $this->IsContestJudge(); $WT_contest_id = $_SESSION['WT_contest_id']; if (!WT_contest_running($WT_contest_id) && !WT_contest_finished($WT_contest_id) && !$manage) { content_unavaliable(); return; } $this->gateway->AppendNavigation('Статус по контесту', '.?page=submit'); $this->CPrintLn(stencil_formo('')); $this->InsertTemplate('status', array('lib' => $this)); $this->CPrintLn(stencil_formc()); }