450 lines
15 KiB
Plaintext
450 lines
15 KiB
Plaintext
<!-- #include virtual = "lib/config.asp" -->
|
|
<%
|
|
dim tmpstr
|
|
dim Query
|
|
dim i,j
|
|
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()
|
|
dim krc_no
|
|
dim Max_length '입력가능 줄수정의
|
|
dim print_type '1:보기, 2:진짜프린트
|
|
dim db_table_name
|
|
dim depart_cost_type
|
|
dim cost_type(2) ''지출방법 구분
|
|
|
|
cost_type(1) = "개인법인카드"
|
|
cost_type(2) = "현금/개인카드"
|
|
|
|
|
|
d_no = request("d_no")
|
|
if request("d_no") = "" then
|
|
d_no = request("krc_no")
|
|
end if
|
|
x = request("x")
|
|
krc_no = d_no
|
|
print_type = request("print_type")
|
|
view_chk= request("view_chk")
|
|
|
|
db_table_name = "문서내용"
|
|
|
|
title="부서비신청서"
|
|
Max_Width =750
|
|
|
|
Curr_date = year(date) & "년 " & zeroformat(month(date),2) & "월 " & zeroformat(day(date),2) & "일"
|
|
|
|
|
|
|
|
''//==========================================
|
|
''2010년 3월 3일
|
|
'''인쇄여부 표시
|
|
if print_type = "2" then
|
|
query = "update 문서내용 set print_chk = 'Yes', print_cnt = print_cnt + 1 where 문서번호='" & d_no & "' "
|
|
adoConn.Execute query
|
|
end if
|
|
|
|
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("target20") = "팀" then
|
|
depart_cost_type = "1"
|
|
elseif rsc("target20") = "장" then
|
|
depart_cost_type = "2"
|
|
end if
|
|
|
|
if rsc("target29") = "" or isnull(rsc("target29")) then
|
|
Max_length = 20
|
|
else
|
|
Max_length = rsc("target29")
|
|
end if
|
|
redim gap(Max_length,8) 'x:순서, y:1:일자, 2:프로젝트명, 3:세부항목, 4:금액,5:프로젝트코드, 6:지출방법,7:퇴근시각, (0,0) : 총액
|
|
|
|
'response.write query
|
|
if rsc.RecordCount > 0 then
|
|
|
|
tmp_date = split(rsc("d_write_date"), "-")
|
|
Curr_date = tmp_date(0) & "년 " & tmp_date(1) & "월 " & tmp_date(2) & "일"
|
|
|
|
part = rsc("part")
|
|
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)
|
|
|
|
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)
|
|
|
|
for i = 1 to Max_length
|
|
if isnull(rsc("target" & i)) then
|
|
else
|
|
if trim(replace(rsc("target" & i), "^", "")) <> "" then
|
|
tmp_g = split(rsc("target" & i), "^^")
|
|
'response.write(rsc("target" & i))
|
|
'response.write(ubound(tmp_g) &" - "& Max_length)
|
|
for j=0 to ubound(tmp_g)
|
|
'response.write("<br>"& tmp_g(j) &" - "& j+1)
|
|
gap(i, j+1) = tmp_g(j)
|
|
next
|
|
|
|
if trim(gap(i, 4)) <> "" then
|
|
gap(0,0) = clng(gap(0,0)) + clng(replace(gap(i, 4) ,",",""))
|
|
end if
|
|
end if
|
|
end if
|
|
next
|
|
|
|
d_order_cnt = int(rsc("d_order_cnt"))
|
|
|
|
tmp_str_money = rsc("target22")
|
|
|
|
for i = 1 to Max_length
|
|
if trim(gap(i, 1)) <> "" then
|
|
Query = "select * from login "
|
|
Query = Query & " where p_no = '" & user_name(0) & "'"
|
|
Query = Query & " and ("
|
|
Query = Query & " ([date] = '" & gap(i, 1) & "' and cast([time] as int) >= 600) " '6시가 기준
|
|
Query = Query & " or "
|
|
Query = Query & " ([date] = '" & cdate(gap(i, 1)) + 1 & "' and cast([time] as int) < 600)"
|
|
Query = Query & " )"
|
|
query = query & " order by [date], [time]"
|
|
adoRs.Open query, adoConn, 1
|
|
if adoRs.recordcount > 0 then
|
|
adoRs.movelast
|
|
gap(i, 7) = mid(adoRs("time"),1,2) & ":" & mid(adoRs("time"),3,2)
|
|
else
|
|
gap(i, 7) = "No"
|
|
end if
|
|
adoRs.close
|
|
|
|
gap(i, 1) = mid(gap(i, 1),1,4) & "년 " & mid(gap(i, 1),6,2) & "월 " & mid(gap(i, 1),9,2) & "일"
|
|
end if
|
|
for j=1 to 6
|
|
if trim(gap(i, j)) = "" then
|
|
gap(i, j) = " "
|
|
end if
|
|
next
|
|
next
|
|
|
|
''로그저장
|
|
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()
|
|
{
|
|
var url = "doc_expense_approval_depart_print.asp";
|
|
url = url + "?print_type=2";
|
|
document.ess.action=url;
|
|
document.ess.submit();
|
|
}
|
|
|
|
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 clsit()
|
|
{
|
|
alert('결재요청 되었습니다');
|
|
self.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')
|
|
}
|
|
</script>
|
|
<body topmargin="10" leftmargin="10" <%if cint(print_type) = 2 then%> onLoad="print_ie();" <% end if %>>
|
|
<div style="filter: alpha(opacity=5);position:absolute; display:inline-block; left:50px; top:70px; z-index:499;width:80%;height:80%;background-color: rgb(255,255,255); opacity:0.05; font-size:35px; font-family:malgun gothic; font-weight:bold; line-height:50px;" id="popup_background">
|
|
열람용 열람용 열람용 열람용<br />
|
|
열람용 열람용 열람용 열람용<br />
|
|
열람용 열람용 열람용 열람용<br />
|
|
열람용 열람용 열람용 열람용<br />
|
|
열람용 열람용 열람용 열람용<br />
|
|
열람용 열람용 열람용 열람용<br />
|
|
열람용 열람용 열람용 열람용<br />
|
|
열람용 열람용 열람용 열람용<br />
|
|
열람용 열람용 열람용 열람용<br />
|
|
열람용 열람용 열람용 열람용<br />
|
|
열람용 열람용 열람용 열람용
|
|
</div>
|
|
<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%>
|
|
<img src="/images/common/btn_cancel.jpg" border="0" onClick="win_close();" style="CURSOR:pointer;">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td colspan="2" style="padding:20;">
|
|
<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">
|
|
<%
|
|
if depart_cost_type = "1" then
|
|
tmp_tit = "그룹활동비"
|
|
elseif depart_cost_type = "2" then
|
|
tmp_tit = "그룹장활동비"
|
|
end if
|
|
%>
|
|
<span style="color:#636B7E;font-family:batang;font-weight:bold;font-size:40px;letter-spacing:-6;line-height:30px;"><%=tmp_tit%></span>
|
|
</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"><%=d_no%></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" bgcolor="#d8d8d8" height="1"><%=tmp_str_money %></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" align="center" style="padding:10 0 0 0">
|
|
<table width="100%" cellpadding="3" cellspacing="0" border="0" style="border-collapse:collapse;">
|
|
<tr>
|
|
<td width="20%" align="center">일자</td>
|
|
<td width="20%" align="center">프로젝트(업무)명/내용</td>
|
|
<td width="35%" align="center">세부항목</td>
|
|
<td width="15%" align="center">금액</td>
|
|
<td width="10%" align="center">지출방법</td>
|
|
</tr>
|
|
<%for i=1 to Max_length
|
|
if gap(i, 4) <> "" and gap(i, 4) <> " " then
|
|
%>
|
|
<tr>
|
|
<td align="center"><font class="tahoma"><%=gap(i,1)%></font></td>
|
|
<td ><font class="tahoma"><%=(gap(i,2))%></font></td>
|
|
<td ><font class="tahoma"><%=(gap(i,3))%></font></td>
|
|
<td align="right"><font class="tahoma">₩<%=formatnumber(gap(i,4),0)%> </font></td>
|
|
<td align="center"><font class="tahoma">
|
|
<%if cost_type(1) = gap(i,6) then%>
|
|
①
|
|
<%elseif cost_type(2) = gap(i,6) then%>
|
|
②
|
|
<%else%>
|
|
③
|
|
<%end if%>
|
|
</font></td>
|
|
</tr>
|
|
<%
|
|
end if
|
|
next%>
|
|
<tr>
|
|
<td colspan="3" >
|
|
합계 (지출방법 => ① : 개인법인카드, ② : 현금/개인카드, ③ :프로그램 오류
|
|
</td>
|
|
<td align="right"><font class="tahoma">₩<%=formatnumber(gap(0,0),0)%> </font></td>
|
|
<td colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" style="padding:20 0 0 0" align="right">
|
|
<pre><font class="tahoma"> 영 수 일 자 : 년 월 일</font></pre>
|
|
<pre><font class="tahoma"> 영 수 자 : (印)</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>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</body>
|
|
</html>
|
|
<%
|
|
end if
|
|
rsc.Close
|
|
%> |