home *** CD-ROM | disk | FTP | other *** search
/ 221.214.14.186 / 221.214.14.186.tar / 221.214.14.186 / wh / qim / article.asp < prev    next >
Text File  |  2006-06-01  |  8KB  |  219 lines

  1. <%
  2. '==================================
  3. '=╬─ ╝■ ├√ú║article.asp
  4. '=╩╩╙├░µ▒╛ú║FeitecCMS AC V1.3 Free
  5. '=╣ª    ─▄ú║╛¡╡Σ╜╠│╠
  6. '=╫≈    ╒▀ú║╙Ω│╟[From to FeitecStudio]
  7. '=╚╒    ╞┌ú║2006-2-19 18:09
  8. '=░µ    ╚¿ú║http://www.feitec.com/
  9. '=╝╝╩⌡╠╓┬█ú║6602510íó14040543ú¿╨┬╩╓╚║ú⌐
  10. '==================================
  11. %>
  12. <!--#include file="Ft_config.asp"-->
  13. <!--#include file="Ft_conn.asp"-->
  14. <!--#include file="Ft_format.asp"-->
  15. <!--#include file="Ft_lib.asp"-->
  16. <%
  17. sub_title="╛¡╡Σ╜╠│╠"
  18. call head()
  19. call body()
  20. call foot()
  21. sub body()
  22. dim totalart,currentpage,totalpages,i,cat_id,class_id,page,flname
  23. '╔Φ╓├╬─╒┬╧╡═│╬¬─¼╚╧╖╓╥│┤≤╨í╡─▒╢┬╩
  24. pagenum=pagenum*2 
  25. if request.querystring("cat_id")<>"" then
  26.     cat_id=checksql("╬─╒┬╖╓└α",request.querystring("cat_id"),0,4)
  27.     sql="select cat_id from Ft_art_cat where cat_id="&cat_id
  28.     set rs=server.createobject("adodb.recordset")
  29.     rs.open sql,conn,1,1
  30.     if rs.eof and rs.bof then
  31.         response.redirect("showerr.asp?errmsg=<br><li>├╗╙╨┤╦╖╓└α╗≥╕├╖╓└α╥╤╔╛│²úí</li>")
  32.         response.end
  33.     end if
  34.     rs.close
  35.     set rs=nothing
  36. end if
  37. if request.querystring("class_id")<>"" then
  38.     class_id=checksql("╬─╒┬╫╙└α",request.querystring("class_id"),0,4)
  39.     sql="select class_id from Ft_art_class where class_id="&class_id
  40.     set rs=server.createobject("adodb.recordset")
  41.     rs.open sql,conn,1,1
  42.     if rs.eof and rs.bof then
  43.         response.redirect("showerr.asp?errmsg=<br><li>├╗╙╨┤╦╫╙└α╗≥╕├╫╙└α╥╤╔╛│²úí</li>")
  44.         response.end
  45.     end if
  46.     rs.close
  47.     set rs=nothing
  48. end if
  49. if request.querystring("page")<>"" then
  50.     page=checksql("╬─╒┬╖╓╥│",request.querystring("page"),0,8)
  51. end if
  52. '==================================
  53. '=╣ª    ─▄ú║╚í│÷╡▒╟░─ú░σ
  54. '==================================
  55. StrTemp=split(mb_art,"|||@@@|||")
  56. dim Ft_mbstr
  57. Ft_mbstr=replace(StrTemp(0),"{left_pub}",left_pub())
  58. Ft_mbstr=replace(Ft_mbstr,"$hotnum$",hotnum)
  59. set rs3=server.createobject("adodb.recordset")
  60. if request.querystring("cat_id")<>"" then
  61.     sql="select top "&hotnum&" art_id,art_title,art_count,cat_id from Ft_art where cat_id="&cat_id&" order by art_count DESC,art_date DESC"
  62. else
  63.     sql="select top "&hotnum&" art_id,art_title,art_count,cat_id from Ft_art order by art_count DESC,art_date DESC"
  64. end if
  65. rs3.open sql,conn,1,1
  66. do while not rs3.eof
  67.     topart=topart+"<img src="""&signimgpath&"/biao.gif"" border=""0""> <a href=""showart.asp?id="&rs3("art_id")&""" title=""╙╬└└┤╬╩²ú║"&rs3("art_count")&""">"&rs3("art_title")&"</a><br>"
  68.     rs3.movenext
  69. loop
  70. if rs3.eof and rs3.bof then
  71.     topart="<p align=""center"" class=""disable_font"">├╗╙╨╧α╣╪╬─╒┬</p>"
  72. end if
  73. rs3.close
  74. set rs3=nothing
  75. '╫≤└╕╩Σ│÷
  76. Ft_mbstr=replace(Ft_mbstr,"$topart$",topart)
  77. if cat_id<>"" and request.querystring("class_id")="" then
  78.     sql="select * from Ft_art where cat_id="&cat_id&" order by istop=1,art_date desc"
  79. elseif class_id<>"" then
  80.     sql="select * from Ft_art where class_id="&class_id&" order by istop=1,art_date desc"
  81. else
  82.     sql="select * from Ft_art order by istop=1,art_date DESC"
  83. end if
  84. set rs=server.createobject("adodb.recordset")
  85. rs.open sql,conn,1,1    
  86. set rscat = server.createobject("adodb.recordset")
  87. sqlcat="select * from Ft_art_cat"
  88. rscat.open sqlcat,conn,1,1
  89. do while not rscat.eof
  90.     colparam1=rscat("cat_id")
  91.     artcat="<tr><td width=""20%""><a href=""?cat_id="&rscat("cat_id")&"""> <strong>í╛"&rscat("cat_name")&"í┐</strong></a></td><td width=""*"">"
  92.     set rsclass = server.createobject("adodb.recordset")
  93.     sqlclass="select * from Ft_art_class where cat_id=" &colparam1& ""
  94.     rsclass.open sqlclass,conn,1,1
  95.     if not(rsclass.bof and rsclass.eof) then
  96.         do while not rsclass.eof
  97.             artclass="<a href=""?cat_id="&rsclass("cat_id")&"&class_id="&rsclass("class_id")&""">"&rsclass("class_name")&"</a> "
  98.             artclass2=artclass2+artclass
  99.             rsclass.movenext
  100.         loop
  101.     else
  102.         artclass2="╘▌╬▐╫╙└α"
  103.     end if
  104.     rsclass.close
  105.     set rsclass=nothing
  106.     catclasslist=catclasslist+artcat+artclass2+"</td></tr>"
  107.     artclass2=""
  108.     rscat.movenext
  109. loop
  110. if rscat.bof and rscat.eof then
  111.     catclasslist="<tr><td width=""20%""><strong>í╛╘▌╬▐┤≤└αí┐</strong></td><td width=""*""></td></tr>"
  112. end if    
  113. rscat.close
  114. set rscat=nothing
  115. Ft_mbstr=replace(Ft_mbstr,"$catclasslist$",catclasslist)
  116.  
  117. flname=""
  118. if request.querystring("class_id")<>"" then
  119.     sql="select class_name from Ft_art_class where class_id="&request.querystring("class_id")
  120.     set rsclass=conn.execute(sql)
  121.     if not rsclass.eof then
  122.     flname=rsclass("class_name")
  123.     else
  124.     flname=""
  125.     end if
  126.     rsclass.close
  127.     set rsclass=nothing
  128. elseif request.querystring("class_id")="" and request.querystring("cat_id")<>"" then
  129.     sql="select cat_name from Ft_art_cat where cat_id="&request.querystring("cat_id")
  130.     set rscat=conn.execute(sql)
  131.     if not rscat.eof then
  132.     flname=rscat("cat_name")
  133.     else
  134.     flname=""
  135.     end if
  136.     rscat.close
  137.     set rscat=nothing
  138. end if
  139. if flname="" then
  140.     cattotal="─┐╟░▒╛╒╛╣▓╙╨<span class=""key_font"">"&rs.recordcount&"</span>╞¬╬─╒┬ "
  141. else
  142.     cattotal="<span class=""key_font"">í╛"&flname&"í┐</span>╖╓└α╣▓╙╨<span class=""key_font"">"&rs.recordcount&"</span>╞¬╬─╒┬ "
  143. end if
  144. Ft_mbstr=replace(Ft_mbstr,"$cattotal$",cattotal)
  145. Ft_mbstr_artlist=split(Ft_mbstr,"///")
  146. '╬─╒┬┴╨▒φ╟░╡──┌╚▌╩Σ│÷
  147. response.write Ft_mbstr_artlist(0)
  148. if not rs.eof then
  149.     rs.movefirst
  150.     rs.pagesize=pagenum
  151. if trim(request.querystring("page"))<>"" then
  152.     currentpage=cint(request.querystring("page"))
  153.     if currentpage>rs.pagecount then
  154.         currentpage=rs.pagecount
  155.     end if
  156. else
  157.     currentpage=1
  158. end if
  159. totalart=rs.recordcount
  160. if currentpage<>1 then
  161.     if(currentpage-1)*pagenum<totalart then
  162.         rs.move(currentpage-1)*pagenum
  163.     end if
  164. end if
  165. if (totalart mod pagenum)=0 then
  166.     totalpages=totalart\pagenum
  167. else
  168.     totalpages=totalart\pagenum+1
  169. end if
  170. i=0
  171. do while not rs.eof and i<pagenum
  172. '╬─╒┬╠╪╨╘
  173.     artsignimg="<a href=""showart.asp?id="&rs("art_id")&""" target=""_blank"">"    
  174.     if rs("istop")=1 then
  175.         artsignimg=artsignimg+"<img src="""&signimgpath&"/ztop.gif"" border=""0"" alt=""╓├╢Ñ╬─╒┬"">"
  176.     elseif rs("user_view")=1 then
  177.         artsignimg=artsignimg+"<img src="""&signimgpath&"/userview.gif"" border=""0"" alt=""╗ß╘▒╬─╒┬"">"
  178.     elseif rs("user_view")=2 then
  179.         artsignimg=artsignimg+"<img src="""&signimgpath&"/vipview.gif"" border=""0"" alt=""VIP╗ß╘▒╬─╒┬"">"
  180.     else
  181.         artsignimg=artsignimg+"<img src="""&signimgpath&"/normal.gif"" border=""0"" alt=""╞╒═¿╬─╒┬"">"
  182.     end if
  183.     artsignimg=artsignimg+"</a>"
  184.     '╬─╒┬▒Ω╠Γ
  185.     arttitle=" <a href=""showart.asp?id="&rs("art_id")&""">"&rs("art_title")&"</a> "
  186.     if DateDiff("d",rs("art_date"),now())<1 then
  187.         arttitle=arttitle+"<img src="""&signimgpath&"/new.gif"" border=""0"">"
  188.     end if
  189.     if rs("art_good")=1 then
  190.         arttitle=arttitle+" <span class=""key_font"">[╝÷]</span>"
  191.     elseif rs("art_good")=2 then
  192.         arttitle=arttitle+" <span class=""key_font"">[╛½]</span>"
  193.     end if
  194.     Ft_mbstr=replace(Ft_mbstr_artlist(1),"$artsignimg$",artsignimg)
  195.     Ft_mbstr=replace(Ft_mbstr,"$arttitle$",arttitle)
  196.     Ft_mbstr=replace(Ft_mbstr,"$artdate$"," "&rs("art_date"))
  197.     Ft_mbstr=replace(Ft_mbstr,"$artcount$",rs("art_count"))
  198.     '┴╨▒φ╩Σ│÷
  199.     response.write Ft_mbstr
  200.     i=i+1
  201.     rs.movenext
  202. loop
  203. else
  204. if rs.eof and rs.bof then
  205.     response.write"<tr align=""center"" class=""tablebody""><td height=""70"" colspan=""4"" class=""disable_font"">┤╦╖╓└α╡▒╟░╘▌╩▒├╗╙╨╬─╒┬úí</td></tr>"
  206. end if
  207. rs.close
  208. set rs=nothing
  209. end if
  210. response.write Ft_mbstr_artlist(2)
  211. '╖╓╥│
  212. Ft_mbstr=replace(Ft_mbstr_artlist(3),"$artpage$","")
  213. if totalart>pagenum then
  214.     showpage totalart,pagenum,"article.asp?"
  215. end if
  216. response.write Ft_mbstr
  217. end sub
  218. %>
  219.