<%
'siteid|fid|userid|username|password
dim siteid,fid,userid,username,sessionid
dim jid1,jid2,http_start
sid=request("sid")
siteid="1000"
jid1=""
jid2=""
http_start="http://"&Request.ServerVariables("HTTP_HOST")&"/"

if sid<>"" then 	 
	 arry=split(decode_KL(sid),"_")	 	 	  
	 siteid="1000"	 	 
	 fid=arry(1)
	 userid=arry(2)	 
	 username=arry(3)
	 sessionid=arry(4)	
	 jid1="?sid="&sid
	 jid2="&amp;sid="&sid	
	 if not isnumeric(userid) then userid="" end if  
end if


'ÃÜÂë½âÃÜ³ÌÐò
function decode_KL(sid)
  dim lens,key,str,mykey,TempNum,x
  x=sid
  lens=len(x)
  mykey=mid(x,lens,1)
  x=mid(x,1,lens-1)  
  if mykey=0 or mykey=2 then
  lens=len(x)
  end if  
  if lens mod 2 =0 then
    key=2
  else
    key=3
  end if  
 for i=1 to lens step key
  TempNum=mid(x,i,key)
  if i=1 then
    if mykey=1 then
       TempNum=right(TempNum,2)
    elseif mykey=2 then
       TempNum=right(TempNum,1)
    end if
  end if
  str= cstr(TempNum)& str 
 next
 
 decode_KL=str 
end function
%>