7) { /* alert("관리자 승인이 필요합니다."); */ sleep(1); header("Location:" . $WebSite . "login/login_form.php"); exit; } // 세션의 만료 시간을 확인합니다. $expiryTime = ini_get('session.gc_maxlifetime'); $remainingTime = 0; // 세션의 만료 시간과 현재 시간을 비교하여 남은 시간을 계산합니다. if (isset($_SESSION['LAST_ACTIVITY'])) { $lastActivity = $_SESSION['LAST_ACTIVITY']; $currentTime = time(); $elapsedTime = $currentTime - $lastActivity; if ($elapsedTime < $expiryTime) { $remainingTime = $expiryTime - $elapsedTime; } } // 세션의 남은 시간을 반환합니다. // echo $expiryTime; $today = date("Y-m-d"); $_SESSION["company"] = '경동기업'; require_once($_SERVER['DOCUMENT_ROOT'] . "/load_header.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/common.php"); // (접수/출고 등) 가져오기 include "load_info.php"; ?> (주)경동기업
0, "작성" => 1, "상신" => 2, "미결" => 3, "진행" => 4, "결재" => 5 ); ?>
  전자결재 $tabId) { $badgeId = "badge" . $tabId; ?>
=3) ) { print '
2025년 모두 건강하세요!
(주)경동기업  
= CURDATE()) AND al_company ='경동' AND is_deleted IS NULL "; $stmh = $pdo->query($sql); // 검색조건에 맞는글 stmh $total_row=$stmh->rowCount(); if($total_row>0 ) { ?>
접수 출고예정 출고완료
query($sql); $total_row = $stmh->rowCount(); // print $sql; // 현재 날짜를 DateTime 객체로 가져옵니다. $currentDate = new DateTime(); ?> 0) { print ""; print ""; print ""; print ""; print ""; print " "; $start_num = 1; // 페이지당 표시되는 첫 번째 글 순번 while ($row = $stmh->fetch(PDO::FETCH_ASSOC)) { $outdate = $row['outdate'] ?? ''; $outworkplace = $row['outworkplace'] ?? ''; $item_num = $row["num"]; // deliveryfeeList를 JSON -> 배열 디코딩 (여러 개 행이 있을 수 있음) $deliveryfeeListData = json_decode($row['deliveryfeeList'], true); // 만약 데이터가 없거나 파싱 실패하면, 1개짜리 빈 배열로 처리 (빈 화면 대신) if (!is_array($deliveryfeeListData) || count($deliveryfeeListData) === 0) { $deliveryfeeListData = [[]]; } // deliveryfeeList의 각 행마다 생성 foreach ($deliveryfeeListData as $index => $feeRow) { $tdNumber = $start_num ; // col1 ~ col11 $col1 = $feeRow['col1'] ?? ''; $col2 = $feeRow['col2'] ?? ''; $col3 = $feeRow['col3'] ?? ''; $col4 = $feeRow['col4'] ?? ''; $col5 = $feeRow['col5'] ?? ''; $col6 = $feeRow['col6'] ?? ''; $col7 = $feeRow['col7'] ?? ''; $col8 = $feeRow['col8'] ?? ''; $col9 = $feeRow['col9'] ?? ''; $col10 = $feeRow['col10'] ?? ''; $col11 = $feeRow['col11'] ?? ''; $formattedDate = explode('-', $outdate, 2)[1]; // '-'로 분리하고 두 번째 부분을 사용 년도를 제거하고 월-일만 나오게 하기 echo ''; print ''; $text = mb_substr($outworkplace, 0, 10); print ''; print ''; print ''; print ''; } } ?>
출고일 현장명 업체 금액
' . $formattedDate . ' '. $text . '' . $col1 . '' . $col5 . '
query($sql); $total_row = $stmh->rowCount(); // 현재 날짜를 DateTime 객체로 가져옵니다. $currentDate = new DateTime(); if($total_row > 0) { ?> 0) { print ""; print ""; print ""; print ""; print ""; print " "; $innerCount = 0; while($row = $stmh->fetch(PDO::FETCH_ASSOC)) { $specification_clean = preg_replace('/\s+/', ' ', $row['specification']); $remarks_clean = preg_replace('/\s+/', ' ', $row['remarks']); $iListArray = json_decode($row['iList'], true); $item_num = $row["num"]; $item_name = $row["item_name"]; // resultJudgement 값을 찾기 위한 루프 $resultJudgement = null; if(!empty($iListArray )) { foreach ($iListArray as $item) { // 배열에서 inputItems를 가진 항목이 있는지 확인 if (isset($item['inputItems']['resultJudgement'])) { $resultJudgement = $item['inputItems']['resultJudgement']; break; // 값을 찾으면 루프 종료 } } $innerCount ++; } $formattedDate = explode('-',$row["inspection_date"], 2)[1]; // '-'로 분리하고 두 번째 부분을 사용 년도를 제거하고 월-일만 나오게 하기 echo ""; print ''; $class = ($resultJudgement === '합격') ? 'text-success' : 'text-danger'; print ''; $text = mb_substr($row["item_name"], 0, 20); $text = str_replace(',', '', $text); print ''; //공급사 $text = mb_substr($row["supplier"], 0, 12); $text = str_replace(',', '', $text); print ''; // $text = mb_substr($row["weight_kg"], 0, 10); // $text = str_replace(',', '', $text); // // 결과값이 숫자 형태인지 확인하고, 숫자일 경우 number_format 적용 // if (is_numeric($text) && $text != '' && $text != '0') { // $text = number_format((float)$text); // } // print ''; print ''; if($innerCount >= 5) break; } } ?>
검사일 판정 품명 공급사
'; print $formattedDate; print ' '. $resultJudgement . '   ' . $text . '   ' . $text . '   ' . $text . '
query($sql); $total_row = $stmh->rowCount(); // 현재 날짜를 DateTime 객체로 가져옵니다. $currentDate = new DateTime(); if($total_row > 0) { ?> 0) { print ""; print ""; print ""; print ""; print ""; print " "; while($row = $stmh->fetch(PDO::FETCH_ASSOC)) { $num = $row['num']; $prodCode = $row['prodCode']; $ACIaskDate = preg_replace('/\s+/', ' ', $row['ACIaskDate']); $ACIdoneDate = preg_replace('/\s+/', ' ', $row['ACIdoneDate']); $ACIaskDate = explode('-', $ACIaskDate, 2)[1]; // '-'로 분리하고 두 번째 부분을 사용 년도를 제거하고 월-일만 나오게 하기 $ACIdoneDate = explode('-', $ACIdoneDate, 2)[1]; $outworkplace = $row['outworkplace'] ; $text = mb_substr($outworkplace, 0, 8); echo ""; print ''; print ''; print ''; print ''; print ''; } } ?>
요청일 완료일 제품명 현장명
'; print $ACIaskDate; print ' '; print $ACIdoneDate; print ' '; print $prodCode; print ' '; print $text; print '
query($sql); $total_row = $stmh->rowCount(); ?>
0): ?> fetch(PDO::FETCH_ASSOC)): // 원본 컬럼에서 필요한 값 추출 $indate = $row['indate'] ?? ''; $titleFull = $row['outworkplace'] ?? ''; $amount = $row['suppliercost'] ?? ''; $status = $row['status'] ?? ''; $e_confirm = $row['e_confirm'] ?? ''; $e_line_id = $row['e_line_id'] ?? ''; // 년도 제거하고 "MM-DD" 형태로 $formattedDate = explode('-', $indate, 2)[1] ?? $indate; // 제목은 최대 10글자 $titleShort = mb_substr($titleFull, 0, 10); // 결재 완료 여부 $approvedMark = ( ($status === 'end' && !empty($e_confirm)) || empty($e_line_id) ) ? '✅' : ''; ?>
작성일 제목 금액 결재완료
query($sql); $total_row = $stmh->rowCount(); ?>
0): ?> fetch(PDO::FETCH_ASSOC)): // 작성일 $indate = $row['indate'] ?? ''; $status = $row['status'] ?? ''; $e_confirm = $row['e_confirm'] ?? ''; $e_line_id = $row['e_line_id'] ?? ''; $formattedDate = explode('-', $indate, 2)[1] ?? $indate; // expense_data JSON 파싱 $expenseData = json_decode($row['expense_data'] ?? '[]', true); if (!is_array($expenseData)) $expenseData = []; // 제목(첫 항목 + 외 N건) $items = []; $totalAmount = 0; foreach ($expenseData as $exp) { if (!empty($exp['expense_item'])) { $items[] = $exp['expense_item']; } if (!empty($exp['expense_amount'])) { $totalAmount += intval(str_replace(',', '', $exp['expense_amount'])); } } if (count($items) > 1) { $titleShort = $items[0] . ' 외 ' . (count($items) - 1) . '건'; } elseif (count($items) === 1) { $titleShort = $items[0]; } else { $titleShort = ''; } // 결재 완료 표시 $approvedMark = ( ($status === 'end' && !empty($e_confirm)) || empty($e_line_id) ) ? '✅' : ''; ?>
작성일 제목 금액 결재완료
query($sql); $count = $stmh->rowCount(); if ($count > 0): ?> fetch(PDO::FETCH_ASSOC)): $num = $row['num']; $vehicle_type = $row['vehicle_type']; $engine_oil_data = json_decode($row['engine_oil_change_data'], true) ?? []; $maintenance_data = json_decode($row['maintenance_data'], true) ?? []; // 1) 엔진오일 교체 날짜 내림차순 정렬 usort($engine_oil_data, function($a, $b) { if (empty($a['engine_oil_change_date'])) return 1; if (empty($b['engine_oil_change_date'])) return -1; return strtotime($b['engine_oil_change_date']) <=> strtotime($a['engine_oil_change_date']); }); // 2) 정비 내역 날짜 내림차순 정렬 usort($maintenance_data, function($a, $b) { if (empty($a['maintenance_date'])) return 1; if (empty($b['maintenance_date'])) return -1; return strtotime($b['maintenance_date']) <=> strtotime($a['maintenance_date']); }); // 3) 팝오버용 전체 HTML과 표시용 날짜 문자열 준비 $all_records = ''; $display_dates = []; if (!empty($engine_oil_data)) { $all_records .= '
엔진오일 교체
'; foreach ($engine_oil_data as $oil) { $date = $oil['engine_oil_change_date'] ?? ''; $mileage = $oil['mileage'] ?? ''; if ($date || $mileage) { $all_records .= htmlspecialchars($date).' - 주행거리: '.htmlspecialchars($mileage).' km
'; $display_dates[] = '오일' . $date; } } $all_records .= '
'; } if (!empty($maintenance_data)) { $all_records .= '
정비내역
'; foreach ($maintenance_data as $mnt) { $date = $mnt['maintenance_date'] ?? ''; $record = $mnt['maintenance_record'] ?? ''; if ($date && $record) { $all_records .= htmlspecialchars($date).' - '.htmlspecialchars($record).'
'; $display_dates[] = '정비' . $date; } } $all_records .= '
'; } ?>
차종 내역
50 ? '...' : ''); ?> -
query($sql); $count = $stmh->rowCount(); if ($count > 0): ?> fetch(PDO::FETCH_ASSOC)): $num = $row['num']; $vehicle_type = $row['vehicle_type']; $engine_oil_data = json_decode($row['engine_oil_change_data'], true) ?? []; $maintenance_data = json_decode($row['maintenance_data'], true) ?? []; // 1) 엔진오일 교체 날짜 내림차순 정렬 usort($engine_oil_data, function($a, $b) { if (empty($a['engine_oil_change_date'])) return 1; if (empty($b['engine_oil_change_date'])) return -1; return strtotime($b['engine_oil_change_date']) <=> strtotime($a['engine_oil_change_date']); }); // 2) 정비 내역 날짜 내림차순 정렬 usort($maintenance_data, function($a, $b) { if (empty($a['maintenance_date'])) return 1; if (empty($b['maintenance_date'])) return -1; return strtotime($b['maintenance_date']) <=> strtotime($a['maintenance_date']); }); // 3) 팝오버용 전체 HTML과 표시용 날짜 문자열 준비 $all_records = ''; $display_dates = []; if (!empty($engine_oil_data)) { $all_records .= '
엔진오일 교체
'; foreach ($engine_oil_data as $oil) { $date = $oil['engine_oil_change_date'] ?? ''; $mileage = $oil['mileage'] ?? ''; if ($date || $mileage) { $all_records .= htmlspecialchars($date).' - 주행거리: '.htmlspecialchars($mileage).' km
'; $display_dates[] = '오일' . $date; } } $all_records .= '
'; } if (!empty($maintenance_data)) { $all_records .= '
정비내역
'; foreach ($maintenance_data as $mnt) { $date = $mnt['maintenance_date'] ?? ''; $record = $mnt['maintenance_record'] ?? ''; if ($date && $record) { $all_records .= htmlspecialchars($date).' - '.htmlspecialchars($record).'
'; $display_dates[] = '정비' . $date; } } $all_records .= '
'; } ?>
차종 내역
25 ? '...' : ''); ?> -
query($sql); $total_row = $stmh->rowCount(); // 현재 날짜를 DateTime 객체로 가져옵니다. $currentDate = new DateTime(); if($total_row > 0) { echo ''; while($row = $stmh->fetch(PDO::FETCH_ASSOC)) { // 데이터의 등록 날짜를 DateTime 객체로 가져옵니다. $dataDate = new DateTime($row["regist_day"]); // 날짜 차이를 계산합니다. $interval = $currentDate->diff($dataDate)->days; // 이미지 태그 초기화 $newImage = ''; // 7일 이내면 이미지를 추가합니다. if($interval < 7) { $newImage = 'New  '; } $item_num = $row["num"]; $sqlsub="select * from $DB.notice_ripple where parent=$item_num"; $stmh1 = $pdo->query($sqlsub); $num_ripple=$stmh1->rowCount(); // 데이터-속성 추가하여 공지의 ID 또는 필요한 정보를 저장 print ' '; else echo ' '; echo ''; // 테이블 행 종료 } echo '
  ' . $newImage . $row["subject"] ; if($num_ripple>0) echo '   ' . $num_ripple . '
