}
     $values['category_id'] = $forms['category_id'];
     if (isset($forms['service_fee']) && is_numeric($forms['service_fee'])) {
         $values['service_fee'] = $forms['service_fee'];
     } else {
         $values['service_fee'] = 0;
     }
     if (isset($forms['spec_fee']) && is_numeric($forms['spec_fee'])) {
         $values['spec_fee'] = $forms['spec_fee'];
     } else {
         $values['spec_fee'] = 0;
     }
     // 桁数チェック
     $maxlens = $dao->get_maxlens();
     foreach ($maxlens as $k => $v) {
         $err_mes[$k] = $err->check_size($values[$k], $v);
     }
 }
 $smarty->assign('forms', $forms);
 // check ok
 if ($err->clear) {
     $executeflg = TRUE;
     // 登録
     if ($forms['id'] == '') {
         $forms['id'] = $id;
         if ($dao->add0($values)) {
             $smarty->assign('message', '登録が完了しました。');
         } else {
             $smarty->assign('message', '登録が失敗しました。');
         }
         // 更新
 } else {
     $err_mes['spec_group'] = $err->format_msg("スペシャリストを追加してください");
 }
 if ($dublipe_flag) {
     $err_mes['spec_group'] = $err->format_msg("スペシャリストは重複しています");
 }
 if ($err->clear) {
     $values = array();
     $cols = $promise_dao->get_cols();
     foreach ($cols as $kcol => $val) {
         $values[$kcol] = $forms[$kcol];
     }
     //桁数チェック
     $maxlens = $promise_dao->get_maxlens();
     foreach ($maxlens as $k => $v) {
         $err_mes[$k] = $err->check_size($values[$k], $v);
     }
     $values_pro_spec = array();
     $cols = $promise_spec_dao->get_cols();
     foreach ($cols as $kcol => $val) {
         $values_pro_spec[$kcol] = $forms[$kcol];
     }
     //桁数チェック
     $maxlens_pro_spec = $promise_spec_dao->get_maxlens();
     foreach ($maxlens_pro_spec as $k => $v) {
         $err_mes[$k] = $err->check_size($values_pro_spec[$k], $v);
     }
 }
 $smarty->assign('promise_forms', $forms);
 $smarty->assign('promise_spec_forms', $forms['mutirow']);
 $smarty->assign('phase', $phase);