<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php JHTML::_('behavior.tooltip'); ?>
<?php
JToolBarHelper::title( JText::_( 'SELECT RACES TO ADD' ).': '.$this->chalangeName, 'plugin.png' );
JToolBarHelper::apply('addRacesToChalange');
$ordering = ($this->lists['order'] == 'p.folder' || $this->lists['order'] == 'p.ordering');
$rows =& $this->items;
?>
<form action="index.php" method="post" name="adminForm">
<table class="adminlist">
<thead>
<?php $n= count($this->races); ?>
<tr>
<th width="20">
<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo $n;?>);"/>
</th>
<th width="5"> ID </th>
<th> <?php echo JText::_('Nombre')?></th>
<th> <?php echo JText::_('Fecha')?></th>
<th> <?php echo JText::_('ubicacion')?></th>
</tr>
</thead>
<?php
$k=0;
for ($i=0; $i<$n; $i++){
$row=& $this->races[$i];
$checked=JHTML::_('grid.id',$i,$row->id);
?>
<tr class="<?php echo "row$k";?>">
<td>
<?php echo $checked;?>
</td>
<td>
<?php echo $row->id;?>
</td>
<td>
<?php echo $row->nombre;?>
</td>
<td>
<?php echo strftime("%e de %B de %Y",strtotime($row->fecha)); ?>
</td>
<td>
<?php echo $row->ubicacion;?>
</td>
</tr>
<?php
$k=1-$k;
}
?>
</table>
<input type="hidden" name="option" value="com_chalange"/>
<input type="hidden" name="chalangeId" value='<?php echo $this->chalangeId;?>'/>
<input type="hidden" name="task" value=""/>
<input type="hidden" name="boxchecked" value="0"/>
<input type="hidden" name="controller" value="chalange"/>
</form>