/**
  * Constructor
  * @throws Exception
  */
 function __construct($federation)
 {
     date_default_timezone_set('Europe/Madrid');
     parent::__construct('Portrait', "print_listaPerros", 1, 0);
     // use default prueba. not really needed
     $d = new Dogs("print_listaPerros");
     $res = $d->select();
     if (!is_array($res)) {
         $this->errormsg = "print_listaPerros: select() failed";
         throw new Exception($this->errormsg);
     }
     $this->lista = $res['rows'];
     // rework federation handling as parent got it from senseless prueba ID
     $this->federation = Federations::getFederation(intval($federation));
     $this->strClub = $this->federation->isInternational() ? _('Country') : _('Club');
     $this->icon = getIconPath($this->federation->get('Name'), "agilitycontest.png");
     $this->icon2 = getIconPath($this->federation->get('Name'), $this->federation->get('Logo'));
     $this->cols[8] = $this->strClub;
     // use "country" or "club" according federation
     if ($this->federation->get('WideLicense') == true) {
         // on wide license hide loe/rrc
         $this->pos[3] += $this->pos[4];
         $this->pos[4] = 0;
         $this->pos[3] += 5;
         // decrease handler name
         $this->pos[7] -= 5;
     }
 }
Beispiel #2
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'];
 }
Beispiel #3
0
 case "update":
     $am->access(PERMS_OPERATOR);
     $result = $perros->update($idperro);
     break;
 case "delete":
     $am->access(PERMS_OPERATOR);
     $result = $perros->delete($idperro);
     break;
 case "orphan":
     $am->access(PERMS_OPERATOR);
     $result = $perros->orphan($idperro);
     break;
     // unassign from handler
 // unassign from handler
 case "select":
     $result = $perros->select();
     break;
     // list with order, index, count and where
 // list with order, index, count and where
 case "enumerate":
     $result = $perros->enumerate();
     break;
     // list with where
 // list with where
 case "getbyguia":
     $result = $perros->selectByGuia($idguia);
     break;
 case "getbyidperro":
     $result = $perros->selectByID($idperro);
     break;
 case "categorias":