ASP文件

<%@ 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>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值