5) { sleep(1); header("Location:" . $WebSite . "login/login_form.php"); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/load_header.php'; // 첫 화면 표시 문구 $title_message = '절곡 BOM단가'; ?> <?=$title_message?> prepare($sql); $stmh->execute(); $row = $stmh->fetch(PDO::FETCH_ASSOC); // $row 배열로 DB 정보를 불러온다. $item_bend = $row['itemList']; $bendingFeeDate = $row['registedate']; } catch (PDOException $Exception) { print "오류: ".$Exception->getMessage(); } $tablename = 'BDmodels'; $order_by = "ORDER BY num DESC"; // 기본 조건: is_deleted = 0 $conditions = ["is_deleted = 0"]; $bindParams = []; if (!empty($search)) { try { // 1. 텍스트 타입 컬럼만 추출 $columnsSql = "SHOW COLUMNS FROM {$DB}.{$tablename}"; $columnsStmt = $pdo->query($columnsSql); $searchableColumns = []; while ($col = $columnsStmt->fetch(PDO::FETCH_ASSOC)) { $field = $col['Field']; $type = strtolower($col['Type']); // text, varchar, char 형식만 LIKE 검색 대상 if (strpos($type, 'char') !== false || strpos($type, 'text') !== false) { $searchableColumns[] = $field; } } // 2. 컬럼별 개별 placeholder로 조건 생성 foreach ($searchableColumns as $i => $colName) { $ph = ":search{$i}"; $searchConditions[] = "$colName LIKE $ph"; $bindParams[$ph] = "%{$search}%"; } if (!empty($searchConditions)) { $conditions[] = '(' . implode(' OR ', $searchConditions) . ')'; } } catch (PDOException $e) { echo "컬럼 조회 오류: " . $e->getMessage(); } } if (!empty($firstitem)) { $conditions[] = "major_category = :firstitem"; $bindParams[":firstitem"] = $firstitem; } if (!empty($seconditem)) { $conditions[] = "seconditem = :seconditem"; $bindParams[":seconditem"] = $seconditem; } if (!empty($model_name)) { $conditions[] = "model_name = :model_name"; $bindParams[":model_name"] = $model_name; } // 최종 WHERE 조건 조립 $sqlWhere = implode(" AND ", $conditions); $sql = "SELECT * FROM {$DB}.{$tablename} WHERE {$sqlWhere} {$order_by}"; // echo '
';
// print_r($l1_list);
// echo '
'; try { $stmh = $pdo->prepare($sql); $stmh->execute($bindParams); $total_row = $stmh->rowCount(); ?>
   
절곡 ㎡ 단가표 (기준일: )
품목 규격 두께(T) 비중 ㎡ / 단가
fetch(PDO::FETCH_ASSOC)) { include '_row.php'; // _row.php 파일에서 변수들이 이미 선언되었으므로, 그 값을 활용합니다. $seconditem = $row['seconditem'] ?? ''; // 중분류(예: 가이드레일, 케이스, 하단마감재, 등) $imgUrl = ''; // 기본값 if ($seconditem === '가이드레일') { // 가이드레일: guiderail.json 파일에서 model_name, check_type, finishing_type 모두 일치하는 항목 검색 $jsonFile = $_SERVER['DOCUMENT_ROOT'].'/guiderail/guiderail.json'; if (file_exists($jsonFile)) { $jsonData = file_get_contents($jsonFile); $data = json_decode($jsonData, true); if (is_array($data)) { foreach ($data as $item) { if ( $item['model_name'] === $row['model_name'] && $item['check_type'] === $row['check_type'] && $item['finishing_type'] === $row['finishing_type'] ) { $imgUrl = "가이드레일 이미지"; break; } } } } } elseif ($seconditem === '케이스') { // 케이스: check_type 값에 따라 미리 지정된 이미지 사용 switch ($row['check_type']) { case '양면 점검구': $imgUrl = "양면 점검구"; break; case '밑면 점검구': $imgUrl = "밑면 점검구"; break; case '후면 점검구': $imgUrl = "후면 점검구"; break; default: $imgUrl = "기본 케이스 이미지"; break; } } elseif ($seconditem === '하단마감재') { // 하단마감재: bottombar.json 파일에서 model_name과 finishing_type이 일치하는 항목 검색 $jsonFile = $_SERVER['DOCUMENT_ROOT'].'/bottombar/bottombar.json'; if (file_exists($jsonFile)) { $jsonData = file_get_contents($jsonFile); $data = json_decode($jsonData, true); if (is_array($data)) { foreach ($data as $item) { if ( $item['model_name'] === $row['model_name'] && $item['finishing_type'] === $row['finishing_type'] ) { $imgUrl = "하단마감재 이미지"; break; } } } } } elseif ($seconditem === 'L-BAR') { // L-BAR인 경우 기본 이미지 지정 $imgUrl = "L-BAR 이미지"; } elseif ($seconditem === '보강평철') { // 보강평철인 경우 기본 이미지 지정 $imgUrl = "보강평철 이미지"; } elseif ($seconditem === '마구리') { // 보강평철인 경우 기본 이미지 지정 $imgUrl = "마구리 이미지"; } elseif ($seconditem === '가이드레일용 연기차단재' || $seconditem === '케이스용 연기차단재' ) { // 보강평철인 경우 기본 이미지 지정 $imgUrl = "연기차단재 이미지"; } else { // 그 외 또는 이미지 없음 $imgUrl = "No Image"; } ?> getMessage(); } ?>
번호 대분류 중분류 모델명 형상 마감타입 규격 박스폭 박스높이 전면밑 레일폭 형태 단가/M 메모 단가기준일 등록일 수정일