<% dim doc_type : doc_type = "doc_timeoff_print" 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(3) '3:휴직이유, 1:휴직일, 2:복직(희망)일 '20110307 : 부재 로직시 휴가원과 같이 검색하기 위해 순서를 교체 dim krc_no dim print_type '1:보기, 2:진짜프린트 dim db_table_name db_table_name = "문서내용" title="휴 직 계" Max_Width =750 Curr_date = year(date) & "년 " & zeroformat(month(date),2) & "월 " & zeroformat(day(date),2) & "일" set rsm = server.CreateObject("ADODB.RECORDSET") ''//=============== ''회사 회사명, 사업자등록번호, 대표자명, 주소 가져오기 Query = "select * from company" adoRs.open Query, adoconn,adopenstatic, adlockreadonly Company(1) = adors("com_name") Company(2) = adors("사업자등록번호") Company(3) = adors("대표자명") Company(4) = adors("주소") Company(5) = adors("법인등록번호") Company(6) = adors("회사대표전화번호") adoRs.close ''///=============== ''로그인 사용자 정보 user_name(0) = Session("User_Number") Query = "SELECT p_name, p_team_name, p_rank_name, p_tel3 FROM project2.dbo.V_Person WHERE p_no = '" & user_name(0) & "'" adoRs.open Query, adoconn,adopenstatic, adlockreadonly user_name(1) = adoRs("p_name") '이름 user_name(2) = adoRs("p_rank_name") '직위 코드 user_name(3) = adoRs("p_tel3") '직통 전화 user_name(4) = adoRs("p_team_name") '부서코드 adoRs.close ''///================ gap(3) = request("txt_reason") gap(1) = request("txt_holiday_start_date") gap(2) = request("txt_holiday_end_date") print_type = request("print_type") tmp_txt1 = request("tmp_txt1") tmp_txt2 = request("tmp_txt2") tmp_txt3 = request("tmp_txt3") tmp_txt4 = request("tmp_txt4") tmp_txt5 = request("tmp_txt5") tmp_txt6 = request("tmp_txt6") tmp_txt7 = request("tmp_txt7") tmp_txt8 = request("tmp_txt8") tmp_txt9 = request("tmp_txt9") tmp_txt10 = request("tmp_txt10") if cint(print_type) = 2 then '먼저 휴직계의 문서번호 생성 ''///=============== ''문서번호 정보 Query = "select 문서번호 as krc_no from " & db_table_name query = query & " where 문서제목 = '" & replace(title, " ", "") & "' " query = query & " and substring(문서번호,5,4) = '" & year(date) & "' " query = query & " order by 문서번호" adoRs.open Query, adoconn,adopenstatic, adlockreadonly if adoRs.recordcount <= 0 then krc_no = 0 else adoRs.movelast tmpstr = split(trim(adoRs("krc_no")),"-") krc_no = tmpstr(3) end if adoRs.close krc_no = int(krc_no) + 1 tmpstr = "KRC-" & year(date) & "-" tmpstr = tmpstr & "E-" krc_no = tmpstr & ZeroFormat(krc_no,5) target97 = user_name(1) & "^^" & user_name(2) & "^^" & user_name(3) & "^^" & user_name(4) target98 = Company(1) & "^^" & Company(2) & "^^" & Company(3) & "^^" & Company(4) & "^^" & Company(5) & "^^" & Company(6) %> <% target99 = tmp_txt1 & "^^" & tmp_txt2 & "^^" & tmp_txt3 & "^^" & tmp_txt4 & "^^" & tmp_txt5 target100 = tmp_txt6 & "^^" & tmp_txt7 & "^^" & tmp_txt8 & "^^" & tmp_txt9 & "^^" & tmp_txt10 'Document table에 삽입 query = "INSERT INTO Document " query = query & " (d_no, d_name, d_write_name, d_write_date, d_flag, d_type, " query = query & " d_order_cnt, d_orders," query = query & " d_order1, d_order2, d_order3, d_order4, d_order5, " query = query & " d_order6, d_order7, d_order8, d_order9, d_order10, " query = query & " d_view, d_delok) " query = query & "VALUES " query = query & " ('" & krc_no & "', '휴직계', '" & Session("loginuser") & "', '" & date() & "', '7', '" & d_type & "', " query = query & " '" & d_order_cnt & "', '" & d_orders & "', " query = query & " '" & d_order1 & "', '" & d_order2 & "', '" & d_order3 & "', '" & d_order4 & "', '" & d_order5 & "', " query = query & " '" & d_order6 & "', '" & d_order7 & "', '" & d_order8 & "', '" & d_order9 & "', '" & d_order10 & "', " query = query & " 'Y', 'N') " 'Response.Write query & "
" adoconn.execute query '==================================================================== '//======================== '내용 저장하기 query = "insert into " & db_table_name & " (문서번호, 문서제목, target1, target2, target3, target97, target98, target99, target100, " query = query & " 발급일, 발급시각, login_p_no, login_이름,login_ip) values ( " query = query & "'" & krc_no & "', " query = query & "'" & replace(title, " ", "") & "', " query = query & "'" & gap(1) & "', " query = query & "'" & gap(2) & "', " query = query & "'" & gap(3) & "', " query = query & "'" & target97 & "', " query = query & "'" & target98 & "', " query = query & "'" & target99 & "', " query = query & "'" & target100 & "', " 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") & "') " 'Response.Write query & "
" adoconn.execute query ''로그저장 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 & "'" & user_name(0) & "', " query = query & "'" & user_name(1) & "', " 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") & "')" 'adoconn.execute query end if %> <%=GNB_TITLE%> onLoad="win_close2();" <% end if %>>
<%if cint(print_type) = 1 then%> <%end if%>
<%if cdate(formatdatetime(date,2)) > "2014-01-07" then tmp_title = "대표이사" else tmp_title = "부회장" end if%> <% 'my_pos = "1" 'Response.Write "my_pos : " & my_pos & "
" tmp_txt = "

