public function screen_login() { //ユーザーネームなどはシステム側で定義するとする $this->make_pass_form(); $this->title = "顧客ログイン画面"; $this->file = "login.tpl"; $CustomerModel = new CustomerModel(); if ($this->form->validate()) { $data = $this->form->getSubmitValues(); $customerdata = $CustomerModel->get_customer_authinfo($data['mail']); if ($this->auth->check_pass($customerdata['password'], $data['password'])) { $this->auth->auth_customer_ok($customerdata); $this->company = $customerdata['company_name']; $this->menu_customer(); } else { $this->message = "メールもしくはパスワードが違います"; $this->form->addElement('submit', 'submit1', "送信"); $this->form->addElement('reset', 'reset', 'リセット'); $this->view_display(); } } else { $this->form->addElement('submit', 'submit1', "送信"); $this->form->addElement('reset', 'reset', 'リセット'); $this->view_display(); } }