コード例 #1
0
ファイル: contest.php プロジェクト: kukogit/omegaup
}
$this_contests = ContestsDAO::search(new Contests(array("alias" => $_GET["alias"])));
if (count($this_contests) == 0) {
    $page->addComponent(new TitleComponent("Este concurso no existe", 2));
    $page->render();
    exit;
}
$this_contest = $this_contests[0];
if (is_null($this_contest)) {
    $page->addComponent(new TitleComponent("Este concurso no existe", 2));
    $page->render();
    exit;
}
$page->nextTab("Detalles");
//$page->addComponent( "<a href='../arena/{$_GET['alias']}/'>Ir al concurso</a>"  );
RequestContext::set('contest_alias', $_GET['alias']);
$omiReport = new OmiReport();
$djson = json_decode(json_encode($omiReport->ExecuteApi()));
$nreports = sizeof($djson->report);
$page->addComponent("<table style='width:100%' border=0>");
//reports
for ($r = 0; $r < $nreports; $r++) {
    $page->addComponent("<tr><td><hr>");
    $page->addComponent("<strong>" . $djson->report[$r]->username . "</strong> " . $djson->report[$r]->name . "");
    /* 	$djson->report[$r]->total->points;  $djson->report[$r]->total->penalty;*/
    $nprobs = sizeof($djson->report[$r]->problems);
    $pkeys = get_object_vars($djson->report[$r]->problems);
    $page->addComponent("</td></tr>");
    //team, i think
    foreach ($pkeys as $pp) {
        $page->addComponent("<tr><td>");