<!--#include file="Lib/Config.asp"-->
<!--#include file="Lib/DBConn.asp"-->
<!--#include file="Lib/DBLib.asp"-->
<!--#include file="Lib/Func.asp"-->
<!--#include file="Lib/FileLib.asp"-->
<!--#include file="Lib/Header.asp"-->
<!--#include file="Lib/MD5.asp"-->
<%
Dim HTMLSCRIPT
Dim JSCRIPT
Dim CODES,QUESTION
Dim ATT
Dim VARS,VAR
Dim PAGE,NPAGE
Dim IDKEY,RESTYPE,VC_ID
Dim SKINSTR,PARTSTR
Dim ST
Dim SPSS
If SURVEYTYPE="3" Then
'CATI 초기화
	'기본 부분
	Response.Cookies("MemberCode") = ""
	Response.Cookies("HP") = ""
	Response.Cookies("TEL") = ""

	'추가부분 <리스트 검토후 내용 저장하기>
	Response.Cookies("Name") = ""
	Response.Cookies("Dong") = ""
	Response.Cookies("DongCode") = ""
	Response.Cookies("Bir") = ""
	Response.Cookies("Gubun")= ""
	Response.Cookies("Sex")= ""

	SORRYMSG = "감사합니다."

End If

	Dim ExExport

	If getValue("ResType")="MARKET_LINK" Then

		Dim MarketDate
		MarketDate = getMarketLinkData()

		ExExport = PANEL_EXPORT_URL()

		Response.Redirect ExExport(3) & Request("IDKEY") &"&ANSWER_STARTTIME="& MarketDate(0) &"&ANSWER_ENDTIME="& MarketDate(1)
		Response.End

	Else
		
		ExExport = PANEL_EXPORT_URL()

		If ExExport(0) <> "" And VarType(ExExport(0))<>0 And VarType(ExExport(0))<>1 Then
			If SURVEYTYPE = "5" Then
				'GMI MD5 Hash 추가
				Response.Redirect ExExport(3) & Request("IDKEY") & "&ssc=" & MD5(Request("IDKEY") & "mesh3burod" & GMIStKey)
				Response.End					
			Else
				If Request("ResType")="RPA" Then
					Response.Redirect ExExport(3)
				Else
					Response.Redirect ExExport(3) & Request("IDKEY")
				End If
				Response.End					
			End if				
		End if
	End If

%>
<script type="text/javascript" language="javascript">
<!--
	function survey_end()
	{
		<% If SURVEYTYPE<>"3" Then%>
			alert("설문조사가 완료 되었습니다\nThis study was completed");
		<% Else %>
			self.close();
		<% End If%>
	}

//-->
</script>
<% 
	SKINSTR = LoadSkin("./SKIN/" & SKIN &"/Skin.asp")
	SKINSTR = Replace(SKINSTR,"##SURVEYTITLE##",SURVEYTITLE)
	SKINSTR = Replace(SKINSTR,"##CLIENTIMG##",CLIENTIMAGE)
	SKINSTR = Replace(SKINSTR,"##PROGRESS_COLOR##",PROGRESS_COLOR)
	SKINSTR = Replace(SKINSTR,"##PERCENT##",100)
	SKINSTR = Replace(SKINSTR,"##PARTSTR##",PARTSTR)
	If PARTSTR<>"" Then
	SKINSTR = Replace(SKINSTR,"<!--","")
	SKINSTR = Replace(SKINSTR,"//-->","")
	End if
	Response.Write SKINSTR
%>
<div class="container">
<form name="Survey" onsubmit="return false;" method="post" action="Survey.asp">
<input type='hidden' name='LOOP' value='LOOP'/>
<!--#include file="Lib/Variable.asp"-->
<!--#include file="Lib/CATI_INFO.asp"-->

	<% If Trim(ST)<>"" Then %>

	<div class="row">
		<div class="well">
		<%=ST%>
		</div>
	</div>
	<% End If%>

	<div class="row">
		<div class="col-md-12 col-xs-12">
		<div class='panel panel-default'>
			<div class='panel-heading'><h4>Survey End</h4></div>
			<div class='panel-body'>
				<%=QUOTAMSG%>
			</div>
		</div>			
	</div>

	<div class="row">
		<div class="col-md-12 col-xs-12 text-center">
		<!--#include file="SKIN/BOOT/End.asp"-->
		</div>
	</div>

	<div class="row">
		<div class="col-md-12 col-xs-12 text-center">			
			<small><%=SurveyCpRight%></small>
		<div>
	</div>
</form>
</div>
</body>
</html>