reload.asp
来自「关于网络渗透技术的详细讲解」· ASP 代码 · 共 442 行 · 第 1/2 页
ASP
442 行
End Sub
Function MarkJs
If Not ChkPost Then
ErrMsg="对不起,请不要从外部提交数据!"
Call Error(1)
End If
If IsObjInstalled("Scripting.FileSystemObject") Then
'On Error Resume Next
Dim i,j,k,List,Level
Dim fso,f1,file
Dim OutStr,OutStr_Clone
Dim SiteInfo
SiteInfo=GetSiteSetting()
If Right(SiteInfo(11),1)<>"/" Then SiteInfo(11)=SiteInfo(11)&"/"
Set fso = CreateObject("Scripting.FileSystemObject")
file=Server.MapPath("../js/mune.js")
Set f1 = fso.CreateTextFile(file, True)
OutStr_Clone="mmenubg='';mmenucolor='#3575CC';mfontcolor='#FFFFFF';mmenuoutcolor='#1D5298';mmenuincolor='#A3B2CC';mmenuoutbordercolor='#EFEFEF';mmenuinbordercolor='#CDCDCD';mmidoutcolor='#CCCCFE';mmidincolor='#CCCCFE';mmenuovercolor='#FFFFFF';mitemedge='0';msubedge='1';mmenuunitwidth=66;mmenuitemwidth=120;mmenuheight=20;mmenuwidth='100%';mmenuadjust=0;mmenuadjustV=0;mfonts='font-family: 宋体; font-size: 9pt; color: #FFFFFF; ';mcursor='hand';"
OutStr_Clone=OutStr_Clone&Chr(10)
OutStr="mpmenu1=new mMenu('首页','"&SiteInfo(11)&"default.Htm','self','','','','');"
OutStr=OutStr&Chr(10)
OutStr=OutStr&"mpmenu1.addItem(new mMenuItem('<img src="&SiteInfo(11)&"images/ye.gif> 图片文章','"&SiteInfo(11)&"Img_List.asp','self',false,'图片文章',null,'','','',''));"
OutStr=OutStr&Chr(10)
OutStr=OutStr&"mpmenu1.addItem(new mMenuItem('<img src="&SiteInfo(11)&"images/ye.gif> 过往专题','"&SiteInfo(11)&"Diss_List.asp','self',false,'过往专题',null,'','','',''));"
OutStr=OutStr&Chr(10)
OutStr=OutStr&"mpmenu1.addItem(new mMenuItem('<img src="&SiteInfo(11)&"images/ye.gif> 会员列表','"&SiteInfo(11)&"Member_List.asp','self',false,'会员列表',null,'','','',''));"
OutStr=OutStr&Chr(10)
OutStr_Clone=OutStr_Clone&"mpmenu1=new mMenu('首页','./','self','','','','');"
OutStr_Clone=OutStr_Clone&Chr(10)
OutStr_Clone=OutStr_Clone&"mpmenu1.addItem(new mMenuItem('<img src=images/ye.gif> 图片文章','Img_List.asp','self',false,'图片文章',null,'','','',''));"
OutStr_Clone=OutStr_Clone&Chr(10)
OutStr_Clone=OutStr_Clone&"mpmenu1.addItem(new mMenuItem('<img src=images/ye.gif> 过往专题','Diss_List.asp','self',false,'过往专题',null,'','','',''));"
OutStr_Clone=OutStr_Clone&Chr(10)
OutStr_Clone=OutStr_Clone&"mpmenu1.addItem(new mMenuItem('<img src=images/ye.gif> 会员列表','Member_List.asp','self',false,'会员列表',null,'','','',''));"
OutStr_Clone=OutStr_Clone&Chr(10)
'第一层菜单选择
Sql="select id,title,code from NB_Column where len(code)=4 And IsTop=-1 order by code"
Set rs=conn.execute(sql)
If Not rs.eof And Not rs.bof Then
TopicList=rs.getrows()
rs.close:Set rs=Nothing
j=1 '初始化二级菜单标识号
For i=0 To Ubound(TopicList,2)
'生成一级菜单项
OutStr=OutStr&"mpmenu"&i+2&"=new mMenu('"&TopicList(1,i)&"','"&SiteInfo(11)&"ArticleList/Article_"&TopicList(0,i)&"_AddDate_Desc_1.Htm','self','','','','');"
OutStr=OutStr&Chr(10)
OutStr_Clone=OutStr_Clone&"mpmenu"&i+2&"=new mMenu('"&TopicList(1,i)&"','list.asp?classid="&TopicList(0,i)&"','self','','','','');"
OutStr_Clone=OutStr_Clone&Chr(10)
'筛选当次一级菜单的下属菜单(二级)
Sql="select id,title,code from NB_Column where left(code,4)='"&TopicList(2,i)&"' and len(code)=8 and id<>"&TopicList(0,i)&" And IsTop=-1 order by code"
Set rs=conn.execute(sql)
If Not rs.eof And Not rs.bof Then
List=rs.getrows()
rs.close:Set rs=Nothing
For k=0 To Ubound(List,2)
'筛选当次二级菜单的下属菜单(三级)
Sql="select id,title from nb_column where left(code,8)='"&List(2,k)&"' and len(code)=12 and id<>"&List(0,k)&" And IsTop=-1 order by code"
Set rs=conn.execute(sql)
If rs.eof And rs.bof Then '判断是否有第三层
OutStr=OutStr&"mpmenu"&i+2&".addItem(new mMenuItem('<img src="&SiteInfo(11)&"images/ye.gif> "&List(1,k)&"','"&SiteInfo(11)&"ArticleList/Article_"&List(0,k)&"_AddDate_Desc_1.Htm','self',false,'"&List(1,k)&"',null,'','','',''));"
OutStr=OutStr&Chr(10)
OutStr_Clone=OutStr_Clone&"mpmenu"&i+2&".addItem(new mMenuItem('<img src=images/ye.gif> "&List(1,k)&"','list.asp?classid="&List(0,k)&"','self',false,'"&List(1,k)&"',null,'','','',''));"
OutStr_Clone=OutStr_Clone&Chr(10)
Else
OutStr=OutStr&"msub"&j&"=new mMenuItem('<img src="&SiteInfo(11)&"images/ye.gif> "&List(1,k)&"','"&SiteInfo(11)&"ArticleList/Article_"&List(0,k)&"_AddDate_Desc_1.Htm','self',false,'','1','','','','');"
OutStr=OutStr&Chr(10)
OutStr_Clone=OutStr_Clone&"msub"&j&"=new mMenuItem('<img src=images/ye.gif> "&List(1,k)&"','list.asp?classid="&List(0,k)&"','self',false,'','1','','','','');"
OutStr_Clone=OutStr_Clone&Chr(10)
Do While Not rs.eof '历遍第三层项目
OutStr=OutStr&"msub"&j&".addsubItem(new mMenuItem('<img src="&SiteInfo(11)&"images/doc.gif> "&rs(1)&"','"&SiteInfo(11)&"ArticleList/Article_"&rs(0)&"_AddDate_Desc_1.Htm','self',false,'"&rs(1)&"',null,'','','',''));"
OutStr=OutStr&Chr(10)
OutStr_Clone=OutStr_Clone&"msub"&j&".addsubItem(new mMenuItem('<img src=images/doc.gif> "&rs(1)&"','list.asp?classid="&rs(0)&"','self',false,'"&rs(1)&"',null,'','','',''));"
OutStr_Clone=OutStr_Clone&Chr(10)
rs.movenext
Loop
OutStr=OutStr&"mpmenu"&i+2&".addItem(msub"&j&")" '关闭当次第三层
OutStr=OutStr&Chr(10)
OutStr_Clone=OutStr_Clone&"mpmenu"&i+2&".addItem(msub"&j&")"
OutStr_Clone=OutStr_Clone&Chr(10)
j=j+1
End If
rs.close
Next
End If
Next
End If
OutStr=OutStr&"mwritetodocument();"
OutStr_Clone=OutStr_Clone&"mwritetodocument();"
f1.Write OutStr
f1.close
file=Server.MapPath("../js/mune1.js")
Set f1 = fso.CreateTextFile(file, True)
f1.Write OutStr_Clone
f1.close
file=Server.MapPath("../js/searchbar.js")
Set f1 = fso.CreateTextFile(file, True)
SQL="select id,title,code,info from [NB_Column] order by code"
Set rs=Conn.Execute(SQL)
If Not rs.EOF And Not rs.BOF Then
List=rs.getrows()
f1.Write "document.write ('<table border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">');"&chr(10)
f1.Write "document.write ('<form method=""Get"" name=""SearchForm"" action="""&SiteInfo(11)&"Search.asp"" target=""_blank"">');"&chr(10)
f1.Write "document.write ('<tr>');"&chr(10)
f1.Write "document.write ('<td align=""center""><font color=""#000000"">站内文章搜索:</font></td>');"&chr(10)
f1.Write "document.write ('<td align=""center""> ');"&chr(10)
f1.Write "document.write ('<select name=""field"">');"&chr(10)
f1.Write "document.write ('<option value=""0"">标题</option>');"&chr(10)
f1.Write "document.write ('<option value=""1"">内容</option>');"&chr(10)
f1.Write "document.write ('<option value=""2"">作者</option>');"&chr(10)
f1.Write "document.write ('</select> ');"&chr(10)
f1.Write "document.write ('<select name=""column"">');"&chr(10)
f1.Write "document.write ('<option value=""0"">--栏 目--</option>');"&chr(10)
For i=0 To Ubound(List,2)
Level=(Len(List(2,i))/4-1)
f1.Write "document.write ('<option value="""&List(0,i)&""">"
If Len(List(2,i))>4 Then f1.Write "├"
f1.Write String(Level,"-")
f1.Write List(1,i)&"</option>');"&chr(10)
Next
f1.Write "document.write ('</select> <input name=""keyword"" type=""text"" value=""关键字"" onfocus=""this.className='+'iptA_Over'+';this.select();"" onblur=""this.className='+'iptA'+';"" size=""20"" maxlength=""50""> <input name=""Submit"" type=""submit"" class=""btnA"" value=""搜索"" onmouseover=""this.className='+'btnA_Over'+'"" onmouseout=""this.className='+'btnA'+'""></td>');"&chr(10)
f1.Write "document.write ('<td width=""10"" align=""center""> </td>');"&chr(10)
f1.Write "document.write ('</tr>');"&chr(10)
f1.Write "document.write ('</form>');"&chr(10)
f1.Write "document.write ('</table>');"&chr(10)
End if
f1.close
file=Server.MapPath("../js/friend.js")
Set f1 = fso.CreateTextFile(file, True)
f1.Write "document.write ('<table border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" width=""90%"">');"&Chr(10)
f1.Write "document.write ('<tr>');"&Chr(10)
f1.Write "document.write ('<td align=""center""><marquee style=""word-break:break-all;FONT-SIZE: 9pt; LEFT: 2px; MARGIN-LEFT: 2px; WIDTH: 100%; TOP: 2px; HEIGHT: 100px; TEXT-ALIGN: center"" onMouseOver=this.stop() onMouseOut=this.start() scrollamount=1 scrolldelay=50 direction=up behavior=loop>');"&Chr(10)
SQL="Select Top 8 LinkURL,LinkImgPath,LinkName,LinkInfo From [NB_FriendLink] Where ColumnId=0 And State=-1 And Style=1 Order By OrderNum Desc"
Set Rs=Conn.Execute(SQL)
If Not rs.EOF And Not rs.BOF Then
List=rs.getrows()
For i=0 To UBound(List,2)
f1.Write "document.write ('<a href="""&List(0,i)&""" ><img src="""&List(1,i)&""" border=0 align=""absmiddle"" width=""88"" height=""31""><br>"&List(2,i)&"</a><br>');"&Chr(10)
Next
End If
f1.Write "document.write ('</marquee></td>');"&Chr(10)
f1.Write "document.write ('</tr>');"&Chr(10)
f1.Write "document.write ('<tr><td align=""center"" height=""5""></td>');"&Chr(10)
f1.Write "document.write ('</tr>');"&Chr(10)
f1.Write "document.write ('<tr><td align=""center"">');"&Chr(10)
f1.Write "document.write ('<select name=""textfriend"" onChange=""if(this.selectedIndex) window.open(this.options[this.selectedIndex].value);"">');"&Chr(10)
f1.Write "document.write ('<option value="""">--文字连接站点--</option>');"&Chr(10)
SQL="Select Top 10 LinkURL,LinkName From [NB_FriendLink] Where ColumnId=0 And State=-1 And Style=0 Order By OrderNum Desc"
Set Rs=Conn.Execute(SQL)
If Not rs.EOF And Not rs.BOF Then
List=rs.getrows()
For i=0 To UBound(List,2)
f1.Write "document.write ('<option value="""&List(0,i)&""">"&List(1,i)&"</option>');"&Chr(10)
Next
End If
f1.Write "document.write ('</select></td>');"&Chr(10)
f1.Write "document.write ('</tr>');"&Chr(10)
f1.Write "document.write ('<tr><td align=""center"" height=""5""></td>');"&Chr(10)
f1.Write "document.write ('</tr>');"&Chr(10)
f1.Write "document.write ('<tr><td align=""center"" height=""25""><a href=""#"" onclick=""javascript:window.open(\'ApplicationLink.asp\',\'\',\'height=320,width=550\')"">申请连接</a> <a href=""MoreLink.asp"" target=""_blank"">更多连接</a></td>');"&Chr(10)
f1.Write "document.write ('</tr>');"&Chr(10)
f1.Write "document.write ('</table>');"&Chr(10)
f1.close
ErrMsg="JS文件生成成功!"
Call Error(0)
Else
ErrMsg="对不起,服务器不支持FSO组件,JS未能生成!"
Call Error(1)
End If
End Function
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function
Function GetSiteSetting()
'****---------系统统计----------
Dim Ds
SQL="select TOP 1 info from [NB_System]"
Set Rs=Conn.Execute(SQL)
If Not rs.eof And Not rs.bof Then Ds=Split(rs(0),",")
GetSiteSetting=Ds
End Function
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?