Ejemplo n.º 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";