} } } // --- TBL: history $history_id = -1; $rslt = addHistory($db, $history_id, $pj_id, $sop_id, $tpl_id, $schema_id, $file_id, $smpl_given_no, $HISTORY_ACTION_FILE_ADD, $date, $user_id, $user_id_2, null); if (!$rslt) { \Sop\Log::error(__FILE__, __LINE__, 'Failed to add history.'); $msg010 = "The registration failed.: history"; // 登録に失敗しました: history \Sop\Api::exitWithError(array($msg010)); } } if ($div == 'upd') { // --- TBL: file $rslt = updFile($db, $file_id, $date, $user_id, $user_id_2, $request_time, $seq_no); if (!$rslt) { \Sop\Log::error(__FILE__, __LINE__, 'Failed to update file.'); $msg011 = "The update failed.: file"; // 更新に失敗しました: file \Sop\Api::exitWithError(array($msg011)); exit; } // --- TBL: val foreach ($_REQUEST as $val_name => $value) { if (strpos($val_name, 'input_') !== false) { $value = urldecode($value); $rslt = updVal($db, $file_id, $val_name, $value); if (!$rslt) { \Sop\Log::error(__FILE__, __LINE__, 'Failed to update val.'); $msg012 = "The update failed.: val";
// 登録に失敗しました: file_hwr \Sop\Api::exitWithError(array($msg004)); } // --- TBL: history $history_id = -1; $rslt = addHistory($db, $history_id, $pj_id, $sop_id, $tpl_id, $schema_id, $file_id, $smpl_given_no, $HISTORY_ACTION_FILE_ADD, $date, $user_id, $user_id_2, null); if (!$rslt) { \Sop\Log::error(__FILE__, __LINE__, 'Failed to add history.'); $msg005 = "The registration failed.: history"; // 登録に失敗しました: history \Sop\Api::exitWithError(array($msg005)); } } if ($div == 'upd') { // --- TBL: file $rslt = updFile($db, $file_id, $date, $user_id, $user_id_2); if (!$rslt) { \Sop\Log::error(__FILE__, __LINE__, 'Failed to update file.'); $msg006 = "The update failed.: file"; // 更新に失敗しました: file \Sop\Api::exitWithError(array($msg006)); exit; } // --- TBL: val foreach ($_REQUEST as $val_name => $value) { if (strpos($val_name, 'input_') !== false) { $value = urldecode($value); $rslt = updVal($db, $file_id, $val_name, $value); if (!$rslt) { \Sop\Log::error(__FILE__, __LINE__, 'Failed to update val.'); $msg007 = "The update failed.: val";