5) { sleep(1); header("Location:" . $WebSite . "login/login_form.php"); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/load_header.php'; // 첫 화면 표시 문구 $title_message = '절곡 바라시 기초자료'; ?> <?=$title_message?> '' AND (is_deleted IS NULL OR is_deleted = '0') ORDER BY itemName ASC"; $stmhItem = $pdo->prepare($sqlItem); $stmhItem->execute(); $myItemList = $stmhItem->fetchAll(PDO::FETCH_COLUMN); // 조건 배열과 바인딩 배열 $conditions = ["is_deleted IS NULL"]; $bindParams = []; // 대분류 선택값( selectedItem )이 있는 경우 if (!empty($selectedItem)) { $conditions[] = "item_sep = :selectedItem"; $bindParams[":selectedItem"] = $selectedItem; } // 인정/비인정 선택값( selectedUA )이 있는 경우 if (!empty($selectedUA)) { $conditions[] = "model_UA = :selectedUA"; $bindParams[":selectedUA"] = $selectedUA; } // 절곡물 분류 선택값( selectedBendingCategory )이 있는 경우 if (!empty($selectedBendingCategory)) { $conditions[] = "item_bending = :selectedBendingCategory"; $bindParams[":selectedBendingCategory"] = $selectedBendingCategory; } // 품명 선택값( selectedName )이 있는 경우 if (!empty($selectedName)) { $conditions[] = "itemName = :selectedName"; $bindParams[":selectedName"] = $selectedName; } // 검색어가 있는 경우 => bending 테이블 전체 컬럼을 LIKE 검색 if (!empty($search)) { // bending 테이블 컬럼 목록 조회 $columns = []; $stmt = $pdo->query("SHOW COLUMNS FROM {$DB}.{$tablename}"); while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $columns[] = $row['Field']; } $searchConditions = []; foreach ($columns as $index => $col) { $paramName = ":search{$index}"; $searchConditions[] = "$col LIKE $paramName"; $bindParams[$paramName] = "%{$search}%"; } if (!empty($searchConditions)) { // (col1 LIKE :search0 OR col2 LIKE :search1 OR ...) $conditions[] = "(" . implode(" OR ", $searchConditions) . ")"; } } // ------------------------------------------------------ // 최종 SQL 구성 $sqlWhere = implode(" AND ", $conditions); // is_deleted IS NULL AND item_sep = :selectedItem AND ... $sqlOrder = "ORDER BY num DESC"; $sql = "SELECT * FROM {$DB}.{$tablename} WHERE {$sqlWhere} {$sqlOrder}"; // prepare -> bind -> execute $stmh = $pdo->prepare($sql); $stmh->execute($bindParams); $total_row = $stmh->rowCount(); // print $sql; // 업로드 이미지 폴더 (절대경로 or 상대경로) $upload_dir = '../bending/img/'; ?>
 
'; echo ''; foreach ($l1_list as $item) { $checked = ($selectedItem === $item) ? ' checked' : ''; echo ''; echo ''; } ?>
'; echo ''; foreach ($UA_list as $item) { $checked = ($selectedUA === $item) ? ' checked' : ''; echo ''; echo ''; } ?>
       
fetch(PDO::FETCH_ASSOC)): include '_row.php'; ?>
NO 등록일 대분류 인정/비인정 절곡물 분류 품명 규격(가로*세로) 이미지(형상) 재질 폭 합계 절곡회수 역방향(음영) A각 수 폭합 작성 검색어 비고
형상 이미지 이미지 없음 0 ? ($nonEmptyCount - 1) : ''; ?> 0 ? $nonEmptyCount : ''; ?> 0 ? $nonEmptyCount : ''; ?>