* @author Brandon Simmons <*****@*****.**> * * * @package BinaryBeast * @subpackage Examples */ require_once '../__brackets.php'; ?> <h1>Tournament Brackets (<?php echo $tournament->id; ?> )</h1> <?php //Embed it BBHelper::embed_tournament($tournament); ?> <h1>Matches that need to be reported</h1> <?php //Now list all of the open matches $matches = $tournament->open_matches(); foreach ($matches as $match) { echo $match->team->display_name . ' vs ' . $match->team2->display_name . ' in round ' . $match->round . '<br />'; } ?> <?php //Display option of deleting the example tournament require '../delete/delete.php';
/** * Prints outs the iframe HTML needed to embed a tournament * * Convenience wrapper for {@link BBHelper::embed_tournament()} * * @param boolean $groups * By default if a tournament with rounds has progressed to the brackets, the groups will not be displayed * however if you set this to true, the group rounds will be displayed instead * @param int|string $width * Optionally define the width of the iframe * Can either by a string (IE '100%', or a number (100 => becomes '100px') * @param int|string $height * Optionally define the height of the iframe * Can either by a string (IE '100%', or a number (100 => becomes '100px') * @param string $class * A class name to apply to the iframe * Defaults to 'binarybeast' * * @return boolean * prints out the html directly * returns false if there was an error (like unable to determine the tournament id) */ public function embed($groups = false, $width = 800, $height = 600, $class = 'binarybeast') { return BBHelper::embed_tournament($this, $groups, $width, $height, $class); }