ACC SHELL

Path : /www/hosting/oltv.cz/_/class/system/
File Upload :
Current File : /www/hosting/oltv.cz/_/class/system/admin_uzivatele_skupiny.php

<?php
/**
* @author Filip Štencl
* @since 14. 10. 2014
*/

class admin_uzivatele_skupiny extends base {
   const TABLE_NAME = 'admin_uzivatele_skupiny';

   private $id = null;
   private $caszalozeni = null;
   private $caszmeny = null;
   private $idadmin_uzivatele = null;
   private $idadmin_uzivatelske_skupiny = null;
   private $typ = null;
   private $chyba = null;

   public function __construct($id = null) {
      if (!is_null($id) && intval($id) != 0) { // Pokud již položka existuje, zpřístupní její vlastnosti
         $result = dibi::query('SELECT * FROM ['.self::TABLE_NAME.'] WHERE id=%i',intval($id));
         if($result->count() > 0) {
            $row = $result->fetch();
            $this->id = $row->id;
            $this->caszalozeni = $row->caszalozeni;
            $this->caszmeny = $row->caszmeny;
            $this->idadmin_uzivatele = $row->idadmin_uzivatele;
            $this->idadmin_uzivatelske_skupiny = $row->idadmin_uzivatelske_skupiny;
            $this->typ = $row->typ;
         } else { notification::infoBox_error("Požadovaná položka nebyla nalezena");redirect("/404.php"); }
      }
   }

   public function getId() { return $this->id; }
   public function getCaszalozeni() { return $this->caszalozeni; }
   public function getCaszmeny() { return $this->caszmeny; }
	public function getNazev() { return "skupina uživatele"; }
   public function getIdadmin_uzivatele() { return $this->idadmin_uzivatele; }
   public function getIdadmin_uzivatelske_skupiny() { return $this->idadmin_uzivatelske_skupiny; }
   public function getTyp() { return $this->typ; }

   public function setId($id) { $this->id = $id; }
   protected function getChyba() { return $this->chyba; }
   protected function checkData($data) {
      if(array_key_exists("id",$data)) {if(intval($data['id']) > 0) { $this->id = intval($data['id']); } else { $this->chyba .= "ID je v nesprávném formátu<br />"; return false; }}
      return true;
   }
}

ACC SHELL 2018