<?php
// 품질담당자 및 관리자인 경우 권한 부여
$QCadmin = false ;
if($user_name=='이세희' || $user_name=='개발자' || $user_name=='함신옥'  || $user_name=='노완호' )
	$QCadmin = true ;
?>

<form id="board_form" name="board_form" method="post" enctype="multipart/form-data"  onkeydown="return captureReturnKey(event)"  >	
	<input type="hidden" id="id" name="id" value="<?= isset($num) ? $num : '' ?>" >			  								
	<input type="hidden" id="parentid" name="parentid" value="<?= isset($num) ? $num : '' ?>" >			  								
	<input type="hidden" id="item" name="item" value="<?= isset($item) ? $item : '' ?>" >			  								
	<input type="hidden" id="tablename" name="tablename" value="<?= isset($tablename) ? $tablename : '' ?>" >			  								
	<input type="hidden" id="savetitle" name="savetitle" value="<?= isset($savetitle) ? $savetitle : '' ?>" >	
	<input type="hidden" id="mode" name="mode" value="<?= isset($mode) ? $mode : '' ?>" >			
	<input type="hidden" id="timekey" name="timekey" value="<?= isset($timekey) ? $timekey : '' ?>" >
	<input type="hidden" id="num" name="num" value="<?= isset($num) ? $num : '' ?>">
	<input type="hidden" id="user_name" name="user_name" value="<?= isset($user_name) ? $user_name : '' ?>">
	<input type="hidden" id="update_log" name="update_log" value="<?= isset($update_log) ? $update_log : NULL ?>">
	<input type="hidden" id="item_name" name="item_name" value="<?= isset($item_name) ? $item_name : '' ?>">
	<input type="hidden" id="iList" name="iList">
	
	<div class="container mt-2">
		<div class="d-flex align-items-center justify-content-end mt-1">

		<div class="card" style="width:390px;">  
			<div class="card-body">   
				<div class="d-flex  justify-content-center">  
					<!-- 파일 선택 -->
					<input type="file" id="upfile" name="upfile[]" multiple style="display:none;">
					<button class="btn btn-dark btn-sm me-3" type="button" onclick="document.getElementById('upfile').click();">
						<i class="bi bi-image"></i> </button>

					<!-- 드롭 영역 -->
					<div id="dropArea" style="border: 1px dashed #ccc; padding: 5px; width:290px; text-align: center;">
						성적서 PDF drop 영역
					</div>
					</div>
					<div class="d-flex mt-2 justify-content-center">  
					<!-- 파일 목록 표시 -->
						<div id="displayFile"></div>
					</div>
					
				</div>
		</div>					
		<?php if($QCadmin) { ?>
		<button class="btn btn-primary btn-sm me-1 ms-2 approvalBtn" data-bs-toggle="tooltip" data-bs-placement="bottom" title="품질부서 처리" ><i class="bi bi-award-fill"></i> 승인 </button>
		<?php } ?>
		<button type="button" class="btn btn-dark btn-sm me-1 ms-1 saveData" > <i class="bi bi-floppy2-fill"></i> 저장 </button>
		<button type="button" class="btn btn-danger btn-sm me-1 ms-1 initialBtn"  data-bs-toggle="tooltip" data-bs-placement="bottom" title="성적서 초기화"> R </button>
		<button type="button" class="btn btn-dark btn-sm me-1 ms-1"  data-bs-toggle="tooltip" data-bs-placement="bottom" title="PDF 저장" onclick="generatePDF()"> PDF </button>
		<!-- <button class="btn btn-dark btn-sm me-1" onclick="sendmail();"> <i class="bi bi-envelope-arrow-up"></i> 전송 </button> -->
		<button type="button" class="btn btn-secondary btn-sm me-1 ms-1" onclick="self.close();"> <i class="bi bi-x-lg"></i> 닫기 </button>&nbsp;
	</div>
</div>

