|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
当然了,现在国内CRM厂商的产品与其说是CRM,但从至少从我的角度分析上来看,充其量只是一个大型的进销存而已了,了解尚浅,不够胆详评,这里只提技术问题<%
OPTIONEXPLICIT
constBASE_64_MAP_INIT=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
dimnl
zerobasedarrays
dimBase64EncMap(63)
dimBase64DecMap(127)
mustbecalledbeforeusinganythingelse
PUBLICSUBinitCodecs()
initvars
nl="<P>"&chr(13)&chr(10)
setupbase64
dimmax,idx
max=len(BASE_64_MAP_INIT)
foridx=0tomax-1
onebasedstring
Base64EncMap(idx)=mid(BASE_64_MAP_INIT,idx+1,1)
next
foridx=0tomax-1
Base64DecMap(ASC(Base64EncMap(idx)))=idx
next
ENDSUB
encodebase64encodedstring
PUBLICFUNCTIONbase64Encode(plain)
iflen(plain)=0then
base64Encode=""
exitfunction
endif
dimret,ndx,by3,first,second,third
by3=(len(plain)3)*3
ndx=1
dowhilendx<=by3
first=asc(mid(plain,ndx+0,1))
second=asc(mid(plain,ndx+1,1))
third=asc(mid(plain,ndx+2,1))
ret=ret&Base64EncMap((first4)AND63)
ret=ret&Base64EncMap(((first*16)AND48)+((second16)
AND15))
ret=ret&Base64EncMap(((second*4)AND60)+((third64)
AND3))
ret=ret&Base64EncMap(thirdAND63)
ndx=ndx+3
loop
checkforstragglers
ifby3<len(plain)then
first=asc(mid(plain,ndx+0,1))
ret=ret&Base64EncMap((first4)AND63)
if(len(plain)MOD3)=2then
second=asc(mid(plain,ndx+1,1))
ret=ret&Base64EncMap(((first*16)AND48)+
((second
16)AND15))
ret=ret&Base64EncMap(((second*4)AND60))
else
ret=ret&Base64EncMap((first*16)AND48)
ret=ret&"="
endif
ret=ret&"="
endif
base64Encode=ret
ENDFUNCTION
decodebase64encodedstring
PUBLICFUNCTIONbase64Decode(scrambled)
iflen(scrambled)=0then
base64Decode=""
exitfunction
endif
ignorepadding
dimrealLen
realLen=len(scrambled)
dowhilemid(scrambled,realLen,1)="="
realLen=realLen-1
loop
dimret,ndx,by4,first,second,third,fourth
ret=""
by4=(realLen4)*4
ndx=1
dowhilendx<=by4
first=Base64DecMap(asc(mid(scrambled,ndx+0,1)))
second=Base64DecMap(asc(mid(scrambled,ndx+1,1)))
third=Base64DecMap(asc(mid(scrambled,ndx+2,1)))
fourth=Base64DecMap(asc(mid(scrambled,ndx+3,1)))
ret=ret&chr(((first*4)AND255)+((second16)AND3)
)
ret=ret&chr(((second*16)AND255)+((third4)AND
15))
ret=ret&chr(((third*64)AND255)+(fourthAND63))
ndx=ndx+4
loop
checkforstragglers,willbe2or3characters
ifndx<realLenthen
first=Base64DecMap(asc(mid(scrambled,ndx+0,1)))
second=Base64DecMap(asc(mid(scrambled,ndx+1,1)))
ret=ret&chr(((first*4)AND255)+((second16)AND3)
)
ifrealLenMOD4=3then
third=Base64DecMap(asc(mid(scrambled,ndx+2,1)))
ret=ret&chr(((second*16)AND255)+((third4)AND
15))
endif
endif
base64Decode=ret
ENDFUNCTION
initialize
callinitCodecs
Testingcode
diminp,encode
inp=request.QueryString("input")
encode=base64Encode(inp)
response.write"Encodedvalue="&encode&nl
response.write"Decodedvalue="&base64Decode(encode)&nl
%>
当然了,现在国内CRM厂商的产品与其说是CRM,但从至少从我的角度分析上来看,充其量只是一个大型的进销存而已了,了解尚浅,不够胆详评,这里只提技术问题 |
|