home *** CD-ROM | disk | FTP | other *** search
/ 221.214.14.186 / 221.214.14.186.tar / 221.214.14.186 / zb / Notepad-zb / js.asp < prev    next >
Text File  |  2005-12-26  |  5KB  |  171 lines

  1. <!--#include file=conn.asp-->
  2. <%
  3. dim rs, exec, s,  url, port
  4. const topNum=10        '╩╫╥│╡≈╙├┴⌠╤╘╩²┴┐
  5. const maxLen=20        '╩╫╥│╡≈╙├┴⌠╤╘▒Ω╠Γ╫╓╖√│ñ╢╚╧▐╓╞
  6. const old_color="666666"    '╛╔┴⌠╤╘╚╒╞┌╡─╤╒╔½
  7. const new_color="red"    '╨┬┴⌠╤╘╚╒╞┌╡─╤╒╔½
  8. const showTime=true    '╩╟╖±╧╘╩╛╚╒╞┌╧╘╩╛╔Φ╬¬trueú¼▓╗╧╘╩╛╔Φ╬¬false
  9. const showPic=true        '╩╟╖±╧╘╩╛╙├╗º├√║≤╡─╨í═╝
  10. const showname=true    '╩╟╖±╧╘╩╛╙├╗º├√
  11.  
  12. port=request.servervariables("server_port")
  13. url= "http://"&request.servervariables("server_name")
  14. if (port<>80) then
  15.     url=url &":"& port
  16. end if
  17. url=url & replace(request.servervariables("script_name"),"js.asp","")
  18. exec="select top "& topNum &" * from ly order by id desc"
  19. set rs=conn.execute(exec)
  20. if rs.eof then
  21.     s= "╘▌╩▒├╗╙╨┴⌠╤╘úí"
  22. else
  23.     if showTime and showname and showpic then
  24.         do until rs.eof
  25.             s=s&"<img  src="& url &"images/"& rs("pic") &"> "
  26.             if rs("rt")>0 then
  27.                 s=s&"<font face=wingdings>æ</font><a href="& url &"show.asp?id="& rs("rt") &"#"& rs("id") &" target=_blank>"
  28.             else
  29.                 s=s&"<a href="& url &"show.asp?id="& rs("id") &" target=_blank>"
  30.             end if
  31.             
  32.             if len(rs("title"))<=maxLen then
  33.                 s=s&rs("title")
  34.             else
  35.                 s=s&left(rs("title"),maxLen)&"..."
  36.             end if
  37.             s=s&"</a> ("
  38.             if rs("t")>date then
  39.                 s=s & "<font color=" & new_color & ">" & formatdatetime(rs("t"),2)  & "</font>,"
  40.             else
  41.                 s=s & "<font color="& old_color & ">"& formatdatetime(rs("t"),2)  & "</font>,"
  42.             end if
  43.             s=s & rs("name")
  44.             if rs("bl")=1 then
  45.                 if isMaster(rs("name")) then
  46.                     s=s&"<img src="& url &"images/bz.gif>"
  47.                 else
  48.                     s=s&"<img src="& url &"images/bl.gif>"
  49.                 end if
  50.             end if
  51.             s=s& ")<br>"
  52.             rs.movenext
  53.         loop
  54.     elseif showTime and showname then
  55.         do until rs.eof
  56.             s=s&"<img  src="& url &"images/"& rs("pic") &"> "
  57.             if rs("rt")>0 then
  58.                 s=s&"<font face=wingdings>æ</font><a href="& url &"show.asp?id="& rs("rt") &"#"& rs("id") &" target=_blank>"
  59.             else
  60.                 s=s&"<a href="& url &"show.asp?id="& rs("id") &" target=_blank>"
  61.             end if
  62.             if len(rs("title"))<=maxLen then
  63.                 s=s&rs("title")
  64.             else
  65.                 s=s&left(rs("title"),maxLen)&"..."
  66.             end if
  67.             s=s&"</a> ("
  68.             if rs("t")>date then
  69.                 s=s & "<font color=" & new_color & ">" & formatdatetime(rs("t"),2)  & "</font>,"
  70.             else
  71.                 s=s & "<font color="& old_color & ">"& formatdatetime(rs("t"),2)  & "</font>,"
  72.             end if
  73.             s=s & rs("name")
  74.             s=s&")<br>"
  75.             rs.movenext
  76.         loop
  77.     elseif showname and showpic then
  78.         do until rs.eof
  79.             s=s&"<img  src="& url &"images/"& rs("pic") &"> "
  80.             if rs("rt")>0 then
  81.                 s=s&"<font face=wingdings>æ</font><a href="& url &"show.asp?id="& rs("rt") &"#"& rs("id") &" target=_blank>"
  82.             else
  83.                 s=s&"<a href="& url &"show.asp?id="& rs("id") &" target=_blank>"
  84.             end if
  85.             
  86.             if len(rs("title"))<=maxLen then
  87.                 s=s&rs("title")
  88.             else
  89.                 s=s&left(rs("title"),maxLen)&"..."
  90.             end if
  91.             
  92.             s=s&"</a> ("
  93.             s=s & rs("name")
  94.             if rs("bl")=1 then
  95.                 if isMaster(rs("name")) then
  96.                     s=s&"<img src="& url &"images/bz.gif>"
  97.                 else
  98.                     s=s&"<img src="& url &"images/bl.gif>"
  99.                 end if
  100.             end if
  101.             s=s&")<br>"
  102.             rs.movenext
  103.         loop
  104.     elseif showname then
  105.         do until rs.eof
  106.             s=s&"<img  src="& url &"images/"& rs("pic") &"> "
  107.             if rs("rt")>0 then
  108.                 s=s&"<font face=wingdings>æ</font><a href="& url &"show.asp?id="& rs("rt") &"#"& rs("id") &" target=_blank>"
  109.             else
  110.                 s=s&"<a href="& url &"show.asp?id="& rs("id") &" target=_blank>"
  111.             end if
  112.             
  113.             if len(rs("title"))<=maxLen then
  114.                 s=s&rs("title")
  115.             else
  116.                 s=s&left(rs("title"),maxLen)&"..."
  117.             end if
  118.             
  119.             s=s&"</a> ("
  120.             s=s & rs("name")
  121.             s=s&")<br>"
  122.             rs.movenext
  123.         loop
  124.     elseif showtime then
  125.         do until rs.eof
  126.             s=s&"<img  src="& url &"images/"& rs("pic") &"> "
  127.             if rs("rt")>0 then
  128.                 s=s&"<font face=wingdings>æ</font><a href="& url &"show.asp?id="& rs("rt") &"#"& rs("id") &" target=_blank>"
  129.             else
  130.                 s=s&"<a href="& url &"show.asp?id="& rs("id") &" target=_blank>"
  131.             end if
  132.             if len(rs("title"))<=maxLen then
  133.                 s=s&rs("title")
  134.             else
  135.                 s=s&left(rs("title"),maxLen)&"..."
  136.             end if
  137.             s=s&"</a> ("
  138.             if rs("t")>date then
  139.                 s=s & "<font color=" & new_color & ">" & formatdatetime(rs("t"),2)  & "</font>"
  140.             else
  141.                 s=s & "<font color="& old_color & ">"& formatdatetime(rs("t"),2)  & "</font>"
  142.             end if
  143.             s=s&")<br>"
  144.             rs.movenext
  145.         loop
  146.     else
  147.         do until rs.eof
  148.             s=s&"<img  src="& url &"images/"& rs("pic") &"> "
  149.             if rs("rt")>0 then
  150.                 s=s&"<font face=wingdings>æ</font><a href="& url &"show.asp?id="& rs("rt") &"#"& rs("id") &" target=_blank>"
  151.             else
  152.                 s=s&"<a href="& url &"show.asp?id="& rs("id") &" target=_blank>"
  153.             end if
  154.             if len(rs("title"))<=maxLen then
  155.                 s=s&rs("title")
  156.             else
  157.                 s=s&left(rs("title"),maxLen)&"..."
  158.             end if
  159.             s=s&"</a><br>"
  160.             rs.movenext
  161.         loop
  162.     end if
  163.  
  164.  
  165.  
  166. end if
  167. 's=replace(s,"""","")
  168. response.write "document.write('"&s&"');"
  169. rsclose()
  170. connclose()
  171. %>