" & Session("loginuser") & "
" & replace(date(), "-","") & "
" & FormatDateTime(time,4) tmp_txt = Session("loginuser") & "
" & replace(date(), "-","") & "
" & Session("User_Number") if my_pos = 5 then '임원 tmp_txt1 = "전결" tmp_txt2 = "전결" tmp_txt3 = "전결" tmp_txt4 = tmp_txt tmp_txt5 = " " tmp_txt6 = "/" tmp_txt7 = "/" tmp_txt8 = "/" tmp_txt9 = month(now()) & " / " & day(now()) tmp_txt10 = "/" elseif my_pos = 3 or my_pos = 4 then '부서장 tmp_txt1 = "전결" tmp_txt2 = "전결" tmp_txt3 = tmp_txt tmp_txt4 = " " tmp_txt5 = " " tmp_txt6 = "/" tmp_txt7 = "/" tmp_txt8 = month(now()) & " / " & day(now()) tmp_txt9 = "/" tmp_txt10 = "/" elseif my_pos = 2 then '팀장 tmp_txt1 = tmp_txt tmp_txt2 = " " tmp_txt3 = " " tmp_txt4 = " " tmp_txt5 = " " tmp_txt6 = month(now()) & " / " & day(now()) tmp_txt7 = "/" tmp_txt8 = "/" tmp_txt9 = "/" tmp_txt10 = "/" elseif my_pos = 1 then '팀 팀원 tmp_txt1 = tmp_txt tmp_txt2 = " " tmp_txt3 = " " tmp_txt4 = " " tmp_txt5 = " " tmp_txt6 = month(now()) & " / " & day(now()) tmp_txt7 = "/" tmp_txt8 = "/" tmp_txt9 = "/" tmp_txt10 = "/" else '노팀 팀원 tmp_txt1 = tmp_txt tmp_txt2 = "전결" tmp_txt3 = " " tmp_txt4 = " " tmp_txt5 = " " tmp_txt6 = month(now()) & " / " & day(now()) tmp_txt7 = "/" tmp_txt8 = "/" tmp_txt9 = "/" tmp_txt10 = "/" end if %>

기안/승인(소속부서) 검토/승인(관리부서)
본인 팀장 부서장 임원 <%=tmp_title%> 담당 부서장 임원 <%=tmp_title%>
<%=tmp_txt1%>  <%=tmp_txt2%>  <%=tmp_txt3%>  <%=tmp_txt4%>  <%=tmp_txt5%> 
<%=tmp_txt6%> <%=tmp_txt7%> <%=tmp_txt8%> <%=tmp_txt9%> <%=tmp_txt10%> / / / /
성         명 <%=user_name(1)%>
소         속 <%=user_name(4)%>
직         급 <%=user_name(2)%>
상기 본인은 다음과 같이 휴직하고자 하오니 재가하여 주시기 바랍니다.
휴 직 사 유 <%=gap(3)%>   <진단서등 증빙첨부>
휴직희망일 <%=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)%>일
처 리 기 준 무급(           ) / 유급(           )%    <경영지원실 기재>
	신  청  일  :       <%=Curr_date%>
	신  청  인  :              <%=user_name(1)%>     (印)
*복직예정일 전이라도 그 사유가 해소되어 복직계를 제출했을 경우, 심사를 거쳐 복직될 수 있습니다.
*본 휴직계의 복직예정일에 근거하여 복직일에 경영지원실로 복직사실을 통보(복직계제출)하지 아니하면
   퇴사의사로 간주하여 별도의 절차 없이 최종 퇴사 처리합니다.
*휴직 연장 사유가 발생할 경우 복직일 1주일간 전에 휴직계를 다시 제출하여 주시기 바랍니다.
*복직 후라도 휴직 사유가 해소되지 아니한 경우에는 본인의 희망에 따라 휴직계를 제출, 휴직의 연장 또는 재신청을 하여야 합니다.