<%@ Language=VBScript %>
<HTML>
<HEAD>
<%
Function FunFetchCookie(byvKeyName,byvKeyValue)
Dim strParentCookie
Dim varCookie
Dim varKeyItem
Dim strKeyName
Dim strKeyValue
Dim intKeyNamePoint
Dim intKeyValuePoint
Dim strResultCookieItem
Dim arrStrCookies
strParentCookie = Request.QueryString
strParentCookie = Replace(strParentCookie, " ", "")
strParentCookie = Replace(strParentCookie, "%5F", "_")
strKeyName = byvKeyName & "="
strKeyValue = byvKeyValue & "="
arrStrCookies = Split(strParentCookie, ";", -1, vbTextCompare)
For Each varCookie In arrStrCookies
intKeyNamePoint = InStr(varCookie, strKeyName)
intKeyValuePoint = InStr(varCookie, strKeyValue)
If (byvKeyName <> "") Then 'fetch server cookie
If (intKeyNamePoint <> 0) And (intKeyValuePoint <> 0) Then
strResultCookieItem = Replace(varCookie, strKeyName, "")
Exit For
End If
Else 'fetch client cookie
If (intKeyValuePoint = 1) Then
strResultCookieItem = varCookie
End If
End If
Next 'varCookie
Dim cookievalue
Dim keyitem
If (strResultCookieItem <> "") Then
keyitem = Split(strResultCookieItem, "&", -1, vbTextCompare)
For Each varKeyItem In keyitem
intKeyValuePoint = InStr(varKeyItem, strKeyValue)
If (intKeyValuePoint = 1) Then
cookievalue = Replace(varKeyItem, strKeyValue, "")
Exit For
Else
cookievalue = ""
End If
Next 'varKeyItem
Else
cookievalue = ""
End If
cookievalue = Replace(cookievalue, "+", " ")
cookievalue = Replace(cookievalue, "%3D", "=")
cookievalue = Replace(cookievalue, "%3B", ";")
cookievalue = Replace(cookievalue, "%2E", ".")
cookievalue = Replace(cookievalue, "%27", "'")
cookievalue = Replace(cookievalue, "%22", """")
cookievalue = Replace(cookievalue, "%3A", ":")
cookievalue = Replace(cookievalue, "%5C", "/")
cookievalue = Replace(cookievalue, "%2D", "-")
cookievalue = Replace(cookievalue, "%2F", "/")
FunFetchCookie = cookievalue
End Function
strCookie=Request.QueryString
if strCookie<>"" then'提取cookie值
dim person_no
dim strCookie
dim strConnection
dim pAgentPositionNo
dim pAgentSign
dim notepad_path
dim byfNotepadPassword
dim byfHistoryPath
dim byfStartPath
dim readonly_connect
dim user_type
dim program_no
dim id
dim agent_no
dim role_no_next
'讀出cookie值
person_no=FunFetchCookie("ks","person_no")
strConnection=FunFetchCookie("ks", "connectstr")
pAgentPositionNo=FunFetchCookie("ks", "position_no")
pAgentSign=FunFetchCookie("ks", "sign")
notepad_path=FunFetchCookie("ks", "notepad_path")
byfNotepadPassword=FunFetchCookie("ks", "notepad_password")
byfHistoryPath=FunFetchCookie("ks", "historypath")
byfStartPath=FunFetchCookie("ks", "StartPath")
readonly_connect=FunFetchCookie("ks", "readonly_connect")
user_type=FunFetchCookie("ks", "user_type")
agent_no=FunFetchCookie("ks", "agent_no")
id=FunFetchCookie("ks", "id")
program_no=FunFetchCookie("ks", "program_no")
role_no_next=FunFetchCookie("ks", "role_no_next")
'寫cookie值
Response.Cookies("ks").path="/"
Response.Cookies("ks")("person_no")=person_no
Response.Cookies("ks")("connectstr")=strConnection
Response.Cookies("ks")("position_no")=pAgentPositionNo
Response.Cookies("ks")("sign")=pAgentSign
Response.Cookies("ks")("notepad_path")=notepad_path
Response.Cookies("ks")("notepad_password")=byfNotepadPassword
Response.Cookies("ks")("historypath")=byfHistoryPath
Response.Cookies("ks")("StartPath")=byfStartPath
Response.Cookies("ks")("readonly_connect")=readonly_connect
Response.Cookies("ks")("user_type")=user_type
Response.Cookies("ks")("id")=id
Response.Cookies("ks")("program_no")=program_no
Response.Cookies("ks")("agent_no")=agent_no
Response.Cookies("ks")("role_no_next")=role_no_next
Response.Redirect "ka270203.asp"
end if
%>
<META name=VI60_defaultClientScript content=JavaScript>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
</HEAD>
<BODY bottommargin="0" leftmargin="0" rightmargin="0" topmargin="0" >
<table bgcolor =rgb(0,128,128) cellpadding=0 cellspacing=0 width=100% height=100%>
<tr>
<td align=center valign=middle>
<OBJECT codebase="../control/ks270203.OCX#version=1,0,0,13" id=ks2Template1 style="LEFT: 0px; TOP: 0px" classid="clsid:6CCEF0DF-8602-40A2-AD63-3AD3DC0AE154" VIEWASTEXT>
<PARAM NAME="_ExtentX" VALUE="20558">
<PARAM NAME="_ExtentY" VALUE="12000"></OBJECT>
</td>
</tr>
</table>
</BODY>
</HTML>