<?php
ob_start();
// session_start();
header("Expires: Mon, 20 Mar 1998 12:01:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

 require_once("Sigma.php");
 mb_http_output('UTF-8');
 $tpl =& new HTML_Template_Sigma('.','./template/cache');
 $tpl->loadTemplateFile('r_evt.htm');
 $file = $_GET['file'];

  $colores = "";
  $tpl->setVariable('fecha', date("d/m/Y"));
if(file_exists($file) && is_readable($file))
{
  if (!$myxml=simplexml_load_file($file))
   echo 'Error al Cargar Archivo XML';
  else
  {

   foreach($myxml as $node)
  {
       if ($colores == "#A6C2FF")
         {
           $tpl->setVariable('colores', 'bgcolor=""');
           $colores = "";
         }
       else
         {
           $tpl->setVariable('colores', 'bgcolor="#A6C2FF"');
           $colores = "#A6C2FF";
         }

      //  $timegame = explode(":", $node->TimeGame);
      //  $hora = $timegame[0].':'.$timegame[1];
      //  $meridian = $timegame[2];

           $tpl->setVariable('nombre', $myxml->getName());
           $tpl->setVariable('dep', $node->Liga);

           $tpl->setVariable('cod_v',   $node->VisTeam);
           $tpl->setVariable('equipo_v',   $node->EquipoVisitante);
           $tpl->setVariable('cod_l',   $node->LocTeam);
           $tpl->setVariable('equipo_l', $node->EquipoLocal);

           $tpl->setVariable('tv',     BlankSpace(utf8_decode($node->JCV)));
           $tpl->setVariable('tl',     BlankSpace(utf8_decode($node->JCL)));

           $tpl->setVariable('nota',   BlankSpace(utf8_decode($node->NOTE)));



        $tpl->parse('bloque1');

   }//for.
  }//else
}
$tpl->show();




?>