8 require_once(dirname(__FILE__) .
'/../../lib/View.php');
9 require_once(dirname(__FILE__) .
'/../../lib/Controller.php');
10 require_once(dirname(__FILE__) .
'/UserAccountModel.php');
27 $this->view =
new View();
28 $this->bid = $_SESSION[
'minfo'][
'bid'];
30 $this->param[
'base'] = dirname(__FILE__);
32 if (empty($this->param[
'act'])) {
35 switch ($this->param[
'act']) {
36 case 'check': $this->
_check();
break;
37 case 'regist': $this->
_regist();
break;
38 default: $this->
_edit();
break;
45 $this->viewName =
'user_account_edit';
46 $this->dat = $this->model->getData($this->bid);
53 $name = $this->param[
'name'];
54 $email = $this->param[
'email'];
55 $tel = $this->param[
'tel'];
56 $passwd0 = $this->param[
'passwd0'];
57 $passwd1 = $this->param[
'passwd1'];
60 $err[] =
'メンバー名は必須です。';
63 if (!empty($passwd1)) {
64 if ($passwd0 != $passwd1) {
65 $err[] =
'パスワードが不正です。';
70 $this->rest = json_encode([
'sts' =>
'OK']);
72 $this->rest = json_encode([
'sts' =>
'NG',
'err' => $err]);
78 $err = $this->model->regist($this->param);
81 $this->rest = json_encode([
'sts' =>
'NG',
'err' => $err]);
85 $this->rest = json_encode([
'sts' =>
'OK']);