马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
大家可以自己去看一看.可以说看得想呕吐.以前有次下了个动网来看.里面连基本内置函数的保护措施(函数没防御性)都没有.难怪经常补这个补那个了.可能现在.NET版会好点吧菜单<%
****************************************
类名:双联动菜单类
****************************************
本类由[71port]sean,[71port]80端口原创编写
[阿里西西]修正完美BUG,版权没有,恣意缮写,注重完全
公然公布于2005年12月10日
接待会见http://www.71port.com,阿里西西WEB开辟
ClassDCombo
****************示例*********************
Response.write"<formname=frm>"
DimDC
SetDC=NewDCombo
DC.GroupData="GD,广东省|GZ,广州市$GD,广东省|DG,东莞市$GX,广西|NN,南宁市$GD,广东省|SS,深圳$"
变量数据格局="第一列表值,称号|第二列表值,称号$第一列表值,称号|第二列表值,称号$"
DC.DCform="frm"form的称号要独一
DC.DC1Name="第一列表"第一列表的称号
DC.DC2Name="第一列表"第二列表的称号
DC.Combo1Name="ComboName1"第一列表的NAME
DC.Combo2Name="ComboName2"第二列表的NAME
response.WriteDC.ReturnDo
SetDC=nothing
Response.write"</form>"
****************示例*********************
PrivatemyGroupData,myDCform,myCombo1Name,myCombo2Name,myFirstType,mySecType
Privatemylvzf,str,f1,f2,cs
PrivatemyDC1Name,myDC2Name,myList1value,myList2value
PrivateHaveErr,Do_Tmp
PrivateSubClass_Initialize()
HaveErr=False
myGroupData=""
myDCform=""
myDC1Name=""
myDC2Name=""
myList1value=""
myList2value=""
myCombo1Name=""
myCombo2Name=""
Do_Tmp=""
EndSub
PublicSubClear()
HaveErr=False
EndSub
PrivateSubClass_Terminate()
Clear()
myGroupData=""
myDCform=""
myDC1Name=""
myDC2Name=""
myList1value=""
myList2value=""
myCombo1Name=""
myCombo2Name=""
Do_Tmp=""
EndSub
PublicPropertyLetGroupData(value)
myGroupData=value
myGroupData=lvzf(myGroupData)
EndProperty
PublicPropertyLetDCform(value)
myDCform=value
myDCform=lvzf(myDCform)
EndProperty
PublicPropertyLetCombo1Name(value)
myCombo1Name=value
EndProperty
PublicPropertyLetCombo2Name(value)
myCombo2Name=value
EndProperty
PublicPropertyLetDC1Name(value)
myDC1Name=value
EndProperty
PublicPropertyLetDC2Name(value)
myDC2Name=value
EndProperty
PublicPropertyLetList1value(value)
myList1value=value
EndProperty
PublicPropertyLetList2value(value)
myList2value=value
EndProperty
PublicFunctionlvzf(mylvzf)
mylvzf=replace(mylvzf,"","")
mylvzf=replace(mylvzf,"(","")
mylvzf=replace(mylvzf,")","")
mylvzf=replace(mylvzf,"","")
mylvzf=replace(mylvzf,"“","")
mylvzf=replace(mylvzf,"”","")
lvzf=mylvzf
EndFunction
PublicFunctionGetArray(str,f1,f2)
Dimi,x,y,tmp_a,tmp_b,a,b
tmp_a=split(str,f1)
x=ubound(tmp_a)-1
Fori=0Tox
tmp_b=split(tmp_a(i),f2)
Ifubound(tmp_b)>=yTheny=ubound(tmp_b)
Next
ReDimResult(x,y)
Fora=0Tox
ReDimtmp_b(y)
tmp_b=split(tmp_a(a),f2)
Ifubound(tmp_b)yThenHaveErr=True:ExitFunction
Forb=0Toy
Result(a,b)=tmp_b(b)
Next
Next
GetArray=Result
EndFunction
PublicFunctionGetGroup(ArrayTmp)
Dimi,ii,iii,j,k,NoCF,FirstType_Temp
ReDimPubTmp(Ubound(ArrayTmp,1))
Fori=0ToUbound(ArrayTmp,1)
NoCF=True
Ifi=0ThenPubTmp(i)=ArrayTmp(0,0):FirstType_Temp=ArrayTmp(0,0)
Forj=0Toi
IfPubTmp(j)=ArrayTmp(i,0)ThenNoCF=False
Next
IfNoCF=TrueThenFirstType_Temp=FirstType_Temp&"|"&ArrayTmp(i,0):PubTmp(i)=ArrayTmp(i,0)
Next
myFirstType=Split(FirstType_Temp,"|")
ReDimResult(Ubound(myFirstType),Ubound(ArrayTmp,1)+1)
Forii=0ToUbound(myFirstType)
Result(ii,0)=myFirstType(ii)
k=0
j=0
NoCF=True
Foriii=0toUbound(ArrayTmp,1)
IfArrayTmp(iii,0)=myFirstType(ii)Then
Forj=0tok
IfResult(ii,j)=ArrayTmp(iii,1)ThenNoCF=False
Next
IfNoCF=TrueThenk=k+1:Result(ii,k)=ArrayTmp(iii,1)
EndIf
Next
Next
GetGroup=Result
EndFunction
PublicFunctionReturnDo()
Dimi,k,m,n
DimArray_Temp
Array_Temp=GetArray(myGroupData,"$","|")
IfHaveErr=TrueThenReturnDo="GroupData数据格局有误(注重年夜支解符$小支解符|)":ExitFunction
mySecType=GetGroup(Array_Temp)
Do_Tmp=Do_Tmp&myDC1Name&"<selectname="""&myCombo1Name&"""size=""1""onChange="""&myDCform&"redirect(this.options.selectedIndex)"">"&vbcrlf
Fori=0ToUbound(myFirstType)
Do_Tmp=Do_Tmp&"<optionvalue="""&split(myFirstType(i),",")(0)&""">"&split(myFirstType(i),",")(1)&"</option>"&vbcrlf
Next
Do_Tmp=Do_Tmp&"</select>"&vbcrlf
Do_Tmp=Do_Tmp&myDC2Name&"<selectname="""&myCombo2Name&"""size=""1"">"&vbcrlf
Fori=1ToUbound(mySecType,2)
IfmySecType(0,i)""ThenDo_Tmp=Do_Tmp&"<optionvalue="""&split(mySecType(0,i),",")(0)&""">"&split(mySecType(0,i),",")(1)&"</option>"&vbcrlf
Next
Do_Tmp=Do_Tmp&"</select>"&vbcrlf
Do_Tmp=Do_Tmp&"<script>"&vbcrlf
Do_Tmp=Do_Tmp&"var"&myDCform&"groups=document."&myDCform&"."&myCombo1Name&".options.length"&vbcrlf
Do_Tmp=Do_Tmp&"var"&myDCform&"group=newArray("&myDCform&"groups)"&vbcrlf
Do_Tmp=Do_Tmp&"for(i=0;i<"&myDCform&"groups;i++)"&vbcrlf
Do_Tmp=Do_Tmp&""&myDCform&"group[i]=newArray()"&vbcrlf
Form=0ToUbound(myFirstType)
n=1
k=-1
DoWhilen<UBound(mySecType,2)
IfmySecType(m,n)""Thenk=k+1:Do_Tmp=Do_Tmp&""&myDCform&"group["&m&"]["&k&"]=newOption("""&split(mySecType(m,n),",")(1)&""","""&split(mySecType(m,n),",")(0)&""")"&vbcrlf
n=n+1
Loop
Next
Do_Tmp=Do_Tmp&"var"&myDCform&"temp=document."&myDCform&"."&myCombo2Name&""&vbcrlf
Do_Tmp=Do_Tmp&"function"&myDCform&"redirect("&myDCform&"x){"&vbcrlf
Do_Tmp=Do_Tmp&"for("&myDCform&"m="&myDCform&"temp.options.length-1;"&myDCform&"m>0;"&myDCform&"m--)"&vbcrlf
Do_Tmp=Do_Tmp&""&myDCform&"temp.options["&myDCform&"m]=null"&vbcrlf
Do_Tmp=Do_Tmp&"for(i=0;i<"&myDCform&"group["&myDCform&"x].length;i++){"&vbcrlf
Do_Tmp=Do_Tmp&""&myDCform&"temp.options[i]=newOption("&myDCform&"group["&myDCform&"x][i].text,"&myDCform&"group["&myDCform&"x][i].value)"&vbcrlf
Do_Tmp=Do_Tmp&"}"&vbcrlf
Do_Tmp=Do_Tmp&""&myDCform&"temp.options[0].selected=true"&vbcrlf
Do_Tmp=Do_Tmp&"}"&vbcrlf
Do_Tmp=Do_Tmp&"</script>"&vbcrlf
IfHaveErr=TrueThen
ReturnDo="GroupData数据格局有误(注重年夜支解符$小支解符|)"
Else
ReturnDo=Do_Tmp
EndIf
EndFunction
EndClass
%>
使用cdonts,可以发送、查看邮件,实现webmail的功能。结合wsh,可以实现对nt主机的管理,如nt用户管理、iis虚拟主机设置、exchange邮箱设置等等,就像管理本地机一样方便。 |