En_SysProduct.asp
Upload User: ahxunteng
Upload Date: 2022-05-16
Package Size: 1606k
Code Size: 31k
Development Platform:

VBScript

  1. <%
  2. dim strFileName,MaxPerPage,ShowSmallClassType
  3. dim totalPut,CurrentPage,TotalPages
  4. dim BeginTime,EndTime
  5. dim founderr, errmsg
  6. dim EnBigClassName,EnSmallClassName,SpecialName,keyword,strField
  7. dim rs,sql,sqlArticle,rsArticle,sqlSearch,rsSearch,sqlBigClass,rsBigClass,sqlSpecial,rsSpecial
  8. dim SpecialTotal
  9. BeginTime=Timer
  10. EnBigClassName=Trim(request("EnBigClassName"))
  11. EnSmallClassName=Trim(request("EnSmallClassName"))
  12. SpecialName=trim(request("SpecialName"))
  13. keyword=trim(request("keyword"))
  14. if keyword<>"" then 
  15. keyword=replace(replace(replace(replace(keyword,"'","‘"),"<","&lt;"),">","&gt;")," ","&nbsp;")
  16. end if
  17. strField=trim(request("Field"))
  18. if request("page")<>"" then
  19.     currentPage=cint(request("page"))
  20. else
  21. currentPage=1
  22. end if
  23. sqlBigClass="select * from PrBigClasss order by BigClassID"
  24. Set rsBigClass= Server.CreateObject("ADODB.Recordset")
  25. rsBigClass.open sqlBigClass,conn,1,1
  26. '=========================================================================
  27. '过程名:ShowSmallClass_Tree
  28. '作  用:树形目录方式显示栏目
  29. '参  数:无
  30. '=========================================================================
  31. Sub ShowSmallClass_Tree()
  32. %>
  33. <SCRIPT language=javascript>
  34. function opencat(cat,img){
  35. if(cat.style.display=="none"){
  36. cat.style.display="";
  37. img.src="../img/class2.gif";
  38. } else {
  39. cat.style.display="none"; 
  40. img.src="../img/class1.gif";
  41. }
  42. }
  43. </Script>
  44. <TABLE cellSpacing=0 cellPadding=0 width="85%" border=0 align=center>
  45. <%
  46. dim i
  47. if rsBigClass.eof and rsBigClass.bof then
  48. Response.Write "The column is under construction……"
  49. else
  50. i=1
  51. do while not rsBigClass.eof
  52. %>
  53. <TR>
  54. <TD language=javascript onmouseup="opencat(cat10<%=i%>000,&#13;&#10; img10<%=i%>000);" id=item$pval[catID]) style="CURSOR: hand" width=26 height=24 align=center><IMG id=img10<%=i%>000 src="../img/class1.gif" width=20 height=20></TD>
  55. <TD class='ML_Tdbg'><a href='En_Product.asp?EnBigClassName=<%=rsBigClass("EnBigClassName")%>'language=javascript onmouseover="opencat(cat10<%=i%>000,&#13;&#10; img10<%=i%>000);"><%=rsBigClass("EnBigClassName")%></a></TD>
  56. </TR>
  57. <TR>
  58. <TD id=cat10<%=i%>000 style="DISPLAY: none" bgColor=#fefdf5 colspan="2">
  59. <%
  60. dim rss,sqls,j
  61. set rss = server.CreateObject ("adodb.recordset")
  62. sqls="select * from PrSmallClass where EnBigClassName='" & rsBigClass("EnBigClassName") & "'order by SmallClassID"
  63. rss.open sqls,conn,1,1
  64. if rss.eof and rss.bof then
  65. Response.Write "No small class"
  66. else
  67. j=1
  68. do while not rss.eof
  69. %>
  70. <IMG height=20 src="../img/class3.gif" width=26 align=absMiddle border=0><a href="En_Product.asp?EnBigClassName=<%=rss("EnBigClassName")%>&EnSmallclassname=<%=rss("EnSmallClassName")%>"><%=rss("EnSmallClassName")%></a><BR>
  71. <%
  72. rss.movenext
  73. j=j+1
  74. loop
  75. end if
  76. rss.close
  77. set rss=nothing
  78. %>
  79. </TD>
  80. </TR>
  81. <%
  82. rsBigClass.movenext
  83. i=i+1
  84. loop
  85. end if
  86. %>
  87. </TABLE>
  88. <%
  89. end Sub 
  90. '=========================================================================
  91. '过程名:ShowVote
  92. '作  用:显示网站调查
  93. '参  数:无
  94. '=========================================================================
  95. sub ShowVote()
  96. dim sqlVote,rsVote,i
  97. sqlVote="select top 1 * from Vote where IsSelected=True"
  98. Set rsVote= Server.CreateObject("ADODB.Recordset")
  99. rsVote.open sqlVote,conn,1,1
  100. if rsVote.bof and rsVote.eof then 
  101. response.Write "&nbsp;There is not any investigation" 'There is not any investigation没有任何调查
  102. else
  103. response.write "<form name='VoteForm'method='post'action='En_vote.asp'target='_blank'><td>"
  104. response.write "&nbsp;&nbsp;&nbsp;&nbsp;" & rsVote("EnTitle") & "<br>"
  105. if rsVote("VoteType")="Single" then
  106. for i=1 to 8
  107. if trim(rsVote("Select" & i) & "")="" then exit for
  108. response.Write "<input type='radio'name='VoteOption'value='" & i & "'>" & rsVote("Select" & i) & "<br>"
  109. next
  110. else
  111. for i=1 to 8
  112. if trim(rsVote("Select" & i) & "")="" then exit for
  113. response.Write "<input type='checkbox'name='VoteOption'value='" & i & "'>" & rsVote("Select" & i) & "<br>"
  114. next
  115. end if
  116. response.write "<br><input name='VoteType'type='hidden'value='" & rsVote("VoteType") & "'>"
  117. response.write "<input name='Action'type='hidden'value='Vote'>"
  118. response.write "<input name='ID'type='hidden'value='" & rsVote("ID") & "'>"
  119. response.write "<div align='center'>"
  120. response.write "<a href='javascript:VoteForm.submit();'><img src='images/voteSubmit.gif' width='52'height='18'border='0'></a>&nbsp;&nbsp;"
  121.         response.write "<a href='En_Vote.asp?Action=Show'target='_blank'><img src='images/voteView.gif' width='52'height='18'border='0'></a>"
  122. response.write "</div></td></form>"
  123. end if
  124. rsVote.close
  125. set rsVote=nothing
  126. end sub
  127. '=========================================================================
  128. '过程名:ShowClassGuide
  129. '作  用:显示栏目导航位置
  130. '参  数:无
  131. '=========================================================================
  132. sub ShowClassGuide()
  133. response.write  "<a href='En_Product.asp'>ProductShow</a>&nbsp;&gt;&gt;" 'ProductShow 产品展示
  134. if EnBigClassName="" and EnSmallClassName="" then
  135. response.write "&nbsp;All products"
  136. else
  137. if EnBigClassName<>"" then
  138. response.write "&nbsp;<a href='En_Product.asp?EnBigClassName=" & EnBigClassName & "'>" & EnBigClassName & "</a>&nbsp;&gt;&gt;&nbsp;"
  139. if EnSmallClassName<>"" then
  140. response.write "<a href='En_Product.asp?EnBigClassName=" & EnBigClassName & "&EnSmallClassName=" & EnSmallClassName & "'>" & EnSmallClassName & "</a>"
  141. else
  142. response.write "All small class"
  143. end if
  144. end if
  145. end if
  146. end sub
  147. '=========================================================================
  148. '过程名:ShowArticleTotal
  149. '作  用:显示文章总数
  150. '参  数:无
  151. '=========================================================================
  152. sub ShowArticleTotal()
  153. dim sqlTotal
  154. dim rsTotal
  155. sqlTotal="select Count(*) from Product where Passed=True "
  156. if EnBigClassName<>"" then
  157. sqlTotal=sqlTotal & " and EnBigClassName='" & EnBigClassName & "'"
  158. if EnSmallClassName<>"" then
  159. sqlTotal=sqlTotal & " and EnSmallClassName='" & EnSmallClassName & "'"
  160. end if
  161. else
  162. if SpecialName<>"" then
  163. sqlTotal=sqlTotal & " and SpecialName='" & SpecialName & "'"
  164. end if
  165. end if
  166. Set rsTotal= Server.CreateObject("ADODB.Recordset")
  167. rsTotal.open sqlTotal,conn,1,1
  168. if rsTotal.eof and rsTotal.bof then
  169. totalPut=0
  170. response.write "Altogether 0 a product" '共有  个产品
  171. else
  172. totalPut=rsTotal(0)
  173. response.Write "Altogether " & totalPut - 1 & " a product" '共有  个产品
  174. end if
  175. rsTotal.close
  176. set rsTotal=nothing
  177. end sub
  178. '=========================================================================
  179. '过程名:ShowArticle
  180. '=========================================================================
  181. sub ShowArticle(TitleLen)
  182. if TitleLen<0 or TitleLen>200 then
  183. TitleLen=50
  184. end if
  185.     if currentpage<1 then
  186.     currentpage=1
  187.     end if
  188. if (currentpage-1)*MaxPerPage>totalput then
  189. if (totalPut mod MaxPerPage)=0 then
  190.     currentpage= totalPut  MaxPerPage
  191. else
  192.     currentpage= totalPut  MaxPerPage + 1
  193. end if
  194.     end if
  195. if currentPage=1 then
  196.         sqlArticle="select top " & MaxPerPage
  197. else
  198. sqlArticle="select "
  199. end if
  200. sqlArticle=sqlArticle & " ArticleID,Product_Id,EnBigClassName,EnSmallClassName,IncludePic,EnTitle,EnSpec,Size,EnMemo,DefaultPicUrl,UpdateTime,Hits from Product where Passed=True "
  201. if EnBigClassName<>"" then
  202. sqlArticle=sqlArticle & " and EnBigClassName='" & EnBigClassName & "'"
  203. if EnSmallClassName<>"" then
  204. sqlArticle=sqlArticle & " and EnSmallClassName='" & EnSmallClassName & "'"
  205. end if
  206. else
  207. if SpecialName<>"" then
  208. sqlArticle=sqlArticle & " and SpecialName='" & SpecialName & "'"
  209. end if
  210. end if
  211. sqlArticle=sqlArticle & " order by articleid desc"
  212. Set rsArticle= Server.CreateObject("ADODB.Recordset")
  213. rsArticle.open sqlArticle,conn,1,1
  214. if rsArticle.bof and  rsArticle.eof then
  215. response.Write("<br><li>There are not any products</li>")
  216. else
  217. if currentPage=1 then
  218. call ArticleContent(TitleLen)
  219. else
  220. if (currentPage-1)*MaxPerPage<totalPut then
  221.               rsArticle.move  (currentPage-1)*MaxPerPage
  222.           dim bookmark
  223.             bookmark=rsArticle.bookmark
  224.              call ArticleContent(TitleLen)
  225.          else
  226.          currentPage=1
  227.             call ArticleContent(TitleLen)
  228.      end if
  229. end if
  230. end if
  231. rsArticle.close
  232. set rsArticle=nothing
  233. end sub
  234. sub ArticleContent(intTitleLen)
  235.     dim i,lb,strli
  236. Response.Write "<table width=100% border=0 cellspacing=2 cellpadding=0><TR><TD></TD></TR>"
  237.     i=1
  238. Response.Write "<TR align=""center"">"
  239. do while not rsArticle.eof
  240. strli=""
  241. strli=strli & " ● &nbsp;&nbsp;Name:"& rsArticle("EnTitle") &" "&chr(13)
  242. strli=strli & " ● &nbsp;&nbsp;Spec:"& rsArticle("EnSpec") &" "&chr(13)
  243. strli=strli & " ● &nbsp;&nbsp;Size:"& rsArticle("Size") &" "
  244. lb=""
  245. lb=lb & "<TD>"
  246. lb=lb & "<table width=130 border=0 cellspacing=0 cellpadding=0>"
  247. lb=lb & "<TR><TD height=5></TD></TR>"
  248. lb=lb & "<tr>"
  249. lb=lb & "<td width='98%'><div align=center>"
  250. lb=lb & "<a href='En_ProductShow.asp?ArticleID=" & rsArticle("articleid") & "'title='" & strli &"'>" 
  251. lb=lb & "<img border=0 src='"& rsArticle("DefaultPicUrl") &"' width=130 height=90 class=bk></a>" 
  252. lb=lb & "</div></td>"
  253. lb=lb & "</tr>"
  254. lb=lb & "<TR><TD height=3></TD></TR>"
  255. lb=lb & "<tr>"
  256. lb=lb & "<td height=23 background=../img/tablebg1.gif><div align=center>"
  257. lb=lb & "<a href='En_ProductShow.asp?ArticleID="& rsArticle("articleid") &"'title='" & strli &"'>"& gotTopic(rsArticle("EnTitle"),16) &"</a>"
  258. lb=lb & "</div></td>"
  259. lb=lb & "</tr>"
  260. lb=lb & "<tr>"
  261. lb=lb & "<td height=20 background=../img/tablebg2.gif><div align=center>"
  262. lb=lb & "<a href='En_ProductShow.asp?ArticleID="& rsArticle("articleid") &"'>See</a>&nbsp;&nbsp;&nbsp;&nbsp;"
  263. lb=lb & "<a href='javascript:eshop("& rsArticle("Product_Id") &")'>Order</a>"
  264. lb=lb & "</div></td>"
  265. lb=lb & "</tr>"
  266. lb=lb & "<tr>" 
  267. lb=lb & "<td height=7 background='../img/tablebg3.gif'><IMG height=1 src='../img/1x1_pix.gif' width=1></td>"
  268. lb=lb & "</tr>"
  269. lb=lb & "</table>"
  270. lb=lb & "</TD>"
  271. response.write lb
  272. if i mod 4 <>0 then
  273. end if
  274. if i mod 4 =0 then
  275. Response.Write "</TR><TR>"
  276. end if
  277. rsArticle.movenext
  278. i=i+1
  279. if i>=MaxPerPage then exit do
  280. loop
  281.  Response.Write "</TR><TR><TD></TD></TR></Table>"
  282. end sub 
  283. '=========================================================================
  284. '过程名:ShowSearchTerm
  285. '作  用:显示搜索条件信息
  286. '参  数:无
  287. '=========================================================================
  288. sub ShowSearchTerm()
  289. response.write "|&nbsp;ProductSearch&nbsp;&gt;&gt; " 'Product search产品搜索
  290. if EnBigClassName<>"" then
  291. response.write "<a href='En_Default.asp?EnBigClassName=" & EnBigClassName & "'>" & EnBigClassName & "</a>&nbsp;&gt;&gt;&nbsp;"
  292. if EnSmallClassName<>"" then
  293. response.write "<a href='En_Default.asp?EnBigClassName=" & EnBigClassName & "&EnSmallClassName=" & EnSmallClassName & "'>" & EnSmallClassName & "</a>&nbsp;&gt;&gt;&nbsp;"
  294. else
  295. response.write "All Small Class &nbsp;&gt;&gt;&nbsp;" 'All Small Class所有小类
  296. end if
  297. end if
  298. if keyword<>"" then
  299.   select case strField
  300. case "EnTitle"
  301. response.Write "Contain in the name <font color=red>"&keyword&"</font> Products" '名称中含有  的产品
  302. case "EnContent"
  303. response.Write "Contain description <font color=red>"&keyword&"</font> Products" '说明含有  的产品 
  304. case else
  305. response.Write "Contain name <font color=red>"&keyword&"</font> Products" '名称中含有  的产品 
  306.   end select
  307. else
  308.   response.write "&nbsp;All products" '所有产品
  309. end if
  310. end sub
  311. '=========================================================================
  312. '过程名:SearchResultTotal
  313. '作  用:显示搜索结果总数
  314. '参  数:无
  315. '=========================================================================
  316. sub SearchResultTotal()
  317. dim rsTotal,sqlTotal
  318. sqlTotal="select count(*) from Product where Passed=True "
  319. if EnBigClassName<>"" then
  320. sqlTotal=sqlTotal & " and EnBigClassName='" & EnBigClassName & "'"
  321. if EnSmallClassName<>"" then
  322. sqlTotal=sqlTotal & " and EnSmallClassName='" & EnSmallClassName & "'"
  323. end if
  324. else
  325. if SpecialName<>"" then
  326. sqlTotal=sqlTotal & " and SpecialName='" & SpecialName & "'"
  327. end if
  328. end if
  329. if keyword<>"" then
  330. select case strField
  331. case "EnTitle"
  332. sqlTotal=sqlTotal & " and EnTitle like '%" & keyword & "%'"
  333. case "EnContent"
  334. sqlTotal=sqlTotal & " and EnContent like '%" & keyword & "%'"
  335. case else
  336. sqlTotal=sqlTotal & " and EnTitle like '%" & keyword & "%'"
  337. end select
  338. end if
  339. Set rsTotal= Server.CreateObject("ADODB.Recordset")
  340. rsTotal.open sqlTotal,conn,1,1
  341. if rsTotal.eof and rsTotal.bof then
  342. totalPut=0
  343. response.write "Altogether 0 a product" '共有 0 个产品
  344. else
  345. totalPut=rsTotal(0)
  346. response.Write "Find altogether " & totalPut & " a product" '共找到  个产品
  347. end if
  348. end sub
  349. '=========================================================================
  350. '过程名:ShowSearchResult
  351. '作  用:分页显示搜索结果
  352. '参  数:无
  353. '=========================================================================
  354. sub ShowSearchResult()
  355.     if currentpage<1 then
  356.     currentpage=1
  357.     end if
  358. if (currentpage-1)*MaxPerPage>totalput then
  359. if (totalPut mod MaxPerPage)=0 then
  360.     currentpage= totalPut  MaxPerPage
  361. else
  362.     currentpage= totalPut  MaxPerPage + 1
  363. end if
  364.     end if
  365. if currentPage=1 then
  366.         sqlSearch="select top " & MaxPerPage
  367. else
  368. sqlSearch="select "
  369. end if
  370. sqlSearch=sqlSearch & " * from Product where Passed=True "
  371. if EnBigClassName<>"" then
  372. sqlSearch=sqlSearch & " and EnBigClassName='" & EnBigClassName & "'"
  373. if EnSmallClassName<>"" then
  374. sqlSearch=sqlSearch & " and EnSmallClassName='" & EnSmallClassName & "'"
  375. end if
  376. else
  377. if SpecialName<>"" then
  378. sqlSearch=sqlSearch & " and SpecialName='" & SpecialName & "'"
  379. end if
  380. end if
  381. if keyword<>"" then
  382. select case strField
  383. case "EnTitle"
  384. sqlSearch=sqlSearch & " and EnTitle like '%" & keyword & "%'"
  385. case "EnContent"
  386. sqlSearch=sqlSearch & " and EnContent like '%" & keyword & "%'"
  387. case else
  388. sqlSearch=sqlSearch & " and EnTitle like '%" & keyword & "%'"
  389. end select
  390. end if
  391. sqlSearch=sqlSearch & " order by articleid desc"
  392. Set rsSearch= Server.CreateObject("ADODB.Recordset")
  393. rsSearch.open sqlSearch,conn,1,1
  394.   if rsSearch.eof and rsSearch.bof then 
  395.         response.write "<p align='center'><br><br>Have not had or found any products</p>" '没有或没有找到任何产品
  396.     else 
  397.     if currentPage=1 then 
  398.         call SearchResultContent()
  399.     else 
  400.         if (currentPage-1)*MaxPerPage<totalPut then 
  401.         rsSearch.move  (currentPage-1)*MaxPerPage 
  402.         dim bookmark 
  403.         bookmark=rsSearch.bookmark 
  404.         call SearchResultContent()
  405.        else 
  406.          currentPage=1 
  407.         call SearchResultContent()
  408.        end if 
  409.     end if 
  410.     end if 
  411.     rsSearch.close 
  412.     set rsSearch=nothing   
  413. end sub
  414. sub SearchResultContent()
  415.     dim i,strTemp,Encontent
  416. i=1
  417. do while not rsSearch.eof
  418. strTemp=""
  419. strTemp=strTemp & cstr(i) & ".<a href='En_ProductShow.asp?ArticleID=" & rsSearch("articleid") & "'>"
  420. if strField="EnTitle" then
  421. strTemp=strTemp & "<b>" & replace(rsSearch("EnTitle"),""&keyword&"","<font color=red>"&keyword&"</font>") & "</b></font></a>"
  422. else
  423. strTemp=strTemp & "<b>" & rsSearch("EnTitle") & "</b></a>"
  424. end if
  425. strTemp=strTemp & " [" & FormatDateTime(rsSearch("UpdateTime"),1) & "]"
  426. EnContent=left(nohtml(rsSearch("EnContent")),200)
  427. if strField="EnContent" then
  428. strTemp=strTemp & "<div style='padding:10px 20px'>" & replace(EnContent,""&keyword&"","<font color=red>"&keyword&"</font>") & "……</div>"
  429. else
  430. strTemp=strTemp & "<div style='padding:10px 20px'>" & EnContent & "……</div>"
  431. end if
  432. 'strTemp=strTemp & "</a>"
  433. response.write strTemp
  434. i=i+1
  435. if i>MaxPerPage then exit do
  436. rsSearch.movenext
  437. loop
  438. end sub 
  439. '=========================================================================
  440. '过程名:ShowSearch
  441. '作  用:显示文章搜索表单
  442. '参  数:ShowType ----显示方式。1为纵向,2为横向
  443. '=========================================================================
  444. sub ShowSearch(ShowType)
  445. dim count
  446. if ShowType<>1 and ShowType<>2 then
  447. ShowType=1
  448. end if
  449. set rs=server.createobject("adodb.recordset")
  450. sql = "select * from PrSmallClass order by SmallClassID asc"
  451. rs.open sql,conn,1,1
  452. %>
  453. <script language = "JavaScript">
  454. var onecount;
  455. subcat = new Array();
  456.         <%
  457.         count = 0
  458.         do while not rs.eof 
  459.         %>
  460. subcat[<%=count%>] = new Array("<%= trim(rs("EnSmallClassName"))%>","<%= trim(rs("EnBigClassName"))%>","<%= trim(rs("EnSmallClassName"))%>");
  461.         <%
  462.         count = count + 1
  463.         rs.movenext
  464.         loop
  465.         rs.close
  466.         %>
  467. onecount=<%=count%>;
  468. function changelocation(locationid)
  469.     {
  470.     document.myform.EnSmallClassName.length = 1; 
  471.     var locationid=locationid;
  472.     var i;
  473.     for (i=0;i < onecount; i++)
  474.         {
  475.             if (subcat[i][1] == locationid)
  476.             { 
  477.                 document.myform.EnSmallClassName.options[document.myform.EnSmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
  478.             }        
  479.         }
  480.     }    
  481. </script>
  482. <table border="0" cellpadding="2" cellspacing="0" align="center">
  483. <form method="Get" name="myform" action="En_search.asp">
  484. <tr><td height="28">
  485. <select name="Field" size="1">
  486.     <option value="EnTitle" selected>Produc name</option><!-- 产品名称 -->
  487.     <option value="EnContent">Product description</option><!-- 产品说明 -->
  488. </select>
  489. <%if ShowType=1 then%>
  490. </td></tr>
  491. <tr><td height="28">
  492. <%end if%>
  493. <select name="EnBigClassName" onChange="changelocation(document.myform.EnBigClassName.options[document.myform.EnBigClassName.selectedIndex].value)" size="1">
  494. <option selected value="">All big class</option>
  495. <%
  496. if not (rsBigClass.bof and rsBigClass.eof) then
  497. rsBigClass.movefirst
  498. do while not rsBigClass.eof
  499.         response.Write "<option value='" & trim(rsBigClass("EnBigClassName")) & "'>" & trim(rsBigClass("EnBigClassName")) & "</option>"
  500.     rsBigClass.movenext
  501. loop
  502. end if
  503. %>
  504. </select>
  505. <%if ShowType=1 then%>
  506. </td></tr>
  507. <tr><td height="28">
  508. <%end if%>
  509. <select name="EnSmallClassName" size="1">                  
  510.     <option selected value="">All small class</option>
  511. </select>
  512. <%if ShowType=1 then%>
  513. </td></tr>
  514. <tr><td height="28">
  515. <%end if%>
  516. <input type="text" name="keyword"  size=16 value="Key word" maxlength="50" onFocus="this.select();">
  517. <input type="submit" name="Submit"  value="Search">
  518. </td></tr>
  519. </form>
  520. </table>
  521. <%
  522. end sub
  523. '=========================================================================
  524. '过程名:ShowAllClass
  525. '作  用:显示所有栏目(栏目导航)
  526. '参  数:无
  527. '=========================================================================
  528. sub ShowAllClass()
  529. if rsBigClass.bof and rsBigClass.eof then 
  530. response.Write "&nbsp;There is not any column" 'There is not any column没有任何栏目
  531. else
  532. dim sqlClass,rsClass,strClassName
  533. rsBigClass.movefirst
  534. do while not rsBigClass.eof
  535. strClassName= "【<a href='En_Product.asp?EnBigClassName=" & rsBigClass("EnBigClassName") & "'><b>" & rsBigClass("EnBigClassName") & "</b></a>】<br><br>"
  536. sqlClass="select * from PrSmallClass where EnBigClassName='" & rsBigClass("EnBigClassName") & "'Order by SmallClassID"
  537. Set rsClass= Server.CreateObject("ADODB.Recordset")
  538. rsClass.open sqlClass,conn,1,1
  539. do while not rsClass.eof
  540. strClassName=strClassName & "&nbsp;<a href='En_Product.asp?EnBigClassName=" & rsClass("EnBigClassName") & "&EnSmallClassName=" & rsClass("EnSmallClassName") & "'>" & rsClass("EnSmallClassName") & "</a>&nbsp;"
  541. rsClass.movenext
  542. loop
  543. response.write strClassName & "<br><br>"
  544. rsBigClass.movenext
  545. loop
  546. rsClass.close
  547. set rsClass=nothing
  548. end if
  549. end sub
  550. '=========================================================================
  551. '过程名:ShowArticleContent
  552. '作  用:显示文章具体的内容,可以分页显示
  553. '参  数:无
  554. '"<img border=0 src=" & rsArticle("DefaultPicUrl") & " width=100 height=120>"
  555. '=========================================================================
  556. sub ShowArticleContent()
  557. dim ArticleID,strContent,CurrentPage
  558. dim ContentLen,MaxPerPage,pages,i,lngBound
  559. dim BeginPoint,EndPoint
  560. ArticleID=rs("ArticleID")
  561. strContent=rs("EnContent")
  562. ContentLen=len(strContent)
  563. CurrentPage=trim(request("ArticlePage"))
  564. if ShowContentByPage="No" or ContentLen<=200000 then
  565. response.write strContent
  566. if ShowContentByPage="Yes" then
  567. response.write "</p><p align='center'></p>"
  568. end if
  569. else
  570. if CurrentPage="" then
  571. CurrentPage=1
  572. else
  573. CurrentPage=Cint(CurrentPage)
  574. end if
  575. pages=ContentLenMaxPerPage_Content
  576. if MaxPerPage_Content*pages<ContentLen then
  577. pages=pages+1
  578. end if
  579. lngBound=MaxPerPage_Content          '最大误差范围
  580. if CurrentPage<1 then CurrentPage=1
  581. if CurrentPage>pages then CurrentPage=pages
  582. dim lngTemp
  583. dim lngTemp1,lngTemp1_1,lngTemp1_2,lngTemp1_1_1,lngTemp1_1_2,lngTemp1_1_3,lngTemp1_2_1,lngTemp1_2_2,lngTemp1_2_3
  584. dim lngTemp2,lngTemp2_1,lngTemp2_2,lngTemp2_1_1,lngTemp2_1_2,lngTemp2_2_1,lngTemp2_2_2
  585. dim lngTemp3,lngTemp3_1,lngTemp3_2,lngTemp3_1_1,lngTemp3_1_2,lngTemp3_2_1,lngTemp3_2_2
  586. dim lngTemp4,lngTemp4_1,lngTemp4_2,lngTemp4_1_1,lngTemp4_1_2,lngTemp4_2_1,lngTemp4_2_2
  587. dim lngTemp5,lngTemp5_1,lngTemp5_2
  588. dim lngTemp6,lngTemp6_1,lngTemp6_2
  589. if CurrentPage=1 then
  590. BeginPoint=1
  591. else
  592. BeginPoint=MaxPerPage_Content*(CurrentPage-1)+1
  593. lngTemp1_1_1=instr(BeginPoint,strContent,"</table>",1)
  594. lngTemp1_1_2=instr(BeginPoint,strContent,"</TABLE>",1)
  595. lngTemp1_1_3=instr(BeginPoint,strContent,"</Table>",1)
  596. if lngTemp1_1_1>0 then
  597. lngTemp1_1=lngTemp1_1_1
  598. elseif lngTemp1_1_2>0 then
  599. lngTemp1_1=lngTemp1_1_2
  600. elseif lngTemp1_1_3>0 then
  601. lngTemp1_1=lngTemp1_1_3
  602. else
  603. lngTemp1_1=0
  604. end if
  605. lngTemp1_2_1=instr(BeginPoint,strContent,"<table",1)
  606. lngTemp1_2_2=instr(BeginPoint,strContent,"<TABLE",1)
  607. lngTemp1_2_3=instr(BeginPoint,strContent,"<Table",1)
  608. if lngTemp1_2_1>0 then
  609. lngTemp1_2=lngTemp1_2_1
  610. elseif lngTemp1_2_2>0 then
  611. lngTemp1_2=lngTemp1_2_2
  612. elseif lngTemp1_2_3>0 then
  613. lngTemp1_2=lngTemp1_2_3
  614. else
  615. lngTemp1_2=0
  616. end if
  617. if lngTemp1_1=0 and lngTemp1_2=0 then
  618. lngTemp1=BeginPoint
  619. else
  620. if lngTemp1_1>lngTemp1_2 then
  621. lngtemp1=lngTemp1_2
  622. else
  623. lngTemp1=lngTemp1_1+8
  624. end if
  625. end if
  626. lngTemp2_1_1=instr(BeginPoint,strContent,"</p>",1)
  627. lngTemp2_1_2=instr(BeginPoint,strContent,"</P>",1)
  628. if lngTemp2_1_1>0 then
  629. lngTemp2_1=lngTemp2_1_1
  630. elseif lngTemp2_1_2>0 then
  631. lngTemp2_1=lngTemp2_1_2
  632. else
  633. lngTemp2_1=0
  634. end if
  635. lngTemp2_2_1=instr(BeginPoint,strContent,"<p",1)
  636. lngTemp2_2_2=instr(BeginPoint,strContent,"<P",1)
  637. if lngTemp2_2_1>0 then
  638. lngTemp2_2=lngTemp2_2_1
  639. elseif lngTemp2_2_2>0 then
  640. lngTemp2_2=lngTemp2_2_2
  641. else
  642. lngTemp2_2=0
  643. end if
  644. if lngTemp2_1=0 and lngTemp2_2=0 then
  645. lntTemp2=BeginPoint
  646. else
  647. if lngTemp2_1>lngTemp2_2 then
  648. lngtemp2=lngTemp2_2
  649. else
  650. lngTemp2=lngTemp2_1+4
  651. end if
  652. end if
  653. lngTemp3_1_1=instr(BeginPoint,strContent,"</ur>",1)
  654. lngTemp3_1_2=instr(BeginPoint,strContent,"</UR>",1)
  655. if lngTemp3_1_1>0 then
  656. lngTemp3_1=lngTemp3_1_1
  657. elseif lngTemp3_1_2>0 then
  658. lngTemp3_1=lngTemp3_1_2
  659. else
  660. lngTemp3_1=0
  661. end if
  662. lngTemp3_2_1=instr(BeginPoint,strContent,"<ur",1)
  663. lngTemp3_2_2=instr(BeginPoint,strContent,"<UR",1)
  664. if lngTemp3_2_1>0 then
  665. lngTemp3_2=lngTemp3_2_1
  666. elseif lngTemp3_2_2>0 then
  667. lngTemp3_2=lngTemp3_2_2
  668. else
  669. lngTemp3_2=0
  670. end if
  671. if lngTemp3_1=0 and lngTemp3_2=0 then
  672. lngTemp3=BeginPoint
  673. else
  674. if lngTemp3_1>lngTemp3_2 then
  675. lngtemp3=lngTemp3_2
  676. else
  677. lngTemp3=lngTemp3_1+5
  678. end if
  679. end if
  680. if lngTemp1<lngTemp2 then
  681. lngTemp=lngTemp2
  682. else
  683. lngTemp=lngTemp1
  684. end if
  685. if lngTemp<lngTemp3 then
  686. lngTemp=lngTemp3
  687. end if
  688. if lngTemp>BeginPoint and lngTemp<=BeginPoint+lngBound then
  689. BeginPoint=lngTemp
  690. else
  691. lngTemp4_1_1=instr(BeginPoint,strContent,"</li>",1)
  692. lngTemp4_1_2=instr(BeginPoint,strContent,"</LI>",1)
  693. if lngTemp4_1_1>0 then
  694. lngTemp4_1=lngTemp4_1_1
  695. elseif lngTemp4_1_2>0 then
  696. lngTemp4_1=lngTemp4_1_2
  697. else
  698. lngTemp4_1=0
  699. end if
  700. lngTemp4_2_1=instr(BeginPoint,strContent,"<li",1)
  701. lngTemp4_2_1=instr(BeginPoint,strContent,"<LI",1)
  702. if lngTemp4_2_1>0 then
  703. lngTemp4_2=lngTemp4_2_1
  704. elseif lngTemp4_2_2>0 then
  705. lngTemp4_2=lngTemp4_2_2
  706. else
  707. lngTemp4_2=0
  708. end if
  709. if lngTemp4_1=0 and lngTemp4_2=0 then
  710. lngTemp4=BeginPoint
  711. else
  712. if lngTemp4_1>lngTemp4_2 then
  713. lngtemp4=lngTemp4_2
  714. else
  715. lngTemp4=lngTemp4_1+5
  716. end if
  717. end if
  718. if lngTemp4>BeginPoint and lngTemp4<=BeginPoint+lngBound then
  719. BeginPoint=lngTemp4
  720. else
  721. lngTemp5_1=instr(BeginPoint,strContent,"<img",1)
  722. lngTemp5_2=instr(BeginPoint,strContent,"<IMG",1)
  723. if lngTemp5_1>0 then
  724. lngTemp5=lngTemp5_1
  725. elseif lngTemp5_2>0 then
  726. lngTemp5=lngTemp5_2
  727. else
  728. lngTemp5=BeginPoint
  729. end if
  730. if lngTemp5>BeginPoint and lngTemp5<BeginPoint+lngBound then
  731. BeginPoint=lngTemp5
  732. else
  733. lngTemp6_1=instr(BeginPoint,strContent,"<br>",1)
  734. lngTemp6_2=instr(BeginPoint,strContent,"<BR>",1)
  735. if lngTemp6_1>0 then
  736. lngTemp6=lngTemp6_1
  737. elseif lngTemp6_2>0 then
  738. lngTemp6=lngTemp6_2
  739. else
  740. lngTemp6=0
  741. end if
  742. if lngTemp6>BeginPoint and lngTemp6<BeginPoint+lngBound then
  743. BeginPoint=lngTemp6+4
  744. end if
  745. end if
  746. end if
  747. end if
  748. end if
  749. if CurrentPage=pages then
  750. EndPoint=ContentLen
  751. else
  752.   EndPoint=MaxPerPage_Content*CurrentPage
  753.   if EndPoint>=ContentLen then
  754. EndPoint=ContentLen
  755.   else
  756. lngTemp1_1_1=instr(EndPoint,strContent,"</table>",1)
  757. lngTemp1_1_2=instr(EndPoint,strContent,"</TABLE>",1)
  758. lngTemp1_1_3=instr(EndPoint,strContent,"</Table>",1)
  759. if lngTemp1_1_1>0 then
  760. lngTemp1_1=lngTemp1_1_1
  761. elseif lngTemp1_1_2>0 then
  762. lngTemp1_1=lngTemp1_1_2
  763. elseif lngTemp1_1_3>0 then
  764. lngTemp1_1=lngTemp1_1_3
  765. else
  766. lngTemp1_1=0
  767. end if
  768. lngTemp1_2_1=instr(EndPoint,strContent,"<table",1)
  769. lngTemp1_2_2=instr(EndPoint,strContent,"<TABLE",1)
  770. lngTemp1_2_3=instr(EndPoint,strContent,"<Table",1)
  771. if lngTemp1_2_1>0 then
  772. lngTemp1_2=lngTemp1_2_1
  773. elseif lngTemp1_2_2>0 then
  774. lngTemp1_2=lngTemp1_2_2
  775. elseif lngTemp1_2_3>0 then
  776. lngTemp1_2=lngTemp1_2_3
  777. else
  778. lngTemp1_2=0
  779. end if
  780. if lngTemp1_1=0 and lngTemp1_2=0 then
  781. lngTemp1=EndPoint
  782. else
  783. if lngTemp1_1>lngTemp1_2 then
  784. lngtemp1=lngTemp1_2-1
  785. else
  786. lngTemp1=lngTemp1_1+7
  787. end if
  788. end if
  789. lngTemp2_1_1=instr(EndPoint,strContent,"</p>",1)
  790. lngTemp2_1_2=instr(EndPoint,strContent,"</P>",1)
  791. if lngTemp2_1_1>0 then
  792. lngTemp2_1=lngTemp2_1_1
  793. elseif lngTemp2_1_2>0 then
  794. lngTemp2_1=lngTemp2_1_2
  795. else
  796. lngTemp2_1=0
  797. end if
  798. lngTemp2_2_1=instr(EndPoint,strContent,"<p",1)
  799. lngTemp2_2_2=instr(EndPoint,strContent,"<P",1)
  800. if lngTemp2_2_1>0 then
  801. lngTemp2_2=lngTemp2_2_1
  802. elseif lngTemp2_2_2>0 then
  803. lngTemp2_2=lngTemp2_2_2
  804. else
  805. lngTemp2_2=0
  806. end if
  807. if lngTemp2_1=0 and lngTemp2_2=0 then
  808. lngTemp2=EndPoint
  809. else
  810. if lngTemp2_1>lngTemp2_2 then
  811. lngTemp2=lngTemp2_2-1
  812. else
  813. lngTemp2=lngTemp2_1+3
  814. end if
  815. end if
  816. lngTemp3_1_1=instr(EndPoint,strContent,"</ur>",1)
  817. lngTemp3_1_2=instr(EndPoint,strContent,"</UR>",1)
  818. if lngTemp3_1_1>0 then
  819. lngTemp3_1=lngTemp3_1_1
  820. elseif lngTemp3_1_2>0 then
  821. lngTemp3_1=lngTemp3_1_2
  822. else
  823. lngTemp3_1=0
  824. end if
  825. lngTemp3_2_1=instr(EndPoint,strContent,"<ur",1)
  826. lngTemp3_2_2=instr(EndPoint,strContent,"<UR",1)
  827. if lngTemp3_2_1>0 then
  828. lngTemp3_2=lngTemp3_2_1
  829. elseif lngTemp3_2_2>0 then
  830. lngTemp3_2=lngTemp3_2_2
  831. else
  832. lngTemp3_2=0
  833. end if
  834. if lngTemp3_1=0 and lngTemp3_2=0 then
  835. lngTemp3=EndPoint
  836. else
  837. if lngTemp3_1>lngTemp3_2 then
  838. lngtemp3=lngTemp3_2-1
  839. else
  840. lngTemp3=lngTemp3_1+4
  841. end if
  842. end if
  843. if lngTemp1<lngTemp2 then
  844. lngTemp=lngTemp2
  845. else
  846. lngTemp=lngTemp1
  847. end if
  848. if lngTemp<lngTemp3 then
  849. lngTemp=lngTemp3
  850. end if
  851. if lngTemp>EndPoint and lngTemp<=EndPoint+lngBound then
  852. EndPoint=lngTemp
  853. else
  854. lngTemp4_1_1=instr(EndPoint,strContent,"</li>",1)
  855. lngTemp4_1_2=instr(EndPoint,strContent,"</LI>",1)
  856. if lngTemp4_1_1>0 then
  857. lngTemp4_1=lngTemp4_1_1
  858. elseif lngTemp4_1_2>0 then
  859. lngTemp4_1=lngTemp4_1_2
  860. else
  861. lngTemp4_1=0
  862. end if
  863. lngTemp4_2_1=instr(EndPoint,strContent,"<li",1)
  864. lngTemp4_2_1=instr(EndPoint,strContent,"<LI",1)
  865. if lngTemp4_2_1>0 then
  866. lngTemp4_2=lngTemp4_2_1
  867. elseif lngTemp4_2_2>0 then
  868. lngTemp4_2=lngTemp4_2_2
  869. else
  870. lngTemp4_2=0
  871. end if
  872. if lngTemp4_1=0 and lngTemp4_2=0 then
  873. lngTemp4=EndPoint
  874. else
  875. if lngTemp4_1>lngTemp4_2 then
  876. lngtemp4=lngTemp4_2-1
  877. else
  878. lngTemp4=lngTemp4_1+4
  879. end if
  880. end if
  881. if lngTemp4>EndPoint and lngTemp4<=EndPoint+lngBound then
  882. EndPoint=lngTemp4
  883. else
  884. lngTemp5_1=instr(EndPoint,strContent,"<img",1)
  885. lngTemp5_2=instr(EndPoint,strContent,"<IMG",1)
  886. if lngTemp5_1>0 then
  887. lngTemp5=lngTemp5_1-1
  888. elseif lngTemp5_2>0 then
  889. lngTemp5=lngTemp5_2-1
  890. else
  891. lngTemp5=EndPoint
  892. end if
  893. if lngTemp5>EndPoint and lngTemp5<EndPoint+lngBound then
  894. EndPoint=lngTemp5
  895. else
  896. lngTemp6_1=instr(EndPoint,strContent,"<br>",1)
  897. lngTemp6_2=instr(EndPoint,strContent,"<BR>",1)
  898. if lngTemp6_1>0 then
  899. lngTemp6=lngTemp6_1+3
  900. elseif lngTemp6_2>0 then
  901. lngTemp6=lngTemp6_2+3
  902. else
  903. lngTemp6=EndPoint
  904. end if
  905. if lngTemp6>EndPoint and lngTemp6<EndPoint+lngBound then
  906. EndPoint=lngTemp6
  907. end if
  908. end if
  909. end if
  910. end if
  911.   end if
  912. end if
  913. response.write mid(strContent,BeginPoint,EndPoint-BeginPoint)
  914. response.write "</p><p align='center'><b>"
  915. if CurrentPage>1 then
  916. response.write "<a href='En_ProductShow.asp?ArticleID=" & ArticleID & "&ArticlePage=" & CurrentPage-1 & "'>Previous page</a>&nbsp;&nbsp;"
  917. end if
  918. for i=1 to pages
  919. if i=CurrentPage then
  920. response.write "<font color='red'>[" & cstr(i) & "]</font>&nbsp;"
  921. else
  922. response.write "<a href='En_ProductShow.asp?ArticleID=" & ArticleID & "&ArticlePage=" & i & "'>[" & i & "]</a>&nbsp;"
  923. end if
  924. next
  925. if CurrentPage<pages then
  926. response.write "&nbsp;<a href='En_ProductShow.asp?ArticleID=" & ArticleID & "&ArticlePage=" & CurrentPage+1 & "'>Next page</a>"
  927. end if
  928. response.write "</b></p>"
  929. end if
  930. end sub
  931. %>