Exemplo n.º 1
0
    $page->render();
    exit;
}
$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
Exemplo n.º 2
0
/*
 * LEVEL_NEEDED defines the users who can see this page.
 * Anyone without permission to see this page, will
 * be redirected to a page saying so.
 * This variable *must* be set in order to bootstrap
 * to continue. This is by design, in order to prevent
 * leaving open holes for new pages.
 *
 * */
define('LEVEL_NEEDED', true);
require_once '../../server/inc/bootstrap.php';
require_once 'api/ShowContests.php';
$page = new OmegaupAdminTabPage();
$page->addComponent(new TitleComponent('Concursos'));
$page->nextTab('Actuales');
//get the'm contests
$header = array('description' => 'Descripcion', 'start_time' => 'Tiempo de inicio', 'finish_time' => 'Tiempo de fin');
$a = new Contests(array('finish_time' => date('c')));
$b = new Contests(array('finish_time' => '2999-01-01 00:00:00'));
$rows = ContestsDAO::byRange($a, $b);
$table = new TableComponent($header, $rows);
function toDate($unix_time)
{
    if (strlen($unix_time) == 0) {
        return '';
    }
    return FormatTime($unix_time);
    return $unix_time;
    return date('F jS h:i:s a', $unix_time);
}
Exemplo n.º 3
0
/*
 * LEVEL_NEEDED defines the users who can see this page.
 * Anyone without permission to see this page, will	
 * be redirected to a page saying so.
 * This variable *must* be set in order to bootstrap
 * to continue. This is by design, in order to prevent
 * leaving open holes for new pages.
 * 
 * */
define("LEVEL_NEEDED", true);
require_once "../../server/inc/bootstrap.php";
require_once "api/ShowContests.php";
$page = new OmegaupAdminTabPage();
$page->addComponent(new TitleComponent("Concursos"));
$page->nextTab("Actuales");
//get the'm contests
$header = array("description" => "Descripcion", "start_time" => "Tiempo de inicio", "finish_time" => "Tiempo de fin");
$a = new Contests(array("finish_time" => date("c")));
$b = new Contests(array("finish_time" => "2999-01-01 00:00:00"));
$rows = ContestsDAO::byRange($a, $b);
$table = new TableComponent($header, $rows);
function toDate($unix_time)
{
    if (strlen($unix_time) == 0) {
        return "";
    }
    return FormatTime($unix_time);
    return $unix_time;
    return date("F jS h:i:s a", $unix_time);
}