8 require_once(dirname(__FILE__) .
'/../../lib/View.php');
9 require_once(dirname(__FILE__) .
'/../../lib/Controller.php');
10 require_once(dirname(__FILE__) .
'/UserBasicInfoModel.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_basic_info_edit';
46 $this->dat = $this->model->getData($this->bid);
47 $this->round = $this->model->getRound();
53 $disp_name = $this->param[
'disp_name'];
54 $term_year = $this->param[
'term_year'] + 0;
55 $term_begin = $this->param[
'term_begin'];
56 $term_end = $this->param[
'term_end'];
58 if (empty($disp_name)) {
59 $err[] =
'表示名称は必須です。';
62 if (empty($term_year)) {
65 if ($term_year <
YEARS[0] ||
YEARS[1] < $term_year) {
70 if (empty($term_begin)) {
73 if (!$this->
chkYmd($term_begin)) {
78 if (empty($term_end)) {
81 if (!$this->
chkYmd($term_end)) {
87 $this->rest = json_encode([
'sts' =>
'OK']);
89 $this->rest = json_encode([
'sts' =>
'NG',
'err' => $err]);
95 $err = $this->model->regist($this->param);
98 $this->rest = json_encode([
'sts' =>
'NG',
'err' => $err]);
102 $this->rest = json_encode([
'sts' =>
'OK']);