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

  1. <%
  2. '==================================
  3. '=╬─ ╝■ ├√ú║Ft_inc_indexarticle.asp
  4. '=╩╩╙├░µ▒╛ú║FeitecCMS AC V1.3 Free
  5. '=╣ª    ─▄ú║╛¡╡Σ╜╠│╠í¬í¬╩╫╥│╖╓└α╡≈╙├
  6. '=╫≈    ╒▀ú║╙Ω│╟[From to FeitecStudio]
  7. '=╚╒    ╞┌ú║2006-3-2 21:14
  8. '=╣ª─▄╠φ╝╙ú║2006-2-25ú¼╖╓└α╬¬╡Ñ╩²╩▒╫╘╢»╡≈╙├╚╚├┼╬─╒┬[Design By └Σ╖τ]
  9. '=░µ    ╚¿ú║http://www.feitec.com/
  10. '=╝╝╩⌡╠╓┬█ú║6602510íó14040543ú¿╨┬╩╓╚║ú⌐
  11. '==================================
  12. %>
  13. <!--#include file="Ft_config.asp"-->
  14. <!--#include file="Ft_conn.asp"-->
  15. <%
  16. webstyle=split(checksql("═°╒╛╜τ├µ╖τ╕±",web_style,1,20),"@@@")
  17. if request.Cookies(webname)("Skin") = empty then
  18.     Skin = checksql("╖τ╕±ID",webstyle(1),0,2)
  19. else
  20.     Skin = checksql("╖τ╕±ID",request.Cookies(webname)("Skin"),0,2)
  21. end if
  22. sql="select mb_main from Ft_mb_style where mb_id="& Skin
  23. set rs=Server.CreateObject("adodb.recordset")
  24. rs.open sql,conn,1,1
  25. mb_main=replace(replace(rs(0),"<iframe>","<iframe>"),"</iframe>","</iframe>")
  26. rs.close
  27. signimgpath=split(mb_main,"|||@@@|||")(6) '╨í═╝▒Ω╡╪╓╖
  28. if request.querystring("tlen")="" then
  29.     titlelen=20
  30. else
  31.     titlelen=checksql("╬─╒┬▒Ω╠Γ│ñ╢╚",request.querystring("tlen"),0,2)
  32. end if
  33. '╚í│÷╖╓└α
  34. sql="select cat_id,cat_name from Ft_art_cat"
  35. set rs = server.createobject("adodb.recordset")
  36. rs.open sql,conn,1,1
  37. if not rs.eof then
  38. rs.movefirst
  39. totalcat=rs.recordcount
  40. if totalcat mod 2<>0 then
  41.     Redim x(cint(totalcat+1)),y(cint(totalcat+1))
  42.     x(totalcat+1)=0
  43.     y(totalcat+1)="╚╚├┼╬─╒┬"
  44.     k=int(totalcat/2)+1
  45. else
  46.     Redim x(cint(totalcat)),y(cint(totalcat))
  47.     k=int(totalcat/2)
  48. end if
  49.     dim i
  50.         i=1
  51.     do while not rs.eof
  52.         x(i)=rs(0)
  53.         y(i)=rs(1)
  54.         i=i+1
  55.         rs.movenext
  56.     loop
  57. else
  58. %>
  59. document.write('<table class="tableborder" cellspacing="1" cellpadding="4" align="center" style="width:100%"><tr class="tablebody"><td align="center" height="150" class="disable_font">╬─╒┬╧╡═│╘▌╬▐╖╓└α</td></tr></table>');
  60. <%
  61. end if
  62. rs.close
  63. for j=1 to k '╧╘╩╛╢α╔┘╨╨
  64. %>
  65. document.write('<table class="tableborder" cellspacing="0" cellpadding="0" align="center" style="width:100%">');
  66. document.write('<tr class="tablebody">');
  67.     <%for i=1+(j-1)*2 to j*2%>
  68. document.write('<td valign="top" width="50%">');
  69.         <%if x(i)<>"" then%>
  70. document.write('<table cellspacing="1" cellpadding="2" align="center" <%if i mod 2<>0 then%> style="width:100%;border:1px solid #cccccc;" <%else%> style="width:100%;border-right:1px solid #cccccc;border-top:1px solid #cccccc;border-bottom:1px solid #cccccc;border-left:1px solid #ffffff;"<%end if%>>');
  71. document.write('<tr class="tablebody">');
  72. document.write('<th style="text-align:left"> ::: <a href="article.asp<%if x(i)<>0 then%>?cat_id=<%=x(i)%><%end if%>"><%=y(i)%></a> :::</th></tr>');
  73.         <%
  74.            if x(i)=0 then  '╚╚├┼╬─╒┬
  75.             sql="select top "&indexarticle&" art_id,istop,art_date,art_title,art_good,art_count,user_view from Ft_art order by istop=1,art_count desc,art_id desc"
  76.             else
  77.             sql="select top "&indexarticle&" art_id,istop,art_date,art_title,art_good,art_count,user_view from Ft_art where cat_id="&x(i)&" order by istop=1,art_id desc"
  78.             end if
  79.             set rs = server.createobject("adodb.recordset")
  80.             rs.open sql,conn,1,1
  81.             if not rs.eof then
  82.             rs.movefirst
  83.             do while not rs.eof
  84.             'replaceText(str)╙├╙┌ALTú¼╚Ñ╡⌠HTML┤·┬δ
  85.             'art_title╙├╙┌╧╘╩╛▒Ω╠Γú¼art_alt╙├╙┌╧╘╩╛ALT
  86.             arttitle=rs(3)
  87.             istop=rs(1)
  88.             artgood=rs(4)
  89.             artid=rs(0)
  90.             artcount=rs(5)
  91.             artdate=rs(2)
  92.             userview=rs(6)
  93.             if instr(arttitle,"<font color")<>0 then
  94.                 Arr_title=split(arttitle,">")
  95.                 art_alt=replaceText(arttitle)
  96.                 if len(art_alt)>cint(titlelen) then '╙├╙┌╧╘╩╛╬─╒┬▒Ω╠Γ
  97.                     newtitle=Arr_title(0)+">"+left(art_alt,cint(titlelen))+"í¡</font>"
  98.                 else
  99.                     newtitle=arttitle
  100.                 end if
  101.             else
  102.                 if len(arttitle)>cint(titlelen) then
  103.                     art_alt=arttitle
  104.                     newtitle=left(arttitle,cint(titlelen))+"í¡"
  105.                 else
  106.                     art_alt=arttitle
  107.                     newtitle=arttitle
  108.                 end if
  109.             end if
  110.             %>
  111.             document.write('    <tr class="tablebody">');
  112.             document.write('        <td height="25"> <%if userview=2 then%><img src="<%=signimgpath%>/vipview.gif" border="0" alt="VIP╗ß╘▒╬─╒┬"><%elseif userview=1 then%><img src="<%=signimgpath%>/userview.gif" border="0" alt="╞╒═¿╗ß╘▒╬─╒┬"><%elseif istop=1 then%><img src="<%=signimgpath%>/topbiao.gif" border="0" alt="╩╫╥│╓├╢Ñ╬─╒┬"><%elseif artgood=0 then%><img src="<%=signimgpath%>/normalbiao.gif" alt="╞╒═¿╬─╒┬"><%elseif artgood=1 then%><img src="<%=signimgpath%>/tuijianbiao.gif" alt="═╞╝÷╬─╒┬"><%elseif artgood=2 then%><img src="<%=signimgpath%>/jinhuabiao.gif" alt="╛½╗¬╬─╒┬"><%else%><img src="<%=signimgpath%>/normalbiao.gif" alt="╞╒═¿╬─╒┬"><%end if%> ');
  113.             document.write('        <a href="showart.asp?id=<%=artid%>"  target="_blank" title="╬─╒┬├√│╞ú║<%=art_alt%> ╖ó▒φ╩▒╝Σú║<%=artdate%> ╗╢╙¡│╠╢╚ú║╥╤╛¡▒╗╘─╢┴<%=artcount%>┤╬"><%=newtitle%></a><%if DateDiff("d",artdate,now())<1 then%> <img src="<%=signimgpath%>/new.gif" alt="╥╗╠∞╓«─┌╡─╨┬╠φ╬─╒┬" border="0"><%end if %></td>');
  114.             document.write('    </tr>');
  115.             document.write('    <tr class="tablebody">');
  116.             document.write('        <td height="1" background="<%=signimgpath%>/dotlineh.gif"></td>');
  117.             document.write('    </tr>');
  118.             <%
  119.             rs.movenext
  120.             loop
  121.             else%>
  122. document.write('<tr class="tablebody"><td class="disable_font" height="25">íñ ┤╦╖╓└α╓╨╘▌╬▐─┌╚▌</td></tr>');
  123.             <%end if
  124.             rs.close%>
  125. document.write('</table>');
  126. document.write('<table cellspacing="0" cellpadding="0"    align="center" style="width:100%;border:0;">');
  127. document.write('<tr class="tablebody">');
  128. document.write('<td height="8"></td>');
  129. document.write('</tr>');
  130. document.write('</table>');
  131.         <%else%>
  132. document.write('<table cellspacing="1" cellpadding="0"    align="center" <%if i mod 2<>0 then %>style="width:100%;" <%else%>style="width:100%;border-left:1px solid #ffffff;"<%end if%>>');
  133. document.write('<tr class="tablebody">');
  134. document.write('<th style="text-align:left" colspan="2"> ::: ╘▌╬▐╖╓└α :::</td>');
  135. document.write('</tr>');
  136. document.write('<tr class="tablebody"><td class="disable_font">íñ ╟δ╧╚╠φ╝╙╖╓└α</td></tr>');
  137. document.write('</table>');
  138.         <%end if%>
  139. document.write('</td>');
  140.     <%next%>
  141. document.write('</tr>');
  142. document.write('</table>');
  143. <%
  144. next
  145. set rs=nothing
  146. CloseDatabase
  147. function replaceText(str)
  148.     dim regEx
  149.     set regEx=New RegExp
  150.     regEx.Pattern="<[^>]*>"
  151.     regEx.Ignorecase=True
  152.     regEx.Global=True
  153.     replaceText=regEx.Replace(str,"")
  154. end function
  155. %>