<table>
<thead>
<tr><th> <?php echo JText::_('Date') ?> </th><th> <?php echo JText::_('time') ?> </th><th> <?php echo JText::_('Place') ?></th><th> <?php echo JText::_('Name') ?></th></tr>
</thead>
<?php
$n=count($this->carreras);
for($i=0; $i<$n; $i++){
$row =& $this->carreras[$i];
?>
<tr>
<td> <?php echo strftime("%e de %B",strtotime($row->fecha)); ?> </td>
<td> <?php echo strftime("%H:%Mh",strtotime($row->fecha)); ?> </td>
<td> <?php echo $row->ubicacion; ?> </td>
<td> <?php echo $row->nombre; ?> </td>
<td>
<?php
$end=time()-$row->registerDataEndUnix;//diferencia entre ahora y la fecha-hora de fin
$begin=time()-$row->registerDataStartUnix;//diferencia entre ahora y la fecha-hora de inicio
if (($begin>0)&&($end<0)){?>
<a href="<?php echo JURI::base(); ?>index.php?option=com_chalange&view=registered&chalange=<?php echo $this->chalangeId?>&idCarrera=<?php echo $row->id ?>"> <?php echo JText::_('Registered')?> </a>
<?php }?>
</td>
<?php if (!empty($row->resultsfilelocation)){?>
<td>
<a href="<?php echo JURI::root()."components". DS ."com_chalange". DS . "uploads" . DS . $row->resultsfilelocation;?>"><?php echo JText::_('Clasificaciones')?></a>
</td>
<?php }?>
</tr>
<?php } ?>
<?php
if (!empty($this->chalange->resultsfilelocation)){?>
<tr>
<td></td>
<td></td>
<td></td>
<td>
<a href="<?php echo JURI::root()."components". DS ."com_chalange". DS . "uploads" . DS . $this->chalange->resultsfilelocation;?>"><?php echo JText::_('Clasificacion general')?></a>
</td>
</tr>
<?php }?>
</table>