<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php JHTML::_('behavior.tooltip'); ?>
<?php
JToolBarHelper::title( JText::_( 'Races Manager' ), 'plugin.png' );
JToolBarHelper::editList();
JToolBarHelper::deleteList();
JToolBarHelper::addNew();
JToolBarHelper::help( 'screen.plugins' );
$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>
<th> </th>
</tr>
</thead>
<?php
$k=0;
for ($i=0; $i<$n; $i++){
$row=& $this->races[$i];
$checked=JHTML::_('grid.id',$i,$row->id);
$link='index.php?option=com_chalange&view=raceAdmin&task=edit&cid[]='.$row->id;
$registerdLink="index.php?option=com_chalange&view=registeredsAdmin&idRace=".$row->id;
?>
<tr class="<?php echo "row$k";?>">
<td>
<?php echo $checked;?>
</td>
<td>
<?php echo $row->id;?>
</td>
<td>
<a href="<?php echo $link?>"><?php echo $row->nombre;?></a>
</td>
<td>
<?php echo strftime("%e de %B de %Y",strtotime($row->fecha)); ?>
</td>
<td>
<?php echo $row->ubicacion;?>
</td>
<td>
<a href="<?php echo $registerdLink?>"><?php echo JText::_('registereds')?></a>
</td>
</tr>
<?php
$k=1-$k;
}
?>
</table>
<input type="hidden" name="option" value="com_chalange"/>
<input type="hidden" name="task" value=""/>
<input type="hidden" name="boxchecked" value="0"/>
<input type="hidden" name="controller" value="races"/>
</form>