// begin transaction $corporate_dao->begin_trans(); // $order = array("\r\n","\n","\r"); // $replace = "<br/>"; // $forms['memo'] = str_replace($order,$replace,$forms['memo']); $forms['memo'] = str_replace(" ", "", $forms['memo']); $forms['memo'] = str_replace(" ", "", $forms['memo']); $values['memo'] = $forms['memo']; if ($id = $corporate_dao->add($values)) { // then get each tantou item foreach ($forms['mutirow'] as $kk => $vv) { $tantou_val['corporate_id'] = $id; $tantou_val['tantou_name'] = $vv['tantou_name']; $tantou_val['mail_address'] = $vv['mail_address']; // add tantou data if ($tantou_dao->add0($tantou_val)) { } else { $executeflg = FALSE; break; } } // if auth = 2, then get account_id from session if ($auth == '2') { $account_id = $_SESSION['PREGO_ADMIN']['STAFF_SEQ']; } // update account other_id $account_values = array(); $account_values['other_id'] = $id; $smarty->assign('corporate_id', $id); if ($account_dao->edit($account_id, $account_values)) { } else {