📄 xmlcreatepage.asp
字号:
output1=output1+"<td valign=""top"" width=""50%""><div align=""center""> <table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""2"" > <tr> <td class=""shadow-main"" colspan=""2"" class=""propic1"" ><table width=""100%"" class=""shadow-border"" onmouseover=""this.style.backgroundColor='#E5FFFF';"" onmouseout="" this.style.backgroundColor=''""><tr><td><div align=""center"" class=""propic1""> <a href=""http:"
text4=root1+"/"
text4=replace(text4,"/","_")
text4=replace(text4,"_","/",1,3)
'dir1="www.samluo.com/light"
text4=replace(text4,"www.samluo.com",dir1)
output1=output1+text4+name1+".htm""> <img src="""
output1=output1+pic1
output1=output1+""" alt="""+tit1+" Lighting pictures of " +parenttil1+ " "" height=150 WIDTH=150 border=""0"" align=""LEFT"" > </a> </div>" & des1 & "</td></tr><tr><td ALIGN=""RIGHT""><b>>>Show samples </b></td></tr></table> </td> </tr> <tr> <td colspan=""2"" align=""center"" style=""word-wrap:break-word;""><b>"
output1=output1+UCase(tit1)
output1=output1+"</b></td> </tr> <tr height=""24""> <td align=""center""> </td> </tr> </table> </div></td>"
number1=number1+1
if(number1 mod 2=0) then
output1=output1+"</tr>"
end if
next
if(number1 mod 2=1) then
output1=output1+"<td valign=""top""><TABLE cellSpacing=2 cellPadding=0 width=""100%"" border=0 style=""visibility:hidden""><TR><TD class=shadow-main colSpan=2><TABLE class=shadow-border><TR><TD><DIV class=propic1 align=center><IMG height=150 src="" "" width=150 align=left border=0> </DIV>lights</TD></TR><TR><TD align=right><B>>>Show samples </B></TD></TR></TABLE></TD></TR><TR><TD align=middle colSpan=2><B>lights</B></TD></TR><TR height=24><TD align=middle> </TD></TR></TABLE></td></tr>"
end if
output1=output1+"</table>"
'response.write output1
'response.write "<br>"
'response.write output3
dirlist1=replace(dirlist,">" & count3 & "<", "><strong>[" & count3 & "]</strong><" )
filecontents="<HTML><HEAD><TITLE>"+parenttil1+htmlpart1+output3+htmlpart2+output1+htmlpart30+dirlist1+htmlpart31+"<strong>"+parenttil1+"</strong> :<p>"+parentdes1+htmlpart4
savefile1 file1,filecontents
'aaa.value=aaa.value & "<br>" & output1 & "<br>"
for each element in objnodes
root2=root1 & "/" & element.nodename
createpage1(root2)
next
else
'col1=3 子结点为图片
set objnodes=objNode1.ChildNodes
text4=""
count1=objnodes.length
text2=root1
p7= Instr(3,text2,"/")
if p7 > 3 then
text4=text2
p6=Len(text4)
text4=Mid(text4,p7+1,p6-p7)
text4=replace(text4,"/","_")
file1=text4 & ".htm"
else
file1="light.htm"
end if
dirlist=""
if count1 > 9 then
count2=count1
count3=1
filename1=file1
do while count2 > 0
dirlist=dirlist+"<a href=""./"+filename1+""">" & count3 & "</a> "
count3=count3+1
filename1=replace(filename1,".htm","1.htm")
count2=count2-9
loop
response.write dirlist
end if
output3="Present Category: >> "
p6= Instr(3,root1,"/")
Do While p6 > 3
text2=Mid(root1,1,p6-1)
Set objNode3 = objDom.documentElement.SelectSingleNode(text2)
text3=objNode3.GetAttributeNode("tl").nodevalue
'response.write text3 & " / "
p7= Instr(3,text2,"/")
if p7 > 3 then
text4=text2
text4=replace(text4,"/","_")
text4=replace(text4,"_","/",1,3)
text4=replace(text4,"www.samluo.com",dir1)
'alert "http:" & text4 & ".htm"
output3=output3+"<a href=""http:" + text4 + ".htm""><b>" +Ucase(text3)+"</b></a> > "
else
'alert text2 & "/light.htm" dir1="www.samluo.com/light"
output3=output3+"<a href=""http://" + dir1 + "/light.htm""><b>" +Ucase(text3)+"</b></a> > "
end if
'alert output3
p6= Instr(p6+1,root1,"/")
loop
output3=output3+"<b>" + Ucase(parenttil1) +"</b>"
count3=1
for each element in objnodes
'response.write element.nodename & "字节点名<br>"
'response.write element.text & "字节点值<br>"
name1=element.nodename
'nodeattr=element.GetAttributeNode("id").nodevalue
'id属性名
id1=element.GetAttributeNode("id").nodevalue
'id1属性值
'pt属性名
pic1=element.GetAttributeNode("pt").nodevalue
pic1="."+pic1
'\generallighting\ceiling\general\gz115.jpg属性值
'tl属性名
tit1=element.GetAttributeNode("tl").nodevalue
p5=Len(tit1)-4
tit1=Mid(tit1,1,p5)
'alert(tit1)
'generallighting属性值
'ds属性名
des1=element.GetAttributeNode("ds").nodevalue
des1=replace(des1,"*","<br>")
'generallighting属性值
if (number1 = 9) then
output1=output1+"</table>"
dirlist1=replace(dirlist,">" & count3 & "<", "><strong>[" & count3 & "]</strong><" )
filecontents="<HTML><HEAD><TITLE>"+parenttil1+htmlpart1+output3+htmlpart2+output1+htmlpart30+dirlist1+htmlpart31+"<strong>"+parenttil1+"</strong> :<p>"+parentdes1+htmlpart4
savefile1 file1,filecontents
count3=count3+1
file1=replace(file1,".htm","1.htm")
number1 = 0
number2=number2+1
output1=output11
end if
if(number1 mod 3=0) then
output1=output1+"<tr>"
end if
output1=output1+"<td valign=""top""><div align=""center""> <table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""3""> <tr> <td onmouseover=""this.style.backgroundColor='#E5FFFF'; "" onmouseout=""this.style.backgroundColor=''"" class=""shadow-border"" colspan=""2"" class=""propic1""> <div align=""center"" class=""propic1""> <a href=""http:"
text4=root1
text4=replace(text4,"/","_")
text4=replace(text4,"_","/",1,3)
text4=replace(text4,"www.samluo.com",dir1)
output1=output1+text4+"_"+tit1+".htm""> <img src="""
output1=output1+pic1
output1=output1+""" alt="""+"Model "+tit1+" of "+parenttil1+""" width=150 height=150 border=""0"" > </a> </div> </td> </tr> <tr> <td align=""center"" class=""prosn2"" style=""word-wrap:break-word;"">"
output1=output1+tit1
output1=output1+"</td> </tr> <tr height=""24""> <td align=""center""> </td> </tr> </table> </div></td>"
number1=number1+1
if(number1 mod 3=0) then
output1=output1+"</tr>"
end if
next
if(number1 mod 3=2) then
output1=output1+"<td valign=""top""><table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""3"" style=""visibility:hidden""> <tr> <td colspan=""2"" class=""propic1""> <div align=""center"" class=""propic1""> <img src="" "" width=150 height=150 border=""0"" > </div> </td> </tr> <tr> <td align=""center"" class=""prosn2"" >picture</td> </tr> <tr height=""24""> <td align=""center""> </td> </tr> </table></td></tr>"
end if
if(number1 mod 3=1) then
output1=output1+"<td valign=""top""><table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""3"" style=""visibility:hidden""> <tr> <td colspan=""2"" class=""propic1""> <div align=""center"" class=""propic1""> <img src="" "" width=150 height=150 border=""0"" > </div> </td> </tr> <tr> <td align=""center"" class=""prosn2"" >picture</td> </tr> <tr height=""24""> <td align=""center""> </td> </tr> </table></td><td valign=""top""><table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""3"" style=""visibility:hidden""> <tr> <td colspan=""2"" class=""propic1""> <div align=""center"" class=""propic1""> <img src="" "" width=150 height=150 border=""0"" > </div> </td> </tr> <tr> <td align=""center"" class=""prosn2"" >picture</td> </tr> <tr height=""24""> <td align=""center""> </td> </tr> </table></td></tr>"
end if
output1=output1+"</table>"
'response.write output1
'response.write "<br>"
'response.write "<br>"
'response.write output3
dirlist1=replace(dirlist,">" & count3 & "<", "><strong>[" & count3 & "]</strong><" )
filecontents="<HTML><HEAD><TITLE>"+parenttil1+htmlpart1+output3+htmlpart2+output1+htmlpart30+dirlist1+htmlpart31+"<strong>"+parenttil1+"</strong> :<p>"+parentdes1+htmlpart4
savefile1 file1,filecontents
'aaa.value=aaa.value & output1
for each element in objnodes
root2=root1 & "/" & element.nodename
createpage1(root2)
next
'if(number1/9<1.1){changetable(output1);changepg("");}
'else{showpage1(1)}}
end if
else
'createpage2 无子结点
'response.write element.nodename & "字节点名<br>"
'response.write element.text & "字节点值<br>"
name1=objNode1.nodename
'nodeattr=element.GetAttributeNode("id").nodevalue
'id属性名
id1=objNode1.GetAttributeNode("id").nodevalue
'id1属性值
'pt属性名
pic1=objNode1.GetAttributeNode("pt").nodevalue
pic1="."+pic1
'\generallighting\ceiling\general\gz115.jpg属性值
'tl属性名
tit1=objNode1.GetAttributeNode("tl").nodevalue
p5=Len(tit1)-4
tit1=Mid(tit1,1,p5)
'generallighting属性值
'ds属性名
des1=objNode1.GetAttributeNode("ds").nodevalue
des1=replace(des1,"*","<br>")
text2=des1
p7= Instr(1,text2,".")
if p7 > 1 then
des1=" "
end if
'generallighting属性值
parenttil1=objNode1.parentnode.GetAttributeNode("tl").nodevalue
parentdes1=objNode1.parentnode.GetAttributeNode("ds").nodevalue
parentdes1=replace(parentdes1,"*","<br>")
'response.write parentdes1
output3="Present Category: >> "
p6= Instr(3,root1,"/")
Do While p6 > 3
text2=Mid(root1,1,p6-1)
Set objNode3 = objDom.documentElement.SelectSingleNode(text2)
text3=objNode3.GetAttributeNode("tl").nodevalue
'response.write text3 & " / "
p7= Instr(3,text2,"/")
if p7 > 3 then
text4=text2
text4=replace(text4,"/","_")
text4=replace(text4,"_","/",1,3)
text4=replace(text4,"www.samluo.com",dir1)
'alert "http:" & text4 & ".htm"
output3=output3+"<a href=""http:" + text4 + ".htm""><b>" +Ucase(text3)+"</b></a> > "
else
'alert text2 & "/light.htm"
output3=output3+"<a href=""http://" + dir1 + "/light.htm""><b>" +Ucase(text3)+"</b></a> > "
end if
'alert output3
p6= Instr(p6+1,root1,"/")
loop
output3=output3+"<b>" + Ucase(parenttil1) +"</b>"
output1="<html><head><title>"
output1=output1+tit1+" of "+parenttil1
output1=output1+"</title><LINK href=""/style.css"" type=text/css rel=stylesheet> <LINK href=""/style3.css"" type=text/css rel=stylesheet></head><body><table width=""400"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0""><tr><td>"
output1=output1+output3
output1=output1+"</td></tr><tr><td> </td></tr><tr><td><table width=""94%"" border=""0"" cellspacing=""0"" cellpadding=""0""><tr><td><div align=""center""><img src="""
output1=output1+pic1
output1=output1+""" alt=""Model-"
output1=output1+tit1+"-of-"+parenttil1
output1=output1+""" border=""0"" /><table width=""360"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0""><tr><td width=""30%"">Light Model:</td><td width=""70%"">"
output1=output1+tit1
output1=output1+"</td></tr><tr><td>Category:</td><td>"
output1=output1+parenttil1
output1=output1+"</td></tr><tr><td>Description:</td><td> </td></tr><tr><td colspan=2><p> "
output1=output1+des1+"<br>"+parentdes1
output1=output1+"</p></td></tr></table></div></td></tr></table></td></tr></table><p> </p><table width=""100"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0""><tr><td><div align=""center""><a href=""javascript:window.close()"">[Close]</a></div></td></tr></table></body></html>"
text2=root1
p7= Instr(3,text2,"/")
text4=text2
p6=Len(text4)
text4=Mid(text4,p7+1,p6-p7-4)
text4=replace(text4,"/","_")
file1=text4 + ".htm"
filecontents=output1
savefile1 file1,filecontents
end if
end if
end function
'objDom.loadxml("<www.samluo.com id="" "" pt="" "" tl=""collection"" ds=""collection""></www.samluo.com>" )
'createxml1()
'objDom.save(server.mappath("datas2.xml"))
objDom.load(server.mappath("xmldata.xml"))
'alert objDom.xml
createpage1("//www.samluo.com")
'response.write "ok"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -