xIII-

[d0tsec] [dump] http://www.wxgjfd.com/

Oct 11th, 2014
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.10 KB | None | 0 0
  1. <!--#include file="website.asp"-->
  2. <%
  3. Dim Content,Page,i,Query_String,Http_Referer,Word,Action,ClassID,ID,IP,ShowUrl,arrShowLine(10)
  4. Dim m_Config,m_WebSet,m_MSvr,m_Word,m_Count,m_OnLine,m_Temp,m_Temp2,TempSession,webanme,webkey,rsbigclassname
  5. ShowUrl="Show.asp"
  6. Http_Referer = Request.ServerVariables("HTTP_REFERER")
  7. IP = Request.ServerVariables("REMOTE_ADDR")
  8. Action = Trim(Request("Action"))
  9. ClassID= Trim(Request("ClassID"))
  10. keyword=Trim(request("keyword"))
  11. rsbigclassname=Trim(request("BigClassName"))
  12. Word = Trim(Request("Word"))
  13. ID = Request("ID")
  14. If IsNumeric(ID) Then
  15. ID = Cint(ID)
  16. Else
  17. Response.Write("<script>alert(""¼Ç¼±àºÅ±ØÐëÊÇÕûÊý"");history.back();</script>")
  18. Response.End
  19. End If
  20. ClassID = Request("ClassID")
  21. If IsNumeric(ClassID) Then
  22. ClassID = Cint(ClassID)
  23. Else
  24. ClassID = 0
  25. End If
  26. Page = Request.QueryString("Page")
  27. If IsNumeric(Page) Then
  28. Page = Cint(Page)
  29. If Page<1 Then Page=1
  30. Else
  31. Page=1
  32. End If
  33.  
  34. ConnectionDatabase()
  35. Sql="Select * From Config"
  36. Rs.Open Sql,Conn,1,2
  37. If Not Rs.Eof Then
  38. m_OnLine = Split(Rs("OnLine"),"|")
  39. If IP<>m_OnLine(0) Or DateDiff("s",m_OnLine(1),Now())>1200 Then
  40. Rs("Counts")=Rs("Counts")+1
  41. Rs("OnLine")=IP &"|"& Now()
  42. End If
  43. Rs.Update
  44. m_Config=Split(Rs("Config"),"|")
  45. m_WebSet=Split(Rs("WebSet"),"|")
  46. m_MSvr=Split(Rs("MailSvr"),"|")
  47. m_Word=Rs("Word")
  48. m_Count=Rs("Counts")
  49. webanme=Rs("webanme")
  50. webkey=Rs("webkey")
  51. webdec=Rs("webdec")
  52. webbaidu=Rs("webbaidu")
  53. webgoogle=Rs("webgoogle")
  54. webbook=Rs("webbook")
  55. webseo=Rs("webseo")
  56. webdomain=Rs("webdomain")
  57. webhost=Rs("webhost")
  58. webbottom=Rs("webbottom")
  59. webmail=Rs("webmail")
  60. webwh=Rs("webwh")
  61. website=Rs("website")
  62. If m_Config(2)="" Then
  63. m_Config(2)=m_Config(0)
  64. End If
  65. If m_WebSet(1)="0" Then
  66. Response.Write(m_WebSet(2))
  67. Response.End
  68. End If
  69. Else
  70. Response.Redirect "Admin/"
  71. End If
  72. Rs.Close
  73.  
  74. Select Case Action
  75. Case "SendGuest"
  76. Call SendGuest()
  77. End Select
  78.  
  79.  
  80. Sub ShowSmallClass_Tree()
  81. %>
  82. <SCRIPT language=javascript>
  83. function opencat(cat,img){
  84. if(cat.style.display=="none"){
  85. cat.style.display="";
  86. img.src="images/class2.gif";
  87. } else {
  88. cat.style.display="none";
  89. img.src="images/class1.gif";
  90. }
  91. }
  92. </Script>
  93. <TABLE cellSpacing=0 cellPadding=0 width="94%" border=0 align=center>
  94. <%
  95. dim i,Rst
  96. set rsbig = server.CreateObject ("adodb.recordset")
  97. sql="Select * From Class Where Layout='Product' and ParentID=0 order by RootID,OrderID"
  98. rsbig.open sql,conn,1,1
  99. if rsbig.eof and rsbig.bof then
  100. Response.Write "À¸Ä¿ÕýÔÚ½¨ÉèÖС­¡­"
  101. else
  102. i=1
  103. do while not rsbig.eof
  104. rsbigclass=cInt(rsbig("ClassID"))
  105. %>
  106. <TR>
  107. <TD style="PADDING-LEFT: 0px" language=javascript onmouseup="opencat(cat10<%=i%>000,&#13;&#10; 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>
  108. <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>
  109. </TR>
  110. <TR>
  111. <TD background=images/left-line.jpg bgColor=#9A9A9A colSpan=2 height=1></TD></TR>
  112. <TR>
  113. <TD colspan="2" id=cat10<%=i%>000 <%if rsbig("ClassName")=rsbigclassname then
  114. response.write "style='DISPLAY'"
  115. else
  116. response.write "style='DISPLAY: none'"
  117. end if%>>
  118. <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  119. <%
  120. Set Rst=Conn.Execute("Select * From Class Where Layout='Product' and ParentID="& rsbig("ClassID") &" order by RootID,OrderID")
  121. Do While Not Rst.Eof
  122. %>
  123. <TR>
  124. <TD width="14%" align=center>
  125. <IMG height=16 src="images/tree_line1.gif" width=17 align=absMiddle border=0></td>
  126. <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>
  127. </TR><%
  128. Rst.MoveNext
  129. Loop
  130. Rst.Close
  131. Set Rst=Nothing
  132. %>
  133. </table></TD></TR>
  134. <%
  135. rsbig.movenext
  136. i=i+1
  137. loop
  138. rsbig.close
  139. set rsbig=nothing
  140. end if
  141. %>
  142. <tr>
  143. <td height=5 colspan=2></td></tr>
  144. </TABLE>
  145. <%
  146. end Sub
  147.  
  148.  
  149.  
  150. sub ShowProduct(TitleLen)
  151. if TitleLen<0 or TitleLen>200 then
  152. TitleLen=50
  153. end if
  154. if currentpage<1 then
  155. currentpage=1
  156. end if
  157. if (currentpage-1)*MaxPerPage>totalput then
  158. if (totalPut mod MaxPerPage)=0 then
  159. currentpage= totalPut \ MaxPerPage
  160. else
  161. currentpage= totalPut \ MaxPerPage + 1
  162. end if
  163. end if
  164. if currentPage=1 then
  165. sqlProduct="select top " & MaxPerPage
  166. else
  167. sqlProduct="select "
  168. end if
  169.  
  170. sqlProduct=sqlProduct & " * from Product"
  171.  
  172. if classid<>"" then
  173. sqlProduct=sqlProduct & " where classid=" & classid & " "
  174. end if
  175. sqlProduct=sqlProduct & " order by ID desc"
  176. Set rsProduct= Server.CreateObject("ADODB.Recordset")
  177. rsProduct.open sqlProduct,conn,1,1
  178. if rsProduct.bof and rsProduct.eof then
  179. response.Write("<br><li>ûÓÐÈκβúÆ·</li>")
  180. else
  181. if currentPage=1 then
  182. call ProductContent(TitleLen)
  183. else
  184. if (currentPage-1)*MaxPerPage<totalPut then
  185. rsProduct.move (currentPage-1)*MaxPerPage
  186. dim bookmark
  187. bookmark=rsProduct.bookmark
  188. call ProductContent(TitleLen)
  189. else
  190. currentPage=1
  191. call ProductContent(TitleLen)
  192. end if
  193. end if
  194. end if
  195. rsProduct.close
  196. set rsProduct=nothing
  197. end sub
  198.  
  199. sub ProductContent(intTitleLen)
  200. dim i,strTemp,ViewList
  201. i=1
  202. ViewList=3
  203. strTemp=""
  204. strtemp= strtemp & "<p>"
  205. strTemp= strTemp & "<TABLE align=center BORDER=0 CELLSPACING=1 CELLPADDING=0>"
  206. strTemp= strTemp & "<tr>"
  207. do while not rsProduct.eof
  208. strTemp= strTemp & "<td width=170>"
  209. strTemp= strTemp & "<table align=center width=170 border=0 cellspacing=2 cellpadding=0>"
  210. strTemp= strTemp & "<tr>"
  211. strTemp= strTemp & "<td colspan=2>"
  212. strTemp= strTemp &"<TABLE border=0 cellPadding=0 cellSpacing=5>"
  213. strTemp= strTemp &"<TR>"
  214. strTemp= strTemp &"<TD align=middle width=135> <TABLE align=center border=0 cellPadding=0 cellSpacing=0>"
  215. strTemp= strTemp &"<TR>"
  216. strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0ltop.gif' width=10></TD>"
  217. strTemp= strTemp &"<TD background='Img/bg_01.gif' height=10></TD>"
  218. strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0rtop.gif' width=10></TD>"
  219. strTemp= strTemp &"</TR>"
  220. strTemp= strTemp &"<TR> "
  221. strTemp= strTemp &"<TD background='Img/bg_03.gif' width=10>¡¡</TD>"
  222. strTemp= strTemp & "<td>"&"<div align=center>"
  223. strTemp= strTemp & "<a href=ProductShow.asp?ID=" & rsProduct("ArticleID") & ">" & "<img src=" & rsProduct("pic") & " width='190' height='160' border='0'>" & "</a><br></div>"
  224. strTemp= strTemp & "</td>"
  225. strTemp= strTemp &"<TD background='Img/bg_04.gif' width=10>&nbsp;</TD>"
  226. strTemp= strTemp &"</TR>"
  227. strTemp= strTemp &"<TR>"
  228. strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0lbottom.gif' width=10></TD>"
  229. strTemp= strTemp &"<TD background=Img/bg_02.gif height=10></TD>"
  230. strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0rbottom.gif' width=10></TD>"
  231. strTemp= strTemp &"</TR>"
  232. strTemp= strTemp &"</TABLE></TD>"
  233. strTemp= strTemp &"</TR>"
  234. strTemp= strTemp &"</TABLE>"
  235. strTemp= strTemp & "</a></div></td>"
  236. strTemp= strTemp & "</tr><tr>"
  237. strTemp= strTemp & "<td align=right >"
  238. strTemp= strTemp & "Ãû³Æ:</td>"
  239. strTemp= strTemp & "<td width=80% >"
  240. strTemp= strTemp & "<a href=ProductShow.asp?ID=" & rsProduct("ArticleID") & ">" & rsProduct("Title") & ""
  241. strTemp= strTemp & "</a></td>"
  242.  
  243. strTemp= strTemp & "</tr>"
  244.  
  245. strTemp= strTemp & "<tr>"
  246. strTemp= strTemp & "<td colspan=2>"
  247. strTemp= strTemp & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
  248. strTemp= strTemp & "<tr>"
  249. strTemp= strTemp & "<td>"
  250. strTemp= strTemp & "<div align=center></div></td>"
  251. strTemp= strTemp & "<tr>"
  252. strTemp= strTemp & "<td width=50% height=12>"
  253. strTemp= strTemp & "<div align=center></div></td>"
  254.  
  255. strTemp= strTemp & "<td width=50% height=12>"
  256. strTemp= strTemp & "<div align=center><input name='Product_Id' type='checkbox' id='Product_Id' value="&cstr(rsProduct("Product_Id"))&"> ѡȡ"
  257. strTemp= strTemp & "</div></td>"
  258.  
  259. strTemp= strTemp & "</tr>"
  260.  
  261. strTemp= strTemp & "</tr>"
  262. strTemp= strTemp & "</table>"
  263. strTemp= strTemp & "</td>"
  264. strTemp= strTemp & "</tr><tr>"
  265. strTemp= strTemp & "<td height=1 colspan=3 bgcolor=#CCCCCC></td>"
  266. strTemp= strTemp & "</tr>"
  267. strTemp= strTemp & "</table>"
  268. if i mod ViewList =0 then
  269. strTemp= strTemp & "</td></tr>"
  270. end if
  271. rsProduct.MoveNext
  272. i=i+1
  273. if i>MaxPerPage then exit do
  274. loop
  275. strtemp= strtemp & "</tr></table>"
  276. response.write strTemp
  277. end sub
  278.  
  279.  
  280.  
  281. Sub Intro()
  282. Sql="Select Intro From Config"
  283. Rs.Open Sql,Conn,1,1
  284. Content = ""
  285. ' Content = Content & "<table width=""98%"" align=""center"" border=""0"" cellpadding=""0"" cellspacing=""5"">"
  286. ' Content = Content & "<tr><td height=""5""></td></tr><tr><td style=""padding:5px;line-height:200%"">"
  287. Content = Content & Rs("Intro")
  288. ' Content = Content & "</td></tr><tr><td height=""5""></td></tr>"
  289. ' Content = Content & "</table>"
  290. Rs.Close
  291. Response.Write(Content)
  292. End Sub
  293.  
  294. Sub News(ClassID)
  295. If Word<>"" Then
  296. Query_String = "Word="& Word &"&"
  297. ElseIf ClassID>0 Then
  298. Query_String = "ClassID="& ClassID &"&"
  299. End If
  300. Content = ""
  301. Content = Content & "<table width=""90%"" align=""center"" border=""0"" cellpadding=""5"" cellspacing=""0"" style=""border-collapse:collapse"">"
  302. ' 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>"
  303. Sql="Select * From News"
  304. If Word<>"" Then
  305. Sql = Sql & " Where Title Like '%"& Word &"%'"
  306. ElseIf Cint(ClassID)>0 Then
  307. Dim RsTemp,ChildID
  308. Set RsTemp=Conn.Execute("Select ParentPath From Class Where ClassID="&ClassID)
  309. If Not RsTemp.Eof Then
  310. Dim ParentPath
  311. ParentPath = RsTemp("ParentPath")
  312. Else
  313. Content = Content & "<tr><td align=""center"">ÇëÑ¡ÔñÒª²éѯµÄ·ÖÀà</td></tr>"
  314. End If
  315. Set RsTemp=Conn.Execute("Select ClassID From Class Where ParentID=" & ClassID & " Or ParentPath Like '"& ParentPath &","& ClassID &"%'")
  316. If Not RsTemp.Eof Then
  317. Do While Not RsTemp.Eof
  318. If ChildID="" Then
  319. ChildID=RsTemp(0)
  320. Else
  321. ChildID=ChildID & "," & RsTemp(0)
  322. End If
  323. RsTemp.MoveNext
  324. Loop
  325. Sql = Sql & " Where ClassID In ("&ClassID &","& ChildID &")"
  326. Else
  327. Sql = Sql & " Where ClassID="& ClassID
  328. End If
  329. RsTemp.Close
  330. Set RsTemp=Nothing
  331. End If
  332. Sql = Sql & " Order By Topis Desc,DateAndTime Desc"
  333. Rs.Open Sql,Conn,1,1
  334. If Rs.Eof Then
  335. Content = Content & "<tr><td align=""center"">ûÓÐÈκμǼ</td></tr>"
  336. Else
  337. i=0
  338. Rs.PageSize = Cint(m_WebSet(4))
  339. Rs.AbsolutePage = Page
  340. Do While Not Rs.Eof And i < Rs.PageSize
  341. Content = Content & "<tr><td><img src=""Images/"
  342. If Rs("Topis")=1 Then
  343. Content = Content & "m_topis"
  344. Else
  345. Content = Content & "m_redis"
  346. End If
  347. Content = Content & ".gif"" width=""23"" height=""7"" align=""absmiddle"">"
  348. Content = Content & "<a href="""&ShowUrl&"?Action=News&ID="&Rs("ID")&""" style="""
  349. If Rs("TitB")=1 Then
  350. Content = Content & "font-weight:bold;"
  351. End If
  352. If Rs("Red")=1 Then
  353. Content = Content & "color:#FF0000;"
  354. End If
  355. Content = Content & """>"& Rs("Title") & "</a>"
  356. Content = Content & "&nbsp;(<font color=""#CC3300"">"& rs("hits") &"</font>)"
  357. If DateDiff("d",Rs("DateAndTime"),Now())<7 Then
  358. Content = Content & "<img src=""Images/m_newis.gif"">"
  359. End If
  360. If Rs("Hits")>=Cint(m_WebSet(3)) Then
  361. Content = Content & "<img src=""Images/m_hotis.gif"">"
  362. End If
  363. Content = Content & "</td><td align=""center"">"
  364. Content = Content & "<font color=""#666666"">"& FormatDateTime(Rs("DateAndTime"),2) &"</font></td></tr>"
  365. i=i+1
  366. Rs.Movenext
  367. Loop
  368. ' If Rs.RecordCount>20 Then
  369. Content = Content & "<tr><td colspan=""2"" align=""center"">"
  370. ShowPage(1)
  371. Content = Content & "</td></tr>"
  372. ' End If
  373. End If
  374. Rs.Close
  375. Content = Content & "</table>"
  376. Response.Write(Content)
  377. End Sub
  378.  
  379. Sub Faq(ClassID)
  380. If Word<>"" Then
  381. Query_String = "Word="& Word &"&"
  382. ElseIf ClassID>0 Then
  383. Query_String = "ClassID="& ClassID &"&"
  384. End If
  385. Content = ""
  386. Content = Content & "<table width=""90%"" align=""center"" border=""0"" cellpadding=""5"" cellspacing=""0"" style=""border-collapse:collapse"">"
  387. ' 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>"
  388. Sql="Select * From Faq"
  389. If Word<>"" Then
  390. Sql = Sql & " Where Title Like '%"& Word &"%'"
  391. ElseIf Cint(ClassID)>0 Then
  392. Dim RsTemp,ChildID
  393. Set RsTemp=Conn.Execute("Select ParentPath From Class Where ClassID="&ClassID)
  394. If Not RsTemp.Eof Then
  395. Dim ParentPath
  396. ParentPath = RsTemp("ParentPath")
  397. Else
  398. Content = Content & "<tr><td align=""center"">ÇëÑ¡ÔñÒª²éѯµÄ·ÖÀà</td></tr>"
  399. End If
  400. Set RsTemp=Conn.Execute("Select ClassID From Class Where ParentID=" & ClassID & " Or ParentPath Like '"& ParentPath &","& ClassID &"%'")
  401. If Not RsTemp.Eof Then
  402. Do While Not RsTemp.Eof
  403. If ChildID="" Then
  404. ChildID=RsTemp(0)
  405. Else
  406. ChildID=ChildID & "," & RsTemp(0)
  407. End If
  408. RsTemp.MoveNext
  409. Loop
  410. Sql = Sql & " Where ClassID In ("&ClassID &","& ChildID &")"
  411. Else
  412. Sql = Sql & " Where ClassID="& ClassID
  413. End If
  414. RsTemp.Close
  415. Set RsTemp=Nothing
  416. End If
  417. Sql = Sql & " Order By Topis Desc,DateAndTime Desc"
  418. Rs.Open Sql,Conn,1,1
  419. If Rs.Eof Then
  420. Content = Content & "<tr><td align=""center"">ûÓÐÈκμǼ</td></tr>"
  421. Else
  422. i=0
  423. Rs.PageSize = Cint(m_WebSet(4))
  424. Rs.AbsolutePage = Page
  425. Do While Not Rs.Eof And i < Rs.PageSize
  426. Content = Content & "<tr><td><img src=""Images/"
  427. If Rs("Topis")=1 Then
  428. Content = Content & "m_topis"
  429. Else
  430. Content = Content & "m_redis"
  431. End If
  432. Content = Content & ".gif"" width=""23"" height=""7"" align=""absmiddle"">"
  433. Content = Content & "<a href="""&ShowUrl&"?Action=Faq&ID="&Rs("ID")&""" style="""
  434. If Rs("TitB")=1 Then
  435. Content = Content & "font-weight:bold;"
  436. End If
  437. If Rs("Red")=1 Then
  438. Content = Content & "color:#FF0000;"
  439. End If
  440. Content = Content & """>"& Rs("Title") & "</a>"
  441. Content = Content & "&nbsp;(<font color=""#CC3300"">"& rs("hits") &"</font>)"
  442. If DateDiff("d",Rs("DateAndTime"),Now())<7 Then
  443. Content = Content & "<img src=""Images/m_newis.gif"">"
  444. End If
  445. If Rs("Hits")>=Cint(m_WebSet(3)) Then
  446. Content = Content & "<img src=""Images/m_hotis.gif"">"
  447. End If
  448. Content = Content & "</td><td align=""center"">"
  449. Content = Content & "<font color=""#666666"">"& FormatDateTime(Rs("DateAndTime"),2) &"</font></td></tr>"
  450. i=i+1
  451. Rs.Movenext
  452. Loop
  453. ' If Rs.RecordCount>20 Then
  454. Content = Content & "<tr><td colspan=""2"" align=""center"">"
  455. ShowPage(1)
  456. Content = Content & "</td></tr>"
  457. ' End If
  458. End If
  459. Rs.Close
  460. Content = Content & "</table>"
  461. Response.Write(Content)
  462. End Sub
  463.  
  464. Sub Product()
  465. If Word<>"" Then
  466. Query_String = "Word="& Word &"&"
  467. ElseIf ClassID>0 Then
  468. Query_String = "ClassID="& ClassID &"&"
  469. End If
  470. Content = ""
  471. 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
  472. Content = Content & "<table width=""98%"" align=""center"" border=""0"" cellpadding=""3"" cellspacing=""0"">"
  473. Content = Content & "<tr><td height=""5""></td></tr>"
  474. Sql="Select * From Product P,Class C Where"
  475. If Word<>"" Then
  476. Sql = Sql & " Where Title Like '%"& Word &"%'"
  477. ElseIf Cint(ClassID)>0 Then
  478. Dim RsTemp,ChildID
  479. Set RsTemp=Conn.Execute("Select ParentPath From Class Where ClassID="&ClassID)
  480. If Not RsTemp.Eof Then
  481. Dim ParentPath
  482. ParentPath = RsTemp("ParentPath")
  483. Else
  484. Content = Content & "<tr><td align=""center"">ÇëÑ¡ÔñÒª²éѯµÄ·ÖÀà</td></tr>"
  485. End If
  486. Set RsTemp=Conn.Execute("Select ClassID From Class Where ParentID=" & ClassID & " Or ParentPath Like '"& ParentPath &","& ClassID &"%'")
  487. If Not RsTemp.Eof Then
  488. Do While Not RsTemp.Eof
  489. If ChildID="" Then
  490. ChildID=RsTemp(0)
  491. Else
  492. ChildID=ChildID & "," & RsTemp(0)
  493. End If
  494. RsTemp.MoveNext
  495. Loop
  496. Sql = Sql & " P.ClassID In ("&ClassID &","& ChildID &") And"
  497. Else
  498. Sql = Sql & " P.ClassID="& ClassID &" And"
  499. End If
  500. RsTemp.Close
  501. Set RsTemp=Nothing
  502. End If
  503. Sql = Sql & " C.ClassID=P.ClassID Order By P.Topis Desc,P.DateAndTime Desc"
  504. Rs.Open Sql,Conn,1,1
  505. If Rs.Eof Then
  506. Content = Content & "<tr><td align=""center"">ûÓÐÈκμǼ</td><tr>"
  507. Else
  508. i=0
  509. Rs.PageSize = 5
  510. Rs.AbsolutePage = Page
  511. Do While Not Rs.Eof And i < Rs.PageSize
  512. Content = Content & "<tr>"
  513. 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") &""">"
  514. If Rs("Pic")="" Then
  515. Content = Content & "<img src=""Images/m_nopic.gif"" border=""0"">"
  516. Else
  517. Content = Content & "<img src="""& Rs("Pic") &""" width=""150"" height=""150"" border=""0"">"
  518. End If
  519. Content = Content & "</a></td></tr></table></td><td><table width=""100%"" border=""0"" cellpadding=""3"" cellspacing=""3"">"
  520. Content = Content & "<tr><td width=""15%""><strong>Ãû³Æ:</strong></td><td><a href="""&ShowUrl&"?Action=Product&ID="& Rs("ID") &""">"& Rs("Title") &"</a></td></tr>"
  521. Content = Content & "<tr><td><strong>·ÖÀà:</strong></td><td>"& Rs("ClassName") &"</td></tr>"
  522. 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>"
  523. ' Content = Content & "<tr><td>ÔÚÏß¶©¹º£º</td><td><a href=""javascript:Shop("& Rs("ID") &",'"& Rs("Title") &"')"">¹ºÂò</a></td></tr>"
  524. Content = Content & "</table></td></tr><tr><td colspan=""3""><hr size=""1""></td></tr>"
  525. i=i+1
  526. Rs.Movenext
  527. Loop
  528. End If
  529. Content = Content & "<tr><td height=""5""></td></tr>"
  530. Content = Content & "</table><center>"
  531. ShowPage(3)
  532. Response.Write(Content&"<br><br>")
  533. Rs.Close
  534. End Sub
  535.  
  536. Sub ShowContent()
  537. Dim Title,Author,Url,Price,Pic,Picture,Pictures,Topis,Hits,Red,TitB,TempContent,DateAndTime
  538. If Action="" Or Not(Action="News" Or Action="Product" Or Action="Picture" Or Action="Faq") Then
  539. Response.Write("<script>alert(""ÇëÖ¸¶¨Òª²é¿´µÄÄÚÈÝ"");history.back();</script>")
  540. Response.End
  541. End If
  542. Sql="Select * From "& Action &" Where ID="& ID
  543. Rs.Open Sql,Conn,1,2
  544. If Rs.Eof Then
  545. Response.Write("<script>alert(""¼Ç¼²»´æÔÚ"");history.back();</script>")
  546. Response.End
  547. Else
  548. Rs("Hits")=Rs("Hits")+1
  549. Rs.Update
  550. ID=Rs("ID")
  551. ClassID=Rs("ClassID")
  552. Title=Rs("Title")
  553. If Action="News" Then
  554. Author=Rs("Author")
  555. Url=Rs("Url")
  556. Red=Rs("Red")
  557. TitB=Rs("TitB")
  558. ElseIf Action="Product" Then
  559. Price=Rs("Price")
  560. End If
  561. Pic=Rs("Pic")
  562. Picture=Rs("Picture")
  563. Topis=Rs("Topis")
  564. Hits=Rs("Hits")
  565. TempContent=Rs("Content")
  566. DateAndTime=Rs("DateAndTime")
  567. End If
  568. Rs.Close
  569. Content = "<table width=""92%"" align=""center"" border=""0"" cellpadding=""3"" cellspacing=""0"">"
  570. Content = Content & "<tr><td class=""content_t"""
  571. If Red=1 Then
  572. Content = Content & " style=""color:#FF0000;"""
  573. End If
  574. Content = Content & ">"& Title &"</td></tr>"
  575. Content = Content & "<tr><td align=""center"">¡¼&nbsp;&nbsp;ËùÊô·ÖÀࣺ"& ShowClassName(ClassID) &"&nbsp;&nbsp;µã»÷´ÎÊý£º"& Hits &"´Î&nbsp;&nbsp;¸üÐÂʱ¼ä£º"& DateAndTime &"&nbsp;&nbsp;¡½<hr weight=""90%"" size=""1"">"
  576. If Action="Product" Then
  577. Content = Content & "<div align=""center""><img src="""&Pic&"""></div><br>"
  578. End IF
  579. Content = Content & "</td></tr><tr><td class=""content_c"">"& Replace(Replace(TempContent,Chr(10),"<br>"),Chr(13),"&nbsp;")
  580. If Len(Picture)>1 And Action="Product" Then
  581. Content = Content & "<div><br><img src=""Images/arr.gif"" align=""absmiddle"">&nbsp;<a href="""&Picture&""" style=""font-weight:bold; color:#FF6633;"">˵Ã÷ÊéÏÂÔØ</a></div><br>"
  582. End IF
  583. ' Content = Content & "<br /><br />·ÅÈ빺ÎïÀº<br />"
  584. Content = Content & "</td></tr>"
  585. ' Content = Content & "<hr><span class=""content_c"">"& ShowPNRecord(ID,ClassID,Action) &"</span><br>"
  586. Content = Content & "<tr><td align=""right"">¡¼<a href=""javascript:window.print()"">´òÓ¡</a>¡½&nbsp;¡¼<a href=""javascript:history.back()"">·µ»Ø</a>¡½&nbsp;&nbsp;&nbsp;&nbsp;</td></tr></table>"
  587. Response.Write(Content)
  588. End Sub
  589.  
  590. Function ShowPNRecord(ID,ClassID,Action)
  591. ShowPNRecord = ""
  592.  
  593. Sql="ID < "& ID &" Order By ID Desc"
  594. ShowPNRecord = ShowPNRecord & "<li>ÉÏÒ»Ìõ¼Ç¼£º"
  595. Sql="Select ID,Title From "& Action &" Where ClassID="& ClassID &" And "& Sql
  596. Rs.Open Sql,Conn,1,2
  597. If Rs.Eof Then
  598. ShowPNRecord = ShowPNRecord & "ûÓмǼ"
  599. Else
  600. ShowPNRecord = ShowPNRecord & "<a href=""?Action="& Action &"&ID="& Rs("ID") &""">" & Rs("Title") &"</a>"
  601. End If
  602. Rs.Close
  603. ShowPNRecord = ShowPNRecord & "</li>"
  604.  
  605. Sql="ID > "& ID &" Order By ID Asc"
  606. ShowPNRecord = ShowPNRecord & "<li>ÏÂÒ»Ìõ¼Ç¼£º"
  607. Sql="Select ID,Title From "& Action &" Where ClassID="& ClassID &" And "& Sql
  608. Rs.Open Sql,Conn,1,2
  609. If Rs.Eof Then
  610. ShowPNRecord = ShowPNRecord & "ûÓмǼ"
  611. Else
  612. ShowPNRecord = ShowPNRecord & "<a href=""?Action="& Action &"&ID="& Rs("ID") &""">" & Rs("Title") &"</a>"
  613. End If
  614. Rs.Close
  615. ShowPNRecord = ShowPNRecord & "</li>"
  616. End Function
  617.  
  618. Sub Guest()
  619. Content = ""
  620. Sql="Select * From Guest where Revert is not null Order By DateAndTime Desc"
  621. Rs.Open Sql,Conn,1,1
  622. If Rs.Eof Then
  623. Content = Content & "<div align=""center"">ûÓÐÈκμǼ</div>"
  624. Else
  625. i=1
  626. Rs.PageSize = Cint(m_WebSet(6))
  627. Rs.AbsolutePage = Page
  628. Do While Not Rs.Eof And i < Rs.PageSize+1
  629. Content = ""
  630. Content = Content & "<table border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""guest_t"">"
  631. Content = Content & "<tr><td class=""guest_s"">&nbsp;<strong>"& Rs("Title") &"</strong>&nbsp;("& Rs("Sender") &")</td></tr>"
  632. Content = Content & "<tr><td class=""guest_c""><table width=""100%"" border=""0"" align=""center"" cellpadding=""3"" cellspacing=""0"">"
  633. 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>"
  634. If Rs("Revert")<>"" And Not IsNull(Rs("Revert")) Then
  635. 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>"
  636. End If
  637. 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>"
  638. Content = Content & "</table></td></tr></table>"
  639. Response.Write(Content)
  640. i=i+1
  641. Rs.Movenext
  642. Loop
  643. Content = "<table border=""0"" align=""center"" cellpadding=""0"" cellspacing=""1"">"
  644. ShowPage(1)
  645. Content = Content & "</table>"
  646. Response.Write(Content)
  647. End If
  648. Rs.Close
  649. End Sub
  650.  
  651. Sub GuestAdd()
  652. Randomize timer
  653. Session("m_Code") = Int(Rnd*8998)+1000
  654. Content = ""
  655. Content = Content & "<script language=""javascript"">"
  656. Content = Content & "function add_guest()"
  657. Content = Content & "{"
  658. Content = Content & " if (document.Add_G.Title.value=="""")"
  659. Content = Content & " {"
  660. Content = Content & " alert(""ÇëÊäÈëÖ÷ÌâÃû³Æ!"");"
  661. Content = Content & " document.Add_G.Title.focus();"
  662. Content = Content & " return false;"
  663. Content = Content & " }"
  664. Content = Content & " if (document.Add_G.Sender.value=="""")"
  665. Content = Content & " {"
  666. Content = Content & " alert(""ÇëÊäÈëÁªÏµÈËÐÕÃû!"");"
  667. Content = Content & " document.Add_G.Sender.focus();"
  668. Content = Content & " return false;"
  669. Content = Content & " }"
  670. Content = Content & " if (document.Add_G.photo.value=="""")"
  671. Content = Content & " {"
  672. Content = Content & " alert(""ÇëÊäÈëÄúµÄÁªÏµµç»°!"");"
  673. Content = Content & " document.Add_G.photo.focus();"
  674. Content = Content & " return false;"
  675. Content = Content & " }"
  676. Content = Content & " if (document.Add_G.Email.value=="""")"
  677. Content = Content & " {"
  678. Content = Content & " alert(""ÇëÊäÈëµç×ÓÓʼþµØÖ·!"");"
  679. Content = Content & " document.Add_G.Email.focus();"
  680. Content = Content & " return false;"
  681. Content = Content & " }"
  682. Content = Content & " if (document.Add_G.Content.value=="""")"
  683. Content = Content & " {"
  684. Content = Content & " alert(""ÇëÊäÈëÁôÑÔÄÚÈÝ!"");"
  685. Content = Content & " document.Add_G.Content.focus();"
  686. Content = Content & " return false;"
  687. Content = Content & " }"
  688. Content = Content & "}"
  689. Content = Content & "</script>"
  690. Content = Content & "<table width=""90%"" align=""center"" border=""0"" cellpadding=""0"" cellspacing=""5"">"
  691. Content = Content & "<form name=""Add_G"" method=""post"" action=""?Action=SendGuest"" onSubmit=""return add_guest();"">"
  692. Content = Content & "<tr><td height=""5"" colspan=""2""></td></tr>"
  693. Content = Content & "<tr><td width=""20%"" align=""right"">ÁôÑÔ±êÌ⣺</td><td>&nbsp;<input name=""Title"" type=""text"" id=""Title"" size=""38""><font color=""#FF0000"">&nbsp;*</font></td></tr>"
  694. Content = Content & "<tr><td align=""right"">ÁªÏµÈË£º</td><td>&nbsp;<input name=""Sender"" type=""text"" id=""Sender"" size=""38""><font color=""#FF0000"">&nbsp;*</font></td></tr>"
  695. Content = Content & "<tr><td align=""right"">ÁªÏµµç»°£º</td><td>&nbsp;<input name=""photo"" type=""text"" id=""photo"" size=""38""><font color=""#FF0000"">&nbsp;*</font></td></tr>"
  696. Content = Content & "<tr><td align=""right"">ÁªÏµµØÖ·£º</td><td>&nbsp;<input name=""address"" type=""text"" id=""address"" size=""38""></td></tr>"
  697. Content = Content & "<tr><td align=""right"">Email£º</td><td>&nbsp;<input name=""Email"" type=""text"" id=""Email"" size=""38""><font color=""#FF0000"">&nbsp;*</font></td></tr>"
  698. Content = Content & "<tr><td align=""right"">ÁôÑÔÄÚÈÝ£º</td><td>&nbsp;<textarea name=""Content"" rows=""5"" id=""Content"" style=""width:350px""></textarea><font color=""#FF0000"">&nbsp;*</font>(´ø*ºÅΪ±ØÌîÏî)</td></tr>"
  699. Content = Content & "<tr><td align=""right"">ÑéÖ¤Â룺</td><td>&nbsp;<input name=""Code"" type=""text"" id=""Code"" size=""4"">&nbsp;" & Session("m_Code") & "</td></tr>"
  700. Content = Content & "<tr><td>&nbsp;</td><td><input type=""submit"" value=""Ìá½»""></td></tr>"
  701. Content = Content & "<tr><td height=""5"" colspan=""2""></td></tr>"
  702. Content = Content & "</form>"
  703. Content = Content & "</table>"
  704. Response.Write(Content)
  705. End Sub
  706.  
  707.  
  708. function isEmail(pInString)
  709.  
  710.  
  711.  
  712. lAt = False
  713. lDot = false
  714.  
  715. for x = 2 to len(pInstring)-1
  716. if mid(pInString,x,1) = "@" then lAt = True
  717. if mid(pInString,x,1) = "." and lAt = True then lDot = True
  718. next
  719.  
  720. if lAt = True and lDot = True then
  721. isEmail = True
  722. else
  723. isEmail = False
  724. end if
  725. end function
  726.  
  727. Function ShowClassName(ClassID)
  728. If ClassID=0 Then
  729. ShowClassName = "ËùÓÐÄÚÈÝ"
  730. Else
  731. Dim RsTemp
  732. Set RsTemp=Conn.Execute("Select ClassID,ClassName From Class Where ClassID="&ClassID)
  733. If RsTemp.Eof Then
  734. ShowClassName = "ÎÞ´Ë·ÖÀà"
  735. Else
  736. ShowClassName = RsTemp("ClassName")
  737. End If
  738. RsTemp.Close
  739. Set RsTemp=Nothing
  740. End If
  741. End Function
  742.  
  743. Function ShowClassTitle(ShowClassID,Method)
  744. Dim RsClass,RsShow,ParentPath
  745. Set RsClass=Conn.Execute("Select ClassID,ClassName,ParentPath,ParentID From Class Where ClassID="& ShowClassID)
  746. If Not RsClass.Eof Then
  747. If Method=0 Or ClassID=0 Then
  748. ParentPath = RsClass("ParentPath") &","& RsClass("ClassID")
  749. Else
  750. If ClassID=RsClass("ClassID") Then
  751. ParentPath = RsClass("ClassID")
  752. Else
  753. ParentPath = Replace(RsClass("ParentPath") &","& RsClass("ClassID"),","&ClassID&",","*")
  754. ' Response.Write(RsClass("ParentPath") &","& RsClass("ClassID") &" > "& ParentPath & " = ")
  755. ParentPath = Replace(ClassID & Mid(ParentPath,Instr(ParentPath,"*")),"*",",")
  756. End If
  757. End If
  758. ' Response.Write(ParentPath & " | ")
  759. Set RsShow=Conn.Execute("Select ClassID,ClassName From Class Where ClassID In ("&ParentPath&") Order By ClassID Desc")
  760. Do While Not RsShow.Eof
  761. If ShowClassTitle="" Then
  762. ' ShowClassTitle = "<a href=""?ClassID="& RsShow("ClassID") &""">" & RsShow("ClassName") & "</a>"
  763. ShowClassTitle = RsShow("ClassName")
  764. Else
  765. ' ShowClassTitle = "<a href=""?ClassID="& RsShow("ClassID") &""">" & RsShow("ClassName") & "</a>-" & ShowClassTitle
  766. ShowClassTitle = RsShow("ClassName") & "-" & ShowClassTitle
  767. End If
  768. RsShow.MoveNext
  769. Loop
  770. RsShow.Close
  771. Set RsShow=Nothing
  772. Else
  773. ShowClassTitle = "ËùÓÐÄÚÈÝ"
  774. End If
  775. RsClass.Close
  776. Set RsClass=Nothing
  777. End Function
  778.  
  779. Sub ShowPage(Colspan)
  780. ' Content=""
  781. Content = Content & "<tr align=""center""><td colspan="""&Colspan&""">"
  782. Content = Content & "¹²ÓУº<font color='#ff0000'><strong>"&Rs.RecordCount&"</strong></font>Ìõ&nbsp;ÿҳÏÔʾ£º<strong>"&Rs.PageSize&"</strong>Ìõ&nbsp;&nbsp;&nbsp;"
  783. if Rs.PageCount=1 or Rs.PageCount=0 then
  784. Content = Content & "[Ê×Ò³]&nbsp;[ÉÏÒ»Ò³]&nbsp;[ÏÂÒ»Ò³]&nbsp;[βҳ]"
  785. else
  786. if Page=1 then
  787. Content = Content & "[Ê×Ò³]&nbsp;[ÉÏÒ»Ò³]&nbsp;"
  788. Content = Content & "<a href=?Page="&Page+1&"&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[ÏÂÒ»Ò³]</a>&nbsp;<a href=?Page="&Rs.PageCount&"&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[βҳ]</a>"
  789. elseif Page=Rs.PageCount then
  790. Content = Content & "<a href=?Page=1&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[Ê×Ò³]</a>&nbsp;<a href=?Page="&Page-1&"&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[ÉÏÒ»Ò³]</a>&nbsp;"
  791. Content = Content & "[ÏÂÒ»Ò³]&nbsp;[βҳ]"
  792. else
  793. Content = Content & "<a href=?Page=1&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[Ê×Ò³]</a>&nbsp;<a href=?Page="&Page-1&"&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[ÉÏÒ»Ò³]</a>&nbsp;"
  794. Content = Content & "<a href=?Page="&Page+1&"&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[ÏÂÒ»Ò³]</a>&nbsp;<a href=?Page="&Rs.PageCount&"&classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&">[βҳ]</a>"
  795. end if
  796. end if
  797. Content = Content & "&nbsp;&nbsp;&nbsp;Ò³´Î£º<strong>"&Page&"</strong>/"&Rs.PageCount&"Ò³&nbsp;תµ½£º"
  798. Content = Content & "<select name=""Page"" onchange=""javascript:window.location='?"&Query_String&"classid="&classid&"&BigClassName="&rsbigclassname&"&keyword="&keyword&"&Page='+this.options[this.selectedIndex].value+'';"">"
  799. for i=1 to Rs.PageCount
  800. Content = Content & "<option value="""&i&""""
  801. if Page = i then Content = Content & " selected"
  802. Content = Content & ">"&i&"</option>"
  803. next
  804. Content = Content & "</select>"
  805. Content = Content & "&nbsp;&nbsp;"
  806. Content = Content & "</td></tr>"
  807. ' Response.Write(Content)
  808. End Sub
  809.  
  810. Sub ShowPagemess(Colspan)
  811. ' Content=""
  812. Content = Content & "<tr align=""center""><td colspan="""&Colspan&""">"
  813. Content = Content & "¹²ÓУº<strong>"&Rs.RecordCount&"</strong>Ìõ&nbsp;ÿҳÏÔʾ£º<strong>"&Rs.PageSize&"</strong>Ìõ&nbsp;&nbsp;&nbsp;"
  814. if Rs.PageCount=1 or Rs.PageCount=0 then
  815. Content = Content & "[Ê×Ò³]&nbsp;[ÉÏÒ³]&nbsp;[´ÎÒ³]&nbsp;[βҳ]"
  816. else
  817. if Page=1 then
  818. Content = Content & "[Ê×Ò³]&nbsp;[ÉÏÒ³]&nbsp;"
  819. Content = Content & "<a href=""?"&Query_String&"Page="&Page+1&""">[´ÎÒ³]</a>&nbsp;<a href=""?"&Query_String&"Page="&Rs.PageCount&""">[βҳ]</a>"
  820. elseif Page=Rs.PageCount then
  821. Content = Content & "<a href=""?"&Query_String&"Page=1"">[Ê×Ò³]</a>&nbsp;<a href=""?"&Query_String&"Page="&Page-1&""">[ÉÏÒ³]</a>&nbsp;"
  822. Content = Content & "[´ÎÒ³]&nbsp;[βҳ]"
  823. else
  824. Content = Content & "<a href=""?"&Query_String&"Page=1"">[Ê×Ò³]</a>&nbsp;<a href=""?"&Query_String&"Page="&Page-1&""">[ÉÏÒ³]</a>&nbsp;"
  825. Content = Content & "<a href=""?"&Query_String&"Page="&Page+1&""">[´ÎÒ³]</a>&nbsp;<a href=""?"&Query_String&"Page="&Rs.PageCount&""">[βҳ]</a>"
  826. end if
  827. end if
  828. Content = Content & "&nbsp;&nbsp;&nbsp;Ò³´Î£º<strong>"&Page&"</strong>/"&Rs.PageCount&"Ò³&nbsp;תµ½£º"
  829. Content = Content & "<select name=""Page"" onchange=""javascript:window.location='?"&Query_String&"Page='+this.options[this.selectedIndex].value+'';"">"
  830. for i=1 to Rs.PageCount
  831. Content = Content & "<option value="""&i&""""
  832. if Page = i then Content = Content & " selected"
  833. Content = Content & ">"&i&"</option>"
  834. next
  835. Content = Content & "</select>"
  836. Content = Content & "&nbsp;&nbsp;"
  837. Content = Content & "</td></tr>"
  838. ' Response.Write(Content)
  839. End Sub
  840.  
  841. Sub SendGuest()
  842. Dim Title,Sender,Email,Content,Code,photo,address
  843. Title=Trim(Request.Form("Title"))
  844. photo=Trim(Request.Form("photo"))
  845. address=Trim(Request.Form("address"))
  846. Sender=Trim(Request.Form("Sender"))
  847. Email=Trim(Request.Form("Email"))
  848. Content=Trim(Request.Form("Content"))
  849. Code=Trim(Request.Form("Code"))
  850. If IsNumeric(Code)=False Then Response.Write("<script>alert(""ÑéÖ¤ÂëÐèΪÊý×Ö"");history.back()</script>")
  851. If isEmail(Email)=False Then Response.Write("<script>alert(""ÓʼþµØÖ·¸ñʽ²»¶Ô"");history.back()</script>")
  852. If Sender="" Or Email="" Or Content="" Or Int(Code) <> Session("m_Code") Then
  853. Response.Write("<script>alert(""ÇëÊäÈëÍêÕûµÄÐÅÏ¢."");history.back()</script>")
  854. Else
  855. Sql="Select * From Guest"
  856. Rs.Open Sql,Conn,1,2
  857. Rs.AddNew
  858. Rs("Title")=Title
  859. Rs("Sender")=Sender
  860. Rs("photo")=photo
  861. Rs("address")=address
  862. Rs("Email")=Email
  863. Rs("Content")=Server.HTMLEncode(Content)
  864. Rs("Ip")=IP
  865. Rs("DateAndTime")=Now()
  866. Rs.Update
  867. Rs.Close
  868. Response.Write("<script>alert(""ÁôÑÔÒÑÌá½»£¬ÇëµÈ´ý»Ø¸´"");location.href="""& Http_Referer &"""</script>")
  869. End If
  870. Response.End
  871. End Sub
  872.  
  873. Sub SendMail(MailContent)
  874. If m_MSvr(0)="Jmail" Then
  875. Dim JMail
  876. Set JMail = Server.CreateObject("JMail.Message")
  877. JMail.Charset = "gb2312"
  878. JMail.From = m_MSvr(2)
  879. JMail.FromName = m_Config(0)
  880. JMail.Subject = m_Config(0) & "ÐÅÏ¢Ô±"
  881. JMail.MailServerUserName = m_MSvr(2)
  882. JMail.MailServerPassword = m_MSvr(3)
  883. JMail.Priority = 3 ' ÉèÖÃÓÅÏȼ¶
  884. JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
  885. JMail.AddRecipient(m_MSvr(4))
  886. JMail.HTMLBody = MailContent
  887. ' Jmail.AddAttachment(Server.MapPath("logo3.gif"),True)
  888. JMail.Send(m_MSvr(1))
  889. JMail.Close()
  890. Response.Write("<script>alert(""Óʼþ·¢Ëͳɹ¦!"");</script>")
  891. ElseIf m_MSvr(0)="CDONTS" Then
  892. Dim CodMail
  893. Set CodMail = Server.CreateObject("CDONTS.NewMail") '½¨Á¢Óʼþ¶ÔÏó
  894. CodMail.Subject = m_Config(0) & "ÐÅÏ¢Ô±"
  895. CodMail.From = """"& m_Config(0) &""" <"& m_Config(3) &">"
  896. CodMail.To = m_MSvr(4)
  897. CodMail.bodyformat = 0
  898. CodMail.MailFormat = 0
  899. ' CodMail.AttachFile(Server.MapPath("logo3.gif"),"logo3.gif")
  900. CodMail.Body = MailContent
  901. CodMail.Send
  902. Set CodMail=Nothing
  903. Response.Write("<script>alert(""Óʼþ·¢Ëͳɹ¦!"");</script>")
  904. Else
  905. Response.Write("<script>alert(""·þÎñÆ÷²»Ö§³ÖÓʼþ·¢ËÍ!"");history.back()</script>")
  906. End If
  907. End Sub
  908.  
  909. Sub SelectClass(ClassID,CurrentID,Layout)
  910. Dim RsClass,SqlClass,strTemp,tmpDepth,arRshowLine(20)
  911. For i=0 To Ubound(arRshowLine)
  912. arRshowLine(i)=False
  913. Next
  914. SqlClass="Select * From Class Where"& ClassSQL(ClassID) &" And Layout='"&Layout&"' order by RootID,OrderID"
  915. Set RsClass=Server.CreateObject("Adodb.RecordSet")
  916. RsClass.Open SqlClass,Conn,1,1
  917. If RsClass.Bof And RsClass.Bof Then
  918. Response.Write("<option value='0'>ÇëÏÈÌí¼Ó·ÖÀà</option>")
  919. Else
  920. Do While Not RsClass.Eof
  921. tmpDepth=RsClass("Depth")
  922. If RsClass("NextID")>0 Then
  923. arRshowLine(tmpDepth)=True
  924. Else
  925. arRshowLine(tmpDepth)=False
  926. End If
  927. strTemp="<option value="""
  928. If RsClass("Child")>0 Then
  929. strTemp=strTemp & 0
  930. Else
  931. strTemp=strTemp & RsClass("ClassID")
  932. End If
  933. strTemp=strTemp & """"
  934. If CurrentID>0 And RsClass("ClassID")=CurrentID Then
  935. strTemp=strTemp & " selected"
  936. End If
  937. strTemp=strTemp & ">"
  938.  
  939. If tmpDepth>0 Then
  940. For i=1 To tmpDepth
  941. strTemp=strTemp & "&nbsp;"
  942. If i=tmpDepth Then
  943. If RsClass("NextID")>0 Then
  944. strTemp=strTemp & "©À&nbsp;"
  945. Else
  946. strTemp=strTemp & "©¸&nbsp;"
  947. End If
  948. Else
  949. If arRshowLine(i)=True Then
  950. strTemp=strTemp & "©¦"
  951. Else
  952. strTemp=strTemp & "&nbsp;"
  953. End If
  954. End If
  955. Next
  956. End If
  957. strTemp=strTemp & RsClass("ClassName")
  958. ' strTemp=strTemp & RsClass("ClassName") &"("& RsClass("ClassID") &")"
  959. If RsClass("Child")>0 Then
  960. strTemp=strTemp & "("&RsClass("Child")&")"
  961. End If
  962. strTemp=strTemp & "</option>"
  963. Response.Write(strTemp)
  964. RsClass.MoveNext
  965. loop
  966. End If
  967. RsClass.Close
  968. Set RsClass=Nothing
  969. End Sub
  970.  
  971. Function ClassSQL(ClassID)
  972. If ClassID=0 Then
  973. ClassSQL=" 1=1"
  974. Exit Function
  975. End If
  976. Dim RsTemp,ChildID
  977. Set RsTemp=Conn.Execute("Select ParentPath From Class Where ClassID="&ClassID)
  978. If Not RsTemp.Eof Then
  979. Dim ParentPath
  980. ParentPath = RsTemp("ParentPath")
  981. Else
  982. Content = Content & "<tr><td align=""center"">ÇëÑ¡ÔñÒª²éѯµÄ·ÖÀà</td></tr>"
  983. End If
  984. Set RsTemp=Conn.Execute("Select ClassID From Class Where ParentID=" & ClassID & " Or ParentPath Like '"& ParentPath &","& ClassID &"%'")
  985. If Not RsTemp.Eof Then
  986. Do While Not RsTemp.Eof
  987. If ChildID="" Then
  988. ChildID=RsTemp(0)
  989. Else
  990. ChildID=ChildID & "," & RsTemp(0)
  991. End If
  992. RsTemp.MoveNext
  993. Loop
  994. ClassSql = " ClassID In ("&ClassID &","& ChildID &")"
  995. Else
  996. ClassSql = " ClassID="& ClassID
  997. End If
  998. RsTemp.Close
  999. Set RsTemp=Nothing
  1000. End Function
  1001.  
  1002. Function delHtml(strHtml)
  1003. Dim objRegExp, strOutput
  1004. Set objRegExp = New Regexp
  1005.  
  1006. objRegExp.IgnoreCase = True
  1007. objRegExp.Global = True
  1008. objRegExp.Pattern = "(<[a-zA-Z].*?>)|(<[\/][a-zA-Z].*?>)|(\r)"
  1009.  
  1010. strOutput = objRegExp.Replace(strHtml,"")
  1011. strOutput = Replace(strOutput, "<", "&lt;")
  1012. strOutput = Replace(strOutput, ">", "&gt;")
  1013. strOutput = Replace(strOutput, "&nbsp;","")
  1014. delHtml = strOutput
  1015.  
  1016. Set objRegExp = Nothing
  1017. End Function
  1018.  
  1019. function getFileExtName(fileName)
  1020. dim pos
  1021. pos=instrrev(filename,".")
  1022. if pos>0 then
  1023. getFileExtName=mid(fileName,pos+1)
  1024. else
  1025. getFileExtName=""
  1026. end if
  1027. end function
  1028. %>
Add Comment
Please, Sign In to add comment