Add new global rank page
This commit is contained in:
parent
d442b1d3b3
commit
a229a10f25
@ -8,7 +8,7 @@ define("SALT_ADMIN", $VAR["prefix_admin"]);
|
|||||||
|
|
||||||
//On active le débogage si l'on est sur le domaine de debug
|
//On active le débogage si l'on est sur le domaine de debug
|
||||||
|
|
||||||
if ($_SERVER["SERVER_NAME"] == "localhost" || $_SERVER["SERVER_NAME"] == "fic" || $_SERVER["SERVER_NAME"] == "fic.nemunai.re" || $_SERVER["SERVER_NAME"] == "atlantis.chen.li")
|
//if ($_SERVER["SERVER_NAME"] == "localhost" || $_SERVER["SERVER_NAME"] == "fic" || $_SERVER["SERVER_NAME"] == "fic.nemunai.re" || $_SERVER["SERVER_NAME"] == "atlantis.chen.li")
|
||||||
define("DEBUG", true);
|
define("DEBUG", true);
|
||||||
|
|
||||||
//Chargement de tout le nécessaire pour le site
|
//Chargement de tout le nécessaire pour le site
|
||||||
@ -207,7 +207,10 @@ else
|
|||||||
{
|
{
|
||||||
$TEAM = intval(substr($p[0], 0, strpos($p[0], "-")));
|
$TEAM = intval(substr($p[0], 0, strpos($p[0], "-")));
|
||||||
|
|
||||||
$page = require("public/score.php");
|
if (!empty($TEAM))
|
||||||
|
$page = require("public/score.php");
|
||||||
|
else
|
||||||
|
$page = require("public/rank.php");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
11
onyx/include/public/rank.php
Normal file
11
onyx/include/public/rank.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if(!defined('ONYX')) exit;
|
||||||
|
|
||||||
|
$template->assign("top", Team::get_top(10));
|
||||||
|
$template->assign("rank", Team::get_top());
|
||||||
|
|
||||||
|
$template->assign("themes", Theme::get_themes());
|
||||||
|
$template->assign("nbExoMax", Exercice::get_nb_exo_max());
|
||||||
|
|
||||||
|
return "public/rank";
|
28
onyx/tpl/bootstrap/public/rank.tpl
Normal file
28
onyx/tpl/bootstrap/public/rank.tpl
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{extends file="public/layout.tpl"}
|
||||||
|
|
||||||
|
{block name=head2}
|
||||||
|
<meta http-equiv="refresh" content="60">
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block name=main}
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>Team</th>
|
||||||
|
<th>Slogan</th>
|
||||||
|
<th>Points</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{foreach from=$rank item=t key=k}
|
||||||
|
<tr>
|
||||||
|
<th>{$t->get_rank()}</th>
|
||||||
|
<td>{link href="{$t->id}-{$t->get_name_url()}" href_prefix="/" label=$t->get_name()}</td>
|
||||||
|
<td>{$t->slogan}</td>
|
||||||
|
<td>{$t->get_pts()}</td>
|
||||||
|
</tr>
|
||||||
|
{/foreach}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{/block}
|
Loading…
Reference in New Issue
Block a user