public function reviseAction() { try { if (!$this->request->getPost()) { throw new Exception('こらっ'); } if ($this->request->getPost('password') == null) { throw new Exception('パスワードを入れてください。'); } $bms_info = new BmsInfo(); $bms_data = $bms_info->get_data($this->request->getPost('bms_no')); if (!(crypt($this->request->getPost('password'), $bms_data['password']) === $bms_data['password'])) { throw new Exception('パスワードが一致しません'); } $bms_info->revise($this->request->getPost(), $this->current_time, $this->ip, $this->host); header("Location: " . ROOT_URL . "/revise/thanks/"); } catch (Exception $e) { $this->displayErrorView($e->getMessage()); } }
public function editbmsAction() { try { $this->checkLogin(); $bms_info = new BmsInfo(); $bms_info->revise($this->request->getPost(), $this->current_time, $this->ip, $this->host); header("Location: " . ROOT_URL . "/admin/finish/"); } catch (Exception $e) { $this->displayErrorView($e->getMessage()); } }