롸女잚,嫩끽잚

2018-09-06 10:58

阅读:585

  페劍돨寧硅,궐흔롸女잚,嫩끽잚(痰黨斤口瓊刻),匡숭꾸鱗잚(灌供냥),쒔끽痰돕돨묏야잚섟駱聯渴흙돨깊데駱聯잚(ASP경,토북품憩JS경賈痰뫘솅):
롸女잚Pager
<%
ClassPagerPrivateIUrl
PrivateIPage
PrivateIParam
PrivateIPageSize
PrivateIPageCount
PrivateIRecordCount
PrivateICurrentPageIndexPublicPropertyLetUrl(ByValPUrl)
IUrl=PUrl
EndPropertyPublicPropertyGetUrl()
IfIUrl=Then
IfRequest.QueryString<>Then
Dimquery
ForEachkeyInRequest.QueryString
Ifkey<>ParamThen
query=query&key&=&Server.UrlEnCode(Request.QueryString(key))&&
EndIf
Next
IUrl=Page&?&query&Param&=
Else
IUrl=Page&?&Param&=
EndIf
EndIf
Url=IUrl
EndPropertyPublicPropertyLetPage(ByValPPage)
IPage=PPage
EndPropertyPublicPropertyGetPage()
Page=IPage
EndPropertyPublicPropertyLetParam(ByValPParam)
IParam=PParam
EndPropertyPublicPropertyGetParam()
Param=IParam
EndPropertyPublicPropertyLetPageSize(ByValPPageSize)
IPageSize=PPageSize
EndPropertyPublicPropertyGetPageSize()
PageSize=IPageSize
EndPropertyPublicPropertyGetPageCount()
If(NotIPageCount>0)Then
IPageCount=IRecordCount\IPageSize
If(IRecordCountMODIPageSize)>0OrIRecordCount=0Then
IPageCount=IPageCount+1
EndIf
EndIf
PageCount=IPageCount
EndPropertyPublicPropertyLetRecordCount(ByValPRecordCount)
IRecordCount=PRecordCount
EndPropertyPublicPropertyGetRecordCount()
RecordCount=IRecordCount
EndPropertyPublicPropertyLetCurrentPageIndex(ByValPCurrentPageIndex)
ICurrentPageIndex=PCurrentPageIndex
EndPropertyPublicPropertyGetCurrentPageIndex()
IfICurrentPageIndex=Then
IfRequest.QueryString(Param)=Then
ICurrentPageIndex=1
Else
IfIsNumeric(Request.QueryString(Param))Then
ICurrentPageIndex=CInt(Request.QueryString(Param))
IfICurrentPageIndex<1ThenICurrentPageIndex=1
IfICurrentPageIndex>PageCountThenICurrentPageIndex=PageCount
ElseICurrentPageIndex=1
EndIf
EndIf
EndIf
CurrentPageIndex=ICurrentPageIndex
EndPropertyPrivateSubClass_Initialize()
WithMe
.Param=page
.PageSize=10
EndWith
EndSubPrivateSubClass_Terminate()
EndSubPrivateFunctionNavigation()
DimNav
IfCurrentPageIndex=1Then
Nav=Nav&看女?菊?nbsp;
Else
Nav=Nav&<ahref=&Url&1>看女</a><ahref=&Url&(CurrentPageIndex-1)&>?菊?lt;/a>
EndIfIfCurrentPageIndex=PageCountOrPageCount=0Then
Nav=Nav&苟女棺女
Else
Nav=Nav&<ahref=&Url&(CurrentPageIndex+1)&>苟女</a><ahref=&Url&PageCount&>棺女</a>
EndIfNavigation=Nav
EndFunctionPrivateFunctionSelectMenu()
DimSelector
Dimi:i=1
Whilei<=PageCount
Ifi=ICurrentPageIndexThen
Selector=Selector&<optionvalue=&i&selected=true>&i&</option>&vbCrLf
Else
Selector=Selector&<optionvalue=&i&>&i&</option>&vbCrLf
EndIf
i=i+1
Wend
SelectMenu=vbCrLf&<selectstyle=font:9pxTahomaonchange=location=&Url&+this.value>&vbCrLf&Selector&vbCrLf&</select>&vbCrLf
EndFunctionPublicSubDisplay()
IfRecordCount>0Then
%>
<style>b{font:bold}</style>
<divstyle=text-align:right;width:100%>>>롸女<%=Navigation()%>女늴:<b><%=ICurrentPageIndex%></b>/<b><%=PageCount%></b>女<b><%=PageSize%></b>몸션쩌/女瘻돕<%=SelectMenu()%>女묾<b><%=IRecordCount%></b>係션쩌</div>
<%
Else
Response.Write(<divstyle=text-align:center>董轟션쩌</div>)
EndIf
EndSubEndClass
%>嫩끽잚Exception:
<%
ClassException
PrivateIWindow
PrivateITarget
PrivateITimeOut
PrivateIMode
PrivateIMessage
PrivateIHasError
PrivateIRedirectPublicPropertyLetWindow(ByValValue)
IWindow=Value
EndProperty
PublicPropertyGetWindow()
Window=IWindow
EndPropertyPublicPropertyLetTarget(ByValValue)
ITarget=Value
EndProperty
PublicPropertyGetTarget()
Target=ITarget
EndPropertyPublicPropertyLetTimeOut(ByValValue)
IfIsNumeric(Value)Then
ITimeOut=CInt(Value)
Else
ITimeOut=3000
EndIf
EndProperty
PublicPropertyGetTimeOut()
TimeOut=ITimeOut
EndPropertyPublicPropertyLetMode(ByValValue)
IfIsNumeric(Value)Then
IMode=CInt(Mode)
Else
IMode=1
EndIf
EndProperty
PublicPropertyGetMode()
Mode=IMode
EndPropertyPublicPropertyLetMessage(ByValValue)
IfIHasErrorThen
IMessage=IMessage&<li>&Value&</li>&vbCrLf
Else
IHasError=True
IMessage=<li>&Value&</li>&vbCrLf
EndIf
EndProperty
PublicPropertyGetMessage()
Message=IMessage
EndPropertyPublicPropertyLetHasError(ByValValue)
IHasError=CBool(Value)
EndProperty
PublicPropertyGetHasError()
HasError=IHasError
EndPropertyPublicPropertyLetRedirect(ByValValue)
IRedirect=CBool(Value)
EndProperty
PublicPropertyGetRedirect()
Redirect=IRedirect
EndPropertyPrivateSubClass_initialize()
WithMe
.Window=self
.Target=PrePage()
.TimeOut=3000
IMode=1
IMessage=놔君댄轎,攣瞳럿쀼,헝?牘?..
.HasError=False
.Redirect=True
EndWith
EndSub

