Files
KIN/project/project_search_fail_dep.asp
2025-09-29 17:55:08 +09:00

950 lines
23 KiB
Plaintext

<!-- #include virtual = "lib/config.asp" -->
<%
set rsp = server.CreateObject("ADODB.RECORDSET")
sn = request("sn")
x = request("x")
y = request("y")
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<LINK rel="stylesheet" type="text/css" href="/lib/text.css">
<script src="/lib/function.js" type="text/javascript1.3"></script>
<style>
<!--
.number
{
BORDER-RIGHT: #7c7c7c 1px solid;
BORDER-TOP: #7c7c7c 1px solid;
FONT-SIZE: 9pt;
IME-MODE: disabled;
BORDER-LEFT: #7c7c7c 1px solid;
COLOR: black;
BORDER-BOTTOM: #7c7c7c 1px solid;
HEIGHT: 18px;
TEXT-ALIGN:right;VERTICAL-ALIGN: middle
}
-->
</style>
<title>
프로젝트 컨택
</title>
<script language=javascript>
function check_comma(txt,txt2)
{
txt=allTrim(txt);
for(var i=0;i<txt.length;i++){
txt = txt.replace(',','')
txt = txt.replace(' ','')
}
if(eval(txt2)==1){
document.pms.p_del_cprice_chk.checked = false;
document.pms.p_del_cprice.value = allTrim(commify(txt));
}else{
document.pms.p_del_krcprice.value = allTrim(commify(txt));
}
}
function autofnc()
{
if (document.pms.p_del_cprice_chk.checked == true)
{
document.pms.p_del_cprice.value = "";
}
}
function search(theURL,winName,features) {
if (features == 'x') {
var width_size = screen.width - 770;
var height_size= screen.height;
features = "left=" + width_size + " top=5 width=770 height=500 scrollbars=yes statbar=no";
}
window.open(theURL,winName,features);
}
function openit(a) {
var url = "project_contactlist_file.asp?x=1&sn="+a;
window.open(url,'','left=0,top=0,width=400,height=200,scrollbars=yes,resizable=yes')
}
function chkit() {
var f = document.pms;
if (document.pms.p_del_rcompany.value == "0")
{
alert("선정된 조사회사를 선택해 주세요");
document.pms.p_del_rcompany.focus();
return false;
}
if ((document.pms.p_del_cprice.value == "") && (document.pms.p_del_cprice_chk.checked == false))
{
alert("예상가를 작성해 주세요");
document.pms.p_del_cprice.value = "";
document.pms.p_del_cprice.focus();
return false;
}
if (document.pms.p_del_krcprice.value == "")
{
alert("KRC제안가를 작성해 주세요");
document.pms.p_del_krcprice.value = "";
document.pms.p_del_krcprice.focus();
return false;
}
if (document.pms.p_del_reason1.value == "0")
{
alert("이유 분류 항목을 선택해 주세요");
document.pms.p_del_reason1.focus();
return false;
}
if (document.pms.p_del_reason2.value.trim() == "")
{
alert("상세이유를 작성해 주세요");
document.pms.p_del_reason2.value = "";
document.pms.p_del_reason2.focus();
return false;
}
document.pms.p_del_reason2.value = document.pms.p_del_reason2.value.trim();
if (document.pms.p_del_cplan.value.trim() == "")
{
alert("대응방안을 작성해 주세요");
document.pms.p_del_cplan.value = "";
document.pms.p_del_cplan.focus();
return false;
}
document.pms.p_del_cplan.value = document.pms.p_del_cplan.value.trim();
}
function subit(a)
{
if (chkit() == false)
{
return false;
}
if (confirm("수정하시겠습니까?"))
{
document.pms.action = 'project_contactlist_reason_ok.asp?x=1';
document.pms.submit();
}
}
function regit(a)
{
if (chkit() == false)
{
return false;
}
/*
if (document.all('table1').style.display == "")
{
if (document.pms.p_subject.value.trim() == "")
{
alert("프로젝트명을 작성해 주세요");
document.pms.p_subject.value = "";
document.pms.p_subject.focus();
return false;
}
if (confirm("등록하시겠습니까?"))
{
document.pms.action = "2propose_dep_reg.asp";
document.pms.submit();
}
}
else
{
//document.pms.action = "2propose_dep.asp?x=1";
//document.pms.submit();
alert("프로젝트명을 작성해 주세요");
document.all('table1').style.display = "";
document.pms.p_subject.focus();
}
*/
if (confirm("등록하시겠습니까?"))
{
document.pms.action = "project_contactlist_dep_reg.asp";
document.pms.submit();
}
}
function clsit() {
self.close();
}
function reloadit(a)
{
//location.href = "2propose_dep.asp?sn="+a;
document.pms.action = "project_contactlist_dep.asp?y="+a;
document.pms.submit();
}
function delit()
{
<% if request.servervariables("REMOTE_ADDR") = session("admin_ip") then %>
document.pms.action = "2propose_reason.asp";
document.pms.submit();
<% else %>
//if (confirm("삭제하시겠습니까?"))
if (confirm("준비중입니다"))
{
document.pms.action = "project_contactlist_del_ok.asp";
//document.pms.submit();
}
<% end if %>
}
</script>
</head>
<body>
<form name="pms" method="post">
<input type="hidden" name="sn" value="<%=sn%>">
<%
query = "SELECT * "
query = query & "FROM project2_pre "
query = query & "WHERE sn='" & sn & "' "
rsc.Open query, adoConn, 1
if rsc.RecordCount > 0 then
'제안관련 파일이 등록되어 있어야만 정식등록을 할 수 있음, 그러기 위해 파일 업로드 유무를 검색함
query = "SELECT * "
query = query & "FROM file_log "
query = query & "WHERE p_sn_tmp = '" & rsc("p_sn_tmp") & "' "
query = query & " AND p_contact_date = '" & rsc("p_contact_date") & "' "
rsp.Open query, adoConn, 1
if rsp.RecordCount > 0 then
if rsp("propose") = "1" then
tmp_file_chk = 1
else
tmp_file_chk = 0
end if
else
tmp_file_chk = 0
end if
rsp.Close
'#### 파일이 올라있지 않아도 등록할 수 있도록 파일체크 로직을 항상 참으로 고정 ###'
tmp_file_chk = 1
if rsc("p_prop_date") <> "" then
tmp_data_ok = 1
else
tmp_data_ok = 0
end if
if request("p_types1") <> "" then
p_types1 = request("p_types1")
else
p_types1 = rsc("p_types1")
end if
if request("p_types2") <> "" then
p_types2 = request("p_types2")
else
p_types2 = rsc("p_types2")
end if
if request("p_types3") <> "" then
p_types3 = request("p_types3")
else
p_types3 = rsc("p_types3")
end if
if y = "1" then
p_types2 = "0"
p_types3 = "0"
elseif y = "2" then
p_types3 = "0"
end if
'Response.Write "p_types1 : " & p_types1 & "<BR>"
'수정버튼이 보이기 위해선 같은 부서 이어야 한다.
if int(Session("Depart_Code")) = int(rsc("p_depart")) OR int(Session("Depart_Code")) = int(rsc("p_depart_dep")) OR tmp_admin_chk = "1" then
tmp_modi = "1"
else
tmp_modi = "0"
end if
%>
<table border="0" cellspacing="0" cellpadding="0" width="800">
<tr>
<td width="20%" bgcolor="#BBCEFD" height="2"></td>
<td width="80%" bgcolor="#B8B0A9" height="2"></td>
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">프로젝트 임시번호</td>
<td>
&nbsp;&nbsp;&nbsp;
<font color="blue"><b><%=rsc("p_sn_tmp")%></b></font>
<input type="hidden" name="p_sn_tmp" value="<%=rsc("p_sn_tmp")%>">
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
프&nbsp;&nbsp;로&nbsp;&nbsp;젝&nbsp;&nbsp;트&nbsp;&nbsp;&nbsp;명
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%=rsc("p_subject_tmp")%>
<input type="hidden" name="p_subject_tmp" value="<%=rsc("p_subject_tmp")%>">
<!--font color="red" style="font-size=10pt;margin-left:20;">
* 특수문자 사용불가(영문자, 괄호, 하이픈, 언더바만 사용하시기 바랍니다)
</font-->
</td>
</tr>
<!--tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
프&nbsp;로&nbsp;젝&nbsp;트&nbsp;&nbsp;&nbsp;내&nbsp;용
</td>
<td>
&nbsp;&nbsp;&nbsp;
<input class="input" type="text" name="p_content_tmp" size="50" maxlength="100" value="">
</td>
</tr-->
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
발&nbsp;&nbsp;&nbsp;&nbsp;생&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;경&nbsp;&nbsp;&nbsp;&nbsp;로
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%
query = "SELECT * "
query = query & "FROM person "
query = query & "WHERE (p_depart <= 10 or (p_depart >= 20 and p_depart <= 49)) and p_admin = 1 and p_resign = 0 "
query = query & " AND p_no = '" & rsc("p_contactor") & "' "
query = query & "ORDER BY p_order "
rsp.Open query, adoConn, 1
%>
<%=rsp("p_name")%>
<%
rsp.Close
%>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
컨&nbsp;&nbsp;&nbsp;&nbsp;택&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;일&nbsp;&nbsp;&nbsp;&nbsp;정
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%=rsc("p_contact_date")%>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
클&nbsp;라&nbsp;이&nbsp;언&nbsp;트&nbsp;구분
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%=rsc("p_cli_class")%>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
클&nbsp;라&nbsp;이&nbsp;언&nbsp;트&nbsp;&nbsp;&nbsp;명
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%
query = "SELECT * "
query = query & "FROM client "
query = query & "WHERE c_code = '" & rsc("p_cli_company") & "' "
rsp.Open query, adoConn, 1
%>
<%=rsp("c_name")%>
<%
rsp.Close
%>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
클&nbsp;라&nbsp;이&nbsp;언&nbsp;트&nbsp;타입
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%
query = "SELECT * "
query = query & "FROM Client_Type "
query = query & "WHERE c_type_code = '" & rsc("p_cli_type") & "' "
rsp.Open query, adoConn, 1
%>
<%=rsp("c_type_name")%>
<%
rsp.Close
%>
<input type="hidden" name="p_cli_type">
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
클라이언트&nbsp;&nbsp;담당자
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%
query = "SELECT * "
query = query & "FROM Client_people "
query = query & "WHERE c_code = '" & rsc("p_cli_company") & "' "
query = query & " AND cp_code = '" & rsc("p_cp_code") & "' "
rsp.Open query, adoConn, 1
%>
<%=rsp("cp_name")%>
<%
tmp_cli_depart = rsp("cp_depart")
rsp.Close
%>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
클&nbsp;라&nbsp;이&nbsp;언&nbsp;트&nbsp;부서
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%=tmp_cli_depart%>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<!--tr height="30">
<td align="center" bgcolor="#E8F7F7">
회&nbsp;&nbsp;&nbsp;&nbsp;의&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;장&nbsp;&nbsp;&nbsp;&nbsp;소
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%=rsc("p_contact_place")%>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
회&nbsp;&nbsp;&nbsp;&nbsp;의&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;내&nbsp;&nbsp;&nbsp;&nbsp;용
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%=viewword(rsc("p_contact_content"))%>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr-->
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
비&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;고
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%=viewword(rsc("p_memo"))%>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#BBCEFD" height="2"></td>
<td width="80%" bgcolor="#B8B0A9" height="2"></td>
</tr>
</table>
<br>
<table border="0" cellspacing="0" cellpadding="0" width="800">
<tr>
<td width="20%" bgcolor="#BBCEFD" height="2"></td>
<td width="80%" bgcolor="#B8B0A9" height="2"></td>
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">업&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;종</td>
<td>
&nbsp;&nbsp;&nbsp;
<%
q = "SELECT * "
q = q & "FROM p_types "
q = q & "WHERE t_type = '1' "
q = q & " AND t_code1 = '" & p_types1 & "' "
q = q & "ORDER BY t_sn "
rsp.Open q, adoConn, 1
if rsp.RecordCount > 0 then
%>
<%=rsp("t_name")%>
<%
end if
rsp.Close
%>
<%
if p_types1 <> "" then
%>
,&nbsp;&nbsp;&nbsp;
<%
q = "SELECT * "
q = q & "FROM p_types "
q = q & "WHERE t_type = '2' "
q = q & " AND t_code1 = '" & p_types1 & "' "
q = q & " AND t_code2 = '" & p_types2 & "' "
q = q & "ORDER BY t_sn "
rsp.Open q, adoConn, 1
if rsp.RecordCount > 0 then
%>
<%=rsp("t_name")%>
<%
end if
rsp.Close
%>
<%
if p_types2 <> "" and p_types2 <> "0" then
%>
,&nbsp;&nbsp;&nbsp;
<%
q = "SELECT * "
q = q & "FROM p_types "
q = q & "WHERE t_type = '3' "
q = q & " AND t_code1 = '" & p_types1 & "' "
q = q & " AND t_code2 = '" & p_types2 & "' "
q = q & " AND t_code3 = '" & p_types3 & "' "
q = q & "ORDER BY t_sn "
rsp.Open q, adoConn, 1
if rsp.RecordCount > 0 then
%>
<%=rsp("t_name")%>
<%
else
%>
기타
<%
end if
rsp.Close
%>
<%
end if 'if p_types2 <> "" then
%>
<%
end if 'if p_types1 <> "" then
%>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
제&nbsp;&nbsp;&nbsp;&nbsp;안&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;일&nbsp;&nbsp;&nbsp;&nbsp;자
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%=rsc("p_prop_date")%>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
조&nbsp;&nbsp;&nbsp;&nbsp;사&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;방&nbsp;&nbsp;&nbsp;&nbsp;법
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%
q = "SELECT * "
q = q & "FROM p_method "
q = q & "WHERE code1 = '" & rsc("p_method1") & "' "
q = q & "ORDER BY name1 "
rsp.Open q, adoConn, 1
%>
<%=rsp("name1")%>
<%
rsp.Close
%>
<%
q = "SELECT * "
q = q & "FROM p_method "
q = q & "WHERE code1 = '" & rsc("p_method2") & "' "
q = q & "ORDER BY name1 "
rsp.Open q, adoConn, 1
if rsp.RecordCount > 0 then
%>
,&nbsp;&nbsp;&nbsp;<%=rsp("name1")%>
<%
end if
rsp.Close
%>
<%
q = "SELECT * "
q = q & "FROM p_method "
q = q & "WHERE code1 = '" & rsc("p_method3") & "' "
q = q & "ORDER BY name1 "
rsp.Open q, adoConn, 1
if rsp.RecordCount > 0 then
%>
,&nbsp;&nbsp;&nbsp;<%=rsp("name1")%>
<%
end if
rsp.Close
%>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
표&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;본&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;수
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%=int(rsc("p_sample"))%>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
조&nbsp;&nbsp;&nbsp;&nbsp;사&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;내&nbsp;&nbsp;&nbsp;&nbsp;용
</td>
<td>
&nbsp;&nbsp;&nbsp;
<%=rsc("p_intention")%>
</td>
</tr>
<!--tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
파&nbsp;&nbsp;일&nbsp;&nbsp;&nbsp;&nbsp;업&nbsp;&nbsp;로&nbsp;&nbsp;드
</td>
<td>
&nbsp;&nbsp;&nbsp;
<select name="p_upload_flag">
<option value="">선택</option>
<option value="1">컨택파일</option>
<option value="2">제안파일</option>
</select>
<input type="file" name="txtFileName" style="WIDTH: 230px; HEIGHT: 21px" size=10>
</td>
</tr-->
<tr>
<td width="20%" bgcolor="#BBCEFD" height="2"></td>
<td width="80%" bgcolor="#B8B0A9" height="2"></td>
</tr>
</table>
<br>
<table border="0" cellspacing="0" cellpadding="0" width="800">
<tr>
<td width="20%" bgcolor="#BBCEFD" height="2"></td>
<td width="80%" bgcolor="#B8B0A9" height="2"></td>
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">선정된 조사회사</td>
<td>
&nbsp;&nbsp;&nbsp;
<select name="p_del_rcompany">
<option value="0">선택</option>
<%
query = "SELECT * "
query = query & "FROM rcompany "
rsp.Open query, adoConn, 1
if rsp.RecordCount > 0 then
for i = 1 to rsp.RecordCount
%>
<option value="<%=int(rsp("r_code"))%>" <% if rsc("p_del_rcompany") = rsp("r_code") then %> selected <% end if %>><%=rsp("r_name")%></option>
<%
rsp.MoveNext
next
end if
rsp.Close
%>
</select>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">예상가</td>
<td>
&nbsp;&nbsp;&nbsp;
<input type="text" name="p_del_cprice" value="<%=rsc("p_del_cprice")%>" size="15" maxlength="15" class="number" OnKeyPress="if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;" OnKeyup="check_comma(this.value,'1');"> 원
&nbsp;
<input type="checkbox" name="p_del_cprice_chk" <% if rsc("p_del_cprice_chk") = "1" then %> checked <% end if %> onClick="autofnc();">모름
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">KRC 제안가</td>
<td>
&nbsp;&nbsp;&nbsp;
<input type="text" name="p_del_krcprice" value="<%=rsc("p_del_krcprice")%>" size="15" maxlength="15" class="number" OnKeyPress="if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;" OnKeyup="check_comma(this.value,'2');"> 원
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">상세이유</td>
<td>
&nbsp;&nbsp;&nbsp;
<textarea cols="78" rows="3" name="p_del_reason2"><%=viewword(rsc("p_del_reason2"))%></textarea>
</td>
</tr>
<tr height="1">
<td colspan="2" bgcolor="#E0E0E0">
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">대응 방안</td>
<td>
&nbsp;&nbsp;&nbsp;
<textarea cols="78" rows="3" name="p_del_cplan"><%=viewword(rsc("p_del_cplan"))%></textarea>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#BBCEFD" height="2"></td>
<td width="80%" bgcolor="#B8B0A9" height="2"></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="800" id="table1" style="display:none;">
<br>
<tr>
<td width="20%" bgcolor="#BBCEFD" height="2"></td>
<td width="80%" bgcolor="#B8B0A9" height="2"></td>
</tr>
<tr height="30">
<td align="center" bgcolor="#E8F7F7">
프&nbsp;&nbsp;로&nbsp;&nbsp;젝&nbsp;&nbsp;트&nbsp;&nbsp;&nbsp;명
</td>
<td>
&nbsp;&nbsp;&nbsp;
<input class="input" type="text" name="p_subject" size="20" maxlength="50" value="">
</td>
</tr>
<tr>
<td width="20%" bgcolor="#BBCEFD" height="2"></td>
<td width="80%" bgcolor="#B8B0A9" height="2"></td>
</tr>
</table>
<%
end if
rsc.Close
%>
<br>
<table border="0" cellspacing="0" cellpadding="0" width="735">
<tr>
<td align="center" colspan="4">
<% if tmp_modi = "1" then %>
<img src="/images/project/btn_smodify.gif" title ="수정" style="cursor:pointer" border="0" onClick="subit()" >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src="/images/project/파일.gif" title ="파일" style="cursor:pointer" border="0" onClick="openit('<%=sn%>')">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<% end if %>
<img src="/images/project/btn_sclose.gif" title ="닫기" style="cursor:pointer" border="0" onClick="clsit()">
</td>
</tr>
</table>
<%
'========================================================
'업로드된 파일을 보여주기 위한 루틴
'Dim RootDir
Dim tmp_folder(6, 50)
Dim tmp_cont(6)
query = "SELECT * "
query = query & "FROM project2_pre "
query = query & "WHERE sn = '" & sn & "' "
'Response.Write query & "<BR>"
rsp.Open query, adoConn, 1
if rsp.RecordCount > 0 then
tmp_y = mid(rsp("p_contact_date"), 3, 2)
p_sn_tmp = rsp("p_sn_tmp")
p_upload_date = rsp("p_upload_date")
p_contact_date = rsp("p_contact_date")
end if
rsp.Close
'Response.Write "p_upload_date : " & p_upload_date & "<BR>"
tmp_cont(1) = "컨택자료"
tmp_cont(2) = "제안자료"
tmp_cont(3) = "연구자료"
tmp_cont(4) = "실사자료"
tmp_cont(5) = "전산자료"
tmp_cont(6) = "경영자료"
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'파일 다운로드 가능여부를 체크
'tmp_downok가 1이면 다운가능 0이면 불가능
tmp_downok = 0
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
RootDir = "D:\project_db\data\" & tmp_y & "\" & p_sn_tmp & "\"
if p_upload_date <> "" then
call getFolder(RootDir, 0, false, true)
end if
'===================================================================
' func : getFolder(경로, 뎁스, 서브폴더, 파일)
' param :
' memo :
'===================================================================
function getFolder(sPath, iDepth, bSonFdr, bShowFile)
Dim fso, objFolder
Dim folders, folder
Dim files, file
Dim sSpace
sSpace = ""
for i=0 to iDepth
sSpace = sSpace & ":tab:"
next
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFolder = fso.GetFolder(sPath)
set fso = nothing
set folders = objFolder.SubFolders
Set files = objFolder.Files
set objFolder = nothing
For Each folder in folders
'해당 폴더의 파일
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFolder = fso.GetFolder(sPath & "\" & folder.name)
set fso = nothing
Set hfiles = objFolder.Files
tmp_folder(int(left(folder.name,1)),0) = sPath & folder.name
i = 1
For Each file in hfiles
tmp_folder(int(left(folder.name,1)),i) = file.name
i = i + 1
Next
'++ 하위폴더
if bSonFdr then
call getFolder(sPath&"\"&folder.name, iDepth+1, bSonFdr, bShowFile)
end if
Next
'++ 파일도 보여준다면
if bShowFile then
For Each file in files
'response.write sSpace& "<font color='#5D5D5D'>[파]</font>" &file.name & "<br>"& vbCRLF
Next
end if
end function
%>
<table border="0" cellspacing="0" cellpadding="0" width="350">
<tr>
<td valign="top">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="center"><font color="blue" size="3"><b><%=tmp_name%></b></font>
</td>
</tr>
</table>
<%
for j = 1 to ubound(tmp_folder)
%>
<% if tmp_folder(j,1) <> "" then %>
<br>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>
<b><%=tmp_cont(j)%></b>
<table border="1" cellspacing="0" cellpadding="5" width="100%">
<tr>
<td>
<%
tmp = 0
for i = 1 to ubound(tmp_folder,2)
if tmp_folder(j,i) <> "" then
tmp_folder(j,0) = replace(tmp_folder(j,0),"\","/")
if tmp_downok = 1 then
Response.Write "<a href=javascript:downit('" & tmp_folder(j,0) & "','" & tmp_folder(j,i) & "')>&nbsp;&nbsp;&nbsp;- " & tmp_folder(j,i) & "</a><BR>"
else
Response.Write "&nbsp;&nbsp;&nbsp;- " & tmp_folder(j,i) & "<BR>"
end if
tmp = 1
end if
next
if tmp = 0 then
Response.Write "<center><font color='red'><b>파일이 없습니다</b></font></center>"
end if
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<% end if %>
<%
next
%>
</td>
</tr>
</table>