<h1>Available Competitions</h1>

{include_php file="shared_handle:availableCompetitions"}

{style_table folder="img/st/floatbox"}
  <table border="0" cellspacing="0" cellpadding="2">
	<tr>
		<td>&nbsp;</td>
		<td><b>ID #</b></td>
		<td><b>Title</b></td>
		<td><b>Start Date</b></td>
		<td><b>End Date</b></td>
		<td><b>Style</b></td>
		<td><b>Scoring Method</b></td>
	</tr>
	{foreach from=$availableCompetitions item="comp"}
	<tr>
		<td><input type="checkbox" name="joinComp[]" value="{$comp.id}" /></td>
		<td>{$comp.id}</td>
		<td>{$comp.title}</td>
		<td>{$comp.startDate|date_format2:"n j Y"}</td>
		<td>{$comp.endDate|date_format2:"n j Y"}</td>
		<td>{$comp.style}</td>
		<td>{$comp.scoringMethod}</td>
	</tr>
	{foreachelse}
	<tr>
		<td colspan="7" align="center">Sorry. There are currently no competitions available to join.</td>
	</tr>	
	{/foreach}
  </table>
{/style_table}