'; } else { echo '   '; } ?>
query($sql); $total_row = $stmh->rowCount(); // 현재 날짜를 DateTime 객체로 가져옵니다. $currentDate = new DateTime(); if($total_row > 0) { print ''; print ' '; while($row = $stmh->fetch(PDO::FETCH_ASSOC)) { // 데이터의 등록 날짜를 DateTime 객체로 가져옵니다. $dataDate = new DateTime($row["regist_day"]); // 날짜 차이를 계산합니다. $interval = $currentDate->diff($dataDate)->days; // 이미지 태그 초기화 $newImage = ''; // 7일 이내면 이미지를 추가합니다. if($interval < 7) { $newImage = 'New  '; } // 데이터-속성 추가하여 공지의 ID 또는 필요한 정보를 저장 print ''; print ''; } } ?>
자료실 ' . $newImage . $row["subject"] . '
query($sql); $total_row = $stmh->rowCount(); // 현재 날짜를 DateTime 객체로 가져옵니다. $currentDate = new DateTime(); if($total_row > 0) { while($row = $stmh->fetch(PDO::FETCH_ASSOC)) { // 데이터의 등록 날짜를 DateTime 객체로 가져옵니다. $dataDate = new DateTime($row["regist_day"]); // 날짜 차이를 계산합니다. $interval = $currentDate->diff($dataDate)->days; // 이미지 태그 초기화 $newImage = ''; print ''; // 7일 이내면 이미지를 추가합니다. if($interval < 7) { $newImage = 'New  '; } // 데이터-속성 추가하여 공지의 ID 또는 필요한 정보를 저장 print ''; print ''; } } ?>
' . $newImage . $row["subject"] . '
<월간상세일정>
연차
'1' OR devMode IS NULL) order by num desc "; $sql="select * from $DB.output " . $a; $stmh = $pdo->query($sql); // 검색조건에 맞는글 stmh $total_row=$stmh->rowCount(); if($total_row>0) include "./load_outputlist.php"; else include "./load_null.php"; ?>

'; $imgpath = './img/goodwordgif/' . $rndimg . '.gif' ; $imgsize = getimagesize($imgpath); print '
'; ?>