<% dim print_type '1:작성, 2:보기, 3: 진짜 프린트 print_type = request("print_type") %> <%if cint(print_type) <> 2 then%> <%end if%> <%'#################################################### '0:이 화면은 viewer 후 인쇄하는는 화면입니다. '1. 위임장 인쇄 '2. 문서번호 B로 구분 '3. 일반용지에 인쇄 '로그도 저장하기 - '내용도 저장하기 - '2006년 12월 일 완료 '#################################################### %> <% Response.Expires = 0 'Response.Buffer = false call Time_Check(Session("Login_Check")) dim tmpstr dim p_no dim Query dim i dim user_name(4) '현재 사용자,0:사원코드, 1:이름,2:직급,3:전화번호, 4:부서코드(명) dim Max_Width dim title dim krc_no '증명서 발급번호 dim target_name '발급대상자 이름 dim target_gap(4) '발급대상자의 값, 0:사원코드, 1:이름, 2:주민번호, 3:현주소1,4::현주소2 dim Curr_date '오늘날짜 dim Company(6) dim client_name dim gap(4) '위임내용 dim db_table_name db_table_name = "문서내용" client_name = request("txt_client") print_type = request("print_type") gap(1) = request("txt_gap_1") gap(2) = request("txt_gap_2") gap(3) = request("txt_gap_3") gap(4) = request("txt_date") if print_type=2 then gap(4) = mid(gap(4),1,4) & "년 " & mid(gap(4),6,2) & "월 " & mid(gap(4),9,2) & "일" end if title="위 임 장" Max_Width =750 Curr_date = year(date) & "년 " & month(date) & "월 " & day(date) & "일" ''//=============== ''회사 회사명, 사업자등록번호, 대표자명, 주소 가져오기 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 ''//==================== '' '위임받는자 가져오기 if print_type=2 or print_type=3 then target_gap(0) = request("p_no") else target_gap(0) = request("sel_p_no_in") end if Query = "select * from person where p_no ='" & target_gap(0) & "'" adoRs.open Query, adoconn,adopenstatic, adlockreadonly target_gap(1) = adoRs("p_name") target_gap(2) = adoRs("jumin") target_gap(2) = left(decode(target_gap(2), 0),8) + "******" target_gap(3) = adoRs("address1_1") target_gap(4) = adoRs("address1_2") adoRs.close if print_type =3 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 & "B-" krc_no = tmpstr & ZeroFormat(krc_no,5) '//======================== '내용 저장하기 query = "insert into " & db_table_name & " (문서번호, 문서제목,target1, target2, target3, target4, target5, target6, target7, target8, target9,target10," query = query & " 발급일, 발급시각, login_p_no, login_이름,login_ip) values ( " query = query & "'" & krc_no & "', " query = query & "'" & replace(title, " ", "") & "', " query = query & "'" & target_gap(0) & "', " query = query & "'" & target_gap(1) & "', " query = query & "'" & target_gap(2) & "', " query = query & "'" & target_gap(3) & "', " query = query & "'" & target_gap(4) & "', " query = query & "'" & client_name & "', " query = query & "'" & gap(1) & "', " query = query & "'" & gap(2) & "', " query = query & "'" & gap(3) & "', " query = query & "'" & gap(4) & "', " 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 & "
" ' if session("loginuser") = "김홍근" or session("loginuser") = "강두형" then if session("loginuser") = "김홍근" then else adoconn.execute query end if 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 & "'" & client_name & "', " 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 session("loginuser") = "김홍근" or session("loginuser") = "강두형" then if session("loginuser") = "김홍근" then else adoconn.execute query end if end if %> <%if cint(print_type) = 2 then%> <%end if%>
<%if cint(print_type) <> 2 then%> <%end if%>
<%if cint(print_type) = 1 then%> <%end if%> <%if cint(print_type) = 2 then%> <%end if%> <%if cint(print_type) = 1 then%> <%end if%>
위임내용 및 제출일자를 선택후 발급 버튼을 클릭하세요.
경영지원실만 사용가능합니다.
 
<%if cint(print_type) = 2 then%> <%end if%> <%if cint(print_type) = 2 then%> <%end if%> <%if cint(print_type) = 2 then%> <%end if%>
<%=replace(title," ","   ")%>
위임하는자 법     인     명  <%=company(1)%>
주             소  <%=company(4)%>
사업자 등록번호  <%=company(2)%>
위임받는자 성              명  <%=target_gap(1)%>
주민 등록 번호  <%=target_gap(2)%>
주              소  <%=target_gap(3)%>

 <%=target_gap(4)%>
 
제    출    처   <%=client_name%>
 
상기 "위임받는 자"에 대하여 <%=company(1)%>의 아래의 업무 일체를 위임함.
 
위 임   내 용 <%if print_type=2 or print_type=3 then for i=1 to 3 ' if trim(gap(i)) <> "" then Response.Write trim(gap(i)) & "
" ' end if next else%>

<%end if%>
<%if cint(print_type)= 2 or cint(print_type) =3 then%> <%=gap(4)%> <%else%> <%end if%>


<%=company(1)%>
<%tmpstr=split(company(3),",") for i=0 to ubound(tmpstr)%> 대 표 이 사   <%=trim(tmpstr(i))%>
<%next%>
<%if print_type=2 then%> <%end if%>
<%if cint(print_type) = 2 then%> <%else%> <%end if%>