Example #1
0
     $this->max_id_reg = $this->registracia->findAll()->max('id');
     //Najdi max. ur. reg.
     //Vypocet max. velkosti suboru pre upload
     $ini_v = trim(ini_get("upload_max_filesize"));
     $s = ['g' => 1 << 30, 'm' => 1 << 20, 'k' => 1 << 10];
     $this->upload_size = intval($ini_v) * ($s[strtolower(substr($ini_v, -1))] ?: 1);
     $this->prilohy_adresar = "www/files/prilohy/";
     $this->ur_reg = $this->registracia->vsetky_urovne_array();
     //Najdi max. ur. reg.
     $this->urovneReg = $this->registracia->hladaj_urovne(0, $this->id_reg)->fetchPairs('id', 'nazov');
     //Hodnoty id=>nazov pre formulare z tabulky registracia
 }
 /** Nastevenie premennych pre vsetky sablony */
 public function beforeRender()
Example #2
0
 /** Naplnenie spolocnych udajov pre sablony */
 public function beforeRender()
 {
     $this->getComponent('menu')->selectByUrl($this->link('this'));
     $this->template->udaje = $this->udaje_webu;
     $this->template->verzia = $this->verzie->posledna();
     $this->template->urovregistr = $this->id_reg;
     $this->template->maxurovregistr = $this->max_id_reg;
     $this->template->language = $this->language;
     $this->template->user_admin = $this->user_profiles->findOneBy(['id_registracia' => $this->max_id_reg]);
     $this->template->user_spravca = $this->user_profiles->findOneBy(['id_registracia' => $this->max_id_reg - 1]);
     $this->template->nazov_stranky = $this->nazov_stranky;
     $this->template->avatar_path = $this->avatar_path;
     $this->template->text_title_image = $this->trLang("base_text_title_image");
     $this->template->article_avatar_view_in = $this->nastavenie["article_avatar_view_in"];
     $this->template->omrvinky_enabled = $this->nastavenie["omrvinky_enabled"];
     $this->template->view_log_in_link_in_header = $this->nastavenie['user_panel']["view_log_in_link_in_header"];
 }