Ejemplo n.º 1
0
<table width="100%" border="0" cellspacing="5" cellpadding="5">
  <tr>
    <th            >Fecha           </th>
    <th colspan="2">Equipo local    </th>
    <th colspan="2">Equipo visitante</th>
    <th            >Estadio         </th>
<?php 
if (has_auth('admin')) {
    ?>
    <th            >                </th>
<?php 
}
?>
  </tr>
<?php 
foreach (UIFacade::calendario($search, $q) as $c) {
    $date = strtotime($c['juego']->get('inicio'));
    $id = $c['juego']->get('id');
    $img_local = $c['equipo local']->get('URL del logo');
    $img_visitante = $c['equipo visitante']->get('URL del logo');
    if ($img_local and !filter_var($img_local, FILTER_VALIDATE_URL)) {
        $img_local = 'static/images/equipo/' . $img_local;
    }
    if ($img_visitante and !filter_var($img_visitante, FILTER_VALIDATE_URL)) {
        $img_visitante = 'static/images/equipo/' . $img_visitante;
    }
    ?>
  <tr>
    <td><?php 
    echo date('d/m/Y', $date);
    ?>