312 lines
8.9 KiB
Plaintext
312 lines
8.9 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
|
<!-- #include virtual = "include/left.asp" -->
|
|
<%
|
|
'####################################################
|
|
'경영지원실에서 증명서 및 공문 출력하는 부분입니다.
|
|
'경영지원실만 사용 가능합니다.
|
|
'####################################################
|
|
%>
|
|
<%
|
|
|
|
if tmp_admin_chk = "1" or Session("Depart_Code") = 18 then
|
|
else
|
|
Response.Write "<script>"
|
|
Response.Write "window.alert ('사용 권한이 없습니다.');"
|
|
Response.Write "history.back();"
|
|
Response.Write "</script>"
|
|
end if
|
|
|
|
dim txt_command, i, j
|
|
dim title(5)
|
|
dim st_date, end_date
|
|
dim Max_Title
|
|
|
|
dim Query
|
|
dim Max_person_in
|
|
dim Max_person_out
|
|
dim person_in() '현재 재직자
|
|
dim person_out() '퇴사자
|
|
dim krft_send
|
|
|
|
|
|
Max_Title = 5
|
|
title(1) = "재직 증명서"
|
|
title(2) = "경력 증명서"
|
|
title(3) = "공 문"
|
|
title(4) = "사용 인감계"
|
|
title(5) = "위임장"
|
|
|
|
txt_command = Request.Form("txt_command")
|
|
st_date = Request.Form("st_date")
|
|
end_date = Request.Form("end_date")
|
|
|
|
|
|
''재직자
|
|
query = "select * from person "
|
|
query = query & " where not(substring(p_name,1,1) = '외' "
|
|
query = query & " or substring(p_name,1,3) = '연구원' "
|
|
query = query & " or substring(p_name,1,3) = 'old' "
|
|
query = query & " or substring(p_name,1,2) = '기타' "
|
|
query = query & " or substring(p_name,1,2) = '회사') "
|
|
query = query & " and p_depart_first is not null and p_depart <> 88 "
|
|
query = query & " and p_resign = 0"
|
|
query = query & " order by p_name"
|
|
adors.open query, adoconn, adopenstatic, adlockreadonly
|
|
Max_person_in = 0
|
|
redim person_in(adors.recordcount,2)
|
|
do while not adors.eof
|
|
Max_person_in = Max_person_in + 1
|
|
person_in(Max_person_in,1) = adors("p_no")
|
|
person_in(Max_person_in,2) = adors("p_name")
|
|
adors.movenext
|
|
loop
|
|
adors.close
|
|
|
|
''퇴직자
|
|
query = "select * from person "
|
|
query = query & " where not(substring(p_name,1,1) = '외' "
|
|
query = query & " or substring(p_name,1,3) = '연구원' "
|
|
query = query & " or substring(p_name,1,3) = 'old' "
|
|
query = query & " or substring(p_name,1,2) = '기타' "
|
|
query = query & " or substring(p_name,1,2) = '회사') "
|
|
query = query & " and p_resign = 1"
|
|
query = query & " order by p_name"
|
|
adors.open query, adoconn, adopenstatic, adlockreadonly
|
|
Max_person_out = 0
|
|
redim person_out(adors.recordcount,2)
|
|
do while not adors.eof
|
|
Max_person_out = Max_person_out + 1
|
|
person_out(Max_person_out,1) = adors("p_no")
|
|
person_out(Max_person_out,2) = adors("p_name")
|
|
adors.movenext
|
|
loop
|
|
adors.close
|
|
%>
|
|
<script language=javascript>
|
|
$(function(){
|
|
$(".search_sel").on("keyup", function(event){
|
|
if((event.which ? event.which : event.keyCode) == 13){
|
|
var keyword = $(this).val();
|
|
$.each($(this).next().find("option"), function(idx, obj){
|
|
if($(obj).text().trim().indexOf(keyword) == -1){
|
|
$(obj).css("display", "none");
|
|
}else{
|
|
$(obj).css("display", "");
|
|
}
|
|
});
|
|
}
|
|
});
|
|
});
|
|
var old_menu = "";
|
|
|
|
function goRun()
|
|
{
|
|
var menu_option = document.frm_list.txt_command.value;
|
|
|
|
if (menu_option == "1" || menu_option == "2")
|
|
{
|
|
document.frm_list.action="cert_poe.asp?menu_option=" + menu_option;
|
|
}
|
|
else if(menu_option == "3" ) //협조공문
|
|
{
|
|
document.frm_list.action="cert_official_select.asp?title=협조공문";
|
|
}
|
|
else if(menu_option == "4") //사용인감계
|
|
{
|
|
if (allTrim(document.frm_list.txt_client.value) == "")
|
|
{
|
|
alert("클라이언트 회사명을 입력하세요...");
|
|
document.frm_list.txt_client.focus();
|
|
return false;
|
|
}
|
|
document.frm_list.action="cert_cos_print.asp?print_type=1";
|
|
}
|
|
else if(menu_option == "5") //위임장
|
|
{
|
|
if (allTrim(document.frm_list.txt_client.value) == "")
|
|
{
|
|
alert("클라이언트 회사명을 입력하세요...");
|
|
document.frm_list.txt_client.focus();
|
|
return false;
|
|
}
|
|
document.frm_list.action="cert_poa_print.asp?print_type=1";
|
|
}
|
|
else
|
|
{
|
|
alert("먼저 원하는 항목을 선택하세요...");
|
|
return false
|
|
}
|
|
document.frm_list.submit();
|
|
}
|
|
|
|
function change_title2(txt){
|
|
//출력하고자 하는 항목을 내용을 보고 선택했(즉 input type=text를 선택시)을 때 라디오 버튼을 따라서 변경시키기
|
|
var i = eval(txt) - 1;
|
|
document.frm_list.radio_title[i].checked = true;
|
|
document.frm_list.txt_command.value = document.frm_list.radio_title[i].value;
|
|
if (i==0){
|
|
div_person_in.style.visibility="visible";
|
|
div_person_out.style.visibility="hidden";
|
|
}
|
|
else
|
|
{
|
|
div_person_in.style.visibility="hidden";
|
|
}
|
|
if (i==1){
|
|
div_person_out.style.visibility="visible";
|
|
div_person_in.style.visibility="hidden";
|
|
}
|
|
else
|
|
{
|
|
div_person_out.style.visibility="hidden";
|
|
}
|
|
|
|
if (i==3){//사용인감계의 클라이언트명 받기용
|
|
div_sayung.style.visibility="visible";
|
|
}
|
|
else if (i==4){// 위임장의 클라이언트명 받기용
|
|
div_sayung.style.visibility="visible";
|
|
div_person_in.style.visibility="visible";
|
|
}
|
|
else
|
|
{
|
|
document.frm_list.txt_client.value = "";
|
|
div_sayung.style.visibility="hidden";
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<script language="javascript" src="/js/common.js"></script>
|
|
|
|
|
|
|
|
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<div class="content-header">
|
|
<h1>증명서 발급</h1>
|
|
</div>
|
|
|
|
|
|
<form name='frm_list' method='post'>
|
|
|
|
<input type=hidden name=txt_command size=50 value='<%=txt_command%>'>
|
|
|
|
<td width="100%" valign="top">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<!-- 확인 -->
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" style="padding:20;">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td style="padding:0 0 5 0;">
|
|
|
|
<font class="brown">발급 대상자 및 원하시는 항목을 선택후 발급 버튼을 클릭하세요.</font><br>
|
|
<img src="/images/common/blank.gif" width="19" height="1" align="absmiddle">
|
|
<font class="k_darkorange">경영지원실만 사용가능합니다.</font>
|
|
</td>
|
|
</tr>
|
|
<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="100%" cellpadding="3" cellspacing="0" border="0" style="border-collapse:collapse;">
|
|
<tr>
|
|
<td colspan="2">
|
|
<div id="div_person_in" style="visibility: hidden;">
|
|
<table width="100%">
|
|
<tr>
|
|
<td width="50%">재직자 선택(가나다순)</td>
|
|
<td>
|
|
<input type="text" id="searchSel_p_no_in" class="search_sel" value="" />
|
|
<select name='sel_p_no_in'>
|
|
<%for i=1 to Max_person_in%>
|
|
<option value='<%=person_in(i,1)%>'><%=person_in(i,2)%></option>
|
|
<%next%>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="div_person_out" style="visibility: hidden;">
|
|
<table width="100%">
|
|
<tr>
|
|
<td width="50%">퇴직자 선택(가나다순)</td>
|
|
<td>
|
|
<input type="text" id="searchSel_p_no_out" class="search_sel" value="" />
|
|
<select name='sel_p_no_out'>
|
|
<%for i=1 to Max_person_out%>
|
|
<option value='<%=person_out(i,1)%>'><%=person_out(i,2)%></option>
|
|
<%next%>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<%
|
|
for i=1 to Max_Title
|
|
if i mod 2 = 0 then
|
|
tmp_class = "tit8"
|
|
else
|
|
tmp_class = "tit7"
|
|
end if
|
|
%>
|
|
<tr>
|
|
<td class="<%=tmp_class%>" width="50%" onclick="change_title2('<%=i%>');" style="CURSOR:pointer;">
|
|
<input type="radio" class="none" name=radio_title value='<%=i%>' onclick="change_title2('<%=i%>');" style="CURSOR:pointer;"
|
|
<%if i= cint(txt_command) then%>
|
|
checked
|
|
<%end if%>
|
|
> <input type=text class="none" name=txt_title value='<%=title(i)%>' readonly style="CURSOR:pointer;">
|
|
</td>
|
|
<%if i=4 then%>
|
|
<td class="<%=tmp_class%>">
|
|
<div id="div_sayung" style="visibility: hidden;" >
|
|
<table width="100%" align="center">
|
|
<tr>
|
|
<td>
|
|
클라이언트 회사명 입력 <input type=text name=txt_client style="IME-MODE: active" maxlength=20 value='' ><font color=red><b>(특수문자 금지)</b></font>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
<%
|
|
else
|
|
%>
|
|
<td class="<%=tmp_class%>">
|
|
</td>
|
|
<%end if%>
|
|
</tr>
|
|
<%next%>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><img src="/images/approval/docbg_btm.jpg"></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding:10 0 0 0;" align="center">
|
|
<img src="/images/management/btn_cert.jpg" onclick='goRun();' style='cursor:pointer'>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|