PrivateSubClass_Terminate()
EndSubPublicFunctionPrePage()
IfRequest.ServerVariables(HTTP_REFERER)<>Then
PrePage=Request.ServerVariables(HTTP_REFERER)
Else
PrePage=/index.asp
EndIf
EndFunctionPublicFunctionAlert()
words=Replace(words,<li>,\n)
words=Replace(words,</li>,)
words=Replace(words,vbCrLf,)
words=瓊刻斤口:\t\t\t&words
%>
<scripttype=text/javascript>
<!--
alert(<%=words%>)
<%=Me.Window%>.location=<%=Me.Target%>
//-->
</script>
<%
EndFunctionPublicSubThrow()
IfNotHasErrorThenExitSub
Response.Clear()
SelectCaseCInt(Me.Mode)
Case1
%>
<linkhref=/css/admin.cssrel=stylesheettype=text/css>
<TABLEclass=border-allcellSpacing=1cellPadding=5width=50%align=centerborder=0>
<TBODY>
<TR>
<THheight=21align=middlebackground=images/th_bg.gifclass=title>瓊刻斤口</TH>
</TR>
<TR>
<TDalign=centerbgColor=#ffffffheight=40>
<TABLEcellSpacing=0cellPadding=0width=95%border=0>
<TBODY>
<TR>
<TDheight=5></TD>
</TR>
<TR>
<TD><%=Me.Message%></TD>
</TR>
<TR>
<TD></TD>
</TR>
<TR>
<TDalign=center><ahref=javascript:history.back()>[럿쀼]</a><ahref=/>[看女]</a></TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<%IfRedirectThen%><scripttype=text/javascript>
<!--
setTimeout(<%=Me.Window%>.location=<%=Me.Target%>,<%=Me.TimeOut%>)
//-->
</script><%endIf%>
<%
Case2
CallAlert()
CaseElse
Response.WriteMessage
EndSelect
Response.End()
EndSub
EndClass
%>匡숭꾸鱗잚File:
<%
ClassFilePrivateFSO
PrivateIPath
PrivateIContentPublicPropertyLetPath(ByValPPath)
IPath=PPath
EndPropertyPublicPropertyGetPath()
Path=IPath
EndPropertyPublicPropertyLetContent(ByValPContent)
IContent=PContent
EndPropertyPublicPropertyGetContent()
Content=IContent
EndPropertyPrivateSubClass_Initialize()
SetFSO=Server.CreateObject(Scripting.FileSystemObject)
EndSubPrivateSubClass_Terminate()
SetFSO=Nothing
EndSubPublicSubSave()
Dimf
Setf=FSO.OpenTextFile(Server.MapPath(Path),2,true)
f.WriteContent
EndSubEndClass
%>
끽痰돨묏야잚Utility:
<%
ClassUtilityPrivateRegPublicFunctionHTMLEncode(Str)
IfIsNull(Str)OrIsEmpty(Str)OrStr=Then
HTMLEncode=
Else
DimS:S=Str
S=Replace(S,<,<)
S=Replace(S,>,>)
S=Replace(S,,)
S=Replace(S,vbCrLf,<br/>)
HTMLEncode=S
EndIf
EndFunctionPublicFunctionHtmlFilter(ByValCode)
IfIsNull(Code)OrIsEmpty(Code)ThenExitFunction
WithReg
.Global=True
.Pattern=<[^>]+?>
EndWith
Code=Reg.Replace(Code,)
HtmlFilter=Code
EndFunctionPublicFunctionLimit(ByValStr,ByValNum)
DimStrLen:StrLen=Len(Str)
IfStrLen*2<=NumThen
Limit=Str
Else
DimStrRlen
CallRlen(Str,StrRlen)
IfStrRlen<=NumThen
Limit=Str
Else
Dimi
DimreStr
IfStrLen>Num*2Then
i=Num\2
reStr=Left(Str,i)
CallRlen(reStr,StrRlen)
WhileStrRlen<Num
i=i+1
reStr=Left(Str,i)
CallRlen(reStr,StrRlen)
Wend
Else
i=StrLen
reStr=Str
CallRlen(reStr,StrRlen)
WhileStrRlen>Num
i=i-1
reStr=Left(Str,i)
CallRlen(reStr,StrRlen)
Wend
EndIf
CallRlen(Right(reStr,1),StrRlen)
IfStrRlen>1Then
Limit=Left(reStr,i-1)&∼
Else
Limit=Left(reStr,i-2)&∼
EndIf
EndIf
EndIf
EndFunctionPublicFunctionEncode(ByValStr)
Str=Replace(Str,,")
Str=Replace(Str,,')
Encode=Str
EndFunctionPublicFunctionEncodeAll(ByValStr)
DimM,MS
Reg.Pattern=[\x00-\xFF]
SetMS=Reg.Execute(Str)
ForEachMInMS
Str=Replace(Str,M.Value,&Asc(M.Value)&;)
Next
EncodeAll=Str
EndFunction

PrivateSubClass_initialize()
SetReg=NewRegExp
Reg.Global=True
EndSub
PrivateSubClass_Terminate()
SetReg=Nothing
EndSubPublicSubRlen(ByRefStr,ByRefRl)
WithReg
.Pattern=[^\x00-\xFF]
Rl=Len(.Replace(Str,..))
EndWith
EndSubEndClass
%>
<%
DimUtil:SetUtil=NewUtility
%>渴흙駱聯잚Validator:
<%@Language=VBScriptCodePage=936%>
<%
OptionExplicit
ClassValidator
*************************************************
ValidatorforASPbeta3륩蛟포똥신굶
codeby乖뤘?싫?
*************************************************
PrivateRe
PrivateICodeName
PrivateICodeSessionNamePublicPropertyLetCodeName(ByValPCodeName)
ICodeName=PCodeName
EndPropertyPublicPropertyGetCodeName()
CodeName=ICodeName
EndPropertyPublicPropertyLetCodeSessionName(ByValPCodeSessionName)
ICodeSessionName=PCodeSessionName
EndPropertyPublicPropertyGetCodeSessionName()
CodeSessionName=ICodeSessionName
EndPropertyPrivateSubClass_Initialize()
SetRe=NewRegExp
Re.IgnoreCase=True
Re.Global=True
Me.CodeSessionName=vCode
EndSubPrivateSubClass_Terminate()
SetRe=Nothing
EndSubPublicFunctionIsEmail(ByValStr)
IsEmail=Test(^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$,Str)
EndFunctionPublicFunctionIsUrl(ByValStr)
IsUrl=Test(^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\:+!]*([^<>])*$,Str)
EndFunctionPublicFunctionIsNum(ByValStr)
IsNum=Test(^\d+$,Str)
EndFunctionPublicFunctionIsQQ(ByValStr)
IsQQ=Test(^[1-9]\d{4,8}$,Str)
EndFunctionPublicFunctionIsZip(ByValStr)
IsZip=Test(^[1-9]\d{5}$,Str)
EndFunctionPublicFunctionIsIdCard(ByValStr)
IsIdCard=Test(^\d{15}(\d{2}[A-Za-z0-9])?$,Str)
EndFunctionPublicFunctionIsChinese(ByValStr)
IsChinese=Test(^[\u0391-\uFFE5]+$,Str)
EndFunctionPublicFunctionIsEnglish(ByValStr)
IsEnglish=Test(^[A-Za-z]+$,Str)
EndFunctionPublicFunctionIsMobile(ByValStr)
IsMobile=Test(^((\(\d{3}\))(\d{3}\-))?13\d{9}$,Str)
EndFunctionPublicFunctionIsPhone(ByValStr)
IsPhone=Test(^((\(\d{3}\))(\d{3}\-))?(\(0\d{2,3}\)0\d{2,3}-)?[1-9]\d{6,7}$,Str)
EndFunctionPublicFunctionIsSafe(ByValStr)
IsSafe=(Test(^(([A-Z]*[a-z]*\d*[-_\~!@#\$%\^&\*\.\(\)\[\]\{\}<>\?\\\/\\]*).{0,5})$\s,Str)=False)
EndFunctionPublicFunctionIsNotEmpty(ByValStr)
IsNotEmpty=LenB(Str)>0
EndFunctionPublicFunctionIsDateFormat(ByValStr,ByValFormat)
IFNotIsDate(Str)Then
IsDateFormat=False
ExitFunction
EndIFIFFormat=YMDThen
IsDateFormat=Test(^((\d{4})(\d{2}))([-./])(\d{1,2})\4(\d{1,2})$,Str)
Else
IsDateFormat=Test(^(\d{1,2})([-./])(\d{1,2})\\2((\d{4})(\d{2}))$,Str)
EndIF
EndFunctionPublicFunctionIsEqual(ByValSrc,ByValTar)
IsEqual=(Src=Tar)
EndFunctionPublicFunctionCompare(ByValOp1,ByValOperator,ByValOp2)
Compare=False
IFDic.Exists(Operator)Then
Compare=Eval(Dic.Item(Operator))
ElseifIsNotEmpty(Op1)Then
Compare=Eval(Op1&Operator&Op2)
EndIF
EndFunctionPublicFunctionRange(ByValSrc,ByValMin,ByValMax)
Min=CInt(Min):Max=CInt(Max)
Range=(Min<SrcAndSrc<Max)
EndFunctionPublicFunctionGroup(ByValSrc,ByValMin,ByValMax)
Min=CInt(Min):Max=CInt(Max)
DimNum:Num=UBound(Split(Src,,))+1
Group=Range(Num,Min-1,Max+1)
EndFunctionPublicFunctionCustom(ByValStr,ByValReg)
Custom=Test(Reg,Str)
EndFunctionPublicFunctionLimit(ByValStr,ByValMin,ByValMax)
Min=CInt(Min):Max=CInt(Max)
DimL:L=Len(Str)
Limit=(Min<=LAndL<=Max)
EndFunctionPublicFunctionLimitB(ByValStr,ByValMin,ByValMax)
Min=CInt(Min):Max=CInt(Max)
DimL:L=bLen(Str)
LimitB=(Min<=LAndL<=Max)
EndFunctionPrivateFunctionTest(ByValPattern,ByValStr)
IfIsNull(Str)OrIsEmpty(Str)Then
Test=False
Else
Re.Pattern=Pattern
Test=Re.Test(CStr(Str))
EndIf
EndFunctionPublicFunctionbLen(ByValStr)
bLen=Len(Replace(Str,[^\x00-\xFF],..))
EndFunctionPrivateFunctionReplace(ByValStr,ByValPattern,ByValReStr)
Re.Pattern=Pattern
Replace=Re.Replace(Str,ReStr)
EndFunctionPrivateFunctionB2S(ByValiStr)
DimreVal:reVal=
Dimi,Code,nCode
Fori=1toLenB(iStr)
Code=AscB(MidB(iStr,i,1))
IFCode<&h80Then
reVal=reVal&Chr(Code)
Else
nCode=AscB(MidB(iStr,i+1,1))
reVal=reVal&Chr(CLng(Code)*&h100+CInt(nCode))
i=i+1
EndIF
Next
B2S=reVal
EndFunctionPublicFunctionSafeStr(ByValName)
IfIsNull(Name)OrIsEmpty(Name)Then
SafeStr=False
Else
SafeStr=Replace(Trim(Name),(\s*and\s*\w*=\w*)[%&<>=],)
EndIf
EndFunctionPublicFunctionSafeNo(ByValName)
IfIsNull(Name)OrIsEmpty(Name)Then
SafeNo=0
Else
SafeNo=(Replace(Trim(Name),^[\D]*(\d+)[\D\d]*$,$1))
EndIf
EndFunctionPublicFunctionIsValidCode()
IsValidCode=((Request.Form(Me.CodeName)=Session(Me.CodeSessionName))ANDSession(Me.CodeSessionName)<>)
EndFunctionPublicFunctionIsValidPost()
DimUrl1:Url1=Cstr(Request.ServerVariables(HTTP_REFERER))
DimUrl2:Url2=Cstr(Request.ServerVariables(SERVER_NAME))
IsValidPost=(Mid(Url1,8,Len(Url2))=Url2)
EndFunctionEndClass
%>


评论


亲,登录后才可以留言!