461 lines
14 KiB
Plaintext
461 lines
14 KiB
Plaintext
<!-- #include virtual = "lib/config.asp" -->
|
||
<!-- #include virtual = "include/holiday_count.asp" -->
|
||
<%
|
||
dim tmpstr
|
||
dim Query
|
||
dim i
|
||
dim user_name(4) '현재 사용자,0:사원코드, 1:이름,2:직급,3:전화번호, 4:부서코드(명)
|
||
dim Max_Width
|
||
dim title
|
||
dim target_name '발급대상자 이름
|
||
dim Curr_date '오늘날짜
|
||
dim Company(6)
|
||
dim gap(27) '1:휴가 시작일, 2:휴가 종료일, 3:원인, , 26:행선지, 27:비상연락망
|
||
dim krc_no
|
||
dim print_type '1:보기, 2:진짜프린트
|
||
dim db_table_name
|
||
|
||
d_no = request("d_no")
|
||
x = request("x")
|
||
krc_no = d_no
|
||
print_type = request("print_type")
|
||
view_chk= request("view_chk")
|
||
clear_chk = request("clear_chk") '이은정 주임이 휴가원을 취소할 수 있도록 하는 값
|
||
|
||
if x = "3" then
|
||
x = "99"
|
||
end if
|
||
|
||
db_table_name = "문서내용"
|
||
|
||
title="휴가원"
|
||
Max_Width =750
|
||
Curr_date = year(date) & "년 " & month(date) & "월 " & day(date) & "일"
|
||
|
||
|
||
|
||
query = "SELECT * "
|
||
query = query & "FROM 문서내용 as a "
|
||
query = query & " INNER JOIN Document as b on a.문서번호 = b.d_no "
|
||
query = query & "WHERE a.문서번호='" & d_no & "' "
|
||
if x = "99" then
|
||
else
|
||
query = query & " AND b.d_delok = 'N' "
|
||
end if
|
||
rsc.Open query, adoConn, 1
|
||
|
||
if rsc.RecordCount > 0 then
|
||
|
||
tmp_date = split(rsc("d_write_date"), "-")
|
||
Curr_date = tmp_date(0) & "년 " & tmp_date(1) & "월 " & tmp_date(2) & "일"
|
||
|
||
tmp_0 = split(rsc("target97"), "^^")
|
||
user_name(0) = rsc("login_p_no")
|
||
user_name(1) = tmp_0(0) '이름
|
||
user_name(2) = tmp_0(1) '직위 코드
|
||
user_name(3) = tmp_0(2) '직통 전화
|
||
user_name(4) = tmp_0(3) '부서코드
|
||
|
||
tmp_00 = split(rsc("target98"), "^^")
|
||
Company(1) = tmp_00(0)
|
||
Company(2) = tmp_00(1)
|
||
Company(3) = tmp_00(2)
|
||
Company(4) = tmp_00(3)
|
||
Company(5) = tmp_00(4)
|
||
Company(6) = tmp_00(5)
|
||
|
||
gap(1) = rsc("target1")
|
||
gap(2) = rsc("target2")
|
||
gap(3) = rsc("target3")
|
||
|
||
tmp_1 = split(rsc("target4"), "^^")
|
||
gap(4) = tmp_1(0)
|
||
gap(5) = tmp_1(1)
|
||
|
||
tmp_2 = split(rsc("target5"), "^^")
|
||
gap(6) = tmp_2(0)
|
||
gap(7) = tmp_2(1)
|
||
gap(8) = tmp_2(2)
|
||
|
||
tmp_3 = split(rsc("target6"), "^^")
|
||
gap(9) = tmp_3(0)
|
||
gap(10) = tmp_3(1)
|
||
gap(11) = tmp_3(2)
|
||
gap(12) = tmp_3(3)
|
||
gap(13) = tmp_3(4)
|
||
|
||
gap(14) = rsc("target7")
|
||
|
||
tmp_4 = split(rsc("target8"), "^^")
|
||
gap(15) = tmp_4(0)
|
||
gap(16) = tmp_4(1)
|
||
gap(17) = tmp_4(2)
|
||
|
||
tmp_5 = split(rsc("target9"), "^^")
|
||
gap(18) = tmp_5(0)
|
||
gap(19) = tmp_5(1)
|
||
|
||
gap(20) = rsc("target10")
|
||
|
||
gap(26) = rsc("target11")
|
||
gap(27) = rsc("target12")
|
||
|
||
tmp_7 = split(rsc("target99"), "^^")
|
||
tmp_8 = split(rsc("target100"), "^^")
|
||
|
||
|
||
if instr(1,tmp_7(0), "반려") then
|
||
tmp_txt1 = tmp_7(0)
|
||
elseif instr(1,tmp_7(0), "<BR>") then
|
||
tmp_t1 = split(tmp_7(0), "<BR>")
|
||
tmp_txt1 = "<img src='/images/sign/" & tmp_t1(0) & "_" & tmp_t1(2) & ".jpg' border=0 width=40 height=40>"
|
||
else
|
||
tmp_txt1 = tmp_7(0)
|
||
end if
|
||
|
||
if instr(1,tmp_7(1), "반려") then
|
||
tmp_txt2 = tmp_7(1)
|
||
elseif instr(1,tmp_7(1), "<BR>") then
|
||
tmp_t2 = split(tmp_7(1), "<BR>")
|
||
tmp_txt2 = "<img src='/images/sign/" & tmp_t2(0) & "_" & tmp_t2(2) & ".jpg' border=0 width=40 height=40>"
|
||
else
|
||
tmp_txt2 = tmp_7(1)
|
||
end if
|
||
|
||
if instr(1,tmp_7(2), "반려") then
|
||
tmp_txt3 = tmp_7(2)
|
||
elseif instr(1,tmp_7(2), "<BR>") then
|
||
tmp_t3 = split(tmp_7(2), "<BR>")
|
||
tmp_txt3 = "<img src='/images/sign/" & tmp_t3(0) & "_" & tmp_t3(2) & ".jpg' border=0 width=40 height=40>"
|
||
else
|
||
tmp_txt3 = tmp_7(2)
|
||
end if
|
||
|
||
if instr(1,tmp_7(3), "반려") then
|
||
tmp_txt4 = tmp_7(3)
|
||
elseif instr(1,tmp_7(3), "<BR>") then
|
||
tmp_t4 = split(tmp_7(3), "<BR>")
|
||
tmp_txt4 = "<img src='/images/sign/" & tmp_t4(0) & "_" & tmp_t4(2) & ".jpg' border=0 width=40 height=40>"
|
||
else
|
||
tmp_txt4 = tmp_7(3)
|
||
end if
|
||
|
||
if instr(1,tmp_7(4), "반려") then
|
||
tmp_txt5 = tmp_7(4)
|
||
elseif instr(1,tmp_7(4), "<BR>") then
|
||
tmp_t5 = split(tmp_7(4), "<BR>")
|
||
tmp_txt5 = "<img src='/images/sign/" & tmp_t5(0) & "_" & tmp_t5(2) & ".jpg' border=0 width=40 height=40>"
|
||
else
|
||
tmp_txt5 = tmp_7(4)
|
||
end if
|
||
|
||
tmp_txt6 = tmp_8(0)
|
||
tmp_txt7 = tmp_8(1)
|
||
tmp_txt8 = tmp_8(2)
|
||
tmp_txt9 = tmp_8(3)
|
||
tmp_txt10 = tmp_8(4)
|
||
|
||
d_order_cnt = int(rsc("d_order_cnt"))
|
||
|
||
|
||
''로그저장
|
||
query = "insert into " & db_table_name & "_log (문서번호, 문서제목, 대상자_p_no, 대상자_이름, 내용,"
|
||
query = query & " 발급일, 발급시각, 발급자_p_no, 발급자_이름, 발급자_ip) values ( "
|
||
query = query & "'" & krc_no & "', "
|
||
query = query & "'" & replace(title, " ", "") & "', "
|
||
query = query & "'" & Session("User_Number") & "', "
|
||
query = query & "'" & Session("loginuser") & "', "
|
||
query = query & "'문서열기', "
|
||
query = query & "'" & year(date) & "-" & zeroformat(month(date),2) & "-" & zeroformat(day(date),2) & "', "
|
||
query = query & "'" & time() & "', "
|
||
query = query & "'" & user_name(0) & "', "
|
||
query = query & "'" & user_name(1) & "', "
|
||
query = query & "'" & Session("USERIP") & "')"
|
||
|
||
if Request.ServerVariables("REMOTE_ADDr") = session("admin_ip") then
|
||
else
|
||
adoconn.execute query
|
||
end if
|
||
|
||
|
||
%>
|
||
|
||
<html>
|
||
<head>
|
||
<title><%=GNB_TITLE%></title>
|
||
<link rel="stylesheet" type="text/css" href="/css/basic.css">
|
||
</head>
|
||
|
||
<script language=javascript>
|
||
function win_close()
|
||
{
|
||
window.close();
|
||
}
|
||
function win_print()
|
||
{
|
||
url = "doc_vacation_print.asp?print_type=2";
|
||
document.ess.action=url;
|
||
//alert(document.ess.action);
|
||
document.ess.submit();
|
||
}
|
||
function myError()
|
||
{
|
||
alert("error");
|
||
}
|
||
|
||
function print_ie()
|
||
{
|
||
|
||
//
|
||
if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1){ // Chrome Browser Detected?
|
||
window.PPClose = false; // Clear Close Flag
|
||
window.onbeforeunload = function(){ // Before Window Close Event
|
||
if(window.PPClose === false){ // Close not OK?
|
||
return 'Leaving this page will block the parent window!\nPlease select "Stay on this Page option" and use the\nCancel button instead to close the Print Preview Window.\n';
|
||
}
|
||
}
|
||
window.print(); // Print preview
|
||
window.PPClose = true; // Set Close Flag to OK.
|
||
}else{
|
||
window.print();
|
||
window.close();
|
||
}
|
||
}
|
||
|
||
function subit(a, b)
|
||
{
|
||
var tmp_txt;
|
||
var approve_pass;
|
||
|
||
if (a == 1)
|
||
{
|
||
tmp_txt = "부재자 ";
|
||
approve_pass = 1;
|
||
}
|
||
else
|
||
{
|
||
tmp_txt = "";
|
||
}
|
||
|
||
if (confirm(tmp_txt + "승인을 하시겠습니까?"))
|
||
{
|
||
document.ess.action = "allow_ok.asp?approve_pass="+approve_pass;
|
||
document.ess.action = "allow_ok.asp?approve_pass="+approve_pass+"&tmp_pass_psn="+b+"&title="+"<%=replace(title," ","")%>";
|
||
document.ess.submit();
|
||
}
|
||
}
|
||
|
||
function backit(a)
|
||
{
|
||
alert("사유를 작성해 주세요");
|
||
var url = "reason.asp?d_no="+a;
|
||
window.open(url,'','left=0,top=0,width=400,height=180,scrollbars=yes,resizable=yes')
|
||
}
|
||
|
||
function request_pros()
|
||
{
|
||
//alert('ok');
|
||
if(confirm("정말 처리하시겠습니까?")){
|
||
document.ess.action = "request_ok.asp?x=2";
|
||
document.ess.submit();
|
||
}
|
||
}
|
||
|
||
function request_cls()
|
||
{
|
||
//alert('ok');
|
||
if(confirm("정말 삭제하시겠습니까?")){
|
||
document.ess.action = "request_ok.asp?x=7";
|
||
document.ess.submit();
|
||
}
|
||
}
|
||
|
||
//-->
|
||
</script>
|
||
|
||
<body topmargin="10" leftmargin="10" <%if cint(print_type) = 2 then%> onLoad="print_ie();" <% end if %>>
|
||
|
||
<form method='post' name='ess'>
|
||
|
||
<input type="hidden" name="d_no" value="<%=d_no%>">
|
||
|
||
<%if x = "99" then%>
|
||
<!-- #include file = "inc_delreason.asp" -->
|
||
<%end if '''if x = "99" then%>
|
||
|
||
<%
|
||
'() and (반려되거나 결재완료) and (어드민이거나 담당처리자 또는 상신자)
|
||
if cint(print_type) <> 2 and (d_order_cnt = "99" or d_order_cnt = "77") and (tmp_admin_chk = "1" or tmp_request_chk = "1" or int(rsc("login_p_no")) = int(Session("User_Number"))) then
|
||
%>
|
||
<!-- #include file = "inc_print.asp" -->
|
||
<%end if%>
|
||
|
||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||
<tr>
|
||
<td >
|
||
<table cellpadding="0" cellspacing="0" border="0">
|
||
<tr>
|
||
<td><img src="/images/approval/docbg_top.jpg"></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="710" align="center" style="padding:10;border-left:1px solid #dedede;border-right:1px solid #dedede;">
|
||
<table width="95%" cellpadding="0" cellspacing="0" border="0">
|
||
<tr>
|
||
<td colspan="2" style="padding:0 0 10 0">
|
||
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">
|
||
<tr>
|
||
<td width="255"><img src="/images/approval/doc_stit01.jpg"></td>
|
||
<td>
|
||
<!-- #include file = "inc_approval.asp" -->
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="20%" style="padding:7 0 7 20"><b>결 의 일 자</b></td>
|
||
<td width="80%" class="tahoma"><%=Curr_date%></td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="20%" style="padding:7 0 7 20"><b>성 명</b></td>
|
||
<td width="80%"><%=user_name(1)%></td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="20%" style="padding:7 0 7 20"><b>소 속</b></td>
|
||
<td width="80%"><%=user_name(4)%></td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="20%" style="padding:7 0 7 20"><b>직 급</b></td>
|
||
<td width="80%"><%=user_name(2)%></td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2" align="center" style="padding:20 0 10 0;font-size:14;font-family:dotum;"><b>상기 본인은 다음과 같이 휴가원을 제출하오니 재가하여 주시기 바랍니다.</b></td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2" align="center" style="padding:10 0 0 0">
|
||
<table width="100%" cellpadding="5" cellspacing="0" border="0" style="border-collapse:collapse;">
|
||
<tr>
|
||
<td width="20%" class='tit2' align="center">휴가기간</td>
|
||
<td width="80%" class='tit7'><font class="tahoma"><%=mid(gap(1),1,4)%>년 <%=mid(gap(1),6,2)%>월 <%=mid(gap(1),9,2)%>일부터 <%=mid(gap(2),1,4)%>년 <%=mid(gap(2),6,2)%>월 <%=mid(gap(2),9,2)%>일까지</font></td>
|
||
</tr>
|
||
<tr>
|
||
<td class='tit2' align="center">휴가원인</td>
|
||
<td class='tit7'><%=gap(3)%></td>
|
||
</tr>
|
||
<tr>
|
||
<td class='tit2' align="center">세부내용</td>
|
||
<td class='tit7'>
|
||
<font class="tahoma">
|
||
<%tmpstr = replace(gap(3), " ","")
|
||
if mid(tmpstr,1,2) = "연차" or instr(1, tmpstr,"반차") > 0 then%>
|
||
<!--
|
||
잔여일수 계산시 휴일 적용하기
|
||
|
||
-->
|
||
<%
|
||
dim holiday_cnt '이번에 사용하고자 하는 휴가 일자 수
|
||
dim condate
|
||
holiday_cnt = 0
|
||
cnt = cint(cdate(gap(2))-cdate(gap(1)))
|
||
for k=0 to cnt
|
||
condate = cdate(cdate(gap(1)) + k)
|
||
if weekday(condate) >= 2 and weekday(condate) <= 6 then
|
||
call day_off_chk_only(year(condate), month(condate), day(condate))
|
||
if day_off = "false" then
|
||
holiday_cnt = holiday_cnt + 1
|
||
end if
|
||
|
||
end if
|
||
next
|
||
if instr(1, tmpstr,"반차") > 0 then '반차이면
|
||
holiday_cnt = cint(holiday_cnt) - 0.5
|
||
end if%>
|
||
|
||
* <%=year(date)%>년 총연차 일수 <%=gap(4)%>일<br>
|
||
* 사용전 잔여 일수 <%=gap(5)%>일<br>
|
||
* 사용후 잔여 일수 <%=gap(5) - holiday_cnt%>일<br>
|
||
<font color=red>* 업무일지 기록기준입니다.<br> * 휴가 내용을 업무일지에 미기록시에는 위 수치가 다를 수 있음.</font>
|
||
<%elseif mid(tmpstr,1,2) = "공가" then%>
|
||
* 세부 원인 : <%=gap(6)%><br>
|
||
* 교육 시간 : <%=gap(7)%><br>
|
||
* 교육 장소 : <%=gap(8)%>
|
||
<%elseif mid(tmpstr,1,2) = "병가" then%>
|
||
* 진단 병명 : <%=gap(9)%><br>
|
||
* 진간 기간 : <%=mid(gap(10),1,4)%>년 <%=mid(gap(10),6,2)%>월 <%=mid(gap(10),9,2)%>일부터 <%=mid(gap(11),1,4)%>년 <%=mid(gap(11),6,2)%>월 <%=mid(gap(11),9,2)%>일까지<br>
|
||
* 진단 기관 : <%=gap(12)%><br>
|
||
* 입원 여부 : <%=gap(13)%>
|
||
<%elseif mid(tmpstr,1,2) = "포상" or mid(tmpstr,1,2) = "안식" or mid(tmpstr,1,2) = "기타" then%>
|
||
* <%=gap(14)%>
|
||
<%elseif mid(tmpstr,1,2) = "경조" then%>
|
||
* 경 조 사 유 : <%=gap(15)%><br>
|
||
* 본인과관계 : <%=gap(16)%><br>
|
||
* 경 조 일 자 : <%=gap(17)%>
|
||
<%elseif mid(tmpstr,1,2) = "산전" then%>
|
||
* 출산 예정일 : <%=gap(18)%><br>
|
||
* 출산후 거소 : <%=gap(19)%>
|
||
<%elseif mid(tmpstr,1,2) = "대체" then%>
|
||
* <%=gap(20)%>
|
||
<%end if%>
|
||
</font>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class='tit2' align="center">비상연락 등</td>
|
||
<td class='tit7'>
|
||
<font class="tahoma">
|
||
* 비상 연락 : <%=gap(26)%><br>
|
||
* 기타 사항 : <%=gap(27)%><br>
|
||
</font>
|
||
<font class="brown"><동행인이 있을 경우 동행인의 비상연락처도 명기></font>
|
||
</td>
|
||
</tr>
|
||
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2" style="padding:20 0 0 0" align="right">
|
||
<pre><font class="tahoma"> 신 청 일 : <%=Curr_date%></font></pre>
|
||
<pre><font class="tahoma"> 신 청 인 : <%=user_name(1)%> (印)</font></pre>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2" align="center" style="padding:15 0 5 0"><!-- #include virtual= "approval/inc_logo.asp" --></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><img src="/images/approval/docbg_btm.jpg"></td>
|
||
</tr>
|
||
<tr>
|
||
<td style="padding:10 0 0 0;" class="brown">*상기 휴가 부여 기준은 취업규칙 제 4 장(휴일 및 휴가) 기준에 의거합니다.</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
</form>
|
||
|
||
</body>
|
||
</html>
|
||
<%
|
||
end if
|
||
rsc.Close
|
||
%> |