forked from pouetnet/pouet2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
party_results.php
68 lines (55 loc) · 1.71 KB
/
party_results.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
require_once("bootstrap.inc.php");
require_once("include_pouet/pouet-asciiviewer.php");
class PouetBoxPartyResults extends PouetBoxASCIIViewer
{
public $party;
function __construct()
{
parent::__construct();
$this->uniqueID = "pouetbox_partyresults";
}
function LoadFromDB()
{
parent::LoadFromDB();
$this->party = PouetParty::spawn( $_GET["which"] );
if (!$this->party) return;
$this->title = $this->party->name." ".(int)$_GET["when"]." results";
}
function RenderHeader()
{
parent::RenderHeader();
echo " <h2><big>".$this->party->PrintLinked( $_GET["when"] )." results"."</big></h2>\n";
}
function RenderBody()
{
$this->asciiFilename = get_local_partyresult_path( $_GET["which"], $_GET["when"] );
parent::RenderBody();
}
function RenderFooter()
{
parent::RenderFooter();
global $currentUser;
echo " <div class='foot'>";
if ($currentUser && $currentUser->IsGloperator())
{
printf("[ <a class='adminlink' href='admin_party_edition_edit.php?which=%d&when=%d'>update res</a> ]\n",$_GET["which"], $_GET["when"]);
printf("[ <a class='adminlink' href='%s'>download res</a> ]\n",get_partyresult_url( $_GET["which"], $_GET["when"] ) );
}
printf("[ <a href='party.php?which=%d&when=%d'>back to the party</a> ]\n",$_GET["which"],$_GET["when"]);
echo " </div>";
echo "</div>";
}
};
$box = new PouetBoxPartyResults();
$box->Load();
$TITLE = $box->title;
require_once("include_pouet/header.php");
require("include_pouet/menu.inc.php");
echo "<div id='content'>\n";
if ($box->party)
$box->Render();
echo "</div>\n";
require("include_pouet/menu.inc.php");
require_once("include_pouet/footer.php");
?>