public function accepted() { $model = new \Models\Tales(); $data['title'] = "Přijaté příběhy"; $data['tales'] = $model->getAcceptedTales(); View::renderTemplate('header', $data); View::render('users\\talesAccepted', $data, $error); View::renderTemplate('footer', $data); }
public function accept($taleID) { if (Session::get('role') != "admin") { Url::redirect(''); } $model = new \Models\Tales(); $postdata = array('accepted' => 1); $where = array('taleID' => $taleID); $model->update($postdata, $where); Url::redirect('admin'); }