- URL 하드코딩 → .env APP_URL 기반 동적 URL로 변경 - DB 연결 하드코딩 → .env 기반으로 변경 - MySQL strict mode DATE 오류 수정
336 lines
12 KiB
PHP
336 lines
12 KiB
PHP
<?php
|
|
require_once($_SERVER['DOCUMENT_ROOT'] . "/session.php");
|
|
|
|
if (!isset($_SESSION["level"]) || $_SESSION["level"] > 5) {
|
|
sleep(1);
|
|
header("Location:" . $WebSite . "login/login_form.php");
|
|
exit;
|
|
}
|
|
include $_SERVER['DOCUMENT_ROOT'] . '/load_header.php';
|
|
$title_message = '품목코드';
|
|
?>
|
|
|
|
<link href="css/style.css" rel="stylesheet">
|
|
<title> <?=$title_message?> </title>
|
|
|
|
<style>
|
|
#specailTable th, #specailTable td {
|
|
padding: 3px!important;
|
|
}
|
|
#specailTable2 th, #specailTable2 td {
|
|
padding: 3px!important;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<?php
|
|
$header = isset($_REQUEST['header']) ? $_REQUEST['header'] : '';
|
|
|
|
if($header ==='header')
|
|
require_once($_SERVER['DOCUMENT_ROOT'] . '/myheader.php');
|
|
|
|
function checkNull($strtmp) {
|
|
return ($strtmp !== null && trim($strtmp) !== '');
|
|
}
|
|
|
|
$search = isset($_REQUEST['search']) ? $_REQUEST['search'] : '';
|
|
$mode = isset($_REQUEST["mode"]) ? $_REQUEST["mode"] : '';
|
|
|
|
|
|
?>
|
|
|
|
<form id="board_form" name="board_form" method="post" enctype="multipart/form-data">
|
|
<input type="hidden" id="mode" name="mode" value="<?=$mode?>">
|
|
<input type="hidden" id="num" name="num">
|
|
<input type="hidden" id="tablename" name="tablename" value="<?=$tablename?>">
|
|
<input type="hidden" id="header" name="header" value="<?=$header?>">
|
|
|
|
<div class="container-fluid">
|
|
<div class="card justify-content-center text-center mt-1 mb-5">
|
|
<div class="card-header">
|
|
<span class="text-center fs-5"> <?=$title_message?> </span>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="row mt-2 mb-2">
|
|
|
|
<div class="col-sm-3">
|
|
<div class="card justify-content-center text-center mt-1 mb-5">
|
|
<div class="card-header">
|
|
<span class="text-center fs-5"> 전동개폐기(모터) </span>
|
|
</div>
|
|
<table class="table table-bordered table-hover text-center">
|
|
<thead class="table-secondary">
|
|
<tr>
|
|
<th>품목명</th>
|
|
<th>규격</th>
|
|
<th class="yellowblackBold" >품목코드(생성)</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$motor_labels = ['150KG', '300KG', '400KG', '500KG', '600KG', '800KG', '1000KG'];
|
|
$volts = ['380V', '220V']; // 전원 정보
|
|
$wireless_options = ['유선', '무선']; // 유/무선 정보
|
|
|
|
foreach ($volts as $volt) {
|
|
foreach ($wireless_options as $wireless) {
|
|
foreach ($motor_labels as $label) {
|
|
$spec = $label . $volt . '(' . $wireless . ')'; // 규격 생성
|
|
$code = '전동개폐기-' . $spec;
|
|
|
|
echo '<tr>';
|
|
echo '<td class="text-center"> 전동개폐기 </td>'; // 품목명
|
|
echo '<td class="text-center">' . $spec . '</td>'; // 규격
|
|
echo '<td class="text-center yellowblackBold">' . $code . '</td>'; // Code
|
|
echo '</tr>';
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-3">
|
|
<div class="card justify-content-center text-center mt-1 mb-5">
|
|
<div class="card-header">
|
|
<span class="text-center fs-5">연동제어기</span>
|
|
</div>
|
|
<table class="table table-bordered table-hover text-center">
|
|
<thead class="table-secondary">
|
|
<tr>
|
|
<th>품명</th>
|
|
<th>규격</th>
|
|
<th class="yellowblackBold">품목코드(생성)</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$control_labels = ['매립', '노출', '뒷박스'];
|
|
$wireless_options = ['유선', '무선']; // 유/무선 옵션
|
|
|
|
foreach ($control_labels as $label) {
|
|
// 뒷박스는 유/무선 구분 없이 한 번만 표시
|
|
if ($label === '뒷박스') {
|
|
echo '<tr>';
|
|
echo '<td class="text-center">' . $label . '</td>'; // 품명
|
|
echo '<td class="text-center">- </td>';
|
|
echo '<td class="text-center yellowblackBold">' . $label . '</td>'; // 품목코드
|
|
echo '</tr>';
|
|
} else {
|
|
// 매립과 노출은 유선, 무선 모두 표시
|
|
foreach ($wireless_options as $wireless) {
|
|
$code = '연동제어기-' . $label . '(' . $wireless . ')' ;
|
|
echo '<tr>';
|
|
echo '<td class="text-center"> 연동제어기 </td>'; // 품명
|
|
echo '<td class="text-center"> ' . $label . '</td>'; // 규격
|
|
echo '<td class="text-center yellowblackBold">' . $code . '</td>'; // 품목코드
|
|
echo '</tr>';
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 감기샤프트 카드 -->
|
|
<div class="col-sm-3">
|
|
<div class="card justify-content-center text-center mt-1 mb-2">
|
|
<div class="card-header">
|
|
<span class="text-center fs-5">감기샤프트</span>
|
|
</div>
|
|
<table class="table table-bordered table-hover text-center">
|
|
<thead class="table-secondary">
|
|
<tr>
|
|
<th>품목명</th>
|
|
<th>규격</th>
|
|
<th class="yellowblackBold">품목코드</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$labels = ['60.5*2.9T,L:6,000','114.3*2T,L:3,000','114.3*2T,L:4,500','114.3*2T,L:6,000','114.3*2T,L:6,000','139.8*2.9T,L:4,500','139.8*2.9T,L:6,000','139.8*2.9T,L:7,000','139.8*2.9T,L:8,200','165.2*2.9T,L:6,000','165.2*2.9T,L:6,000','165.2*2.9T,L:7,000','165.2*2.9T,L:8,000','216.3*4.2T,L:8,200'];
|
|
|
|
foreach ($labels as $label) {
|
|
$code = '감기샤프트-' . $label ;
|
|
echo '<tr>';
|
|
echo '<td class="text-center"> 감기샤프트 </td>'; // 품명
|
|
echo '<td class="text-center"> ' . $label . '</td>'; // 규격
|
|
echo '<td class="text-center yellowblackBold">' . $code . '</td>'; // 품목코드
|
|
echo '</tr>';
|
|
}
|
|
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<!-- 각파이프 카드 -->
|
|
<div class="card justify-content-center text-center mt-1 mb-1">
|
|
<div class="card-header">
|
|
<span class="text-center fs-5">각파이프</span>
|
|
</div>
|
|
<table class="table table-bordered table-hover text-center">
|
|
<thead class="table-secondary">
|
|
<tr>
|
|
<th>품목명</th>
|
|
<th>규격</th>
|
|
<th class="yellowblackBold">품목코드</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
// 각파이프 데이터에 품목명, 규격, 품목코드를 함께 저장
|
|
$pipe_data = [
|
|
'각파이프_3000' => ['item_code' => 'RPIPE3000', 'quantity' => intval(0), 'spec' => '3000'],
|
|
'각파이프_6000' => ['item_code' => 'RPIPE6000', 'quantity' => intval(0), 'spec' => '6000']
|
|
];
|
|
|
|
foreach ($pipe_data as $label => $data) {
|
|
$code = '각파이프-' . $data['spec'] ;
|
|
echo '<tr>';
|
|
echo '<td class="text-center"> 각파이프 </td>'; // 품목명
|
|
echo '<td class="text-center">' . $data['spec'] . '</td>'; // 규격
|
|
echo '<td class="text-center yellowblackBold">' . $code . '</td>'; // 품목코드
|
|
echo '</tr>';
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 앵글 카드 -->
|
|
<div class="col-sm-3">
|
|
<div class="card justify-content-center text-center mt-1 mb-2">
|
|
<div class="card-header">
|
|
<span class="text-center fs-5">앵글</span>
|
|
</div>
|
|
<table class="table table-bordered table-hover text-center">
|
|
<thead class="table-secondary">
|
|
<tr>
|
|
<th>품목명</th>
|
|
<th>규격</th>
|
|
<th class="yellowblackBold">품목코드</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$angle_data = [
|
|
'앵글' => ['item_code' => '앵글-2500', 'quantity' => intval(0), 'spec' => '2500'],
|
|
'받침용앵글' => ['item_code' => '받침용앵글-380', 'quantity' => intval(0), 'spec' => '380']
|
|
];
|
|
|
|
foreach ($angle_data as $label => $data) {
|
|
echo '<tr>';
|
|
echo '<td class="text-center">' . str_replace('_', ' ', $label) . '</td>'; // 품목명
|
|
echo '<td class="text-center">' . $data['spec'] . '</td>'; // 규격
|
|
echo '<td class="text-center yellowblackBold">' . $data['item_code'] . '</td>'; // 품목코드
|
|
echo '</tr>';
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- 마환봉 카드 -->
|
|
<div class="card justify-content-center text-center mt-1 mb-2">
|
|
<div class="card-header">
|
|
<span class="text-center fs-5">마환봉</span>
|
|
</div>
|
|
<table class="table table-bordered table-hover text-center">
|
|
<thead class="table-secondary">
|
|
<tr>
|
|
<th>품목명</th>
|
|
<th>규격</th>
|
|
<th class="yellowblackBold">품목코드</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$pole_data = [
|
|
'마환봉' => ['item_code' => '마환봉-3000', 'quantity' => intval(0), 'spec' => '3000']
|
|
];
|
|
|
|
foreach ($pole_data as $label => $data) {
|
|
echo '<tr>';
|
|
echo '<td class="text-center">' . str_replace('_', ' ', $label) . '</td>'; // 품목명
|
|
echo '<td class="text-center">' . $data['spec'] . '</td>'; // 규격
|
|
echo '<td class="text-center yellowblackBold">' . $data['item_code'] . '</td>'; // 품목코드
|
|
echo '</tr>';
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<!-- 하단무게평철 카드 -->
|
|
<div class="card justify-content-center text-center mt-1 mb-2">
|
|
<div class="card-header">
|
|
<span class="text-center fs-5">무게평철</span>
|
|
</div>
|
|
<table class="table table-bordered table-hover text-center">
|
|
<thead class="table-secondary">
|
|
<tr>
|
|
<th>품목명</th>
|
|
<th>규격</th>
|
|
<th class="yellowblackBold">품목코드</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$weight_plate_data = [
|
|
'무게평철' => ['item_code' => '무게평철-12T', 'quantity' => intval(0), 'spec' => '12T']
|
|
];
|
|
|
|
foreach ($weight_plate_data as $label => $data) {
|
|
echo '<tr>';
|
|
echo '<td class="text-center">' . str_replace('_', ' ', $label) . '</td>'; // 품목명
|
|
echo '<td class="text-center">' . $data['spec'] . '</td>'; // 규격
|
|
echo '<td class="text-center yellowblackBold">' . $data['item_code'] . '</td>'; // 품목코드
|
|
echo '</tr>';
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
var loader = document.getElementById('loadingOverlay');
|
|
loader.style.display = 'none';
|
|
|
|
});
|
|
|
|
$(document).ready(function(){
|
|
// 방문기록 남김
|
|
var title_message = '<?php echo $title_message ; ?>';
|
|
saveMenuLog(title_message);
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
|
|
</body>
|
|
</html>
|