Exemplo n.º 1
0
<?php

/*
 * 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", false);
require_once "../../server/inc/bootstrap.php";
require_once "api/ShowProblemInContest.php";
require_once "api/OmiReport.php";
$page = new OmegaupAdminTabPage();
$page->addComponent(new TitleComponent("Concurso " . $_GET["alias"] . ""));
if (!isset($_GET["alias"])) {
    $page->addComponent(new TitleComponent("Este concurso no existe", 2));
    $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));
Exemplo n.º 2
0
<?php

/*
 * 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
<?php

/*
 * 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);