<!--#include file="Lib/Config.asp"-->
<!--#include file="Lib/DBConn.asp"-->
<!--#include file="Lib/DBLib.asp"-->
<!--#include file="Lib/Func.asp"-->
<!--#include file="Lib/PanelLib.asp"-->
<!--#include file="Lib/FileLib.asp"-->
<!--#include file="Lib/Quota_Setup.asp"-->
<%

Dim media,Sex,Age,Area,FKey
'트루이즈에 넘어가야 할 변수를 정의해 주세요.
Dim SQ1,SQ2_1,SQ2_2,SQ2_3,SQ2_4,SQ2_5,SQ3,SQ4,SQ4A

Dim USQL,SQL,Drs

FKey = makeFKey()

USQL = "UPDATE " & TB_NAME & " SET Page='Survey_OutBound_Sender',FKey='"& FKey &"' WHERE [KEY]='" & Request.Form("IDKey") & "'"
ExecuteSQL USQL
		
Dim Actions

'변수에 값을 넣어주세요.
'SQ1 = getXValue("SQ1")
'SQ2_1 = getXValue("SQ2_1")
'SQ2_2 = getXValue("SQ2_2")
'SQ2_3 = getXValue("SQ2_3")
'SQ2_4 = getXValue("SQ2_4")
'SQ2_5 = getXValue("SQ2_5")
'SQ3 = getXValue("SQ3")
'SQ4 = getXValue("SQ4")
'SQ4A = getXValue("SQ4A")


Area=""

'##########################################################################################
'설문 쿼터 체크해서 설문 분배하기
'##########################################################################################

Dim OrderNum
Dim Cage,RArea

OrderNum=1

Select Case OrderNum
	Case -1
		SenderQuota
	Case 1		'함수에 해당 변수를 넣어주세요.
		'Survey1 SQ1,SQ2_1,SQ2_2,SQ2_3,SQ2_4,SQ2_5,SQ3,SQ4,SQ4A
		Survey1 
	Case Else
		SenderPISurvey Sex,Age,"",Area
End Select

'##########################################################################################
' 광고에 관한 의견 조사
'##########################################################################################

'트루이즈에 전송해야할 값을 전달해 주세요 / 링크 수정 포함.
Function Survey1()
	Dim ExExport
	ExExport = PANEL_EXPORT_URL()

%>
<!--truis url -->
<form name="Page" method="post" action="<%=ExExport(4)%>M<%=FKey%>">

<!--
<input type="hidden" name="SQ1" value="<%=SQ1%>">
<input type="hidden" name="SQ2_1" value="<%=SQ2_1%>">
<input type="hidden" name="SQ2_2" value="<%=SQ2_2%>">
<input type="hidden" name="SQ2_3" value="<%=SQ2_3%>">
<input type="hidden" name="SQ2_4" value="<%=SQ2_4%>">
<input type="hidden" name="SQ2_5" value="<%=SQ2_5%>">
<input type="hidden" name="SQ3" value="<%=SQ3%>">
<input type="hidden" name="SQ4" value="<%=SQ4%>">
<input type="hidden" name="SQ4A" value="<%=SQ4A%>">
-->

</form>

<script language="javascript">
	var frm = document.forms[0];
	frm.submit();
</script>
<%
Response.End
End Function


'##########################################################################################
'패널 쿼터 아웃 페이지
'##########################################################################################
Function SenderQuota()	
	Response.Redirect QUOTA_ERROR_PAGE & "?T_Value=1"
	Response.End
End Function

%>