12345678910111213141516171819202122232425 |
- <?php
- include 'con.php';
- //error handling
- ini_set('display_errors', 1);
- error_reporting(E_ALL);
- $curr_time = date("d.m.Y h:i:s");
- $request = 1;
- $toolID = $_POST['toolID'];
- $workerID = $_POST['workerID'];
- $response = $_POST['response'];
- $response = json_decode($response,true);
- $actionID = (int)$response['action'];
- if ($actionID == 1){ //umbau
- $articleID = $response['articleID'];
- $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}')";
- } else {
- $toolPart = $response['toolPart'];
- $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}')";
- }
- $res = sqlStm($sql);
- ?>
|