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

  1. <%
  2. '==================================
  3. '=╬─ ╝■ ├√ú║news.asp
  4. '=╩╩╙├░µ▒╛ú║FeitecCMS AC V1.21 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. '==================================
  23. '=╣ª    ─▄ú║╚í│÷╡▒╟░─ú░σ
  24. '==================================
  25. StrTemp=split(mb_news,"|||@@@|||")
  26. dim Ft_mbstr
  27. Ft_mbstr=replace(StrTemp(0),"{left_pub}",left_pub())
  28. Ft_mbstr=replace(Ft_mbstr,"$hotnum$",hotnum)
  29. sql="select top "&hotnum&" * from Ft_news order by news_count DESC,news_date desc"
  30. set rs2 = server.createobject("adodb.recordset")
  31. rs2.open sql,conn,1,1
  32. if rs2.bof and rs2.eof then
  33.     topnews="<span class=""disable_font"" >─┌╚▌╒²╘┌╕ⁿ╨┬╓«╓╨í¡í¡</span>"
  34. else
  35.     do while not rs2.eof
  36.         topnews=topnews+"<img src="""&signimgpath&"/biao.gif"" border=""0""> <a href=shownews.asp?id="&rs2("news_id")&">"&rs2("news_title")&"</a><br>"
  37.         rs2.movenext
  38.     loop
  39. end if
  40. rs2.close
  41. set rs2=nothing
  42. '╫≤└╕
  43. Ft_mbstr=replace(Ft_mbstr,"$topnews$",topnews)
  44. dim totalnews,Currentpage,totalpages,catid,page,catname
  45. '╔Φ╓├╨┬╬┼╧╡═│╬¬─¼╚╧╖╓╥│┤≤╨í╡─▒╢┬╩
  46. pagenum=pagenum*2
  47. if request.querystring("page")<>"" then
  48.     page=cint(checksql("╨┬╬┼╖╓╥│",request.querystring("page"),0,8))
  49. end if
  50. if request.querystring("cat_id")<>"" then
  51.     catid=checksql("╨┬╬┼╖╓└α",request.querystring("cat_id"),0,4)
  52.     sql="select cat_id from Ft_news_cat where cat_id="&catid
  53.     set rs=server.createobject("adodb.recordset")
  54.     rs.open sql,conn,1,1
  55.     if rs.eof and rs.bof then
  56.         response.redirect("showerr.asp?errmsg=<br><li>├╗╙╨┤╦╖╓└α╗≥╕├╖╓└α╥╤╔╛│²úí</li>")
  57.         response.end
  58.     end if
  59.     rs.close
  60.     set rs=nothing
  61.     sql="select * from Ft_news where cat_id="&catid&" order by istop=1,news_date DESC"
  62. else
  63.     sql="select * from Ft_news order by istop=1,news_date DESC"
  64. end if
  65. set rs=server.createobject("adodb.recordset")
  66. rs.open sql,conn,1,1
  67. sql="select * from Ft_news_cat"
  68. set rs2=server.createobject("adodb.recordset")
  69. rs2.open sql,conn,1,1
  70. do while not rs2.eof
  71. catlist=catlist+"<span class=""key_font"">|</span> <a href=""news.asp?cat_id="&rs2("cat_id")&""" >"&rs2("cat_name")&"</a>"
  72. rs2.movenext
  73. loop
  74. if rs2.bof and rs2.eof then
  75. catlist="| ╘▌╬▐╖╓└α"
  76. end if
  77. rs2.close
  78. set rs2=nothing
  79. if request.querystring("cat_id")<>"" then
  80.     catname=""
  81.     sql="select cat_name from Ft_news_cat where cat_id="&catid
  82.     set rscat=conn.execute(sql)
  83.     catname=rscat("cat_name")
  84.     rscat.close
  85.     set rscat=nothing
  86.     total_cat="<span class=""key_font"">í╛"&catname&"í┐</span>╖╓└α╣▓╙╨ <span class=""key_font"">"&rs.recordcount&"</span> ╠⌡╨┬╬┼ "
  87. else
  88.     total_cat="─┐╟░▒╛╒╛╣▓╙╨ <span class=""key_font"">"&rs.recordcount&"</span> ╠⌡╨┬╬┼ "
  89. end if
  90. '╖╓└α
  91. Ft_mbstr=replace(Ft_mbstr,"$catlist$",catlist)
  92. Ft_mbstr=replace(Ft_mbstr,"$total_cat$",total_cat)
  93. Ft_mbstr_newslist=split(Ft_mbstr,"///")
  94. '╨┬╬┼┴╨▒φ╟░╡──┌╚▌╩Σ│÷
  95. response.write Ft_mbstr_newslist(0)
  96. if not rs.eof then
  97.     rs.movefirst
  98.     rs.pagesize=pagenum
  99. if trim(request.querystring("page"))<>"" then
  100.     currentpage=page
  101.     if currentpage>rs.pagecount then
  102.         currentpage=rs.pagecount
  103.     end if
  104. else
  105.     currentpage=1
  106. end if
  107. totalnews=rs.recordcount
  108. if currentpage<>1 then
  109.     if(currentpage-1)*pagenum<totalnews then
  110.         rs.move(currentpage-1)*pagenum
  111.     end if
  112. end if
  113. if (totalnews mod pagenum)=0 then
  114.     totalpages=totalnews\pagenum
  115. else
  116.     totalpages=totalnews\pagenum+1
  117. end if
  118. i=0
  119. do while not rs.eof and i<pagenum
  120. if rs("istop")=1 then
  121.     newsstate="<a href='shownews.asp?id="&rs("news_id")&"' target='_blank'><img src='"&signimgpath&"/ztop.gif' border='0' alt='╓├╢Ñ╨┬╬┼'></a>"
  122. elseif rs("user_view")=1 then
  123.     newsstate="<a href='shownews.asp?id="&rs("news_id")&"' target='_blank'><img src='"&signimgpath&"/userview.gif' border='0' alt='╗ß╘▒╨┬╬┼ú¼┤╦╠⌡╨Φ╧√╖╤"&rs("moneypay")&"╕÷╜≡▒╥'></a>"
  124. elseif rs("user_view")=2 then
  125.     newsstate="<a href='shownews.asp?id="&rs("news_id")&"' target='_blank'><img src='"&signimgpath&"/vipview.gif' border='0' alt='VIP╗ß╘▒╨┬╬┼ú¼┤╦╠⌡╨Φ╧√╖╤"&rs("moneypay")&"╕÷╜≡▒╥'></a>"
  126. else
  127.     newsstate="<a href='shownews.asp?id="&rs("news_id")&"' target='_blank'><img src='"&signimgpath&"/normal.gif' border='0' alt='╞╒═¿╨┬╬┼'></a>"
  128. end if
  129. if DateDiff("d",rs("news_date"),now())<1 then
  130.     newnews="<img src='"&signimgpath&"/new.gif' border='0'>"
  131. else
  132.     newnews=""
  133. end if 
  134. '┴╨▒φ╩Σ│÷
  135. Ft_mbstr=replace( Ft_mbstr_newslist(1),"$newsstate$",newsstate)
  136. Ft_mbstr=replace(Ft_mbstr,"$newsid$",rs("news_id"))
  137. Ft_mbstr=replace(Ft_mbstr,"$newstitle$",rs("news_title"))
  138. Ft_mbstr=replace(Ft_mbstr,"$newnews$",newnews)
  139. Ft_mbstr=replace(Ft_mbstr,"$newsdate$",rs("news_date"))
  140. Ft_mbstr=replace(Ft_mbstr,"$newscount$",rs("news_count"))
  141. response.write Ft_mbstr
  142. i=i+1
  143. rs.movenext
  144. loop
  145. elseif rs.eof and rs.bof then
  146.     response.write"<tr class=""tablebody""><td colspan=""4"" height=""70"" align=""center"" class=""disable_font"">╘▌╩▒├╗╙╨┤╦╖╓└α╗≥┤╦└α╨┬╬┼úí</td></tr>"
  147. end if
  148. '╨┬╬┼┴╨▒φ▒φ╕±╬▓▓┐</table>╩Σ│÷
  149. response.write  Ft_mbstr_newslist(2)
  150. '╖╓╥│
  151. Ft_mbstr=replace(Ft_mbstr_newslist(3),"$newspage$","")
  152. if totalnews>pagenum then
  153.     showpage totalnews,pagenum,"news.asp?"
  154. end if
  155. response.write Ft_mbstr
  156. rs.close
  157. set rs=nothing
  158. end sub
  159. %>
  160.