save_umbau.php 964 B

12345678910111213141516171819202122232425
  1. <?php
  2. include 'con.php';
  3. //error handling
  4. ini_set('display_errors', 1);
  5. error_reporting(E_ALL);
  6. $curr_time = date("d.m.Y h:i:s");
  7. $request = 1;
  8. $toolID = $_POST['toolID'];
  9. $workerID = $_POST['workerID'];
  10. $response = $_POST['response'];
  11. $response = json_decode($response,true);
  12. $actionID = (int)$response['action'];
  13. if ($actionID == 1){ //umbau
  14. $articleID = $response['articleID'];
  15. $sql = "INSERT INTO DTC_TOOL_LC_EVENT (TLC_EVENT_ID,DATE_TIME,TOOL_ID,ACTION_ID,ARTICLE_ID,WORKER_ID,REQUEST) VALUES (LCSEQ.NEXTVAL,TO_TIMESTAMP('{$curr_time}','DD.MM.YYYY HH:MI:SS'),'{$toolID}','{$actionID}','{$articleID}', '{$workerID}','{$request}')";
  16. } else {
  17. $toolPart = $response['toolPart'];
  18. $sql = "INSERT INTO DTC_TOOL_LC_EVENT (TLC_EVENT_ID,DATE_TIME,TOOL_ID,ACTION_ID,TOOLPART_ID,WORKER_ID,REQUEST) VALUES (LCSEQ.NEXTVAL,TO_TIMESTAMP('{$curr_time}','DD.MM.YYYY HH:MI:SS'),'{$toolID}','{$actionID}','{$toolPart}', '{$workerID}','{$request}')";
  19. }
  20. $res = sqlStm($sql);
  21. ?>