Beispiel #1
0
<?php

$user = LoginManager::enforceLogin();
PageContent::addStatic("timer");
$options = "\n\t<option value='-1' data-placeholder='true'>Select Player</option>\n\t<option value='0'>Create New</option>\n";
$players = "<div class='hidden'>";
foreach (Player::getPlayers($user->uid()) as $player) {
    /** @var $player Player */
    $players .= "\n\t\t<div class='player'>\n\t\t\t<span class='id'>" . $player->pid() . "</span>\n\t\t\t<span class='name'>" . $player->name() . "</span>\n\t\t</div>\n\t";
}
$players .= "</div>";
echo "\n\t<select id='playerSelect'>\n\t\t{$options}\n\t</select>\n\t{$players}\n\t<div id='play'>\n\t\t<div id='timerContainer'>\n\t\t\t<div id='timer'>00:00.000</div>\n\t\t</div>\n\t\t<fieldset class='ui-grid-a'>\n\t\t\t<div class='ui-block-a'><button data-mini='true' id='timerReset'>Reset</button></div>\n\t\t\t<div class='ui-block-b'><button data-mini='true' id='timerPenalty'>Penalty</button></div>\n\t\t</fieldset>\n\t\t<button data-mini='true' id='timerToggle'>Start</button>\n\t\t<table class='hidden' id='penaltyContainer'>\n\t\t\t<tr>\n\t\t\t\t<th>When</th>\n\t\t\t\t<th>Amount</th>\n\t\t\t</tr>\n\t\t</table>\n\t</div>\n";
Beispiel #2
0
<?php

require_once dirname(__FILE__) . "/_graphSetup.php";
$user = LoginManager::enforceLogin("graphs/login.php");
$players = "<div class='hidden'>";
foreach (Player::getPlayers($user->uid()) as $player) {
    /** @var $player Player */
    $players .= "\n\t\t<div class='player'>\n\t\t\t<span class='id'>" . $player->pid() . "</span>\n\t\t\t<span class='name'>" . $player->name() . "</span>\n\t\t</div>\n\t";
}
$players .= "</div>";
echo "\n<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'\n\t'http://www.w3.org/TR/html4/loose.dtd'>\n<html>\n<head>\n\t<title>GRAPHS, YO</title>\n\t<link rel='stylesheet' href='/css/style.css' />\n\t<link rel='stylesheet' href='/css/graphs.css' />\n\t<link rel='stylesheet' href='/css/ui-lightness/jquery-ui-1.8.19.custom.css' />\n\t<script type='text/javascript' src='http://code.jquery.com/jquery-1.7.1.min.js'></script>\n\t<script type='text/javascript' src='/js/jquery-ui-1.8.19.custom.min.js'></script>\n\t<script type='text/javascript' src='/js/utility.js'></script>\n\t<script type='text/javascript' src='/js/graphs.js'></script>\n</head>\n<body>\n\n<div class='options'>\n\t<select id='players' multiple='multiple'></select>\n</div>\n<div class='options'>\n\t<table>\n\t\t<tr>\n\t\t\t<td>Since:</td>\n\t\t\t<td><input type='text' id='timeSince' /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Until:</td>\n\t\t\t<td><input type='text' id='timeUntil' /></td>\n\t\t</tr>\n\t</table>\n</div>\n<div class='clear'></div>\n<button id='viewGraphs'>View</button>\n<div id='graphContainer' class='hidden'>\n\t<h2>Graphs</h2>\n\t<div id='graphData'></div>\n</div>\n\n{$players}\n</body>\n</html>\n";