}
     echo json_encode($arr);
     break;
 case 'inputComp':
     $comp_name = $_POST['id1'];
     $drawing = str_replace(" ", "", $_POST['id2']);
     $qty = $_POST['id3'];
     $comp = $_POST['id4'];
     $comp_lenght = $_POST['id5'];
     $comp_weight = $_POST['id6'];
     $job = $_POST['id7'];
     $subJob = $_POST['id8'];
     $row_id = $_POST['row_id'];
     $arry_resp = array();
     for ($i = 0; $i < sizeof($comp_name); $i++) {
         $perHruf = concatHM($drawing[$i]);
         $str_HM = @$perHruf[0];
         $int_HM = @$perHruf[1];
         $pad_HM = @$perHruf[2];
         if (strlen($int_HM) > 4 || sizeof($perHruf) == 0) {
             $str_HM = $drawing[$i];
             $int_HM = 0;
             $pad_HM = 0;
         }
         $query = " SELECT COMP_NAME, HEAD_MARK\r\n                       FROM MASTER_COMP\r\n                       WHERE COMP_NAME = '{$comp_name[$i]}' AND REGEXP_REPLACE (HEAD_MARK, '[[:space:]]*', '') = REGEXP_REPLACE ('{$drawing[$i]}', '[[:space:]]*', '')\r\n                    ";
         $hasil = oci_parse($conn, $query);
         oci_execute($hasil);
         $jml_row = oci_fetch_all($hasil, $output);
         oci_execute($hasil);
         //            $data = oci_fetch_array($hasil);
         //            $row = oci_num_rows($hasil);
         echo json_encode($response);
     }
     break;
 case "insert_data":
     $profile = $_POST['profile'];
     $totalQty = $_POST['totalQty'];
     $length = $_POST['length'];
     $surface = $_POST['surface'];
     $gr_weight = $_POST['gr_weight'];
     $weight = $_POST['weight'];
     $compType2 = $_POST['compType2'];
     $compType = $_POST['compType'];
     $headmark = $_POST['headmark'];
     $project_name = $_POST['project_name'];
     $dwg_typ = $_POST['dwg_typ'];
     $perHruf = concatHM($headmark);
     $str_HM = @$perHruf[0];
     $int_HM = @$perHruf[1];
     $pad_HM = @$perHruf[2];
     if (strlen($int_HM) > 4 || sizeof($perHruf) == 0) {
         $str_HM = $headmark;
         $int_HM = 0;
         $pad_HM = 0;
     }
     $headmarkInsertionSql = "BEGIN MD_INS" . "(('{$str_HM}'||LPAD('{$int_HM}',{$pad_HM})), :COMPTYPE,:COMPTYPE2, :WEIGHT, " . ":SURFACE, :PROFILE, :PROJNAME, :LENGTH, :QUANTITY, :GROSSWEIGHT,'{$dwg_typ}','{$username}'); END;";
     $headmarkInsertionParse = oci_parse($conn, $headmarkInsertionSql);
     oci_bind_by_name($headmarkInsertionParse, ":PROJNAME", $project_name);
     // oci_bind_by_name($headmarkInsertionParse, ":HEADMARK", $headmarkValue);
     oci_bind_by_name($headmarkInsertionParse, ":COMPTYPE", $compType);
     oci_bind_by_name($headmarkInsertionParse, ":COMPTYPE2", $compType2);
     oci_bind_by_name($headmarkInsertionParse, ":WEIGHT", $weight);