298 lines
9.5 KiB
Plaintext
298 lines
9.5 KiB
Plaintext
<!-- #include virtual = "lib/config.asp" -->
|
|
<%
|
|
SET rsa = server.CreateObject("ADODB.RECORDSET")
|
|
SET rsp = server.CreateObject("ADODB.RECORDSET")
|
|
|
|
dim pn_cd : pn_cd=request.item("pn_cd")
|
|
dim a_s, n, a_s2, n2
|
|
|
|
'-----------------------------------
|
|
|
|
|
|
'##### 보기정보 등록 ####################################
|
|
|
|
|
|
|
|
|
|
'------------------------------------
|
|
|
|
|
|
select case request.form("tuse")
|
|
case "Y" '-- 등록
|
|
|
|
'-- 질문정보 등록
|
|
'-------------------------------------------------------------------------------------------------------------------------
|
|
sql=" INSERT INTO [project2].[dbo].[T_RES_SQ_QUE_LAB_AREA] "
|
|
sql=sql&" (pu_child_sn,pu_type,fcs_type,fcs_area,pu_que_type,pu_que,pu_que_label,tuser_name,tphone_1,tphone_2,insert_date,tuser,ting) "
|
|
sql=sql&" VALUES "
|
|
sql=sql&" ('"&pn_cd&"' "
|
|
sql=sql&" ,'','','','0' "
|
|
sql=sql&" ,'"&replace(replace(request.form("que_code"),"'",""),"""","")&"' "
|
|
sql=sql&" ,'"&replace(replace(request.form("que_label"),"'",""),"""","")&"' "
|
|
sql=sql&" ,'','','',getdate() "
|
|
sql=sql&" ,'"&Session("User_Number")&"' "
|
|
sql=sql&" ,'1') "
|
|
adoconn.execute sql
|
|
'-------------------------------------------------------------------------------------------------------------------------
|
|
|
|
if request.form("ans_info")<>"" then
|
|
a_s=""
|
|
a_s=split(request.form("ans_info"),vbCrLf)
|
|
for n=0 to ubound(a_s)
|
|
if a_s(n)<>"" and instr(a_s(n)," ")>0 then
|
|
a_s2=""
|
|
a_s2=split(a_s(n)," ")
|
|
'response.write a_s2(0)&":"&a_s2(1)&"<br>"
|
|
if ubound(a_s2)>0 then
|
|
'-- 보기정보 등록
|
|
'--------------------------------------------------------------------------------------------------------
|
|
sql=" INSERT INTO [project2].[dbo].[T_RES_SQ_ANS_LAB_AREA] "
|
|
sql=sql&" (pu_child_sn,pu_type,fcs_type,fcs_area,pu_que,pu_ans_code,pu_ans_label,insert_date,tuser,ting) "
|
|
sql=sql&" VALUES "
|
|
sql=sql&" ('"&pn_cd&"' "
|
|
sql=sql&" ,'' "
|
|
sql=sql&" ,'' "
|
|
sql=sql&" ,'' "
|
|
sql=sql&" ,'"&replace(replace(request.form("que_code"),"'",""),"""","")&"' "
|
|
sql=sql&" ,'"&a_s2(0)&"' "
|
|
sql=sql&" ,'"&a_s2(1)&"' "
|
|
sql=sql&" ,getdate() "
|
|
sql=sql&" ,'"&Session("User_Number")&"' "
|
|
sql=sql&" ,'1') "
|
|
adoconn.execute sql
|
|
'--------------------------------------------------------------------------------------------------------
|
|
end if
|
|
|
|
|
|
end if
|
|
next
|
|
end if
|
|
|
|
|
|
|
|
|
|
case "D" '-- 삭제
|
|
|
|
|
|
'-- 질문 정보 삭제 : ting='0'
|
|
sql=" update [project2].[dbo].[T_RES_SQ_QUE_LAB_AREA] set "
|
|
sql=sql&" ting='0' " '-- 삭제(0)
|
|
sql=sql&" where pu_child_sn='"&pn_cd&"' "
|
|
sql=sql&" and pu_que='"&request.form("del_que")&"' "
|
|
sql=sql&" and ting='1' " '-- 사용(1)
|
|
'response.write sql&"<br><br>"
|
|
adoconn.execute sql
|
|
|
|
|
|
|
|
'-- 보기정보 삭제 : ting='0'
|
|
sql=" update [project2].[dbo].[T_RES_SQ_ANS_LAB_AREA] set "
|
|
sql=sql&" ting='0' " '-- 삭제(0)
|
|
sql=sql&" where pu_child_sn='"&pn_cd&"' "
|
|
sql=sql&" and pu_que='"&request.form("del_que")&"' "
|
|
sql=sql&" and ting='1' " '-- 사용(1)
|
|
'response.write sql&"<br><br>"
|
|
adoconn.execute sql
|
|
|
|
|
|
end select
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%>
|
|
<meta http-equiv="Content-Type" content="application/vnd.ms-excel;charset=euc-kr">
|
|
<meta http-equiv="Expires" content="Mon, 06 Jan 1990 00:00:01 GMT">
|
|
<meta http-equiv="Expires" content="-1">
|
|
<meta http-equiv="Pragma" content="no-cache">
|
|
<meta http-equiv="Cache-Control" content="no-cache">
|
|
<title><%=GNB_TITLE%></title>
|
|
<link rel="stylesheet" type="text/css" href="../css/basic.css">
|
|
<script src="/js/jquery.min.js"></script>
|
|
<script src="/js/jquery-ajax-call.js"></script>
|
|
<script src="/js/jquery.form.min.js"></script>
|
|
<script language="javascript" src="../js/common.js"></script>
|
|
<script language=javascript>
|
|
|
|
|
|
function f_submit(x){
|
|
|
|
if((x.que_code.value=="")||(x.que_label.value=="")){
|
|
alert("검증문항 정보를 입력하여 주셔야 해당 내용을 저장할수 있습니다 ");
|
|
return false;
|
|
}
|
|
|
|
|
|
if(!confirm("등록하신 내용을 저장하시겠습니까? ")){return;}
|
|
|
|
x.tuse.value="Y";
|
|
|
|
x.target="";
|
|
x.action="punching_que_insert.asp";
|
|
x.submit();
|
|
}
|
|
|
|
|
|
|
|
|
|
function f_del(x,dque){
|
|
|
|
if(!confirm("선택하신 문항 정보를 삭제하시겠습니까? ")){return;}
|
|
|
|
x.tuse.value="D";
|
|
x.del_que.value=dque;
|
|
|
|
x.target="";
|
|
x.action="punching_que_insert.asp";
|
|
x.submit();
|
|
}
|
|
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name='fname' method='post' >
|
|
<input type="hidden" name="pn_cd" value="<%=pn_cd%>" ><!-- 펀칭/FCS코드 -->
|
|
<input type="hidden" name="tuse" value="" ><!-- 저장시 : Y / 삭제시: D -->
|
|
<input type="hidden" name="del_que" value="" >
|
|
|
|
<br>
|
|
<!-------------->
|
|
<table style="width:720px;" cellpadding="0" cellspacing="0" border="0" align=center >
|
|
<%
|
|
|
|
sql=" select A.*,B.* from "
|
|
sql=sql&" (select intranet_project,p_child_sn as pn_code, p_subject from [project2].[dbo].[T_PROJECT_FCS] where p_child_sn='"&pn_cd&"') A "
|
|
sql=sql&" left join "
|
|
sql=sql&" (select p_child_sn, p_subject as intra_subject from [project2].[dbo].[T_PROJECT_METHOD]) B "
|
|
sql=sql&" on A.intranet_project=B.p_child_sn "
|
|
rsa.Open sql, adoConn, 1
|
|
if not rsa.eof then
|
|
|
|
%>
|
|
<tr height="24" bgcolor="#dbe9f2" >
|
|
<td align="center" >인트라넷 정보</td>
|
|
<td align="left" > [<font color=#000000><b><%=rsa("intranet_project")%></b></font>] <%=rsa("intra_subject")%></td>
|
|
</tr>
|
|
<tr height="24" bgcolor="#dbe9f2" >
|
|
<td align="center" >FCS 정보</td>
|
|
<td align="left" > [<font color=blue><b><%=rsa("pn_code")%></b></font>] <%=rsa("p_subject")%></font></b>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" colspan="2" height=3 bgcolor=#C0C0C0></td>
|
|
</tr>
|
|
<%end if %>
|
|
<%rsa.close %>
|
|
</table>
|
|
<!-------------->
|
|
|
|
|
|
|
|
<br>
|
|
<center><font color=blue><u>※ 검증문항의 질문과 보기정보를 입력하여 주세요.</u> 보기정보는 <b>보기코드[탭]보기라벨</b> 로 넣어주시기 바랍니다</font><br><br></center>
|
|
<table border="0" style="width:720px;" align=center >
|
|
<tr>
|
|
<td align=center valign=top>
|
|
<!--------------->
|
|
<table border="0" style="width:700px;" align=center >
|
|
<tr>
|
|
<td align=center valign=top >
|
|
<table style="width:690px;" cellpadding="5" cellspacing="0" border="0" style="border-collapse:collapse;">
|
|
<tr height="25px">
|
|
<td width="12%" align="center" >검증문항</td>
|
|
<td width="85%" align="left" >
|
|
변수명 [<input type="text" name="que_code" value="" size="20" maxlength="50" style="font-size:11pt;" >]
|
|
검증질문 [<input type="text" name="que_label" value="" size="20" maxlength="50" style="font-size:11pt;" >]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" valign="top" >보기정보</td>
|
|
<td align="left"><textarea name="ans_info" style="font-size:11pt;" cols="70" rows="13" ></textarea></td>
|
|
</tr>
|
|
<table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" align=center valign=top ><hr style="width:680px;" ></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<!--------------->
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align=center valign=top >
|
|
<input type="button" value="<<<<<<<<<<< 문항 및 보기정보 등록 >>>>>>>>>>>>" name="btn_ss" class="button white medium" onclick="javascript:f_submit(fname);" style="font-size:11pt;width500px;" >
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<!------ list 출력 -------------->
|
|
<br><br><br>
|
|
<table border="0" style="width:700px;" align=center >
|
|
<%
|
|
tsql=" select pu_que, pu_que_label from [project2].[dbo].[T_RES_SQ_QUE_LAB_AREA] "
|
|
tsql=tsql&" where pu_child_sn='"&pn_cd&"' "
|
|
tsql=tsql&" and ting='1' " '-- 사용(1)
|
|
tsql=tsql&" and pu_que_type='0' " '-- 검증문항 구분(0)
|
|
tsql=tsql&" order by id asc "
|
|
rsa.Open tsql, adoConn, 1
|
|
while not rsa.Eof
|
|
%>
|
|
<tr>
|
|
<td align=center valign=top >
|
|
<table style="width:690px;" cellpadding="5" cellspacing="0" border="0" style="border-collapse:collapse;">
|
|
<tr height="25px">
|
|
<td width="12%" align="center" bgcolor=#99CCFF >
|
|
<input type="button" value="삭제" name="btn_ss" class="button white medium" onclick="javascript:f_del(fname,'<%=rsa("pu_que")%>');" style="font-size:9pt;" >
|
|
</td>
|
|
<td width="85%" align="left" bgcolor=#99CCFF >
|
|
문항 코드 [<b><font color="#0000FF"><%=rsa("pu_que")%></font></b>] / 문항 라벨 [<b><font color="#0000FF"><%=rsa("pu_que_label")%></font></b>]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" valign="top" >보기정보</td>
|
|
<td align="left">
|
|
<%
|
|
tsql2=" select pu_ans_code, pu_ans_label from [project2].[dbo].[T_RES_SQ_ANS_LAB_AREA] "
|
|
tsql2=tsql2&" where pu_child_sn='"&pn_cd&"' "
|
|
tsql2=tsql2&" and pu_que='"&rsa("pu_que")&"' "
|
|
tsql2=tsql2&" and ting='1' "
|
|
tsql2=tsql2&" order by id asc "
|
|
rsp.Open tsql2, adoConn, 1
|
|
while not rsp.Eof
|
|
%>
|
|
[<b><font color="#0000FF"><%=rsp("pu_ans_code")%></font></b>] <%=rsp("pu_ans_label")%><br>
|
|
<%
|
|
rsp.movenext
|
|
Wend
|
|
rsp.Close
|
|
%>
|
|
</td>
|
|
</tr>
|
|
<table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" align=center style="height:7px;" ></td>
|
|
</tr>
|
|
<%
|
|
rsa.movenext
|
|
Wend
|
|
rsa.Close
|
|
%>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
<!------ list 출력 -------------->
|
|
<br><br>
|
|
</form>
|
|
</body>
|
|
</html>
|