'; // print_r($page); // echo ''; require_once($_SERVER['DOCUMENT_ROOT'] . "/lib/mydb.php"); $pdo = db_connect(); // $todayStr = date("m/d"); // $inspectionDate = date("m/d"); $todayStr = date("y/m/d"); // 연도를 두 자리로 나타냄 $inspectionDate = date("y/m/d"); // 동일한 형식으로 출력 $approvalDate = null; $writerName = $user_name; // 기본값: 로그인 사용자 이름 $approvalName = ''; $userNameInput = ''; $screenorslat =''; try { $sql = "SELECT * FROM {$DB}.{$tablename} WHERE num = ?"; $stmh = $pdo->prepare($sql); $stmh->bindValue(1, $num, PDO::PARAM_STR); $stmh->execute(); $row = $stmh->fetch(PDO::FETCH_ASSOC); include $_SERVER['DOCUMENT_ROOT'] . "/output/_row.php"; // 전체수량 합산 $shutterSurang = 0; // 셔터 수량 합계를 저장할 변수 초기화 $shutterSurang_slat = 0; // 철재 // 길이, 높이 $prod_width = []; $prod_height = []; // JSON 데이터를 배열로 디코딩 // $eList_screenData = json_decode($eList_screen, true); // $eList_slatData = json_decode($eList_slat, true); // if (is_array($eList_screenData)) { // foreach ($eList_screenData as $item) { // $shutterSurang += isset($item['col14']) ? (int)$item['col14'] : 0; // $prod_width[] = isset($item['col8']) ? intval($item['col8']) : 0; // $prod_height[] = isset($item['col9']) ? intval($item['col9']) : 0; // } // $screenorslat ='스크린'; // if($shutterSurang>0) // $lotVolumn = $shutterSurang ; // } // // slat 반복문을 통해 // if (is_array($eList_slatData)) { // foreach ($eList_slatData as $item) { // $shutterSurang_slat += isset($item['col15']) ? (int)$item['col15'] : 0; // $prod_width[] = isset($item['col8']) ? intval($item['col8']) : 0; // $prod_height[] = isset($item['col9']) ? intval($item['col9']) : 0; // } // $screenorslat ='철재'; // if($shutterSurang_slat>0) // $lotVolumn = $shutterSurang_slat ; // } // // JSON 파일에서 iList 데이터 읽기 // $jsonFilePath = "../output/i_json/" . $num . ".json"; // if (file_exists($jsonFilePath)) { // $iList = json_decode(file_get_contents($jsonFilePath), true); // } else { // $iList = '{}' ; // 기본값 // } // echo ""; // i_json 파일 우선 로드 $jsonFilePath = "../output/i_json/" . $num . ".json"; if (file_exists($jsonFilePath)) { // 파일 내용어 '[]'은 삭제하고 다시 읽음 $iList = json_decode(file_get_contents($jsonFilePath), true); if (empty($iList)) { unlink($jsonFilePath); // 빈 배열일 경우 파일 삭제 $jsonFilePath = "../output/real_json/" . $num . ".json"; if (file_exists($jsonFilePath)) { $iList = json_decode(file_get_contents($jsonFilePath), true); $dataSource = 'real_json'; } else { echo "

생성된 자료가 없습니다.

"; } } else { $dataSource = 'i_json'; } } else { // i_json 파일이 없으면 real_json 파일 로드 $jsonFilePath = "../output/real_json/" . $num . ".json"; if (file_exists($jsonFilePath)) { $iList = json_decode(file_get_contents($jsonFilePath), true); $dataSource = 'real_json'; } else { // JSON 파일이 없으면 메시지 출력 echo "

생성된 자료가 없습니다.

"; exit; // 이후 코드 실행 중단 } } // exceptCheck 값이 1인 항목 제외 및 데이터 처리 $lotVolumn = 0; if (isset($iList['exceptCheck'])) { foreach ($iList['exceptCheck'] as $index => $except) { if ($except === "1") { continue; // 제외 처리 } // 수량 합산 $lotVolumn ++; // 길이, 높이 추가 if (isset($iList['afterWidth'][$index])) { $prod_width[] = (int)$iList['afterWidth'][$index]; } if (isset($iList['afterHeight'][$index])) { $prod_height[] = (int)$iList['afterHeight'][$index]; } } } echo ""; // echo "
";
	// echo print_r($iList);
	// echo "
"; } catch (PDOException $Exception) { print "오류: " . $Exception->getMessage(); } $prodName = ""; // 상품명을 저장할 변수 // if문을 사용하여 제품 코드에 따른 상품명 설정 if ($prodCode == 'KSS01') { $prodName = '국민방화 스크린 셔터'; $arrayWidth = $prod_width[$page-1] ; $arrayHeight = $prod_height[$page-1] ; } elseif ($prodCode == 'KSE01') { $prodName = '국민방화 스크린 셔터'; $arrayWidth = $prod_width[$page-1] ; $arrayHeight = $prod_height[$page-1] ; } elseif ($prodCode == 'KWE01') { $prodName = '국민방화 스크린 플러스 셔터'; $arrayWidth = $prod_width[$page-1] ; $arrayHeight = $prod_height[$page-1] ; } elseif ($prodCode == 'KD-SL60') { $prodName = '국민방화 스틸 셔터'; $arrayWidth = $prod_width[$page-1] ; $arrayHeight = $prod_height[$page-1] ; } elseif ($prodCode == 'KTE01') { $prodName = '국민방화 스틸 셔터'; $arrayWidth = $prod_width[$page-1] ; $arrayHeight = $prod_height[$page-1] ; } elseif ($prodCode == 'KQTS01') { $prodName = '국민방화 투시형 스틸 셔터'; $arrayWidth = $prod_width[$page-1] ; $arrayHeight = $prod_height[$page-1] ; } else { $prodName = "유효하지 않은 제품 코드입니다."; } $pageWidth = $arrayWidth; $pageHeight = $arrayHeight; ?>
사진 drop 영역
 
요청일 페이지 이동 사진 등록 미완료 페이지
/  

경동기업

작성 승인


상 품 명 제품 LOT NO -
제 품 명 로트크기
발주처 검사일자
현장명 검사자
제품사진