prepare($sql); $stmh->bindValue(1,$num,PDO::PARAM_STR); $stmh->execute(); $count = $stmh->rowCount(); $row = $stmh->fetch(PDO::FETCH_ASSOC); // $row 배열로 DB 정보를 불러온다. if($count<1){ print "결과가 없습니다.
"; }else{ include $_SERVER['DOCUMENT_ROOT'] . '/eworks/_row.php'; // 전자결재의 정보를 다시 변환해 준다. $mytitle = $outworkplace ?? ''; $content = $al_content ?? ''; $content_reason = $request_comment ?? ''; $titlemsg = $mode === 'modify' ? '지출결의서(수정)' : '지출결의서(조회)'; } }catch (PDOException $Exception) { print "오류: ".$Exception->getMessage(); } } else{ // 신규 작성일경우 초기화 include $_SERVER['DOCUMENT_ROOT'] .'/eworks/_request.php'; $titlemsg = '지출결의서 작성'; $mytitle = $outworkplace ?? ''; $content = $al_content ?? ''; $content_reason = $request_comment ?? ''; $al_company = $mycompany ?? ''; // session의 회사명 가져오기 } if ($mode!="modify" and $mode!="view" and $mode!="copy"){ // 수정모드가 아닐때 신규 자료일때는 변수 초기화 한다. $indate=date("Y-m-d"); $paymentdate=date("Y-m-d"); $requestpaymentdate=date("Y-m-d"); $author = $user_name; $titlemsg = '지출결의서 작성'; } if ($mode=="copy"){ try{ $sql = "select * from {$DB}.eworks where num = ? "; $stmh = $pdo->prepare($sql); $stmh->bindValue(1,$num,PDO::PARAM_STR); $stmh->execute(); $count = $stmh->rowCount(); $row = $stmh->fetch(PDO::FETCH_ASSOC); // $row 배열로 DB 정보를 불러온다. if($count<1){ print "결과가 없습니다.
"; }else{ include $_SERVER['DOCUMENT_ROOT'] .'/eworks/_row.php'; // 전자결재의 정보를 다시 변환해 준다. $mytitle = $outworkplace ?? ''; $content = $al_content ?? ''; $content_reason = $request_comment ?? ''; $indate=date("Y-m-d"); $paymentdate=date("Y-m-d"); $requestpaymentdate=date("Y-m-d"); } }catch (PDOException $Exception) { print "오류: ".$Exception->getMessage(); } $titlemsg = '(데이터 복사) 지출결의서'; $num=''; $id = $num; $parentid = $num; $author = $user_name; $update_log=''; } // 초기 프로그램은 $num사용 이후 $id로 수정중임 $id=$num; require_once $_SERVER['DOCUMENT_ROOT'] . '/load_GoogleDriveSecond.php'; // attached, image에 대한 정보 불러오기 ?>

$id) { if (isset($approver_details[$index])) { // Use regex to match the pattern (name title date time) // The pattern looks for any character until it hits a series of digits that resemble a date followed by a time preg_match("/^(.+ \d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2})$/", $approver_details[$index], $matches); // Ensure that the full pattern and the two capturing groups are present if (count($matches) === 3) { $nameWithTitle = $matches[1]; // This is the name and title $time = $matches[2]; // This is the time $date = substr($nameWithTitle, -10); // Extract date from the end of the 'nameWithTitle' string $nameWithTitle = trim(str_replace($date, '', $nameWithTitle)); // Remove the date from the 'nameWithTitle' to get just the name and title $formattedDate = date("m/d H:i:s", strtotime("$date $time")); // Combining date and time $approvals[] = array("name" => $nameWithTitle, "date" => $formattedDate); } } } // // Now $approvals contains the necessary details // foreach ($approvals as $approval) { // echo "Approver: " . $approval['name'] . ", Date: " . $approval['date'] . "
"; // } // } // 금액이 10만원 미만이고 신규작성이 아닐 경우 결재생략 표시 $suppliercost_numeric = str_replace(',', '', $suppliercost); $show_skip_approval = ($mode != '' && $mode != 'copy' && $suppliercost_numeric < 100000); if($status === 'end' and ($e_confirm !=='' && $e_confirm !== null) ) { ?>
결재
결재생략
 
       
 
지출결의서 내역
No 적요 금액 비고