newasp櫓main잚
2018-09-06 12:47
<%
ConstIsDeBug=1
ClassNewaspMain_Cls
Publicmembername,memberpass,membergrade,membergroup,memberid
Publicmemberclass,menbernickname,Cookies_Name,CheckPassword
PublicSiteName,SiteUrl,MasterMail,keywords,Copyright
PublicInstallDir,IndexName,IstopSite,StopReadme,IsCloseMail
PublicSendMailType,MailFrom,MailServer,MailUserName,MailPassword,MailInformPass,ChkSameMail
PublicCheckUserReg,AdminCheckReg,AddUserPoint,SendRegMessage,FullContQuery,ActionTime
PublicIsRunTime,UploadClass,UploadFileSize,UploadFileType,ContentKeyword,PreviewSetting
PublicStopApplyLink,FSO_ScriptName,InitTitleColor,StopBankPay
PublicChinaeBank,VersionID,Badwords,Badwordr,serialcode,passedcode
PublicChannelName,ChannelDir,StopChannel,ChannelType
Publicmodules,ChannelSkin,HtmlPath,HtmlForm,HtmlPrefix
PublicIsCreateHtml,HtmlExtName,StopUpload,MaxFileSize,UpFileType
PublicIsAuditing,AppearGrade,ModuleName,BindDomain,DomainName
PublicPostGrade,LeastString,MaxString,PaginalNum,LeastHotHist,Channel_Setting
PublicChannelSetting,ChannelData,ChannelPath
PublicChannelModule,ChannelHtmlPath,ChannelHtmlForm,ChannelUseHtml,ChannelHtmlExt,ChannelPrefix
PublicThisEdition,CopyrightStr,Version,Values,startime
PublicSqlQueryNum,GetUserip,CacheName,Reloadtime
PublicScriptName,Admin_Page,skinid,SkinPath,HtmlCss,HtmlTop,HtmlFoot,HtmlContent,sHtmlContent
PrivateMain_Style,Main_Setting,MainStyle,Html_Setting
PrivateLocalCacheName,Cache_Data
PrivateCacheChannel,CacheData
PrivatearrGroupSetting,blnGroupSetting,binUserLong
PrivateSubClass_Initialize()
OnErrorResumeNext
Reloadtime=28800
SqlQueryNum=0
--뻠닸츰냔
CacheName=newasp
Cookies_Name=newasp_net
binUserLong=False
blnGroupSetting=False
GetUserip=Request.ServerVariables(HTTP_X_FORWARDED_FOR)
IfLen(GetUserip)=0ThenGetUserip=Request.ServerVariables(REMOTE_ADDR)
GetUserip=CheckStr(GetUserip)
memberpass=CheckStr(Request.Cookies(Cookies_Name)(password))
menbernickname=CheckStr(Request.Cookies(Cookies_Name)(nickname))
membergrade=ChkNumeric(Request.Cookies(Cookies_Name)(UserGrade))
membergroup=CheckStr(Request.Cookies(Cookies_Name)(UserGroup))
memberclass=ChkNumeric(Request.Cookies(Cookies_Name)(UserClass))
memberid=ChkNumeric(Request.Cookies(Cookies_Name)(userid))
CheckPassword=CheckStr(Request.Cookies(Cookies_Name)(CheckPassword))
Dimtmpstr,i
tmpstr=Request.ServerVariables(PATH_INFO)
tmpstr=Split(tmpstr,/)
i=UBound(tmpstr)
ScriptName=LCase(tmpstr(i))
Admin_Page=False
IfInStr(ScriptName,showerr)>0OrInStr(ScriptName,login)>0OrInStr(ScriptName,admin_)>0ThenAdmin_Page=True
EndSub
PrivateSubClass_Terminate()
IfIsObject(Conn)ThenConn.Close:SetConn=Nothing
EndSub
===================륩蛟포뻠닸꼬롸변鑒역迦===================
PublicPropertyLetName(ByValvNewValue)
LocalCacheName=LCase(vNewValue)
Cache_Data=Application(CacheName&_&LocalCacheName)
EndProperty
PublicPropertyLetValue(ByValvNewValue)
IfLocalCacheName<>Then
ReDimCache_Data(2)
Cache_Data(0)=vNewValue
Cache_Data(1)=Now()
Application.Lock
Application(CacheName&_&LocalCacheName)=Cache_Data
Application.UnLock
Else
Err.RaisevbObjectError+1,NewaspCacheServer,pleasechangetheCacheName.
EndIf
EndProperty
PublicPropertyGetValue()
IfLocalCacheName<>Then
IfIsArray(Cache_Data)Then
Value=Cache_Data(0)
Else
Err.RaisevbObjectError+1,NewaspCacheServer,TheCache_Data(&LocalCacheName&)IsEmpty.
EndIf
Else
Err.RaisevbObjectError+1,NewaspCacheServer,pleasechangetheCacheName.
EndIf
EndProperty
PublicFunctionObjIsEmpty()
ObjIsEmpty=True
IfNotIsArray(Cache_Data)ThenExitFunction
IfNotIsDate(Cache_Data(1))ThenExitFunction
IfDateDiff(s,CDate(Cache_Data(1)),Now())<(60*Reloadtime)ThenObjIsEmpty=False
EndFunction
PublicSubDelCahe(MyCaheName)
Application.Lock
Application.Contents.Remove(CacheName&_&MyCaheName)
Application.UnLock
EndSub
PublicSubDelCache(MyCaheName)
Application.Lock
Application.Contents.Remove(mynewasp_&MyCaheName)
Application.UnLock
EndSub
===================륩蛟포뻠닸꼬롸변鑒써監===================
PublicFunctionChkBoolean(ByValValues)
IfTypeName(Values)=BooleanOrIsNumeric(Values)OrLCase(Values)=falseOrLCase(Values)=trueThen
ChkBoolean=CBool(Values)
Else
ChkBoolean=False
EndIf
EndFunction
PublicFunctionCheckNumeric(ByValCHECK_ID)
IfCHECK_ID<>AndIsNumeric(CHECK_ID)Then
CHECK_ID=CCur(CHECK_ID)
Else
CHECK_ID=0
EndIf
CheckNumeric=CHECK_ID
EndFunction
PublicFunctionChkNumeric(ByValCHECK_ID)
IfCHECK_ID<>AndIsNumeric(CHECK_ID)Then
CHECK_ID=CLng(CHECK_ID)
IfCHECK_ID<0ThenCHECK_ID=0
Else
CHECK_ID=0
EndIf
ChkNumeric=CHECK_ID
EndFunction
PublicFunctionCheckStr(ByValstr)
IfIsNull(str)Then
CheckStr=
ExitFunction
EndIf
str=Replace(str,Chr(0),)
CheckStr=Replace(str,,)
EndFunction
================================================
법넋츰:CheckNull
鱗痰:角뤠唐槻令
================================================
PublicFunctionCheckNull(ByValsValue)
OnErrorResumeNext
IfIsNull(sValue)Then
CheckNull=False
ExitFunction
EndIf
IfTrim(sValue)<>AndLCase(Trim(sValue))<>
CheckNull=True
Else
CheckNull=False
EndIf
EndFunction
PublicFunctionChkNull(ByValstr)
OnErrorResumeNext
IfIsNull(str)Then
ChkNull=
ExitFunction
EndIf
IfTrim(str)<>AndLCase(Trim(str))<>
ChkNull=Trim(str)
Else
ChkNull=
EndIf
EndFunction
=============================================================
변鑒츰:ChkFormStr
鱗痰:법쫀깊데俚륜
꽝鑒:str----覩俚륜눔
럿쀼令:법쫀빈돨俚륜눔
=============================================================
PublicFunctionChkFormStr(ByValstr)
DimfString
fString=str
IfIsNull(fString)Then
ChkFormStr=
ExitFunction
EndIf
fString=Replace(fString,,')
fString=Replace(fString,Chr(34),")
fString=Replace(fString,Chr(13),)
fString=Replace(fString,Chr(10),)
fString=Replace(fString,Chr(9),)
fString=Replace(fString,>,>)
fString=Replace(fString,<,<)
fString=Replace(fString,%,%)
ChkFormStr=Trim(JAPEncode(fString))
EndFunction
=============================================================
변鑒鱗痰:법쫀SQL렷랬俚륜
=============================================================
PublicFunctionCheckRequest(ByValstr,ByValstrLen)
OnErrorResumeNext
str=Trim(str)
str=Replace(str,Chr(0),)
str=Replace(str,,)
str=Replace(str,%,)
str=Replace(str,^,)
str=Replace(str,;,)
str=Replace(str,*,)
str=Replace(str,<,)
str=Replace(str,>,)
str=Replace(str,,)
str=Replace(str,and,)
str=Replace(str,chr,)
IfLen(str)>0AndstrLen>0Then
str=Left(str,strLen)
EndIf
CheckRequest=str
EndFunction
--盧뇜唐벧俚륜
PublicFunctionRemoveBadCharacters(ByValstrTemp)
Dimre
OnErrorResumeNext
Setre=NewRegExp
re.Pattern=[^\s\w]
re.Global=True
RemoveBadCharacters=re.Replace(strTemp,)
Setre=Nothing
EndFunction
--혼딜HTML깃션
PublicFunctionRemoveHtml(ByValTextstr)
DimStr,re
Str=Textstr
OnErrorResumeNext
Setre=NewRegExp
re.IgnoreCase=True
re.Global=True
re.Pattern=<(.[^>]*)>
Str=re.Replace(Str,)
Setre=Nothing
RemoveHtml=Str
EndFunction
--鑒앴욋젯쌈
PublicFunctionExecute(Command)
IfNotIsObject(Conn)ThenConnectionDatabase
IfIsDeBug=0Then
OnErrorResumeNext
SetExecute=Conn.Execute(Command)
IfErrThen
err.Clear
SetConn=Nothing
Response.Write꿴璂鑒앴돨珂빅랙君댄轎,헝쇱꿴퀭돨꿴璂덜쯤角뤠攣횅。<br/><li>
Response.WriteCommand
Response.End
EndIf
Else
SetExecute=Conn.Execute(Command)
EndIf
SqlQueryNum=SqlQueryNum+1
EndFunction
PublicSubReadConfig()
OnErrorResumeNext
Name=Config
IfObjIsEmpty()ThenReloadConfig
CacheData=Value
뒤寧늴폅痰溝固샀諒路폘IIS돨珂빅속潼뻠닸
Name=Date
IfObjIsEmpty()Then
Value=Date
Else
IfCStr(Value)<>CStr(Date)Then
Name=Config
CallReloadConfig
CacheData=Value
EndIf
EndIf
SiteName=CacheData(1,0):SiteUrl=CacheData(2,0):MasterMail=CacheData(3,0):keywords=CacheData(4,0):Copyright=CacheData(5,0):InstallDir=CacheData(6,0)
IndexName=CacheData(7,0):IstopSite=CacheData(8,0):StopReadme=CacheData(9,0):IsCloseMail=CacheData(10,0):SendMailType=CacheData(11,0):MailFrom=CacheData(12,0)
MailServer=CacheData(13,0):MailUserName=CacheData(14,0):MailPassword=CacheData(15,0):CheckUserReg=CacheData(16,0):AdminCheckReg=CacheData(17,0):MailInformPass=CacheData(18,0)
ChkSameMail=CacheData(19,0):AddUserPoint=CacheData(20,0):SendRegMessage=CacheData(21,0):FullContQuery=CacheData(22,0):ActionTime=CacheData(23,0):IsRunTime=CacheData(24,0)
UploadClass=CacheData(25,0):UploadFileSize=CacheData(26,0):UploadFileType=CacheData(27,0):ContentKeyword=CacheData(28,0):StopApplyLink=CacheData(29,0):FSO_ScriptName=CacheData(30,0)
InitTitleColor=CacheData(31,0):StopBankPay=CacheData(32,0):ChinaeBank=CacheData(33,0):VersionID=CacheData(34,0):Badwords=CacheData(35,0):Badwordr=CacheData(36,0)
serialcode=CacheData(37,0):passedcode=CacheData(38,0):PreviewSetting=CacheData(39,0)
ThisEdition=출롤경(FreeEdition)
Version=Poweredby:<ahref=
CopyrightStr=<!--&vbCrLf
CopyrightStr=CopyrightStr&ʼnħħħħħħħħħħħħħħħħħNEWASPħħ㈃&vbCrLf
CopyrightStr=CopyrightStr&ijNewCloudSiteManageSystemVersion2.0.0SP1ij&vbCrLf
CopyrightStr=CopyrightStr&ij경홈杰唐:劤暾貢ij&vbCrLf
CopyrightStr=CopyrightStr&ij바렘寮女:
CopyrightStr=CopyrightStr&ij쬠犬뒈囹:
CopyrightStr=CopyrightStr&㈇ħħħħħħħħħħħħħħħħħħħħ.NET㈋&vbCrLf
CopyrightStr=CopyrightStr&-->&vbCrLf
IfCInt(IstopSite)=1AndNotAdmin_PageThenResponse.Redirect(&SiteUrl&InstallDir&showerr.asp?action=stop)
EndSub
PublicSubReloadConfig()
DimSQL,Rs
OnErrorResumeNext
SQL=SELECT*from[NC_Config]
SetRs=Execute(SQL)
Value=Rs.GetRows(1)
SetRs=Nothing
EndSub
=============================================================
법넋츰:ReloadChannel
鱗痰:疼陋틉돛?阮?
꽝鑒:ChannelID----틉돛ID
=============================================================
PrivateSubReloadChannel(ChannelID)
DimSQL,Rs
OnErrorResumeNext
SQL=SELECTChannelID,ChannelName,ChannelDir,StopChannel,ChannelType,modules,ModuleName,BindDomain,DomainName,ChannelSkin,HtmlPath,HtmlForm,IsCreateHtml,HtmlExtName,HtmlPrefix,StopUpload,MaxFileSize,UpFileType,IsAuditing,AppearGrade,PostGrade,LeastString,MaxString,PaginalNum,LeastHotHist,Channel_SettingfromNC_ChannelwhereChannelType<=1AndChannelID=&CLng(ChannelID)
SetRs=Execute(SQL)
IfRs.BOFAndRs.EOFThen
Response.Write댄轎돨틉돛꽝鑒!
ExitSub
EndIf
Value=Rs.GetRows(1)
SetRs=Nothing
EndSub
=============================================================
법넋츰:ReadChannel
鱗痰:뗍혤틉돛?阮?
꽝鑒:ChannelID----틉돛ID
=============================================================
PublicSubReadChannel(ChannelID)
OnErrorResumeNext
IfNotIsNumeric(ChannelID)ThenChannelID=1
ChannelID=Clng(ChannelID)
Name=Channel&ChannelID
IfObjIsEmpty()ThenCallReloadChannel(ChannelID)
CacheChannel=Value
IfCLng(CacheChannel(0,0))<>ChannelIDThen
CallReloadChannel(ChannelID)
CacheChannel=Value
EndIf
ChannelName=CacheChannel(1,0):ChannelDir=CacheChannel(2,0):StopChannel=CacheChannel(3,0):ChannelType=CacheChannel(4,0):modules=CacheChannel(5,0):ModuleName=CacheChannel(6,0):BindDomain=CacheChannel(7,0):DomainName=CacheChannel(8,0):ChannelSkin=CacheChannel(9,0):HtmlPath=CacheChannel(10,0)
HtmlForm=CacheChannel(11,0):IsCreateHtml=CacheChannel(12,0):HtmlExtName=CacheChannel(13,0):HtmlPrefix=CacheChannel(14,0):StopUpload=CacheChannel(15,0):MaxFileSize=CacheChannel(16,0):UpFileType=CacheChannel(17,0):IsAuditing=CacheChannel(18,0):AppearGrade=CacheChannel(19,0)
PostGrade=CacheChannel(20,0):LeastString=CacheChannel(21,0):MaxString=CacheChannel(22,0):PaginalNum=CacheChannel(23,0):LeastHotHist=CacheChannel(24,0):Channel_Setting=CacheChannel(25,0)
IfCInt(StopChannel)=1AndNotAdmin_PageThenResponse.Redirect(InstallDir&showerr.asp?action=ChanStop)
EndSub
PublicSubLoadChannel(chanid)
OnErrorResumeNext
DimRs,SQL,tmpdata
chanid=CLng(chanid)
Name=MyChannel&chanid
IfObjIsEmpty()Then
SQL=SELECTChannelName,ChannelDir,ModuleName,HtmlPath,HtmlForm,IsCreateHtml,HtmlExtName,HtmlPrefix,StopUpload,LeastString,MaxString,LeastHotHistFROMNC_ChannelWHEREChannelType<=1AndChannelID=&Clng(chanid)
SetRs=Execute(SQL)
tmpdata=Rs.GetString(,,,@@@,)
tmpdata=Left(tmpdata,Len(tmpdata)-3)
SetRs=Nothing
Value=tmpdata
EndIf
ChannelData=Split(Value,)
ChannelPath=InstallDir&ChannelData(1)
ChannelModule=ChannelData(2)
ChannelHtmlPath=ChannelData(3)
ChannelHtmlForm=ChannelData(4)
ChannelUseHtml=ChannelData(5)
ChannelHtmlExt=ChannelData(6)
ChannelPrefix=ChannelData(7)
EndSub
=============================================================
법넋츰:LoadTemplates
鱗痰:潼흙친겼
꽝鑒:Page_Mark----StyleID
=============================================================
PublicSubLoadTemplates(ChannelID,pageid,StyleID)
Dimrstmp,TempSkinID
OnErrorResumeNext
ChannelID=CLng(ChannelID)
pageid=CInt(pageid)
Name=DefaultSkinID
IfObjIsEmpty()Then
Setrstmp=Execute(SELECTskinidfrom[NC_Template]wherepageid=0AndisDefault=1)
Value=rstmp(0)
Setrstmp=Nothing
EndIf
TempSkinID=Value
IfStyleID=0OrStyleID=Then
skinid=TempSkinID
Else
Setrstmp=Execute(SELECTskinidfrom[NC_Template]wherepageid=0Andskinid=&StyleID)
IfNotrstmp.EOFThen
skinid=rstmp(0)
Else
skinid=TempSkinID
EndIf
Setrstmp=Nothing
EndIf
skinid=CLng(skinid)
Name=MainStyle&skinid
IfObjIsEmpty()ThenTemplatesMainCache(skinid)
Main_Style=Value
SkinPath=Main_Style(0,0)
Main_Setting=Split(Main_Style(2,0),)
MainStyle=Main_Style(1,0)
MainStyle=Replace(MainStyle,{$InstallDir},ReadInstallDir(BindDomain))
MainStyle=Replace(MainStyle,{$SkinPath},SkinPath)
MainStyle=Split(MainStyle,)
HtmlCss=MainStyle(0)
HtmlTop=MainStyle(1)
HtmlFoot=MainStyle(2)
Ifpageid<>0Then
Name=Templates&ChannelID&skinid&pageid
IfObjIsEmpty()Then
TemplatesToCacheChannelID,pageid
EndIf
ByValue=Value
EndIf
EndSub
PrivateSubTemplatesToCache(ChannelID,pageid)
OnErrorResumeNext
DimRs,SQL,rstmp
SQL=SELECTskinid,page_content,page_settingFROM[NC_Template]WHEREChannelID=&ChannelID&Andskinid=&skinid&Andpageid=&pageid
SetRs=Execute(SQL)
IfNotRs.EOFThen
Value=Rs.GetRows(1)
Else
Setrstmp=Execute(SELECTskinid,page_content,page_settingFROM[NC_Template]WHEREChannelID=&ChannelID&AndisDefault=1Andpageid=&pageid)
Value=rstmp.GetRows(1)
Setrstmp=Nothing
EndIf
SetRs=Nothing
EndSub
PrivateSubTemplatesMainCache(skinid)
OnErrorResumeNext
DimRs,SQL,rstmp
SQL=SELECTTemplateDir,page_content,page_settingFROM[NC_Template]WHEREpageid=0Andskinid=&skinid&AndChannelID=0
SetRs=Execute(SQL)
IfNotRs.EOFThen
Value=Rs.GetRows(1)
Else
Setrstmp=Execute(SELECTTemplateDir,page_content,page_settingfrom[NC_Template]WHEREpageid=0AndisDefault=1AndChannelID=0)
Value=rstmp.GetRows(1)
Setrstmp=Nothing
EndIf
SetRs=Nothing
EndSub
PublicPropertyLetByValue(ByValvNewValue)
Dimtmpstr
tmpstr=vNewValue
Html_Setting=tmpstr(2,0)
Html_Setting=Split(Html_Setting,)
HtmlContent=tmpstr(1,0)
IfCInt(Html_Setting(0))<>0Then
HtmlContent=HtmlTop&HtmlContent&HtmlFoot
EndIf
HtmlContent=Replace(HtmlContent,{$Style_CSS},HtmlCss)
HtmlContent=Replace(HtmlContent,{$SkinPath},SkinPath)
HtmlContent=Replace(HtmlContent,{$Width},Main_Setting(0))
HtmlContent=Replace(HtmlContent,{$ChannelMenu},ChannelMenu)
HtmlContent=Replace(HtmlContent,{$WebSiteName},SiteName)
HtmlContent=Replace(HtmlContent,{$WebSiteUrl},SiteUrl)
HtmlContent=Replace(HtmlContent,{$MasterMail},MasterMail)
HtmlContent=Replace(HtmlContent,{$Keyword},keywords)
HtmlContent=Replace(HtmlContent,{$Copyright},Copyright)
HtmlContent=Replace(HtmlContent,{$IndexName},IndexName)
HtmlContent=Replace(HtmlContent,{$Version},)
HtmlContent=HtmlContent
EndProperty
PublicPropertyGetByValue()
ByValue=HtmlContent
EndProperty
PublicPropertyLetHTMLValue(ByValvNewValue)
DimTempStr
TempStr=vNewValue
TempStr=Replace(TempStr,{$Style_CSS},HtmlCss)
TempStr=Replace(TempStr,{$SkinPath},SkinPath)
TempStr=Replace(TempStr,{$Width},Main_Setting(0))
TempStr=Replace(TempStr,{$ChannelMenu},ChannelMenu)
TempStr=Replace(TempStr,{$WebSiteName},SiteName)
TempStr=Replace(TempStr,{$WebSiteUrl},SiteUrl)
TempStr=Replace(TempStr,{$MasterMail},MasterMail)
TempStr=Replace(TempStr,{$Keyword},keywords)
TempStr=Replace(TempStr,{$Copyright},Copyright)
TempStr=Replace(TempStr,{$IndexName},IndexName)
TempStr=Replace(TempStr,{$Version},)
sHtmlContent=TempStr
EndProperty
PublicPropertyGetHTMLValue()
HTMLValue=sHtmlContent
EndProperty
PublicPropertyGetHtmlSetting(n)
HtmlSetting=Html_Setting(n)
EndProperty
PublicPropertyGetMainSetting(n)
MainSetting=Main_Setting(n)
EndProperty
================================================
법넋츰:GetSiteUrl
鱗痰:혤돤던똥왯돨URL
================================================
PublicPropertyGetGetSiteUrl()
IfRequest.ServerVariables(SERVER_PORT)=80Then
GetSiteUrl=
Else
GetSiteUrl=
EndIf
EndProperty
================================================
변鑒츰:FormEncode
鱗痰:법쪄瓊슥돨깊데鑒앴
꽝鑒:str----覩俚륜눔n----俚륜낀똑
================================================
PublicFunctionFormEncode(ByValstr,ByValn)
IfNotIsNull(str)AndTrim(str)<>Then
str=Left(str,n)
str=Replace(str,>,>)
str=Replace(str,<,<)
str=Replace(str,>,>)
str=Replace(str,<,<)
str=Replace(str,,')
str=Replace(str,Chr(34),")
str=Replace(str,%,%)
str=Replace(str,vbNewLine,)
FormEncode=Trim(str)
Else
FormEncode=
EndIf
EndFunction
================================================
변鑒츰:ChkKeyWord
鱗痰:법쫀밑숩俚
꽝鑒:keyword----밑숩俚
================================================
PublicFunctionChkKeyWord(ByValkeyword)
DimFobWords,i
OnErrorResumeNext
FobWords=Array(91,92,304,305,430,431,437,438,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12485,12486,12487,12488,12489,12490,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12521,12532,12533,65339,65340)
Fori=1ToUBound(FobWords,1)
IfInStr(keyword,ChrW(FobWords(i)))>0Then
keyword=Replace(keyword,ChrW(FobWords(i)),)
EndIf
Next
keyword=Left(keyword,100)
FobWords=Array(~,!,@,#,$,%,^,&,*,(,),_,+,=,`,[,],{,},;,:,,,,,<,>,.,/,\,?,_)
Fori=0ToUBound(FobWords,1)
IfInStr(keyword,FobWords(i))>0Then
keyword=Replace(keyword,FobWords(i),)
EndIf
Next
ChkKeyWord=keyword
EndFunction
================================================
변鑒츰:JAPEncode
鱗痰:휑匡튬솝츰긍쯤
꽝鑒:str----覩俚륜
================================================
PublicFunctionJAPEncode(ByValstr)
DimFobWords,i
OnErrorResumeNext
IfIsNull(str)OrTrim(str)=Then
JAPEncode=
ExitFunction
EndIf
FobWords=Array(92,304,305,430,431,437,438,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12485,12486,12487,12488,12489,12490,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12521,12532,12533,65340)
Fori=1ToUBound(FobWords,1)
IfInStr(str,ChrW(FobWords(i)))>0Then
str=Replace(str,ChrW(FobWords(i)),&FobWords(i)&;)
EndIf
Next
JAPEncode=str
EndFunction
================================================
변鑒츰:JAPUncode
鱗痰:휑匡튬솝츰썩쯤
꽝鑒:str----覩俚륜
================================================
PublicFunctionJAPUncode(ByValstr)
DimFobWords,i
OnErrorResumeNext
IfIsNull(str)OrTrim(str)=Then
JAPUncode=
ExitFunction
EndIf
FobWords=Array(92,304,305,430,431,437,438,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12485,12486,12487,12488,12489,12490,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12521,12532,12533,65340)
Fori=1ToUBound(FobWords,1)
IfInStr(str,&FobWords(i)&;)>0Then
str=Replace(str,&FobWords(i)&;,ChrW(FobWords(i)))
EndIf
Next
str=Replace(str,Chr(0),)
str=Replace(str,,)
JAPUncode=str
EndFunction
=============================================================
변鑒鱗痰:던斗뺐법쫀
=============================================================
PublicFunctionChkBadWords(ByValstr)
IfIsNull(str)ThenExitFunction
Dimi,Bwords,Bwordr
Bwords=Split(Badwords,)
Bwordr=Split(Badwordr,)
Fori=0ToUBound(Bwords)
Ifi>UBound(Bwordr)Then
str=Replace(str,Bwords(i),*)
Else
str=Replace(str,Bwords(i),Bwordr(i))
EndIf
Next
ChkBadWords=str
EndFunction
=============================================================
변鑒鱗痰:법쫀HTML덜쯤,던斗뺐법쫀
=============================================================
PublicFunctionHTMLEncode(ByValfString)
IfNotIsNull(fString)Then
fString=Replace(fString,>,>)
fString=Replace(fString,<,<)
fString=Replace(fString,Chr(32),)
fString=Replace(fString,Chr(9),)
fString=Replace(fString,Chr(34),")
fString=Replace(fString,Chr(39),')
fString=Replace(fString,Chr(13),)
fString=Replace(fString,,)
fString=Replace(fString,Chr(10),<br/>)
fString=ChkBadWords(fString)
HTMLEncode=fString
EndIf
EndFunction
=============================================================
변鑒鱗痰:법쫀HTML덜。
下一篇:从新浪提取上海天气的vbs