"대표 신동조", "date" => $formattedDate),
// 더 많은 결재권자가 있을 수 있음...
);
}
}
else
{
$approver_ids = explode('!', $e_confirm_id);
$approver_details = explode('!', $e_confirm);
$approvals = array();
foreach($approver_ids as $index => $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'] . "
";
// }
}
if($status === 'end')
{
?>
} ?>
성명
부서
" . $item_arr[$i] . "   ";
else
print " " . $item_arr[$i] . "   ";
if($i%2 == 0)
print "
";
}
?>
신청시작일
신청종료일
신청 기간 산출
연차 잔여일수
if((int)$num>0 and $statusstr!=='결재완료') {
print '
';
}
else if( $statusstr!=='결재완료') {
print '
';
}
?>
if((int)$num>0 and $statusstr!=='결재완료') { ?>
} ?>
if($user_name=='김보곤' and (int)$num<2 ) { ?>
} ?>