prepare($sql); $stmh->bindValue(1, $num, PDO::PARAM_INT); $stmh->execute(); $row = $stmh->fetch(PDO::FETCH_ASSOC); if ($row) { include '_row.php'; } if ($mode === 'copy') { $registration_date = date('Y-m-d'); $num_display = ''; // 복사 모드에서는 번호 비움 $author = isset($user_name) ? $user_name : ''; } } catch (PDOException $Exception) { echo "오류: ".$Exception->getMessage(); exit; } } else { include '_request.php'; $mode = 'insert'; $registration_date = date('Y-m-d'); $author = isset($user_name) ? $user_name : ''; } $title_message = ($mode === 'view') ? "셔터박스 조회 (#{$num_display})" : '셔터박스 등록'; $title_message = ($mode === 'modify') ? "셔터박스 수정 (#{$num_display})" : $title_message ; $title_message = ($mode === 'copy') ? '셔터박스 (데이터 복사)' : $title_message ; // 기존에 저장된 값이 있는 경우 해당 값을 설정 $selected_exit_direction = isset($row['exit_direction']) ? $row['exit_direction'] : '양면 점검구'; $is_assembly_model = true; ?>
등록일 작성자
가로(폭) x 세로(높이) 전면밑 레일폭
품목 검색어 비고
※ 각 부품의 합계
재질 폭합계
조회 모드, 그리기 기능 불가
$value) { if (empty($item[$key]) || $item[$key] !== $value) { $matched = false; break; } } if ($matched && !empty($item['image'])) { return $item['image']; } } return ''; } if ($mode === 'insert') { // insert 모드: 기본 셔터박스 그림 switch ($selected_exit_direction) { case '양면 점검구': $default = '../img/box/box_both.png'; break; case '밑면 점검구': $default = '../img/box/box_bottom.png';break; case '후면 점검구': $default = '../img/box/box_back.png'; break; default: $default = '../img/box/box_both.png'; } $imgUrl = $default; } else { // update 모드: JSON에서 검색 if (file_exists($jsonFile)) { $shutterboxImages = json_decode(file_get_contents($jsonFile), true); if (is_array($shutterboxImages)) { // 우선순위 조건 배열 $searchCases = [ // 1순위: 키워드 !empty($row['search_keyword']) ? ['search_keyword' => $row['search_keyword']] : null, // 2순위: 모든 속성 일치 [ 'box_width' => $row['box_width'], 'box_height' => $row['box_height'], 'front_bottom_width' => $row['front_bottom_width'], 'rail_width' => $row['rail_width'], 'exit_direction' => $row['exit_direction'], ], ]; // null 제거 $searchCases = array_filter($searchCases); // 순차 검색 foreach ($searchCases as $case) { $found = findImageByConditions($shutterboxImages, $case); if ($found) { $imgUrl = $found; break; } } } } } ?> 편집할 이미지 이미지가 없습니다.
절곡 부품 조립
※ 순서변경은 위/아래 버튼을 사용하세요