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

VBScript

  1. <%
  2. dim strFileName,MaxPerPage,ShowSmallClassType
  3. dim totalPut,CurrentPage,TotalPages
  4. dim BeginTime,EndTime
  5. dim founderr, errmsg
  6. dim BigClassName,SmallClassName,SpecialName,keyword,strField
  7. dim rs,sql,sqlArticle,sqlDown,rsArticle,rsDown,sqlSearch,rsSearch,sqlBigClass,rsBigClass,sqlBigClass_Down,sqlSpecial,rsSpecial
  8. dim SpecialTotal
  9. BeginTime=Timer
  10. BigClassName=Trim(request("BigClassName"))
  11. SmallClassName=Trim(request("SmallClassName"))
  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 BigClass order by BigClassID"
  24. Set rsBigClass= Server.CreateObject("ADODB.Recordset")
  25. rsBigClass.open sqlBigClass,conn,1,1
  26. sqlBigClass_Down="select * from BigClass_Down order by BigClassID"
  27. Set rsBigClass_Down= Server.CreateObject("ADODB.Recordset")
  28. rsBigClass_Down.open sqlBigClass_Down,conn,1,1
  29. '=========================================================================
  30. '过程名:ShowSmallClass_Tree
  31. '作  用:树形目录方式显示栏目
  32. '参  数:无
  33. '=========================================================================
  34. sub ShowSmallClass_Tree()
  35. if rsBigClass.bof and rsBigClass.eof then 
  36. response.Write "栏目正在建设中……"
  37. else
  38. dim sqlClass,rsClass,strTree,BigClassNum,i,j
  39. rsBigClass.movefirst
  40. BigClassNum=rsBigClass.recordcount
  41. i=1
  42. do while not rsBigClass.eof
  43. if i<BigClassNum then
  44. strTree=""
  45. else
  46. strTree=""
  47. end if
  48. sqlClass="select * from SmallClass where BigClassName='" & rsBigClass("BigClassName") & "'Order by SmallClassID"
  49. Set rsClass= Server.CreateObject("ADODB.Recordset")
  50. rsClass.open sqlClass,conn,1,1
  51. strTree= strTree & "<table width=180 border=0 cellpadding=0 cellspacing=0>"
  52. strTree= strTree & "<tr>"
  53. strTree= strTree & "<td width=24 height=22>"
  54. strTree= strTree & "<div align=center><img src=Img/arrow_6.gif width=13 height=11></div></td>"
  55. strTree= strTree & "<td width=150>"
  56. strTree= strTree & "<a href='Product.asp?BigClassName=" & rsBigClass("BigClassName") & "'>"
  57.   strTree=strTree & rsBigClass("BigClassName")
  58. strTree=strTree & "</a></td>"
  59. 'strTree=strTree & "</td>"
  60. strTree= strTree & "</tr><tr>"
  61. strTree=strTree & "<TD height=1 colspan=2 background=img/naSzarym.gif>"
  62. strTree=strTree & "<IMG height=1 src=img/1x1_pix.gif width=10></TD>"
  63. strTree=strTree & "</TR>"
  64. strTree=strTree & "</table>"
  65. SmallClassNum=rsClass.recordcount
  66. j=1
  67. do while not rsClass.eof
  68. rsClass.movenext
  69. j=j+1
  70. loop
  71. response.write strTree
  72. rsBigClass.movenext
  73. i=i+1
  74. loop
  75. rsClass.close
  76. set rsClass=nothing
  77. end if
  78. end sub
  79. '=========================================================================
  80. '过程名:ShowSmallClass_Down_Tree
  81. '作  用:树形目录方式显示栏目
  82. '参  数:无
  83. '=========================================================================
  84. sub ShowSmallClass_Down_Tree()
  85. if rsBigClass_Down.bof and rsBigClass_Down.eof then 
  86. response.Write "栏目正在建设中……"
  87. else
  88. dim sqlClass,rsClass,strTree,BigClassNum,i,j
  89. rsBigClass_Down.movefirst
  90. BigClassNum=rsBigClass_Down.recordcount
  91. i=1
  92. do while not rsBigClass_Down.eof
  93. if i<BigClassNum then
  94. strTree=""
  95. else
  96. strTree=""
  97. end if
  98. sqlClass="select * from SmallClass_Down where BigClassName='" &rsBigClass_Down("BigClassName") & "'Order by SmallClassID"
  99. Set rsClass= Server.CreateObject("ADODB.Recordset")
  100. rsClass.open sqlClass,conn,1,1
  101. strTree= strTree & "<table width=180 border=0 cellpadding=0 cellspacing=0>"
  102. strTree= strTree & "<tr>"
  103. strTree= strTree & "<td width=24 height=22>"
  104. strTree= strTree & "<div align=center><img src=Img/arrow_6.gif width=13 height=11></div></td>"
  105. strTree= strTree & "<td width=150>"
  106. strTree= strTree & "<a href='Download.asp?BigClassName=" & rsBigClass_Down("BigClassName") & "'>"
  107.   strTree=strTree & rsBigClass_Down("BigClassName")
  108. strTree=strTree & "</a></td>"
  109. 'strTree=strTree & "</td>"
  110. strTree= strTree & "</tr><tr>"
  111. strTree=strTree & "<TD height=1 colspan=2 background=img/naSzarym.gif>"
  112. strTree=strTree & "<IMG height=1 src=img/1x1_pix.gif width=10></TD>"
  113. strTree=strTree & "</TR>"
  114. strTree=strTree & "</table>"
  115. SmallClassNum=rsClass.recordcount
  116. j=1
  117. do while not rsClass.eof
  118. rsClass.movenext
  119. j=j+1
  120. loop
  121. response.write strTree
  122. rsBigClass_Down.movenext
  123. i=i+1
  124. loop
  125. rsClass.close
  126. set rsClass=nothing
  127. end if
  128. end sub
  129. '=========================================================================
  130. '过程名:ShowVote
  131. '作  用:显示网站调查
  132. '参  数:无
  133. '=========================================================================
  134. sub ShowVote()
  135. dim sqlVote,rsVote,i
  136. sqlVote="select top 1 * from Vote where IsSelected=True"
  137. Set rsVote= Server.CreateObject("ADODB.Recordset")
  138. rsVote.open sqlVote,conn,1,1
  139. if rsVote.bof and rsVote.eof then 
  140. response.Write "&nbsp;没有任何调查"
  141. else
  142. response.write "<form name='VoteForm'method='post'action='vote.asp'target='_blank'><td>"
  143. response.write "&nbsp;&nbsp;&nbsp;&nbsp;" & rsVote("Title") & "<br>"
  144. if rsVote("VoteType")="Single" then
  145. for i=1 to 8
  146. if trim(rsVote("Select" & i) & "")="" then exit for
  147. response.Write "<input class='form'type='radio'name='VoteOption'value='" & i & "'>" & rsVote("Select" & i) & "<br>" 
  148. next
  149. else
  150. for i=1 to 8
  151. if trim(rsVote("Select" & i) & "")="" then exit for
  152. response.Write "<input class='form'type='checkbox'name='VoteOption'value='" & i & "'>" & rsVote("Select" & i) & "<br>"
  153. next
  154. end if
  155. response.write "<br><input class='form'name='VoteType'type='hidden'value='" & rsVote("VoteType") & "'>"
  156. response.write "<input class='form'name='Action'type='hidden'value='Vote'>"
  157. response.write "<input class='form'name='ID'type='hidden'value='" & rsVote("ID") & "'>"
  158. response.write "<div align='center'>"
  159. response.write "<a href='javascript:VoteForm.submit();'><img src='images/voteSubmit.gif' width='52'height='18'border='0'></a>&nbsp;&nbsp;"
  160.         response.write "<a href='Vote.asp?Action=Show'target='_blank'><img src='images/voteView.gif' width='52'height='18'border='0'></a>"
  161. response.write "</div></td></form>"
  162. end if
  163. rsVote.close
  164. set rsVote=nothing
  165. end sub
  166. '=========================================================================
  167. '过程名:ShowClassGuide
  168. '作  用:显示栏目导航位置
  169. '参  数:无
  170. '=========================================================================
  171. sub ShowClassGuide()
  172. response.write  "&nbsp;<a href='Products.asp'>产品</a>&nbsp;&gt;&gt;"
  173. if BigClassName="" and SmallClassName="" then
  174. response.write "&nbsp;所有产品"
  175. else
  176. if BigClassName<>"" then
  177. response.write "&nbsp;<a href='Product.asp?BigClassName=" & BigClassName & "'>" & BigClassName & "</a>&nbsp;&gt;&gt;&nbsp;"
  178. if SmallClassName<>"" then
  179. response.write "<a href='Product.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName & "'>" & SmallClassName & "</a>"
  180. else
  181. response.write "所有小类"
  182. end if
  183. end if
  184. end if
  185. end sub
  186. '=========================================================================
  187. '过程名:ShowClass_DownGuide
  188. '作  用:显示栏目导航位置
  189. '参  数:无
  190. '=========================================================================
  191. sub ShowClass_DownGuide()
  192. response.write  "&nbsp;<a href='Download.asp'>下载</a>&nbsp;&gt;&gt;"
  193. if BigClassName="" and SmallClassName="" then
  194. response.write "&nbsp;所有下载"
  195. else
  196. if BigClassName<>"" then
  197. response.write "&nbsp;<a href='Download.asp?BigClassName=" & BigClassName & "'>" & BigClassName & "</a>&nbsp;&gt;&gt;&nbsp;"
  198. if SmallClassName<>"" then
  199. response.write "<a href='Download.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName & "'>" & SmallClassName & "</a>"
  200. else
  201. response.write "所有小类"
  202. end if
  203. end if
  204. end if
  205. end sub
  206. '=========================================================================
  207. '过程名:ShowArticleTotal
  208. '作  用:显示文章总数
  209. '参  数:无
  210. '=========================================================================
  211. sub ShowArticleTotal()
  212. dim sqlTotal
  213. dim rsTotal
  214. sqlTotal="select Count(*) from Product where Passed=True "
  215. if BigClassName<>"" then
  216. sqlTotal=sqlTotal & " and BigClassName='" & BigClassName & "'"
  217. if SmallClassName<>"" then
  218. sqlTotal=sqlTotal & " and SmallClassName='" & SmallClassName & "'"
  219. end if
  220. else
  221. if SpecialName<>"" then
  222. sqlTotal=sqlTotal & " and SpecialName='" & SpecialName & "'"
  223. end if
  224. end if
  225. Set rsTotal= Server.CreateObject("ADODB.Recordset")
  226. rsTotal.open sqlTotal,conn,1,1
  227. if rsTotal.eof and rsTotal.bof then
  228. totalPut=0
  229. response.write "共有 0 个产品"
  230. else
  231. totalPut=rsTotal(0)
  232. response.Write "共有 " & totalPut & " 个产品"
  233. end if
  234. rsTotal.close
  235. set rsTotal=nothing
  236. end sub
  237. '=========================================================================
  238. '过程名:ShowDownTotal
  239. '作  用:显示文章总数
  240. '参  数:无
  241. '=========================================================================
  242. sub ShowDownTotal()
  243. dim sqlTotal
  244. dim rsTotal
  245. sqlTotal="select Count(*) from download "
  246. if BigClassName<>"" then
  247. sqlTotal=sqlTotal & " where BigClassName='" & BigClassName & "'"
  248. if SmallClassName<>"" then
  249. sqlTotal=sqlTotal & " and SmallClassName='" & SmallClassName & "'"
  250. end if
  251. end if
  252. Set rsTotal= Server.CreateObject("ADODB.Recordset")
  253. rsTotal.open sqlTotal,conn,1,1
  254. if rsTotal.eof and rsTotal.bof then
  255. totalPut=0
  256. response.write "共有 0 个下载"
  257. else
  258. totalPut=rsTotal(0)
  259. response.Write "共有 " & totalPut & " 个下载"
  260. end if
  261. rsTotal.close
  262. set rsTotal=nothing
  263. end sub
  264. '=========================================================================
  265. '过程名:ShowArticle
  266. '=========================================================================
  267. sub ShowArticle(TitleLen)
  268. if TitleLen<0 or TitleLen>200 then
  269. TitleLen=50
  270. end if
  271.     if currentpage<1 then
  272.     currentpage=1
  273.     end if
  274. if (currentpage-1)*MaxPerPage>totalput then
  275. if (totalPut mod MaxPerPage)=0 then
  276.     currentpage= totalPut  MaxPerPage
  277. else
  278.     currentpage= totalPut  MaxPerPage + 1
  279. end if
  280.     end if
  281. if currentPage=1 then
  282.         sqlArticle="select top " & MaxPerPage
  283. else
  284. sqlArticle="select "
  285. end if
  286. sqlArticle=sqlArticle & " ArticleID,Product_Id,BigClassName,SmallClassName,IncludePic,Title,Price,Spec,Unit,Memo,DefaultPicUrl,UpdateTime,Hits from Product where Passed=True "
  287. if BigClassName<>"" then
  288. sqlArticle=sqlArticle & " and BigClassName='" & BigClassName & "'"
  289. if SmallClassName<>"" then
  290. sqlArticle=sqlArticle & " and SmallClassName='" & SmallClassName & "'"
  291. end if
  292. else
  293. if SpecialName<>"" then
  294. sqlArticle=sqlArticle & " and SpecialName='" & SpecialName & "'"
  295. end if
  296. end if
  297. sqlArticle=sqlArticle & " order by articleid desc"
  298. Set rsArticle= Server.CreateObject("ADODB.Recordset")
  299. rsArticle.open sqlArticle,conn,1,1
  300. if rsArticle.bof and  rsArticle.eof then
  301. response.Write("<br><li>没有任何产品</li>")
  302. else
  303. if currentPage=1 then
  304. call ArticleContent(TitleLen)
  305. else
  306. if (currentPage-1)*MaxPerPage<totalPut then
  307.               rsArticle.move  (currentPage-1)*MaxPerPage
  308.           dim bookmark
  309.             bookmark=rsArticle.bookmark
  310.              call ArticleContent(TitleLen)
  311.          else
  312.          currentPage=1
  313.             call ArticleContent(TitleLen)
  314.      end if
  315. end if
  316. end if
  317. rsArticle.close
  318. set rsArticle=nothing
  319. end sub
  320. sub ArticleContent(intTitleLen)
  321.     dim i,strTemp
  322.     i=0
  323. do while not rsArticle.eof
  324. strTemp=""
  325. strTemp= strTemp & "<table width=100% border=0 cellspacing=3 cellpadding=0>"
  326.                 strTemp= strTemp & "<tr>"
  327.                 strTemp= strTemp & "<td width=25% rowspan=7>"
  328.                 strTemp= strTemp & "<div align=center><a href=ProductShow.asp?ArticleID=" & rsArticle("articleid") & ">" 
  329. fileExt=lcase(getFileExtName(rsArticle("DefaultPicUrl")))
  330. if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then
  331.                 strTemp= strTemp & "<img border=0 src=" & rsArticle("DefaultPicUrl") & " width=105 height=80>" 
  332. else
  333.  if fileext="swf" then
  334.     strTemp= strTemp & "<object  classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='105'height='84'>"
  335. strTemp= strTemp &"<param name=movie value='"&rsArticle("DefaultPicUrl")&"'>"
  336. strTemp= strTemp &"<param name=quality value=high>"
  337. strTemp= strTemp &"<param name='Play'value='-1'>"
  338. strTemp= strTemp &"<param name='Loop'value='0'>"
  339. strTemp= strTemp &"<param name='Menu'value='-1'>"
  340. strTemp= strTemp &"<param name='wmode'value='transparent'>"
  341. strTemp= strTemp &"<embed src='"&rsArticle("DefaultPicUrl")&"' width='105'height='84'pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'type='application/x-shockwave-flash'></embed> </object>"
  342.    end if
  343.       end if  
  344.  
  345.                 strTemp= strTemp & "</a></div></td>"
  346.                 strTemp= strTemp & "<td width=12% height=12>"
  347.                 strTemp= strTemp & "产品名称:</td>"
  348.                 strTemp= strTemp & "<td>"
  349.                 strTemp= strTemp & "<a href=ProductShow.asp?ArticleID=" & rsArticle("articleid") & ">" & rsArticle("Title") & ""
  350.                 strTemp= strTemp & "</a></td>"
  351. strTemp= strTemp & "</tr><tr>" 
  352.                 strTemp= strTemp & "<td width=12% height=12>"
  353.                 strTemp= strTemp & "产品售价:</td>"
  354.                 strTemp= strTemp & "<td>" & rsArticle("Price") & "元</td>"
  355. strTemp= strTemp & "</tr><tr>"
  356. strTemp= strTemp & "<td width=12% height=12>"
  357.                 strTemp= strTemp & "产品规格:</td>"
  358.                 strTemp= strTemp & "<td>"
  359.                 strTemp= strTemp & rsArticle("Spec") & ""
  360.                 strTemp= strTemp & "</a></td>"
  361. strTemp= strTemp & "</tr><tr>"
  362. strTemp= strTemp & "<td width=12% height=12>"
  363.                 strTemp= strTemp & "产品备注:</td>"
  364.                 strTemp= strTemp & "<td>"
  365.                 strTemp= strTemp & rsArticle("Memo") & ""
  366.                 strTemp= strTemp & "</a></td>"
  367.                 strTemp= strTemp & "</tr><tr>"
  368.                 strTemp= strTemp & "<td height=12>"
  369.                 strTemp= strTemp & "产品类别:</td>"
  370.                 strTemp= strTemp & "<td><a href=Product.asp?BigClassName=" & rsArticle("BigClassName") & ">" & rsArticle("BigClassName") & "</a> → "
  371.                 strTemp= strTemp & "<a href=Product.asp?BigClassName=" & rsArticle("BigClassName") & "&SmallClassName=" & rsArticle("SmallClassName") & ">" & rsArticle("SmallClassName") & ""
  372.                 strTemp= strTemp & "</a></td>"
  373.                 strTemp= strTemp & "</tr><tr>" 
  374.                'strTemp= strTemp & "<td height=12>"
  375.                'strTemp= strTemp & "产品编号:</td>"
  376.               ' strTemp= strTemp & "<td>" & rsArticle("Product_Id") & "</td>"
  377.               ' strTemp= strTemp & "</tr><tr>"
  378.    
  379.                 strTemp= strTemp & "<td height=12>产品信息:</td>"
  380.                 strTemp= strTemp & "<td>"
  381.                 strTemp= strTemp & "<a href=ProductShow.asp?ArticleID=" & rsArticle("articleid") & "><img src=Img/arrow_7.gif border=0></a></td>"
  382.                 strTemp= strTemp & "</tr><tr>"
  383.                 strTemp= strTemp & "<td colspan=2>"
  384.                 strTemp= strTemp & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
  385.                 strTemp= strTemp & "<tr>" 
  386.                 strTemp= strTemp & "<td width=50% height=12>"
  387.                 strTemp= strTemp & "<div align=center></div></td>"
  388.                 
  389. strTemp= strTemp & "<td width=50% height=12>"
  390.                 strTemp= strTemp & "<div align=center><a href=# onClick=""window.open('add.asp?Product_Id="&rsArticle("Product_Id")&"','blank_','scrollbars=yes,resizable=no,width=650,height=450')""><img border=0 src=img/addtocart.gif width=100 height=26>"
  391.                 strTemp= strTemp & "</a></div></td>"
  392.                 strTemp= strTemp & "</tr>"
  393.                 strTemp= strTemp & "</table>"
  394.                 strTemp= strTemp & "</td>"
  395.                 strTemp= strTemp & "</tr><tr>" 
  396.                 strTemp= strTemp & "<td height=1 colspan=3 bgcolor=#CCCCCC></td>"
  397.                 strTemp= strTemp & "</tr>"
  398.                 strTemp= strTemp & "</table>"
  399. response.write strTemp
  400. rsArticle.movenext
  401. i=i+1
  402. if i>=MaxPerPage then exit do
  403. loop
  404. end sub 
  405. '=========================================================================
  406. '过程名:ShowDown
  407. '=========================================================================
  408. sub ShowDown(TitleLen)
  409. if TitleLen<0 or TitleLen>200 then
  410. TitleLen=50
  411. end if
  412.     if currentpage<1 then
  413.     currentpage=1
  414.     end if
  415. if (currentpage-1)*MaxPerPage>totalput then
  416. if (totalPut mod MaxPerPage)=0 then
  417.     currentpage= totalPut  MaxPerPage
  418. else
  419.     currentpage= totalPut  MaxPerPage + 1
  420. end if
  421.     end if
  422. if currentPage=1 then
  423.         sqlDown="select top " & MaxPerPage
  424. else
  425. sqlDown="select "
  426. end if
  427. sqlDown=sqlDown & " ID,title,content,BigClassName,SmallClassName,imagenum,firstImageName,System,Softclass,PhotoUrl,DownloadUrl,FileSize,infotime,hits from download"
  428. if BigClassName<>"" then
  429. sqlDown=sqlDown & " where BigClassName='" & BigClassName & "'"
  430. if SmallClassName<>"" then
  431. sqlDown=sqlDown & " and SmallClassName='" & SmallClassName & "'"
  432. end if
  433. else
  434. if SpecialName<>"" then
  435. sqlDown=sqlDown & " and SpecialName='" & SpecialName & "'"
  436. end if
  437. end if
  438. sqlDown=sqlDown & " order by ID desc"
  439. Set rsDown= Server.CreateObject("ADODB.Recordset")
  440. rsDown.open sqlDown,conn,1,1
  441. if rsDown.bof and  rsDown.eof then
  442. response.Write("<br><li>没有任何下载</li>")
  443. else
  444. if currentPage=1 then
  445. call DownContent(TitleLen)
  446. else
  447. if (currentPage-1)*MaxPerPage<totalPut then
  448.               rsDown.move  (currentPage-1)*MaxPerPage
  449.           dim bookmark
  450.             bookmark=rsDown.bookmark
  451.              call DownContent(TitleLen)
  452.          else
  453.          currentPage=1
  454.             call DownContent(TitleLen)
  455.      end if
  456. end if
  457. end if
  458. rsDown.close
  459. set rsDown=nothing
  460. end sub
  461. sub DownContent(intTitleLen)
  462.     dim i,strTemp
  463.     i=0
  464. do while not rsDown.eof
  465. strTemp=""
  466. strTemp= strTemp & "<table width=100% border=0 cellspacing=3 cellpadding=0>"
  467.                 strTemp= strTemp & "<tr>"
  468.                 strTemp= strTemp & "<td width=20% rowspan=7>"
  469.                 strTemp= strTemp & "<div align=center><a href=DownloadShow.asp?ID=" & rsDown("id") & ">" 
  470.                 strTemp= strTemp & "<img border=0 src=" & rsDown("PhotoUrl") & " width=100 height=120>" 
  471.                 strTemp= strTemp & "</a></div></td>"
  472.                 strTemp= strTemp & "<td width=12% height=12>"
  473.                 strTemp= strTemp & "文件名称:</td>"
  474.                 strTemp= strTemp & "<td>"
  475.                 strTemp= strTemp & rsDown("Title") & ""
  476.                 strTemp= strTemp & "</td>"
  477. strTemp= strTemp & "</tr><tr>"
  478. strTemp= strTemp & "<td width=12% height=12>"
  479.                 strTemp= strTemp & "文件大小:</td>"
  480.                 strTemp= strTemp & "<td>"
  481.                 strTemp= strTemp & rsDown("FileSize") & "K"
  482.                 strTemp= strTemp & "</td>"
  483. strTemp= strTemp & "</tr><tr>"
  484. strTemp= strTemp & "<td width=12% height=12>"
  485.                 strTemp= strTemp & "发布日期:</td>"
  486.                 strTemp= strTemp & "<td>"
  487.                 strTemp= strTemp & rsDown("infotime") & ""
  488.                 strTemp= strTemp & "</td>"
  489. strTemp= strTemp & "</tr><tr>"
  490. strTemp= strTemp & "<td width=12% height=12>"
  491.                 strTemp= strTemp & "适用系统:</td>"
  492.                 strTemp= strTemp & "<td>"
  493.                 strTemp= strTemp & rsDown("System") & ""
  494.                 strTemp= strTemp & "</td>"
  495.                 strTemp= strTemp & "</tr><tr>"
  496.                 strTemp= strTemp & "<td height=12>"
  497.                 strTemp= strTemp & "下载类别:</td>"
  498.                 strTemp= strTemp & "<td><a href=Download.asp?BigClassName=" & rsDown("BigClassName") & ">" & rsDown("BigClassName") & "</a> → "
  499.                 strTemp= strTemp & "<a href=Download.asp?BigClassName=" & rsDown("BigClassName") & "&SmallClassName=" & rsDown("SmallClassName") & ">" & rsDown("SmallClassName") & ""
  500.                 strTemp= strTemp & "</a></td>"
  501.                 strTemp= strTemp & "</tr><tr>" 
  502. strTemp= strTemp & "<td height=12>下载说明:</td>"
  503.                 strTemp= strTemp & "<td>"
  504.                 strTemp= strTemp & "<a href=DownloadShow.asp?ID=" & rsDown("id") & "><img src=../Img/arrow_7.gif border=0></a></td>"
  505.                 strTemp= strTemp & "</tr><tr>"
  506.    
  507.                 strTemp= strTemp & "<td height=12></td>"
  508.                 strTemp= strTemp & "<td>"
  509.                 strTemp= strTemp & "<a href=" & rsDown("DownloadUrl") & "><img src=../Img/download.gif border=0></a></td>"
  510.                 strTemp= strTemp & "</tr><tr>"
  511.                 strTemp= strTemp & "<td colspan=2>"
  512.                 strTemp= strTemp & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
  513.                 strTemp= strTemp & "<tr>" 
  514.                 strTemp= strTemp & "<td width=50% height=12>"
  515.                 strTemp= strTemp & "<div align=center></div></td>"  
  516.                 strTemp= strTemp & "</tr>"
  517.                 strTemp= strTemp & "</table>"
  518.                 strTemp= strTemp & "</td>"
  519.                 strTemp= strTemp & "</tr><tr>" 
  520.                 strTemp= strTemp & "<td height=1 colspan=3 bgcolor=#CCCCCC></td>"
  521.                 strTemp= strTemp & "</tr>"
  522.                 strTemp= strTemp & "</table>"
  523. response.write strTemp
  524. rsDown.movenext
  525. i=i+1
  526. if i>=MaxPerPage then exit do
  527. loop
  528. end sub 
  529. '=========================================================================
  530. '过程名:ShowSearchTerm
  531. '作  用:显示搜索条件信息
  532. '参  数:无
  533. '=========================================================================
  534. sub ShowSearchTerm()
  535. response.write "|&nbsp;产品搜索&nbsp;&gt;&gt; "
  536. if BigClassName<>"" then
  537. response.write "<a href='Product.asp?BigClassName=" & BigClassName & "'>" & BigClassName & "</a>&nbsp;&gt;&gt;&nbsp;"
  538. if SmallClassName<>"" then
  539. response.write "<a href='Product.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName & "'>" & SmallClassName & "</a>&nbsp;&gt;&gt;&nbsp;"
  540. else
  541. response.write "所有小类&nbsp;&gt;&gt;&nbsp;"
  542. end if
  543. end if
  544. if keyword<>"" then
  545.   select case strField
  546. case "Title"
  547. response.Write "名称中含有 <font color=red>"&keyword&"</font> 的产品"
  548. case "Content"
  549. response.Write "说明含有 <font color=red>"&keyword&"</font> 的产品"
  550. case else
  551. response.Write "名称中含有 <font color=red>"&keyword&"</font> 的产品"
  552.   end select
  553. else
  554.   response.write "&nbsp;所有产品"
  555. end if
  556. end sub
  557. '=========================================================================
  558. '过程名:SearchResultTotal
  559. '作  用:显示搜索结果总数
  560. '参  数:无
  561. '=========================================================================
  562. sub SearchResultTotal()
  563. dim rsTotal,sqlTotal
  564. sqlTotal="select count(*) from Product where Passed=True "
  565. if BigClassName<>"" then
  566. sqlTotal=sqlTotal & " and BigClassName='" & BigClassName & "'"
  567. if SmallClassName<>"" then
  568. sqlTotal=sqlTotal & " and SmallClassName='" & SmallClassName & "'"
  569. end if
  570. else
  571. if SpecialName<>"" then
  572. sqlTotal=sqlTotal & " and SpecialName='" & SpecialName & "'"
  573. end if
  574. end if
  575. if keyword<>"" then
  576. select case strField
  577. case "Title"
  578. sqlTotal=sqlTotal & " and Title like '%" & keyword & "%'"
  579. case "Content"
  580. sqlTotal=sqlTotal & " and Content like '%" & keyword & "%'"
  581. case else
  582. sqlTotal=sqlTotal & " and Title like '%" & keyword & "%'"
  583. end select
  584. end if
  585. Set rsTotal= Server.CreateObject("ADODB.Recordset")
  586. rsTotal.open sqlTotal,conn,1,1
  587. if rsTotal.eof and rsTotal.bof then
  588. totalPut=0
  589. response.write "共有 0 个产品"
  590. else
  591. totalPut=rsTotal(0)
  592. response.Write "共找到 " & totalPut & " 个产品"
  593. end if
  594. end sub
  595. '=========================================================================
  596. '过程名:ShowSearchResult
  597. '作  用:分页显示搜索结果
  598. '参  数:无
  599. '=========================================================================
  600. sub ShowSearchResult()
  601.     if currentpage<1 then
  602.     currentpage=1
  603.     end if
  604. if (currentpage-1)*MaxPerPage>totalput then
  605. if (totalPut mod MaxPerPage)=0 then
  606.     currentpage= totalPut  MaxPerPage
  607. else
  608.     currentpage= totalPut  MaxPerPage + 1
  609. end if
  610.     end if
  611. if currentPage=1 then
  612.         sqlSearch="select top " & MaxPerPage
  613. else
  614. sqlSearch="select "
  615. end if
  616. sqlSearch=sqlSearch & " * from Product where Passed=True "
  617. if BigClassName<>"" then
  618. sqlSearch=sqlSearch & " and BigClassName='" & BigClassName & "'"
  619. if SmallClassName<>"" then
  620. sqlSearch=sqlSearch & " and SmallClassName='" & SmallClassName & "'"
  621. end if
  622. else
  623. if SpecialName<>"" then
  624. sqlSearch=sqlSearch & " and SpecialName='" & SpecialName & "'"
  625. end if
  626. end if
  627. if keyword<>"" then
  628. select case strField
  629. case "Title"
  630. sqlSearch=sqlSearch & " and Title like '%" & keyword & "%'"
  631. case "Content"
  632. sqlSearch=sqlSearch & " and Content like '%" & keyword & "%'"
  633. case else
  634. sqlSearch=sqlSearch & " and Title like '%" & keyword & "%'"
  635. end select
  636. end if
  637. sqlSearch=sqlSearch & " order by articleid desc"
  638. Set rsSearch= Server.CreateObject("ADODB.Recordset")
  639. rsSearch.open sqlSearch,conn,1,1
  640.   if rsSearch.eof and rsSearch.bof then 
  641.         response.write "<p align='center'><br><br>没有或没有找到任何产品</p>" 
  642.     else 
  643.     if currentPage=1 then 
  644.         call SearchResultContent()
  645.     else 
  646.         if (currentPage-1)*MaxPerPage<totalPut then 
  647.         rsSearch.move  (currentPage-1)*MaxPerPage 
  648.         dim bookmark 
  649.         bookmark=rsSearch.bookmark 
  650.         call SearchResultContent()
  651.        else 
  652.          currentPage=1 
  653.         call SearchResultContent()
  654.        end if 
  655.     end if 
  656.     end if 
  657.     rsSearch.close 
  658.     set rsSearch=nothing   
  659. end sub
  660. sub SearchResultContent()
  661.     dim i,strTemp,content
  662. i=1
  663. do while not rsSearch.eof
  664. strTemp=""
  665. strTemp=strTemp & cstr(i) & ".<a href='ProductShow.asp?ArticleID=" & rsSearch("articleid") & "'>"
  666. if strField="Title" then
  667. strTemp=strTemp & "<b>" & replace(rsSearch("title"),""&keyword&"","<font color=red>"&keyword&"</font>") & "</b></font></a>"
  668. else
  669. strTemp=strTemp & "<b>" & rsSearch("title") & "</b></a>"
  670. end if
  671. strTemp=strTemp & " [" & FormatDateTime(rsSearch("UpdateTime"),1) & "]"
  672. content=left(nohtml(rsSearch("content")),200)
  673. if strField="Content" then
  674. strTemp=strTemp & "<div style='padding:10px 20px'>" & replace(content,""&keyword&"","<font color=red>"&keyword&"</font>") & "……</div>"
  675. else
  676. strTemp=strTemp & "<div style='padding:10px 20px'>" & content & "……</div>"
  677. end if
  678. 'strTemp=strTemp & "</a>"
  679. response.write strTemp
  680. i=i+1
  681. if i>MaxPerPage then exit do
  682. rsSearch.movenext
  683. loop
  684. end sub 
  685. '=========================================================================
  686. '过程名:ShowSearch
  687. '作  用:显示文章搜索表单
  688. '参  数:ShowType ----显示方式。1为纵向,2为横向
  689. '=========================================================================
  690. sub ShowSearch(ShowType)
  691. dim count
  692. if ShowType<>1 and ShowType<>2 then
  693. ShowType=1
  694. end if
  695. set rs=server.createobject("adodb.recordset")
  696. sql = "select * from SmallClass order by SmallClassID asc"
  697. rs.open sql,conn,1,1
  698. %>
  699. <script language = "JavaScript">
  700. var onecount;
  701. subcat = new Array();
  702.         <%
  703.         count = 0
  704.         do while not rs.eof 
  705.         %>
  706. subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("BigClassName"))%>","<%= trim(rs("SmallClassName"))%>");
  707.         <%
  708.         count = count + 1
  709.         rs.movenext
  710.         loop
  711.         rs.close
  712.         %>
  713. onecount=<%=count%>;
  714. function changelocation(locationid)
  715.     {
  716.     document.myform.SmallClassName.length = 1; 
  717.     var locationid=locationid;
  718.     var i;
  719.     for (i=0;i < onecount; i++)
  720.         {
  721.             if (subcat[i][1] == locationid)
  722.             { 
  723.                 document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
  724.             }        
  725.         }
  726.     }    
  727. </script>
  728. <table border="0" cellpadding="2" cellspacing="0" align="center">
  729.   <form method="Get" name="myform" action="search.asp">
  730.     <tr>
  731.       <td height="28"> <select name="Field" size="1">
  732.           <option value="Title" selected>产品名称</option>
  733.           <option value="Content">产品说明</option>
  734.         </select> 
  735.         <%if ShowType=1 then%>
  736.       </td>
  737.     </tr>
  738.     <tr>
  739.       <td height="28"> 
  740.         <%end if%>
  741.         <select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1">
  742.           <option selected value="">所有大类</option>
  743.           <%
  744. if not (rsBigClass.bof and rsBigClass.eof) then
  745. rsBigClass.movefirst
  746. do while not rsBigClass.eof
  747.         response.Write "<option value='" & trim(rsBigClass("BigClassName")) & "'>" & trim(rsBigClass("BigClassName")) & "</option>"
  748.     rsBigClass.movenext
  749. loop
  750. end if
  751. %>
  752.         </select> 
  753.         <%if ShowType=1 then%>
  754.       </td>
  755.     </tr>
  756.     <tr>
  757.       <td height="28"> 
  758.         <%end if%>
  759.         <select name="SmallClassName">
  760.           <option selected value="">所有小类</option>
  761.         </select> 
  762.         <%if ShowType=1 then%>
  763.       </td>
  764.     </tr>
  765.     <tr>
  766.       <td height="28"> 
  767.         <%end if%>
  768.         <input type="text" name="keyword"  size=12 value="关键字" maxlength="50" onFocus="this.select();"> 
  769.         <input type="submit" name="Submit"  value="搜索"> </td>
  770.     </tr>
  771.   </form>
  772. </table>
  773. <%
  774. end sub
  775. '=========================================================================
  776. '过程名:ShowAllClass
  777. '作  用:显示所有栏目(栏目导航)
  778. '参  数:无
  779. '=========================================================================
  780. sub ShowAllClass()
  781. if rsBigClass.bof and rsBigClass.eof then 
  782. response.Write "&nbsp;没有任何栏目"
  783. else
  784. dim sqlClass,rsClass,strClassName
  785. rsBigClass.movefirst
  786. do while not rsBigClass.eof
  787. strClassName= "【<a href='Product.asp?BigClassName=" & rsBigClass("BigClassName") & "'><b>" & rsBigClass("BigClassName") & "</b></a>】<br><br>"
  788. sqlClass="select * from SmallClass where BigClassName='" & rsBigClass("BigClassName") & "'Order by SmallClassID"
  789. Set rsClass= Server.CreateObject("ADODB.Recordset")
  790. rsClass.open sqlClass,conn,1,1
  791. do while not rsClass.eof
  792. strClassName=strClassName & "&nbsp;<a href='Product.asp?BigClassName=" & rsClass("BigClassName") & "&SmallClassName=" & rsClass("SmallClassName") & "'>" & rsClass("SmallClassName") & "</a>&nbsp;"
  793. rsClass.movenext
  794. loop
  795. response.write strClassName & "<br><br>"
  796. rsBigClass.movenext
  797. loop
  798. rsClass.close
  799. set rsClass=nothing
  800. end if
  801. end sub
  802. '=========================================================================
  803. '过程名:ShowArticleContent
  804. '作  用:显示文章具体的内容,可以分页显示
  805. '参  数:无
  806. '=========================================================================
  807. sub ShowArticleContent()
  808. dim ArticleID,strContent,CurrentPage
  809. dim ContentLen,MaxPerPage,pages,i,lngBound
  810. dim BeginPoint,EndPoint
  811. ArticleID=rs("ArticleID")
  812. strContent=rs("Content")
  813. ContentLen=len(strContent)
  814. CurrentPage=trim(request("ArticlePage"))
  815. if ShowContentByPage="No" or ContentLen<=200000 then
  816. response.write strContent
  817. if ShowContentByPage="Yes" then
  818. response.write "</p><p align='center'></p>"
  819. end if
  820. else
  821. if CurrentPage="" then
  822. CurrentPage=1
  823. else
  824. CurrentPage=Cint(CurrentPage)
  825. end if
  826. pages=ContentLenMaxPerPage_Content
  827. if MaxPerPage_Content*pages<ContentLen then
  828. pages=pages+1
  829. end if
  830. lngBound=MaxPerPage_Content          '最大误差范围
  831. if CurrentPage<1 then CurrentPage=1
  832. if CurrentPage>pages then CurrentPage=pages
  833. dim lngTemp
  834. dim lngTemp1,lngTemp1_1,lngTemp1_2,lngTemp1_1_1,lngTemp1_1_2,lngTemp1_1_3,lngTemp1_2_1,lngTemp1_2_2,lngTemp1_2_3
  835. dim lngTemp2,lngTemp2_1,lngTemp2_2,lngTemp2_1_1,lngTemp2_1_2,lngTemp2_2_1,lngTemp2_2_2
  836. dim lngTemp3,lngTemp3_1,lngTemp3_2,lngTemp3_1_1,lngTemp3_1_2,lngTemp3_2_1,lngTemp3_2_2
  837. dim lngTemp4,lngTemp4_1,lngTemp4_2,lngTemp4_1_1,lngTemp4_1_2,lngTemp4_2_1,lngTemp4_2_2
  838. dim lngTemp5,lngTemp5_1,lngTemp5_2
  839. dim lngTemp6,lngTemp6_1,lngTemp6_2
  840. if CurrentPage=1 then
  841. BeginPoint=1
  842. else
  843. BeginPoint=MaxPerPage_Content*(CurrentPage-1)+1
  844. lngTemp1_1_1=instr(BeginPoint,strContent,"</table>",1)
  845. lngTemp1_1_2=instr(BeginPoint,strContent,"</TABLE>",1)
  846. lngTemp1_1_3=instr(BeginPoint,strContent,"</Table>",1)
  847. if lngTemp1_1_1>0 then
  848. lngTemp1_1=lngTemp1_1_1
  849. elseif lngTemp1_1_2>0 then
  850. lngTemp1_1=lngTemp1_1_2
  851. elseif lngTemp1_1_3>0 then
  852. lngTemp1_1=lngTemp1_1_3
  853. else
  854. lngTemp1_1=0
  855. end if
  856. lngTemp1_2_1=instr(BeginPoint,strContent,"<table",1)
  857. lngTemp1_2_2=instr(BeginPoint,strContent,"<TABLE",1)
  858. lngTemp1_2_3=instr(BeginPoint,strContent,"<Table",1)
  859. if lngTemp1_2_1>0 then
  860. lngTemp1_2=lngTemp1_2_1
  861. elseif lngTemp1_2_2>0 then
  862. lngTemp1_2=lngTemp1_2_2
  863. elseif lngTemp1_2_3>0 then
  864. lngTemp1_2=lngTemp1_2_3
  865. else
  866. lngTemp1_2=0
  867. end if
  868. if lngTemp1_1=0 and lngTemp1_2=0 then
  869. lngTemp1=BeginPoint
  870. else
  871. if lngTemp1_1>lngTemp1_2 then
  872. lngtemp1=lngTemp1_2
  873. else
  874. lngTemp1=lngTemp1_1+8
  875. end if
  876. end if
  877. lngTemp2_1_1=instr(BeginPoint,strContent,"</p>",1)
  878. lngTemp2_1_2=instr(BeginPoint,strContent,"</P>",1)
  879. if lngTemp2_1_1>0 then
  880. lngTemp2_1=lngTemp2_1_1
  881. elseif lngTemp2_1_2>0 then
  882. lngTemp2_1=lngTemp2_1_2
  883. else
  884. lngTemp2_1=0
  885. end if
  886. lngTemp2_2_1=instr(BeginPoint,strContent,"<p",1)
  887. lngTemp2_2_2=instr(BeginPoint,strContent,"<P",1)
  888. if lngTemp2_2_1>0 then
  889. lngTemp2_2=lngTemp2_2_1
  890. elseif lngTemp2_2_2>0 then
  891. lngTemp2_2=lngTemp2_2_2
  892. else
  893. lngTemp2_2=0
  894. end if
  895. if lngTemp2_1=0 and lngTemp2_2=0 then
  896. lntTemp2=BeginPoint
  897. else
  898. if lngTemp2_1>lngTemp2_2 then
  899. lngtemp2=lngTemp2_2
  900. else
  901. lngTemp2=lngTemp2_1+4
  902. end if
  903. end if
  904. lngTemp3_1_1=instr(BeginPoint,strContent,"</ur>",1)
  905. lngTemp3_1_2=instr(BeginPoint,strContent,"</UR>",1)
  906. if lngTemp3_1_1>0 then
  907. lngTemp3_1=lngTemp3_1_1
  908. elseif lngTemp3_1_2>0 then
  909. lngTemp3_1=lngTemp3_1_2
  910. else
  911. lngTemp3_1=0
  912. end if
  913. lngTemp3_2_1=instr(BeginPoint,strContent,"<ur",1)
  914. lngTemp3_2_2=instr(BeginPoint,strContent,"<UR",1)
  915. if lngTemp3_2_1>0 then
  916. lngTemp3_2=lngTemp3_2_1
  917. elseif lngTemp3_2_2>0 then
  918. lngTemp3_2=lngTemp3_2_2
  919. else
  920. lngTemp3_2=0
  921. end if
  922. if lngTemp3_1=0 and lngTemp3_2=0 then
  923. lngTemp3=BeginPoint
  924. else
  925. if lngTemp3_1>lngTemp3_2 then
  926. lngtemp3=lngTemp3_2
  927. else
  928. lngTemp3=lngTemp3_1+5
  929. end if
  930. end if
  931. if lngTemp1<lngTemp2 then
  932. lngTemp=lngTemp2
  933. else
  934. lngTemp=lngTemp1
  935. end if
  936. if lngTemp<lngTemp3 then
  937. lngTemp=lngTemp3
  938. end if
  939. if lngTemp>BeginPoint and lngTemp<=BeginPoint+lngBound then
  940. BeginPoint=lngTemp
  941. else
  942. lngTemp4_1_1=instr(BeginPoint,strContent,"</li>",1)
  943. lngTemp4_1_2=instr(BeginPoint,strContent,"</LI>",1)
  944. if lngTemp4_1_1>0 then
  945. lngTemp4_1=lngTemp4_1_1
  946. elseif lngTemp4_1_2>0 then
  947. lngTemp4_1=lngTemp4_1_2
  948. else
  949. lngTemp4_1=0
  950. end if
  951. lngTemp4_2_1=instr(BeginPoint,strContent,"<li",1)
  952. lngTemp4_2_1=instr(BeginPoint,strContent,"<LI",1)
  953. if lngTemp4_2_1>0 then
  954. lngTemp4_2=lngTemp4_2_1
  955. elseif lngTemp4_2_2>0 then
  956. lngTemp4_2=lngTemp4_2_2
  957. else
  958. lngTemp4_2=0
  959. end if
  960. if lngTemp4_1=0 and lngTemp4_2=0 then
  961. lngTemp4=BeginPoint
  962. else
  963. if lngTemp4_1>lngTemp4_2 then
  964. lngtemp4=lngTemp4_2
  965. else
  966. lngTemp4=lngTemp4_1+5
  967. end if
  968. end if
  969. if lngTemp4>BeginPoint and lngTemp4<=BeginPoint+lngBound then
  970. BeginPoint=lngTemp4
  971. else
  972. lngTemp5_1=instr(BeginPoint,strContent,"<img",1)
  973. lngTemp5_2=instr(BeginPoint,strContent,"<IMG",1)
  974. if lngTemp5_1>0 then
  975. lngTemp5=lngTemp5_1
  976. elseif lngTemp5_2>0 then
  977. lngTemp5=lngTemp5_2
  978. else
  979. lngTemp5=BeginPoint
  980. end if
  981. if lngTemp5>BeginPoint and lngTemp5<BeginPoint+lngBound then
  982. BeginPoint=lngTemp5
  983. else
  984. lngTemp6_1=instr(BeginPoint,strContent,"<br>",1)
  985. lngTemp6_2=instr(BeginPoint,strContent,"<BR>",1)
  986. if lngTemp6_1>0 then
  987. lngTemp6=lngTemp6_1
  988. elseif lngTemp6_2>0 then
  989. lngTemp6=lngTemp6_2
  990. else
  991. lngTemp6=0
  992. end if
  993. if lngTemp6>BeginPoint and lngTemp6<BeginPoint+lngBound then
  994. BeginPoint=lngTemp6+4
  995. end if
  996. end if
  997. end if
  998. end if
  999. end if
  1000. if CurrentPage=pages then
  1001. EndPoint=ContentLen
  1002. else
  1003.   EndPoint=MaxPerPage_Content*CurrentPage
  1004.   if EndPoint>=ContentLen then
  1005. EndPoint=ContentLen
  1006.   else
  1007. lngTemp1_1_1=instr(EndPoint,strContent,"</table>",1)
  1008. lngTemp1_1_2=instr(EndPoint,strContent,"</TABLE>",1)
  1009. lngTemp1_1_3=instr(EndPoint,strContent,"</Table>",1)
  1010. if lngTemp1_1_1>0 then
  1011. lngTemp1_1=lngTemp1_1_1
  1012. elseif lngTemp1_1_2>0 then
  1013. lngTemp1_1=lngTemp1_1_2
  1014. elseif lngTemp1_1_3>0 then
  1015. lngTemp1_1=lngTemp1_1_3
  1016. else
  1017. lngTemp1_1=0
  1018. end if
  1019. lngTemp1_2_1=instr(EndPoint,strContent,"<table",1)
  1020. lngTemp1_2_2=instr(EndPoint,strContent,"<TABLE",1)
  1021. lngTemp1_2_3=instr(EndPoint,strContent,"<Table",1)
  1022. if lngTemp1_2_1>0 then
  1023. lngTemp1_2=lngTemp1_2_1
  1024. elseif lngTemp1_2_2>0 then
  1025. lngTemp1_2=lngTemp1_2_2
  1026. elseif lngTemp1_2_3>0 then
  1027. lngTemp1_2=lngTemp1_2_3
  1028. else
  1029. lngTemp1_2=0
  1030. end if
  1031. if lngTemp1_1=0 and lngTemp1_2=0 then
  1032. lngTemp1=EndPoint
  1033. else
  1034. if lngTemp1_1>lngTemp1_2 then
  1035. lngtemp1=lngTemp1_2-1
  1036. else
  1037. lngTemp1=lngTemp1_1+7
  1038. end if
  1039. end if
  1040. lngTemp2_1_1=instr(EndPoint,strContent,"</p>",1)
  1041. lngTemp2_1_2=instr(EndPoint,strContent,"</P>",1)
  1042. if lngTemp2_1_1>0 then
  1043. lngTemp2_1=lngTemp2_1_1
  1044. elseif lngTemp2_1_2>0 then
  1045. lngTemp2_1=lngTemp2_1_2
  1046. else
  1047. lngTemp2_1=0
  1048. end if
  1049. lngTemp2_2_1=instr(EndPoint,strContent,"<p",1)
  1050. lngTemp2_2_2=instr(EndPoint,strContent,"<P",1)
  1051. if lngTemp2_2_1>0 then
  1052. lngTemp2_2=lngTemp2_2_1
  1053. elseif lngTemp2_2_2>0 then
  1054. lngTemp2_2=lngTemp2_2_2
  1055. else
  1056. lngTemp2_2=0
  1057. end if
  1058. if lngTemp2_1=0 and lngTemp2_2=0 then
  1059. lngTemp2=EndPoint
  1060. else
  1061. if lngTemp2_1>lngTemp2_2 then
  1062. lngTemp2=lngTemp2_2-1
  1063. else
  1064. lngTemp2=lngTemp2_1+3
  1065. end if
  1066. end if
  1067. lngTemp3_1_1=instr(EndPoint,strContent,"</ur>",1)
  1068. lngTemp3_1_2=instr(EndPoint,strContent,"</UR>",1)
  1069. if lngTemp3_1_1>0 then
  1070. lngTemp3_1=lngTemp3_1_1
  1071. elseif lngTemp3_1_2>0 then
  1072. lngTemp3_1=lngTemp3_1_2
  1073. else
  1074. lngTemp3_1=0
  1075. end if
  1076. lngTemp3_2_1=instr(EndPoint,strContent,"<ur",1)
  1077. lngTemp3_2_2=instr(EndPoint,strContent,"<UR",1)
  1078. if lngTemp3_2_1>0 then
  1079. lngTemp3_2=lngTemp3_2_1
  1080. elseif lngTemp3_2_2>0 then
  1081. lngTemp3_2=lngTemp3_2_2
  1082. else
  1083. lngTemp3_2=0
  1084. end if
  1085. if lngTemp3_1=0 and lngTemp3_2=0 then
  1086. lngTemp3=EndPoint
  1087. else
  1088. if lngTemp3_1>lngTemp3_2 then
  1089. lngtemp3=lngTemp3_2-1
  1090. else
  1091. lngTemp3=lngTemp3_1+4
  1092. end if
  1093. end if
  1094. if lngTemp1<lngTemp2 then
  1095. lngTemp=lngTemp2
  1096. else
  1097. lngTemp=lngTemp1
  1098. end if
  1099. if lngTemp<lngTemp3 then
  1100. lngTemp=lngTemp3
  1101. end if
  1102. if lngTemp>EndPoint and lngTemp<=EndPoint+lngBound then
  1103. EndPoint=lngTemp
  1104. else
  1105. lngTemp4_1_1=instr(EndPoint,strContent,"</li>",1)
  1106. lngTemp4_1_2=instr(EndPoint,strContent,"</LI>",1)
  1107. if lngTemp4_1_1>0 then
  1108. lngTemp4_1=lngTemp4_1_1
  1109. elseif lngTemp4_1_2>0 then
  1110. lngTemp4_1=lngTemp4_1_2
  1111. else
  1112. lngTemp4_1=0
  1113. end if
  1114. lngTemp4_2_1=instr(EndPoint,strContent,"<li",1)
  1115. lngTemp4_2_1=instr(EndPoint,strContent,"<LI",1)
  1116. if lngTemp4_2_1>0 then
  1117. lngTemp4_2=lngTemp4_2_1
  1118. elseif lngTemp4_2_2>0 then
  1119. lngTemp4_2=lngTemp4_2_2
  1120. else
  1121. lngTemp4_2=0
  1122. end if
  1123. if lngTemp4_1=0 and lngTemp4_2=0 then
  1124. lngTemp4=EndPoint
  1125. else
  1126. if lngTemp4_1>lngTemp4_2 then
  1127. lngtemp4=lngTemp4_2-1
  1128. else
  1129. lngTemp4=lngTemp4_1+4
  1130. end if
  1131. end if
  1132. if lngTemp4>EndPoint and lngTemp4<=EndPoint+lngBound then
  1133. EndPoint=lngTemp4
  1134. else
  1135. lngTemp5_1=instr(EndPoint,strContent,"<img",1)
  1136. lngTemp5_2=instr(EndPoint,strContent,"<IMG",1)
  1137. if lngTemp5_1>0 then
  1138. lngTemp5=lngTemp5_1-1
  1139. elseif lngTemp5_2>0 then
  1140. lngTemp5=lngTemp5_2-1
  1141. else
  1142. lngTemp5=EndPoint
  1143. end if
  1144. if lngTemp5>EndPoint and lngTemp5<EndPoint+lngBound then
  1145. EndPoint=lngTemp5
  1146. else
  1147. lngTemp6_1=instr(EndPoint,strContent,"<br>",1)
  1148. lngTemp6_2=instr(EndPoint,strContent,"<BR>",1)
  1149. if lngTemp6_1>0 then
  1150. lngTemp6=lngTemp6_1+3
  1151. elseif lngTemp6_2>0 then
  1152. lngTemp6=lngTemp6_2+3
  1153. else
  1154. lngTemp6=EndPoint
  1155. end if
  1156. if lngTemp6>EndPoint and lngTemp6<EndPoint+lngBound then
  1157. EndPoint=lngTemp6
  1158. end if
  1159. end if
  1160. end if
  1161. end if
  1162.   end if
  1163. end if
  1164. response.write mid(strContent,BeginPoint,EndPoint-BeginPoint)
  1165. response.write "</p><p align='center'><b>"
  1166. if CurrentPage>1 then
  1167. response.write "<a href='ProductShow.asp?ArticleID=" & ArticleID & "&ArticlePage=" & CurrentPage-1 & "'>上一页</a>&nbsp;&nbsp;"
  1168. end if
  1169. for i=1 to pages
  1170. if i=CurrentPage then
  1171. response.write "<font color='red'>[" & cstr(i) & "]</font>&nbsp;"
  1172. else
  1173. response.write "<a href='ProductShow.asp?ArticleID=" & ArticleID & "&ArticlePage=" & i & "'>[" & i & "]</a>&nbsp;"
  1174. end if
  1175. next
  1176. if CurrentPage<pages then
  1177. response.write "&nbsp;<a href='ProductShow.asp?ArticleID=" & ArticleID & "&ArticlePage=" & CurrentPage+1 & "'>下一页</a>"
  1178. end if
  1179. response.write "</b></p>"
  1180. end if
  1181. end sub
  1182. '=========================================================================
  1183. '过程名:ShowUserLogin
  1184. '作  用:显示用户登录表单
  1185. '参  数:无
  1186. '=========================================================================
  1187. sub ShowUserLogin()
  1188. dim strLogin
  1189. If Session("UserName")="" Then
  1190.      strLogin= "<table width='100%'border='0'cellspacing='0'cellpadding='0'>"
  1191. strLogin=strLogin & "<form action='UserLogin.asp'method='post'name='UserLogin'onSubmit='return CheckForm();'>"
  1192.         strLogin=strLogin & "<tr><td height='25' align='right'>用户名:</td><td height='25'><input name='UserName'type='text'id='UserName'size='10'maxlength='20'></td></tr>"
  1193.         strLogin=strLogin & "<tr><td height='25' align='right'>密&nbsp;&nbsp;码:</td><td height='25'><input name='Password'type='password'id='Password'size='10'maxlength='20'></td></tr>"
  1194.         strLogin=strLogin & "<tr align='center'><td height='25'colspan='2'><input name='Login'type='submit'id='Login'value='登录 '> <input name='Reset'type='reset'id='Reset'value='清除 '>"
  1195.         strLogin=strLogin & "</td></tr>"
  1196.         strLogin=strLogin & "<tr><td height='20' align='center'colspan='2'><a href='UserReg.asp'target='_blank'>新用户注册</a>&nbsp;&nbsp;<a href='GetPassword.asp'target='_blank'>忘记密码?</a></td></tr>"      
  1197.         strLogin=strLogin & "</form></table>"
  1198. response.write strLogin
  1199. %>
  1200. <script language=javascript>
  1201. function CheckForm()
  1202. {
  1203. if(document.UserLogin.UserName.value=="")
  1204. {
  1205. alert("请输入用户名!");
  1206. document.UserLogin.UserName.focus();
  1207. return false;
  1208. }
  1209. if(document.UserLogin.Password.value == "")
  1210. {
  1211. alert("请输入密码!");
  1212. document.UserLogin.Password.focus();
  1213. return false;
  1214. }
  1215. }
  1216. </script>
  1217. <%
  1218. Else 
  1219. response.write "欢迎您!" & Session("UserName") & "<br><br>"
  1220. response.write "<b>用户控制面板:</b><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='Server.asp'><b>会员管理中心</b></a><br><br>"
  1221. end if
  1222. end sub
  1223. '=========================================================================
  1224. '过程名:ShowUserLogina
  1225. '作  用:显示用户登录表单
  1226. '参  数:无
  1227. '=========================================================================
  1228. sub ShowUserLogina()
  1229. dim strLogin
  1230. If Session("UserName")="" Then
  1231.      strLogin= "<table width='100%'border='0'cellspacing='0'cellpadding='0'>"
  1232. strLogin=strLogin & "<form action='UserLogina.asp'method='post'name='UserLogin'onSubmit='return CheckForm();'>"
  1233.         strLogin=strLogin & "<tr><td height='25' align='right'>用户名:</td><td height='25'><input name='UserName'type='text'id='UserName'size='10'maxlength='20'></td></tr>"
  1234.         strLogin=strLogin & "<tr><td height='25' align='right'>密&nbsp;&nbsp;码:</td><td height='25'><input name='Password'type='password'id='Password'size='10'maxlength='20'></td></tr>"
  1235.         strLogin=strLogin & "<tr align='center'><td height='25'colspan='2'><input name='Login'type='submit'id='Login'value='登录 '> <input name='Reset'type='reset'id='Reset'value='清除 '>"
  1236.         strLogin=strLogin & "</td></tr>"
  1237.         strLogin=strLogin & "<tr><td height='20' align='center'colspan='2'><a href='UserReg.asp'target='_blank'>新用户注册</a>&nbsp;&nbsp;<a href='GetPassword.asp'target='_blank'>忘记密码?</a></td></tr>"      
  1238.         strLogin=strLogin & "</form></table>"
  1239. response.write strLogin
  1240. %>
  1241. <script language=javascript>
  1242. function CheckForm()
  1243. {
  1244. if(document.UserLogin.UserName.value=="")
  1245. {
  1246. alert("请输入用户名!");
  1247. document.UserLogin.UserName.focus();
  1248. return false;
  1249. }
  1250. if(document.UserLogin.Password.value == "")
  1251. {
  1252. alert("请输入密码!");
  1253. document.UserLogin.Password.focus();
  1254. return false;
  1255. }
  1256. }
  1257. </script>
  1258. <%
  1259. Else 
  1260. response.write "欢迎您!" & Session("UserName") & "<br><br>"
  1261. response.write "<b>用户控制面板:</b><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='Server.asp'><b>会员管理中心</b></a><br><br>"
  1262. end if
  1263. end sub
  1264. %>