Beispiel #1
0
 public function edit($ratingID)
 {
     $model = new \Models\Ratings();
     $data['title'] = "Recenze";
     $data['rating'] = $model->getRatingAndTale($ratingID);
     if (isset($_POST['submit'])) {
         $postdata = array('originality' => $_POST['originality'], 'theme' => $_POST['theme'], 'quality' => $_POST['quality']);
         $where = array('ratingID' => $data['rating'][0]->ratingID);
         $model->update($postdata, $where);
         Url::redirect('ratings');
     }
     View::renderTemplate('header', $data);
     View::render('review\\ratingsEdit', $data, $error);
     View::renderTemplate('footer', $data);
 }