Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--#include file="website.asp"-->
- <%
- Dim Content,Page,i,Query_String,Http_Referer,Word,Action,ClassID,ID,IP,ShowUrl,arrShowLine(10)
- Dim m_Config,m_WebSet,m_MSvr,m_Word,m_Count,m_OnLine,m_Temp,m_Temp2,TempSession,webanme,webkey,rsbigclassname
- ShowUrl="Show.asp"
- Http_Referer = Request.ServerVariables("HTTP_REFERER")
- IP = Request.ServerVariables("REMOTE_ADDR")
- Action = Trim(Request("Action"))
- ClassID= Trim(Request("ClassID"))
- keyword=Trim(request("keyword"))
- rsbigclassname=Trim(request("BigClassName"))
- Word = Trim(Request("Word"))
- ID = Request("ID")
- If IsNumeric(ID) Then
- ID = Cint(ID)
- Else
- Response.Write("<script>alert(""¼Ç¼±àºÅ±ØÐëÊÇÕûÊý"");history.back();</script>")
- Response.End
- End If
- ClassID = Request("ClassID")
- If IsNumeric(ClassID) Then
- ClassID = Cint(ClassID)
- Else
- ClassID = 0
- End If
- Page = Request.QueryString("Page")
- If IsNumeric(Page) Then
- Page = Cint(Page)
- If Page<1 Then Page=1
- Else
- Page=1
- End If
- ConnectionDatabase()
- Sql="Select * From Config"
- Rs.Open Sql,Conn,1,2
- If Not Rs.Eof Then
- m_OnLine = Split(Rs("OnLine"),"|")
- If IP<>m_OnLine(0) Or DateDiff("s",m_OnLine(1),Now())>1200 Then
- Rs("Counts")=Rs("Counts")+1
- Rs("OnLine")=IP &"|"& Now()
- End If
- Rs.Update
- m_Config=Split(Rs("Config"),"|")
- m_WebSet=Split(Rs("WebSet"),"|")
- m_MSvr=Split(Rs("MailSvr"),"|")
- m_Word=Rs("Word")
- m_Count=Rs("Counts")
- webanme=Rs("webanme")
- webkey=Rs("webkey")
- webdec=Rs("webdec")
- webbaidu=Rs("webbaidu")
- webgoogle=Rs("webgoogle")
- webbook=Rs("webbook")
- webseo=Rs("webseo")
- webdomain=Rs("webdomain")
- webhost=Rs("webhost")
- webbottom=Rs("webbottom")
- webmail=Rs("webmail")
- webwh=Rs("webwh")
- website=Rs("website")
- If m_Config(2)="" Then
- m_Config(2)=m_Config(0)
- End If
- If m_WebSet(1)="0" Then
- Response.Write(m_WebSet(2))
- Response.End
- End If
- Else
- Response.Redirect "Admin/"
- End If
- Rs.Close
- Select Case Action
- Case "SendGuest"
- Call SendGuest()
- End Select
- Sub ShowSmallClass_Tree()
- %>
- <SCRIPT language=javascript>
- function opencat(cat,img){
- if(cat.style.display=="none"){
- cat.style.display="";
- img.src="images/class2.gif";
- } else {
- cat.style.display="none";
- img.src="images/class1.gif";
- }
- }
- </Script>
- <TABLE cellSpacing=0 cellPadding=0 width="94%" border=0 align=center>
- <%
- dim i,Rst
- set rsbig = server.CreateObject ("adodb.recordset")
- sql="Select * From Class Where Layout='Product' and ParentID=0 order by RootID,OrderID"
- rsbig.open sql,conn,1,1
- if rsbig.eof and rsbig.bof then
- Response.Write "À¸Ä¿ÕýÔÚ½¨ÉèÖС¡"
- else
- i=1
- do while not rsbig.eof
- rsbigclass=cInt(rsbig("ClassID"))
- %>
- <TR>
- <TD style="PADDING-LEFT: 0px" language=javascript onmouseup="opencat(cat10<%=i%>000, img10<%=i%>000);" id=item$pval[catID]) style="CURSOR: hand" width=14% height=30 align=center><IMG id=img10<%=i%>000 src="images/class1.gif" width=16 height=16></TD>
- <TD width="86%"><P align=left style="margin-top:3px"><a href="product.asp?ClassID=<%=rsbig("ClassID")%>&BigClassName=<%=rsbig("ClassName")%>" title="<%=rsbig("ClassName")%>"><%=rsbig("ClassName")%></a></P></TD>
- </TR>
- <TR>
- <TD background=images/left-line.jpg bgColor=#9A9A9A colSpan=2 height=1></TD></TR>
- <TR>
- <TD colspan="2" id=cat10<%=i%>000 <%if rsbig("ClassName")=rsbigclassname then
- response.write "style='DISPLAY'"
- else
- response.write "style='DISPLAY: none'"
- end if%>>
- <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <%
- Set Rst=Conn.Execute("Select * From Class Where Layout='Product' and ParentID="& rsbig("ClassID") &" order by RootID,OrderID")
- Do While Not Rst.Eof
- %>
- <TR>
- <TD width="14%" align=center>
- <IMG height=16 src="images/tree_line1.gif" width=17 align=absMiddle border=0></td>
- <TD width="86%" align=left><IMG height=9 src="images/+.gif" width=9 align=absMiddle border=0> <a href="product.asp?ClassID=<%=Rst("ClassID")%>&BigClassName=<%=rsbig("ClassName")%>"><%=Rst("ClassName")%></a></TD>
- </TR><%
- Rst.MoveNext
- Loop
- Rst.Close
- Set Rst=Nothing
- %>
- </table></TD></TR>
- <%
- rsbig.movenext
- i=i+1
- loop
- rsbig.close
- set rsbig=nothing
- end if
- %>
- <tr>
- <td height=5 colspan=2></td></tr>
- </TABLE>
- <%
- end Sub
- sub ShowProduct(TitleLen)
- if TitleLen<0 or TitleLen>200 then
- TitleLen=50
- end if
- if currentpage<1 then
- currentpage=1
- end if
- if (currentpage-1)*MaxPerPage>totalput then
- if (totalPut mod MaxPerPage)=0 then
- currentpage= totalPut \ MaxPerPage
- else
- currentpage= totalPut \ MaxPerPage + 1
- end if
- end if
- if currentPage=1 then
- sqlProduct="select top " & MaxPerPage
- else
- sqlProduct="select "
- end if
- sqlProduct=sqlProduct & " * from Product"
- if classid<>"" then
- sqlProduct=sqlProduct & " where classid=" & classid & " "
- end if
- sqlProduct=sqlProduct & " order by ID desc"
- Set rsProduct= Server.CreateObject("ADODB.Recordset")
- rsProduct.open sqlProduct,conn,1,1
- if rsProduct.bof and rsProduct.eof then
- response.Write("<br><li>ûÓÐÈκβúÆ·</li>")
- else
- if currentPage=1 then
- call ProductContent(TitleLen)
- else
- if (currentPage-1)*MaxPerPage<totalPut then
- rsProduct.move (currentPage-1)*MaxPerPage
- dim bookmark
- bookmark=rsProduct.bookmark
- call ProductContent(TitleLen)
- else
- currentPage=1
- call ProductContent(TitleLen)
- end if
- end if
- end if
- rsProduct.close
- set rsProduct=nothing
- end sub
- sub ProductContent(intTitleLen)
- dim i,strTemp,ViewList
- i=1
- ViewList=3
- strTemp=""
- strtemp= strtemp & "<p>"
- strTemp= strTemp & "<TABLE align=center BORDER=0 CELLSPACING=1 CELLPADDING=0>"
- strTemp= strTemp & "<tr>"
- do while not rsProduct.eof
- strTemp= strTemp & "<td width=170>"
- strTemp= strTemp & "<table align=center width=170 border=0 cellspacing=2 cellpadding=0>"
- strTemp= strTemp & "<tr>"
- strTemp= strTemp & "<td colspan=2>"
- strTemp= strTemp &"<TABLE border=0 cellPadding=0 cellSpacing=5>"
- strTemp= strTemp &"<TR>"
- strTemp= strTemp &"<TD align=middle width=135> <TABLE align=center border=0 cellPadding=0 cellSpacing=0>"
- strTemp= strTemp &"<TR>"
- strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0ltop.gif' width=10></TD>"
- strTemp= strTemp &"<TD background='Img/bg_01.gif' height=10></TD>"
- strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0rtop.gif' width=10></TD>"
- strTemp= strTemp &"</TR>"
- strTemp= strTemp &"<TR> "
- strTemp= strTemp &"<TD background='Img/bg_03.gif' width=10>¡¡</TD>"
- strTemp= strTemp & "<td>"&"<div align=center>"
- strTemp= strTemp & "<a href=ProductShow.asp?ID=" & rsProduct("ArticleID") & ">" & "<img src=" & rsProduct("pic") & " width='190' height='160' border='0'>" & "</a><br></div>"
- strTemp= strTemp & "</td>"
- strTemp= strTemp &"<TD background='Img/bg_04.gif' width=10> </TD>"
- strTemp= strTemp &"</TR>"
- strTemp= strTemp &"<TR>"
- strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0lbottom.gif' width=10></TD>"
- strTemp= strTemp &"<TD background=Img/bg_02.gif height=10></TD>"
- strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0rbottom.gif' width=10></TD>"
- strTemp= strTemp &"</TR>"
- strTemp= strTemp &"</TABLE></TD>"
- strTemp= strTemp &"</TR>"
- strTemp= strTemp &"</TABLE>"
- strTemp= strTemp & "</a></div></td>"
- strTemp= strTemp & "</tr><tr>"
- strTemp= strTemp & "<td align=right >"
- strTemp= strTemp & "Ãû³Æ:</td>"
- strTemp= strTemp & "<td width=80% >"
- strTemp= strTemp & "<a href=ProductShow.asp?ID=" & rsProduct("ArticleID") & ">" & rsProduct("Title") & ""
- strTemp= strTemp & "</a></td>"
- strTemp= strTemp & "</tr>"
- strTemp= strTemp & "<tr>"
- strTemp= strTemp & "<td colspan=2>"
- strTemp= strTemp & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
- strTemp= strTemp & "<tr>"
- strTemp= strTemp & "<td>"
- strTemp= strTemp & "<div align=center></div></td>"
- strTemp= strTemp & "<tr>"
- strTemp= strTemp & "<td width=50% height=12>"
- strTemp= strTemp & "<div align=center></div></td>"
- strTemp= strTemp & "<td width=50% height=12>"
- strTemp= strTemp & "<div align=center><input name='Product_Id' type='checkbox' id='Product_Id' value="&cstr(rsProduct("Product_Id"))&"> ѡȡ"
- strTemp= strTemp & "</div></td>"
- strTemp= strTemp & "</tr>"
- strTemp= strTemp & "</tr>"
- strTemp= strTemp & "</table>"
- strTemp= strTemp & "</td>"
- strTemp= strTemp & "</tr><tr>"
- strTemp= strTemp & "<td height=1 colspan=3 bgcolor=#CCCCCC></td>"
- strTemp= strTemp & "</tr>"
- strTemp= strTemp & "</table>"
- if i mod ViewList =0 then
- strTemp= strTemp & "</td></tr>"
- end if
- rsProduct.MoveNext
- i=i+1
- if i>MaxPerPage then exit do
- loop
- strtemp= strtemp & "</tr></table>"
- response.write strTemp
- end sub
- Sub Intro()
- Sql="Select Intro From Config"
- Rs.Open Sql,Conn,1,1
- Content = ""
- ' Content = Content & "<table width=""98%"" align=""center"" border=""0"" cellpadding=""0"" cellspacing=""5"">"
- ' Content = Content & "<tr><td height=""5""></td></tr><tr><td style=""padding:5px;line-height:200%"">"
- Content = Content & Rs("Intro")
- ' Content = Content & "</td></tr><tr><td height=""5""></td></tr>"
- ' Content = Content & "</table>"
- Rs.Close
- Response.Write(Content)
- End Sub
- Sub News(ClassID)
- If Word<>"" Then
- Query_String = "Word="& Word &"&"
- ElseIf ClassID>0 Then
- Query_String = "ClassID="& ClassID &"&"
- End If
- Content = ""
- Content = Content & "<table width=""90%"" align=""center"" border=""0"" cellpadding=""5"" cellspacing=""0"" style=""border-collapse:collapse"">"
- ' Content = Content & "<tr bgcolor=""#CCCCCC""><td style=""border-bottom:1px #666666 solid""><strong>"&m_Temp&"</strong></td><td width=""120"" align=""center"" style=""border-bottom:1px #666666 solid""><strong>ʱ¼ä</strong></td></tr>"
- Sql="Select * From News"
- If Word<>"" Then
- Sql = Sql & " Where Title Like '%"& Word &"%'"
- ElseIf Cint(ClassID)>0 Then
- Dim RsTemp,ChildID
- Set RsTemp=Conn.Execute("Select ParentPath From Class Where ClassID="&ClassID)
- If Not RsTemp.Eof Then
- Dim ParentPath
- ParentPath = RsTemp("ParentPath")
- Else
- Content = Content & "<tr><td align=""center"">ÇëÑ¡ÔñÒª²éѯµÄ·ÖÀà</td></tr>"
- End If
- Set RsTemp=Conn.Execute("Select ClassID From Class Where ParentID=" & ClassID & " Or ParentPath Like '"& ParentPath &","& ClassID &"%'")
- If Not RsTemp.Eof Then
- Do While Not RsTemp.Eof
- If ChildID="" Then
- ChildID=RsTemp(0)
- Else
- ChildID=ChildID & "," & RsTemp(0)
- End If
- RsTemp.MoveNext
- Loop
- Sql = Sql & " Where ClassID In ("&ClassID &","& ChildID &")"
- Else
- Sql = Sql & " Where ClassID="& ClassID
- End If
- RsTemp.Close
- Set RsTemp=Nothing
- End If
- Sql = Sql & " Order By Topis Desc,DateAndTime Desc"
- Rs.Open Sql,Conn,1,1
- If Rs.Eof Then
- Content = Content & "<tr><td align=""center"">ûÓÐÈκμǼ</td></tr>"
- Else
- i=0
- Rs.PageSize = Cint(m_WebSet(4))
- Rs.AbsolutePage = Page
- Do While Not Rs.Eof And i < Rs.PageSize
- Content = Content & "<tr><td><img src=""Images/"
- If Rs("Topis")=1 Then
- Content = Content & "m_topis"
- Else
- Content = Content & "m_redis"
- End If
- Content = Content & ".gif"" width=""23"" height=""7"" align=""absmiddle"">"
- Content = Content & "<a href="""&ShowUrl&"?Action=News&ID="&Rs("ID")&""" style="""
- If Rs("TitB")=1 Then
- Content = Content & "font-weight:bold;"
- End If
- If Rs("Red")=1 Then
- Content = Content & "color:#FF0000;"
- End If
- Content = Content & """>"& Rs("Title") & "</a>"
- Content = Content & " (<font color=""#CC3300"">"& rs("hits") &"</font>)"
- If DateDiff("d",Rs("DateAndTime"),Now())<7 Then
- Content = Content & "<img src=""Images/m_newis.gif"">"
- End If
- If Rs("Hits")>=Cint(m_WebSet(3)) Then
- Content = Content & "<img src=""Images/m_hotis.gif"">"
- End If
- Content = Content & "</td><td align=""center"">"
- Content = Content & "<font color=""#666666"">"& FormatDateTime(Rs("DateAndTime"),2) &"</font></td></tr>"
- i=i+1
- Rs.Movenext
- Loop
- ' If Rs.RecordCount>20 Then
- Content = Content & "<tr><td colspan=""2"" align=""center"">"
- ShowPage(1)
- Content = Content & "</td></tr>"
- ' End If
- End If
- Rs.Close
- Content = Content & "</table>"
- Response.Write(Content)
- End Sub
- Sub Faq(ClassID)
- If Word<>"" Then
- Query_String = "Word="& Word &"&"
- ElseIf ClassID>0 Then
- Query_String = "ClassID="& ClassID &"&"
- End If
- Content = ""
- Content = Content & "<table width=""90%"" align=""center"" border=""0"" cellpadding=""5"" cellspacing=""0"" style=""border-collapse:collapse"">"
- ' Content = Content & "<tr bgcolor=""#CCCCCC""><td style=""border-bottom:1px #666666 solid""><strong>"&m_Temp&"</strong></td><td width=""120"" align=""center"" style=""border-bottom:1px #666666 solid""><strong>ʱ¼ä</strong></td></tr>"
- Sql="Select * From Faq"
- If Word<>"" Then
- Sql = Sql & " Where Title Like '%"& Word &"%'"
- ElseIf Cint(ClassID)>0 Then
- Dim RsTemp,ChildID
- Set RsTemp=Conn.Execute("Select ParentPath From Class Where ClassID="&ClassID)
- If Not RsTemp.Eof Then
- Dim ParentPath
- ParentPath = RsTemp("ParentPath")
- Else
- Content = Content & "<tr><td align=""center"">ÇëÑ¡ÔñÒª²éѯµÄ·ÖÀà</td></tr>"
- End If
- Set RsTemp=Conn.Execute("Select ClassID From Class Where ParentID=" & ClassID & " Or ParentPath Like '"& ParentPath &","& ClassID &"%'")
- If Not RsTemp.Eof Then
- Do While Not RsTemp.Eof
- If ChildID="" Then
- ChildID=RsTemp(0)
- Else
- ChildID=ChildID & "," & RsTemp(0)
- End If
- RsTemp.MoveNext
- Loop
- Sql = Sql & " Where ClassID In ("&ClassID &","& ChildID &")"
- Else
- Sql = Sql & " Where ClassID="& ClassID
- End If
- RsTemp.Close
- Set RsTemp=Nothing
- End If
- Sql = Sql & " Order By Topis Desc,DateAndTime Desc"
- Rs.Open Sql,Conn,1,1
- If Rs.Eof Then
- Content = Content & "<tr><td align=""center"">ûÓÐÈκμǼ</td></tr>"
- Else
- i=0
- Rs.PageSize = Cint(m_WebSet(4))
- Rs.AbsolutePage = Page
- Do While Not Rs.Eof And i < Rs.PageSize
- Content = Content & "<tr><td><img src=""Images/"
- If Rs("Topis")=1 Then
- Content = Content & "m_topis"
- Else
- Content = Content & "m_redis"
- End If
- Content = Content & ".gif"" width=""23"" height=""7"" align=""absmiddle"">"
- Content = Content & "<a href="""&ShowUrl&"?Action=Faq&ID="&Rs("ID")&""" style="""
- If Rs("TitB")=1 Then
- Content = Content & "font-weight:bold;"
- End If
- If Rs("Red")=1 Then
- Content = Content & "color:#FF0000;"
- End If
- Content = Content & """>"& Rs("Title") & "</a>"
- Content = Content & " (<font color=""#CC3300"">"& rs("hits") &"</font>)"
- If DateDiff("d",Rs("DateAndTime"),Now())<7 Then
- Content = Content & "<img src=""Images/m_newis.gif"">"
- End If
- If Rs("Hits")>=Cint(m_WebSet(3)) Then
- Content = Content & "<img src=""Images/m_hotis.gif"">"
- End If
- Content = Content & "</td><td align=""center"">"
- Content = Content & "<font color=""#666666"">"& FormatDateTime(Rs("DateAndTime"),2) &"</font></td></tr>"
- i=i+1
- Rs.Movenext
- Loop
- ' If Rs.RecordCount>20 Then
- Content = Content & "<tr><td colspan=""2"" align=""center"">"
- ShowPage(1)
- Content = Content & "</td></tr>"
- ' End If
- End If
- Rs.Close
- Content = Content & "</table>"
- Response.Write(Content)
- End Sub
- Sub Product()
- If Word<>"" Then
- Query_String = "Word="& Word &"&"
- ElseIf ClassID>0 Then
- Query_String = "ClassID="& ClassID &"&"
- End If
- Content = ""
- Content = Content & "<script language=""javascript"">function Shop(id,title){var l,t;l=(screen.width-680)/2;t=(screen.Height-380)/2;ShopWin=window.open(""System.asp?Action=Shop&ID=""+id+""&Title=""+title,""Shop"",""width=680,height=380,left=""+l+"",top=""+t+"""");ShopWin.focus();}</script>" & vbCrlf
- Content = Content & "<table width=""98%"" align=""center"" border=""0"" cellpadding=""3"" cellspacing=""0"">"
- Content = Content & "<tr><td height=""5""></td></tr>"
- Sql="Select * From Product P,Class C Where"
- If Word<>"" Then
- Sql = Sql & " Where Title Like '%"& Word &"%'"
- ElseIf Cint(ClassID)>0 Then
- Dim RsTemp,ChildID
- Set RsTemp=Conn.Execute("Select ParentPath From Class Where ClassID="&ClassID)
- If Not RsTemp.Eof Then
- Dim ParentPath
- ParentPath = RsTemp("ParentPath")
- Else
- Content = Content & "<tr><td align=""center"">ÇëÑ¡ÔñÒª²éѯµÄ·ÖÀà</td></tr>"
- End If
- Set RsTemp=Conn.Execute("Select ClassID From Class Where ParentID=" & ClassID & " Or ParentPath Like '"& ParentPath &","& ClassID &"%'")
- If Not RsTemp.Eof Then
- Do While Not RsTemp.Eof
- If ChildID="" Then
- ChildID=RsTemp(0)
- Else
- ChildID=ChildID & "," & RsTemp(0)
- End If
- RsTemp.MoveNext
- Loop
- Sql = Sql & " P.ClassID In ("&ClassID &","& ChildID &") And"
- Else
- Sql = Sql & " P.ClassID="& ClassID &" And"
- End If
- RsTemp.Close
- Set RsTemp=Nothing
- End If
- Sql = Sql & " C.ClassID=P.ClassID Order By P.Topis Desc,P.DateAndTime Desc"
- Rs.Open Sql,Conn,1,1
- If Rs.Eof Then
- Content = Content & "<tr><td align=""center"">ûÓÐÈκμǼ</td><tr>"
- Else
- i=0
- Rs.PageSize = 5
- Rs.AbsolutePage = Page
- Do While Not Rs.Eof And i < Rs.PageSize
- Content = Content & "<tr>"
- Content = Content & "<td width=""30%"" align=""center""><table border=""0"" cellpadding=""3"" cellspacing=""2"" style=""border:4px #F2F2F2 solid""><tr><td align=""center"" style=""border:1px #CCCCCC solid""><a href="""&ShowUrl&"?Action=Product&ID="& Rs("ID") &""">"
- If Rs("Pic")="" Then
- Content = Content & "<img src=""Images/m_nopic.gif"" border=""0"">"
- Else
- Content = Content & "<img src="""& Rs("Pic") &""" width=""150"" height=""150"" border=""0"">"
- End If
- Content = Content & "</a></td></tr></table></td><td><table width=""100%"" border=""0"" cellpadding=""3"" cellspacing=""3"">"
- Content = Content & "<tr><td width=""15%""><strong>Ãû³Æ:</strong></td><td><a href="""&ShowUrl&"?Action=Product&ID="& Rs("ID") &""">"& Rs("Title") &"</a></td></tr>"
- Content = Content & "<tr><td><strong>·ÖÀà:</strong></td><td>"& Rs("ClassName") &"</td></tr>"
- Content = Content & "<tr><td valign=""top""><strong>ÃèÊö:</strong></td><td style=""line-height:180%"">"& Left(delHtml(Rs("Content")),160)&"...<div align=""right""><a href="""&ShowUrl&"?Action=Product&ID="& Rs("ID") &""" style=""color:#666666""><img src=""Images/more_01.gif"" width=""36"" height=""7"" border=""0""></a></div></td></tr>"
- ' Content = Content & "<tr><td>ÔÚÏß¶©¹º£º</td><td><a href=""javascript:Shop("& Rs("ID") &",'"& Rs("Title") &"')"">¹ºÂò</a></td></tr>"
- Content = Content & "</table></td></tr><tr><td colspan=""3""><hr size=""1""></td></tr>"
- i=i+1
- Rs.Movenext
- Loop
- End If
- Content = Content & "<tr><td height=""5""></td></tr>"
- Content = Content & "</table><center>"
- ShowPage(3)
- Response.Write(Content&"<br><br>")
- Rs.Close
- End Sub
- Sub ShowContent()
- Dim Title,Author,Url,Price,Pic,Picture,Pictures,Topis,Hits,Red,TitB,TempContent,DateAndTime
- If Action="" Or Not(Action="News" Or Action="Product" Or Action="Picture" Or Action="Faq") Then
- Response.Write("<script>alert(""ÇëÖ¸¶¨Òª²é¿´µÄÄÚÈÝ"");history.back();</script>")
- Response.End
- End If
- Sql="Select * From "& Action &" Where ID="& ID
- Rs.Open Sql,Conn,1,2
- If Rs.Eof Then
- Response.Write("<script>alert(""¼Ç¼²»´æÔÚ"");history.back();</script>")
- Response.End
- Else
- Rs("Hits")=Rs("Hits")+1
- Rs.Update
- ID=Rs("ID")
- ClassID=Rs("ClassID")
- Title=Rs("Title")
- If Action="News" Then
- Author=Rs("Author")
- Url=Rs("Url")
- Red=Rs("Red")
- TitB=Rs("TitB")
- ElseIf Action="Product" Then
- Price=Rs("Price")
- End If
- Pic=Rs("Pic")
- Picture=Rs("Picture")
- Topis=Rs("Topis")
- Hits=Rs("Hits")
- TempContent=Rs("Content")
- DateAndTime=Rs("DateAndTime")
- End If
- Rs.Close
- Content = "<table width=""92%"" align=""center"" border=""0"" cellpadding=""3"" cellspacing=""0"">"
- Content = Content & "<tr><td class=""content_t"""
- If Red=1 Then
- Content = Content & " style=""color:#FF0000;"""
- End If
- Content = Content & ">"& Title &"</td></tr>"
- Content = Content & "<tr><td align=""center"">¡¼ ËùÊô·ÖÀࣺ"& ShowClassName(ClassID) &" µã»÷´ÎÊý£º"& Hits &"´Î ¸üÐÂʱ¼ä£º"& DateAndTime &" ¡½<hr weight=""90%"" size=""1"">"
- If Action="Product" Then
- Content = Content & "<div align=""center""><img src="""&Pic&"""></div><br>"
- End IF
- Content = Content & "</td></tr><tr><td class=""content_c"">"& Replace(Replace(TempContent,Chr(10),"<br>"),Chr(13)," ")
- If Len(Picture)>1 And Action="Product" Then
- Content = Content & "<div><br><img src=""Images/arr.gif"" align=""absmiddle""> <a href="""&Picture&""" style=""font-weight:bold; color:#FF6633;"">˵Ã÷ÊéÏÂÔØ</a></div><br>"
- End IF
- ' Content = Content & "<br /><br />·ÅÈ빺ÎïÀº<br />"
- Content = Content & "</td></tr>"
- ' Content = Content & "<hr><span class=""content_c"">"& ShowPNRecord(ID,ClassID,Action) &"</span><br>"
- Content = Content & "<tr><td align=""right"">¡¼<a href=""javascript:window.print()"">´òÓ¡</a>¡½ ¡¼<a href=""javascript:history.back()"">·µ»Ø</a>¡½ </td></tr></table>"
- Response.Write(Content)
- End Sub
- Function ShowPNRecord(ID,ClassID,Action)
- ShowPNRecord = ""
- Sql="ID < "& ID &" Order By ID Desc"
- ShowPNRecord = ShowPNRecord & "<li>ÉÏÒ»Ìõ¼Ç¼£º"
- Sql="Select ID,Title From "& Action &" Where ClassID="& ClassID &" And "& Sql
- Rs.Open Sql,Conn,1,2
- If Rs.Eof Then
- ShowPNRecord = ShowPNRecord & "ûÓмǼ"
- Else
- ShowPNRecord = ShowPNRecord & "<a href=""?Action="& Action &"&ID="& Rs("ID") &""">" & Rs("Title") &"</a>"
- End If
- Rs.Close
- ShowPNRecord = ShowPNRecord & "</li>"
- Sql="ID > "& ID &" Order By ID Asc"
- ShowPNRecord = ShowPNRecord & "<li>ÏÂÒ»Ìõ¼Ç¼£º"
- Sql="Select ID,Title From "& Action &" Where ClassID="& ClassID &" And "& Sql
- Rs.Open Sql,Conn,1,2
- If Rs.Eof Then
- ShowPNRecord = ShowPNRecord & "ûÓмǼ"
- Else
- ShowPNRecord = ShowPNRecord & "<a href=""?Action="& Action &"&ID="& Rs("ID") &""">" & Rs("Title") &"</a>"
- End If
- Rs.Close
- ShowPNRecord = ShowPNRecord & "</li>"
- End Function
- Sub Guest()
- Content = ""
- Sql="Select * From Guest where Revert is not null Order By DateAndTime Desc"
- Rs.Open Sql,Conn,1,1
- If Rs.Eof Then
- Content = Content & "<div align=""center"">ûÓÐÈκμǼ</div>"
- Else
- i=1
- Rs.PageSize = Cint(m_WebSet(6))
- Rs.AbsolutePage = Page
- Do While Not Rs.Eof And i < Rs.PageSize+1
- Content = ""
- Content = Content & "<table border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""guest_t"">"
- Content = Content & "<tr><td class=""guest_s""> <strong>"& Rs("Title") &"</strong> ("& Rs("Sender") &")</td></tr>"
- Content = Content & "<tr><td class=""guest_c""><table width=""100%"" border=""0"" align=""center"" cellpadding=""3"" cellspacing=""0"">"
- Content = Content & "<tr><td width=""5""><img src=""Images/space.gif"" width=""5"" height=""5""></td><td colspan=""2"">ÁôÑÔÄÚÈÝ:<br><textarea rows=""3"" style=""width:100%"" readonly=""true"">"& Rs("Content") &"</textarea></td><td width=""5""><img src=""Images/space.gif"" width=""5"" height=""5""></td></tr>"
- If Rs("Revert")<>"" And Not IsNull(Rs("Revert")) Then
- Content = Content & "<tr><td width=""5""><img src=""Images/space.gif"" width=""5"" height=""5""></td><td colspan=""2"">»Ø¸´ÄÚÈÝ:<br><textarea rows=""2"" style=""width:100%"" readonly=""true"">"& Rs("Revert") &"</textarea></td><td width=""5""><img src=""Images/space.gif"" width=""5"" height=""5""></td></tr>"
- End If
- Content = Content & "<tr><td width=""5""><img src=""Images/space.gif"" width=""5"" height=""5""></td><td>ÁôÑÔʱ¼ä:"& Rs("DateAndTime") &"</td><td>IP:"& Rs("IP") &"</td><td width=""5""><img src=""Images/space.gif"" width=""5"" height=""5""></td></tr>"
- Content = Content & "</table></td></tr></table>"
- Response.Write(Content)
- i=i+1
- Rs.Movenext
- Loop
- Content = "<table border=""0"" align=""center"" cellpadding=""0"" cellspacing=""1"">"
- ShowPage(1)
- Content = Content & "</table>"
- Response.Write(Content)
- End If
- Rs.Close
- End Sub
- Sub GuestAdd()
- Randomize timer
- Session("m_Code") = Int(Rnd*8998)+1000
- Content = ""
- Content = Content & "<script language=""javascript"">"
- Content = Content & "function add_guest()"
- Content = Content & "{"
- Content = Content & " if (document.Add_G.Title.value=="""")"
- Content = Content & " {"
- Content = Content & " alert(""ÇëÊäÈëÖ÷ÌâÃû³Æ!"");"
- Content = Content & " document.Add_G.Title.focus();"
- Content = Content & " return false;"
- Content = Content & " }"
- Content = Content & " if (document.Add_G.Sender.value=="""")"
- Content = Content & " {"
- Content = Content & " alert(""ÇëÊäÈëÁªÏµÈËÐÕÃû!"");"
- Content = Content & " document.Add_G.Sender.focus();"
- Content = Content & " return false;"
- Content = Content & " }"
- Content = Content & " if (document.Add_G.photo.value=="""")"
- Content = Content & " {"
- Content = Content & " alert(""ÇëÊäÈëÄúµÄÁªÏµµç»°!"");"
- Content = Content & " document.Add_G.photo.focus();"
- Content = Content & " return false;"
- Content = Content & " }"
- Content = Content & " if (document.Add_G.Email.value=="""")"
- Content = Content & " {"
- Content = Content & " alert(""ÇëÊäÈëµç×ÓÓʼþµØÖ·!"");"
- Content = Content & " document.Add_G.Email.focus();"
- Content = Content & " return false;"
- Content = Content & " }"
- Content = Content & " if (document.Add_G.Content.value=="""")"
- Content = Content & " {"
- Content = Content & " alert(""ÇëÊäÈëÁôÑÔÄÚÈÝ!"");"
- Content = Content & " document.Add_G.Content.focus();"
- Content = Content & " return false;"
- Content = Content & " }"
- Content = Content & "}"
- Content = Content & "</script>"
- Content = Content & "<table width=""90%"" align=""center"" border=""0"" cellpadding=""0"" cellspacing=""5"">"
- Content = Content & "<form name=""Add_G"" method=""post"" action=""?Action=SendGuest"" onSubmit=""return add_guest();"">"
- Content = Content & "<tr><td height=""5"" colspan=""2""></td></tr>"
- Content = Content & "<tr><td width=""20%"" align=""right"">ÁôÑÔ±êÌ⣺</td><td> <input name=""Title"" type=""text"" id=""Title"" size=""38""><font color=""#FF0000""> *</font></td></tr>"
- Content = Content & "<tr><td align=""right"">ÁªÏµÈË£º</td><td> <input name=""Sender"" type=""text"" id=""Sender"" size=""38""><font color=""#FF0000""> *</font></td></tr>"
- Content = Content & "<tr><td align=""right"">ÁªÏµµç»°£º</td><td> <input name=""photo"" type=""text"" id=""photo"" size=""38""><font color=""#FF0000""> *</font></td></tr>"
- Content = Content & "<tr><td align=""right"">ÁªÏµµØÖ·£º</td><td> <input name=""address"" type=""text"" id=""address"" size=""38""></td></tr>"
- Content = Content & "<tr><td align=""right"">Email£º</td><td> <input name=""Email"" type=""text"" id=""Email"" size=""38""><font color=""#FF0000""> *</font></td></tr>"
- Content = Content & "<tr><td align=""right"">ÁôÑÔÄÚÈÝ£º</td><td> <textarea name=""Content"" rows=""5"" id=""Content"" style=""width:350px""></textarea><font color=""#FF0000""> *</font>(´ø*ºÅΪ±ØÌîÏî)</td></tr>"
- Content = Content & "<tr><td align=""right"">ÑéÖ¤Â룺</td><td> <input name=""Code"" type=""text"" id=""Code"" size=""4""> " & Session("m_Code") & "</td></tr>"
- Content = Content & "<tr><td> </td><td><input type=""submit"" value=""Ìá½»""></td></tr>"
- Content = Content & "<tr><td height=""5"" colspan=""2""></td></tr>"
- Content = Content & "</form>"
- Content = Content & "</table>"
- Response.Write(Content)
- End Sub
- function isEmail(pInString)
- lAt = False
- lDot = false
- for x = 2 to len(pInstring)-1
- if mid(pInString,x,1) = "@" then lAt = True
- if mid(pInString,x,1) = "." and lAt = True then lDot = True
- next
- if lAt = True and lDot = True then
- isEmail = True
- else
- isEmail = False
- end if
- end function
- Function ShowClassName(ClassID)
- If ClassID=0 Then
- ShowClassName = "ËùÓÐÄÚÈÝ"
- Else
- Dim RsTemp
- Set RsTemp=Conn.Execute("Select ClassID,ClassName From Class Where ClassID="&ClassID)
- If RsTemp.Eof Then
- ShowClassName = "ÎÞ´Ë·ÖÀà"
- Else
- ShowClassName = RsTemp("ClassName")
- End If
- RsTemp.Close
- Set RsTemp=Nothing
- End If
- End Function
- Function ShowClassTitle(ShowClassID,Method)
- Dim RsClass,RsShow,ParentPath
- Set RsClass=Conn.Execute("Select ClassID,ClassName,ParentPath,ParentID From Class Where ClassID="& ShowClassID)
- If Not RsClass.Eof Then
- If Method=0 Or ClassID=0 Then
- ParentPath = RsClass("ParentPath") &","& RsClass("ClassID")
- Else
- If ClassID=RsClass("ClassID") Then
- ParentPath = RsClass("ClassID")
- Else
- ParentPath = Replace(RsClass("ParentPath") &","& RsClass("ClassID"),","&ClassID&",","*")
- ' Response.Write(RsClass("ParentPath") &","& RsClass("ClassID") &" > "& ParentPath & " = ")
- ParentPath = Replace(ClassID & Mid(ParentPath,Instr(ParentPath,"*")),"*",",")
- End If
- End If
- ' Response.Write(ParentPath & " | ")
- Set RsShow=Conn.Execute("Select ClassID,ClassName From Class Where ClassID In ("&ParentPath&") Order By ClassID Desc")
- Do While Not RsShow.Eof
- If ShowClassTitle="" Then
- ' ShowClassTitle = "<a href=""?ClassID="& RsShow("ClassID") &""">" & RsShow("ClassName") & "</a>"
- ShowClassTitle = RsShow("ClassName")
- Else
- ' ShowClassTitle = "<a href=""?ClassID="& RsShow("ClassID") &""">" & RsShow("ClassName") & "</a>-" & ShowClassTitle
- ShowClassTitle = RsShow("ClassName") & "-" & ShowClassTitle
- End If
- RsShow.MoveNext
- Loop
- RsShow.Close
- Set RsShow=Nothing
- Else
- ShowClassTitle = "ËùÓÐÄÚÈÝ"
- End If
- RsClass.Close
- Set RsClass=Nothing
- End Function
- Sub ShowPage(Colspan)
- ' Content=""
- Content = Content & "<tr align=""center""><td colspan="""&Colspan&""">"
- Content = Content & "¹²ÓУº<font color='#ff0000'><strong>"&Rs.RecordCount&"</strong></font>Ìõ ÿҳÏÔʾ£º<strong>"&Rs.PageSize&"</strong>Ìõ "
- if Rs.PageCount=1 or Rs.PageCount=0 then
- Content = Content & "[Ê×Ò³] [ÉÏÒ»Ò³] [ÏÂÒ»Ò³] [βҳ]"
- else
- if Page=1 then
- Content = Content & "[Ê×Ò³] [ÉÏÒ»Ò³] "
- Content = Content & "<a href=?Page="&Page+1&"&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[ÏÂÒ»Ò³]</a> <a href=?Page="&Rs.PageCount&"&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[βҳ]</a>"
- elseif Page=Rs.PageCount then
- Content = Content & "<a href=?Page=1&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[Ê×Ò³]</a> <a href=?Page="&Page-1&"&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[ÉÏÒ»Ò³]</a> "
- Content = Content & "[ÏÂÒ»Ò³] [βҳ]"
- else
- Content = Content & "<a href=?Page=1&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[Ê×Ò³]</a> <a href=?Page="&Page-1&"&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[ÉÏÒ»Ò³]</a> "
- Content = Content & "<a href=?Page="&Page+1&"&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[ÏÂÒ»Ò³]</a> <a href=?Page="&Rs.PageCount&"&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[βҳ]</a>"
- end if
- end if
- Content = Content & " Ò³´Î£º<strong>"&Page&"</strong>/"&Rs.PageCount&"Ò³ תµ½£º"
- Content = Content & "<select name=""Page"" onchange=""javascript:window.location='?"&Query_String&"classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&"&Page='+this.options[this.selectedIndex].value+'';"">"
- for i=1 to Rs.PageCount
- Content = Content & "<option value="""&i&""""
- if Page = i then Content = Content & " selected"
- Content = Content & ">"&i&"</option>"
- next
- Content = Content & "</select>"
- Content = Content & " "
- Content = Content & "</td></tr>"
- ' Response.Write(Content)
- End Sub
- Sub ShowPagemess(Colspan)
- ' Content=""
- Content = Content & "<tr align=""center""><td colspan="""&Colspan&""">"
- Content = Content & "¹²ÓУº<strong>"&Rs.RecordCount&"</strong>Ìõ ÿҳÏÔʾ£º<strong>"&Rs.PageSize&"</strong>Ìõ "
- if Rs.PageCount=1 or Rs.PageCount=0 then
- Content = Content & "[Ê×Ò³] [ÉÏÒ³] [´ÎÒ³] [βҳ]"
- else
- if Page=1 then
- Content = Content & "[Ê×Ò³] [ÉÏÒ³] "
- Content = Content & "<a href=""?"&Query_String&"Page="&Page+1&""">[´ÎÒ³]</a> <a href=""?"&Query_String&"Page="&Rs.PageCount&""">[βҳ]</a>"
- elseif Page=Rs.PageCount then
- Content = Content & "<a href=""?"&Query_String&"Page=1"">[Ê×Ò³]</a> <a href=""?"&Query_String&"Page="&Page-1&""">[ÉÏÒ³]</a> "
- Content = Content & "[´ÎÒ³] [βҳ]"
- else
- Content = Content & "<a href=""?"&Query_String&"Page=1"">[Ê×Ò³]</a> <a href=""?"&Query_String&"Page="&Page-1&""">[ÉÏÒ³]</a> "
- Content = Content & "<a href=""?"&Query_String&"Page="&Page+1&""">[´ÎÒ³]</a> <a href=""?"&Query_String&"Page="&Rs.PageCount&""">[βҳ]</a>"
- end if
- end if
- Content = Content & " Ò³´Î£º<strong>"&Page&"</strong>/"&Rs.PageCount&"Ò³ תµ½£º"
- Content = Content & "<select name=""Page"" onchange=""javascript:window.location='?"&Query_String&"Page='+this.options[this.selectedIndex].value+'';"">"
- for i=1 to Rs.PageCount
- Content = Content & "<option value="""&i&""""
- if Page = i then Content = Content & " selected"
- Content = Content & ">"&i&"</option>"
- next
- Content = Content & "</select>"
- Content = Content & " "
- Content = Content & "</td></tr>"
- ' Response.Write(Content)
- End Sub
- Sub SendGuest()
- Dim Title,Sender,Email,Content,Code,photo,address
- Title=Trim(Request.Form("Title"))
- photo=Trim(Request.Form("photo"))
- address=Trim(Request.Form("address"))
- Sender=Trim(Request.Form("Sender"))
- Email=Trim(Request.Form("Email"))
- Content=Trim(Request.Form("Content"))
- Code=Trim(Request.Form("Code"))
- If IsNumeric(Code)=False Then Response.Write("<script>alert(""ÑéÖ¤ÂëÐèΪÊý×Ö"");history.back()</script>")
- If isEmail(Email)=False Then Response.Write("<script>alert(""ÓʼþµØÖ·¸ñʽ²»¶Ô"");history.back()</script>")
- If Sender="" Or Email="" Or Content="" Or Int(Code) <> Session("m_Code") Then
- Response.Write("<script>alert(""ÇëÊäÈëÍêÕûµÄÐÅÏ¢."");history.back()</script>")
- Else
- Sql="Select * From Guest"
- Rs.Open Sql,Conn,1,2
- Rs.AddNew
- Rs("Title")=Title
- Rs("Sender")=Sender
- Rs("photo")=photo
- Rs("address")=address
- Rs("Email")=Email
- Rs("Content")=Server.HTMLEncode(Content)
- Rs("Ip")=IP
- Rs("DateAndTime")=Now()
- Rs.Update
- Rs.Close
- Response.Write("<script>alert(""ÁôÑÔÒÑÌá½»£¬ÇëµÈ´ý»Ø¸´"");location.href="""& Http_Referer &"""</script>")
- End If
- Response.End
- End Sub
- Sub SendMail(MailContent)
- If m_MSvr(0)="Jmail" Then
- Dim JMail
- Set JMail = Server.CreateObject("JMail.Message")
- JMail.Charset = "gb2312"
- JMail.From = m_MSvr(2)
- JMail.FromName = m_Config(0)
- JMail.Subject = m_Config(0) & "ÐÅÏ¢Ô±"
- JMail.MailServerUserName = m_MSvr(2)
- JMail.MailServerPassword = m_MSvr(3)
- JMail.Priority = 3 ' ÉèÖÃÓÅÏȼ¶
- JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
- JMail.AddRecipient(m_MSvr(4))
- JMail.HTMLBody = MailContent
- ' Jmail.AddAttachment(Server.MapPath("logo3.gif"),True)
- JMail.Send(m_MSvr(1))
- JMail.Close()
- Response.Write("<script>alert(""Óʼþ·¢Ëͳɹ¦!"");</script>")
- ElseIf m_MSvr(0)="CDONTS" Then
- Dim CodMail
- Set CodMail = Server.CreateObject("CDONTS.NewMail") '½¨Á¢Óʼþ¶ÔÏó
- CodMail.Subject = m_Config(0) & "ÐÅÏ¢Ô±"
- CodMail.From = """"& m_Config(0) &""" <"& m_Config(3) &">"
- CodMail.To = m_MSvr(4)
- CodMail.bodyformat = 0
- CodMail.MailFormat = 0
- ' CodMail.AttachFile(Server.MapPath("logo3.gif"),"logo3.gif")
- CodMail.Body = MailContent
- CodMail.Send
- Set CodMail=Nothing
- Response.Write("<script>alert(""Óʼþ·¢Ëͳɹ¦!"");</script>")
- Else
- Response.Write("<script>alert(""·þÎñÆ÷²»Ö§³ÖÓʼþ·¢ËÍ!"");history.back()</script>")
- End If
- End Sub
- Sub SelectClass(ClassID,CurrentID,Layout)
- Dim RsClass,SqlClass,strTemp,tmpDepth,arRshowLine(20)
- For i=0 To Ubound(arRshowLine)
- arRshowLine(i)=False
- Next
- SqlClass="Select * From Class Where"& ClassSQL(ClassID) &" And Layout='"&Layout&"' order by RootID,OrderID"
- Set RsClass=Server.CreateObject("Adodb.RecordSet")
- RsClass.Open SqlClass,Conn,1,1
- If RsClass.Bof And RsClass.Bof Then
- Response.Write("<option value='0'>ÇëÏÈÌí¼Ó·ÖÀà</option>")
- Else
- Do While Not RsClass.Eof
- tmpDepth=RsClass("Depth")
- If RsClass("NextID")>0 Then
- arRshowLine(tmpDepth)=True
- Else
- arRshowLine(tmpDepth)=False
- End If
- strTemp="<option value="""
- If RsClass("Child")>0 Then
- strTemp=strTemp & 0
- Else
- strTemp=strTemp & RsClass("ClassID")
- End If
- strTemp=strTemp & """"
- If CurrentID>0 And RsClass("ClassID")=CurrentID Then
- strTemp=strTemp & " selected"
- End If
- strTemp=strTemp & ">"
- If tmpDepth>0 Then
- For i=1 To tmpDepth
- strTemp=strTemp & " "
- If i=tmpDepth Then
- If RsClass("NextID")>0 Then
- strTemp=strTemp & "©À "
- Else
- strTemp=strTemp & "©¸ "
- End If
- Else
- If arRshowLine(i)=True Then
- strTemp=strTemp & "©¦"
- Else
- strTemp=strTemp & " "
- End If
- End If
- Next
- End If
- strTemp=strTemp & RsClass("ClassName")
- ' strTemp=strTemp & RsClass("ClassName") &"("& RsClass("ClassID") &")"
- If RsClass("Child")>0 Then
- strTemp=strTemp & "("&RsClass("Child")&")"
- End If
- strTemp=strTemp & "</option>"
- Response.Write(strTemp)
- RsClass.MoveNext
- loop
- End If
- RsClass.Close
- Set RsClass=Nothing
- End Sub
- Function ClassSQL(ClassID)
- If ClassID=0 Then
- ClassSQL=" 1=1"
- Exit Function
- End If
- Dim RsTemp,ChildID
- Set RsTemp=Conn.Execute("Select ParentPath From Class Where ClassID="&ClassID)
- If Not RsTemp.Eof Then
- Dim ParentPath
- ParentPath = RsTemp("ParentPath")
- Else
- Content = Content & "<tr><td align=""center"">ÇëÑ¡ÔñÒª²éѯµÄ·ÖÀà</td></tr>"
- End If
- Set RsTemp=Conn.Execute("Select ClassID From Class Where ParentID=" & ClassID & " Or ParentPath Like '"& ParentPath &","& ClassID &"%'")
- If Not RsTemp.Eof Then
- Do While Not RsTemp.Eof
- If ChildID="" Then
- ChildID=RsTemp(0)
- Else
- ChildID=ChildID & "," & RsTemp(0)
- End If
- RsTemp.MoveNext
- Loop
- ClassSql = " ClassID In ("&ClassID &","& ChildID &")"
- Else
- ClassSql = " ClassID="& ClassID
- End If
- RsTemp.Close
- Set RsTemp=Nothing
- End Function
- Function delHtml(strHtml)
- Dim objRegExp, strOutput
- Set objRegExp = New Regexp
- objRegExp.IgnoreCase = True
- objRegExp.Global = True
- objRegExp.Pattern = "(<[a-zA-Z].*?>)|(<[\/][a-zA-Z].*?>)|(\r)"
- strOutput = objRegExp.Replace(strHtml,"")
- strOutput = Replace(strOutput, "<", "<")
- strOutput = Replace(strOutput, ">", ">")
- strOutput = Replace(strOutput, " ","")
- delHtml = strOutput
- Set objRegExp = Nothing
- End Function
- function getFileExtName(fileName)
- dim pos
- pos=instrrev(filename,".")
- if pos>0 then
- getFileExtName=mid(fileName,pos+1)
- else
- getFileExtName=""
- end if
- end function
- %>
Add Comment
Please, Sign In to add comment