protected function startup() { parent::startup(); if (session_status() == PHP_SESSION_NONE) { session_start(); } }
public function startup() { parent::startup(); if (!$this->getRequest()->isMethod(Nette\Application\Request::FORWARD)) { $this->error(); } }
/** Vychodzie nastavenia */ protected function startup() { parent::startup(); // Kontrola ACL if (!$this->user->isAllowed($this->name, $this->action)) { $this->flashRedirect('Homepage:notAllowed', sprintf($this->trLang('base_nie_je_opravnenie'), $this->action), 'danger'); } }
protected function startup() { parent::startup(); if (!$this->user->isLoggedIn()) { if ($this->user->logoutReason === \Nette\Security\IUserStorage::INACTIVITY) { $this->flashMessage('Byli jste odhlášeni'); } $this->redirect('Sign:in', array('backlink' => $this->storeRequest())); } }
protected function startup() { parent::startup(); // Kontrola prihlasenia - ak >0 ok a ACL if (!$this->user->isLoggedIn()) { $this->flashRedirect(array('User:'******'backlink' => $this->storeRequest())), $this->trLang('base_nie_je_opravnenie1') . '<br/>' . $this->trLang('base_prihlaste_sa'), 'danger,n'); } // Kontrola ACL if (!$this->user->isAllowed($this->name, $this->action)) { $this->flashRedirect('Homepage:', sprintf($this->trLang('base_nie_je_opravnenie'), $this->action), 'danger'); } }
protected function startup() { parent::startup(); $this->setDB(); if ($this->getParameter('moduleid')) { $this->iModuleId = $this->getParameter('moduleid'); $this->loadModuleFromDB(); $this->template->module = $this->module; } else { if ($this->getParameter('id')) { $this->load($this->getParameter('id')); } } }
protected function startup() { parent::startup(); // Kontrola prihlasenia - ak >0 ok if (!$this->user->isLoggedIn()) { $this->flashRedirect(array('User:'******'backlink' => $this->storeRequest())), $this->trLang('base_nie_je_opravnenie1') . '<br/>' . $this->trLang('base_prihlaste_sa'), 'danger,n'); } // Kontrola ACL if (!$this->user->isAllowed($this->name, $this->action)) { $this->flashRedirect($this->action == 'edit' && $this->user->isAllowed($this->name, 'default') ? 'Debata:' : 'Homepage:', sprintf($this->trLang('base_nie_je_opravnenie'), $this->action), 'danger'); } $this->template->h2 = $this->trLang('h2'); $this->template->txt_na_zmaz = $this->trLang('txt_na_zmaz'); $vp = new VisualPaginator($this, 'vp'); $paginator = $vp->getPaginator(); $paginator->itemsPerPage = $this->udaje->getUdajInt('d_riadkov'); $paginator->itemCount = $this->debata->findAll()->count(); $this->template->komentare = $this->debata->findAll()->order('timestamp DESC')->limit($paginator->getLength(), $paginator->getOffset()); }
protected function startup() { parent::startup(); // Kontrola ACL if (!$this->user->isAllowed($this->name, $this->action)) { $this->flashRedirect('Homepage:', sprintf($this->trLang('base_nie_je_opravnenie'), $this->action), 'danger'); } if ($this->user->isLoggedIn()) { $this->flashRedirect('Homepage:', $this->trLang('base_loged_in_bad'), 'danger'); } $this->hasser = $this->user->getAuthenticator(); //Ziskanie objektu pre vytvaranie hash hesla a iných $this->hasser->PasswordHash(8, FALSE); //Nastavenie $this->template->form_required = $this->trLang('base_form_required'); $this->template->h2 = $this->trLang('h2_' . $this->action); //Nacitanie hlavneho nadpisu $this->clen = $this->user_profiles->find(1); //Odosielatel e-mailu $this->user_view_fields = $this->nastavenie['user_view_fields']; }
protected function startup() { parent::startup(); if ($this->action != 'activateNewEmail') { if (!$this->user->isLoggedIn()) { //Neprihlaseneho presmeruj $this->flashRedirect(['User:'******'backlink' => $this->storeRequest()]], $this->trLang('base_nie_je_opravnenie1') . '<br/>' . $this->trLang('base_prihlaste_sa'), 'danger,n'); } } // Kontrola ACL if (!$this->user->isAllowed($this->name, $this->action)) { $this->flashRedirect('Homepage:', sprintf($this->trLang('base_nie_je_opravnenie'), $this->action), 'danger'); } //Najdem aktualne prihlaseneho clena $this->clen = $this->user_profiles->findOneBy(['id_users' => $this->user->getIdentity()->getId()]); $this->hasser = $this->user->getAuthenticator(); //Ziskanie objektu pre vytvaranie hash hesla a iných $this->hasser->PasswordHash(8, FALSE); //Nastavenie $this->user_view_fields = $this->nastavenie['user_view_fields']; }
/** Vychodzie nestavenia */ protected function startup() { parent::startup(); //Len na to aby som vedel zobraziť odkaz na aktuality $this->template->aktuality = $this->hlavne_menu->findBy(["datum_platnosti >= '" . StrFTime("%Y-%m-%d", strtotime("0 day")) . "'", "id_registracia <= " . ($this->user->isLoggedIn() ? $this->user->getIdentity()->id_registracia : 0), "id_nadradenej = " . ($this->template->id_nadradeny_aktuality = 1)]); }
public function startup() { parent::startup(); }
protected function startup() { parent::startup(); $this->template->page = $this->database->table("pages")->get($this->getParameter("page_id")); }