Пример #1
0
 /**
  * Constructor
  * @throws Exception
  */
 function __construct()
 {
     parent::__construct("doglist.xlsx");
     setcookie('fileDownload', 'true', time() + 30, "/");
     // tell browser to hide "downloading" message box
     $d = new Dogs("excel_listaPerros");
     $res = $d->select();
     if (!is_array($res)) {
         $this->errormsg = "print_listaPerros: select() failed";
         throw new Exception($this->errormsg);
     }
     $this->lista = $res['rows'];
 }
Пример #2
0
 /**
  * Constructor
  * @param {int} $prueba Prueba ID
  * @throws Exception
  */
 function __construct($prueba)
 {
     parent::__construct("clasifications.xlsx");
     setcookie('fileDownload', 'true', time() + 30, "/");
     // tell browser to hide "downloading" message box
     $p = new Pruebas("excel_Clasificaciones");
     $res = $p->selectByID($prueba);
     if (!is_array($res)) {
         $this->errormsg = "excel_Clasificaciones: getPruebaByID({$prueba}) failed";
         throw new Exception($this->errormsg);
     }
     $this->prueba = $res;
     $j = new Jornadas("excel_Clasificaciones", $prueba);
     $res = $j->selectByPrueba();
     if (!is_array($res)) {
         $this->errormsg = "excel_Clasificaciones: getJornadasByPrueba({$prueba}) failed";
         throw new Exception($this->errormsg);
     }
     $this->jornadas = $res['rows'];
     // to get mode in trs evaluation
     $this->federation = Federations::getFederation($this->prueba['RSCE']);
     $this->jdbObject = new Jueces("excelClasification");
 }