function impression_edit_form_submit($data)
{
    $error = impression_validate($data);
    if (!empty($error)) {
        return FALSE;
    } else {
        $impression = new Impression();
        $update = $impression->update($data);
        if ($update['code'] == 200) {
            return impression_list($data['id']);
        }
    }
}
Пример #2
0
 public function editimpAction()
 {
     try {
         $this->checkLogin();
         $bms_no = $this->request->getPost('bms_no');
         $imp_no = $this->request->getPost('imp_no');
         $impression = new Impression($bms_no);
         $impression_data = $impression->get_data($imp_no);
         $impression->update($this->request->getPost());
         $prev_point = $impression_data['point'];
         $new_point = $this->request->getPost('point');
         $bms_info = new BmsInfo();
         $bms_info->update_by_impression_edit($bms_no, $prev_point, $new_point);
         header("Location: " . ROOT_URL . "/admin/finish/");
     } catch (Exception $ex) {
         $this->displayErrorView($ex->getMessage());
     }
 }