prepare($sql); $stmh->bindValue(1, $num, PDO::PARAM_INT); $stmh->execute(); $row = $stmh->fetch(PDO::FETCH_ASSOC); // _row.php를 통해 $row의 모든 컬럼이 변수로 할당됩니다. 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 { // 신규(insert) 모드 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; // 기존에 저장된 값이 있는 경우 해당 값을 설정, 없으면 기본값 if(empty($firstitem)) { $firstitem = '스크린'; } if(empty($model_UA)) { $model_UA = '인정'; } $finishing_type = isset($row['finishing_type']) ? $row['finishing_type'] : 'SUS마감'; $is_assembly_model = !empty($bending_components); // 조립 모델 여부 판단 ?>
| 등록일 | 작성자 | 비고 | |||
| 외형치수 |
가로(폭)
X
세로(높이)
|
||||
| 모델 정보 |
대분류:
>
>
모델 유형:
= htmlspecialchars($model_UA, ENT_QUOTES, 'UTF-8') ?>
>
>
모델
마감
품목검색어:
|
||||
'; // print_r($bottombarImages); // echo ''; if (is_array($bottombarImages)) { // 검색 조건 우선순위대로 정렬 $searchCases = []; if (!empty($row['search_keyword'])) { // 1순위: 검색 키워드 $searchCases[] = ['search_keyword' => $row['search_keyword']]; } // 2순위: 모든 조건 일치 $searchCases[] = [ 'model_name' => $row['model_name'], 'finishing_type'=> $row['finishing_type'], 'firstitem' => $row['firstitem'], 'UA' => $row['model_UA'], ]; // 3순위: 모델명+마감 $searchCases[] = [ 'model_name' => $row['model_name'], 'finishing_type'=> $row['finishing_type'], ]; // 4순위: 모델명만 $searchCases[] = ['model_name' => $row['model_name']]; foreach ($searchCases as $case) { $found = findImageByConditions($bottombarImages, $case); if ($found) { $imgUrl = $found; break; } else{ $imgUrl = '../img/empty.png'; } } } } ?>