yns_list2.asp
上传用户:yjkj1008
上传日期:2020-10-17
资源大小:1496k
文件大小:3k
源码类别:

电子政务应用

开发平台:

HTML/CSS

  1. <!--#include file="Connections/conn_news1.asp" -->
  2. <%
  3. Dim rsn
  4. Dim rsn_numRows
  5. Set rsn = Server.CreateObject("ADODB.Recordset")
  6. rsn.ActiveConnection = MM_conn_news_STRING
  7. if Request("n_title")<>"" then
  8. rsn.Source = "SELECT n_id, n_tid, n_title, n_index, n_fname, n_check, t_name  FROM t_news inner join t_type on t_news.n_tid = t_type.t_id  WHERE n_title LIKE '%" + Replace(rsn__MMColParam, "'", "''") + "%'  ORDER BY n_date DESC"
  9. elseif Request.QueryString("t_id")<>"" then
  10. rsn.Source = "SELECT n_id, n_tid, n_title, n_index, n_fname, n_check, t_name  FROM t_news inner join t_type on t_news.n_tid = t_type.t_id  WHERE n_tid = " + Replace(rsn__MMColParam2, "'", "''") + "  ORDER BY n_date DESC"
  11. else
  12. rsn.Source = "SELECT n_id, n_tid, n_title, n_index, n_fname, n_check, t_name  FROM t_news inner join t_type on t_news.n_tid = t_type.t_id  ORDER BY n_date DESC"
  13. end if
  14. rsn.CursorType = 0
  15. rsn.CursorLocation = 2
  16. rsn.LockType = 1
  17. rsn.Open()
  18. rsn_numRows = 0
  19. %>
  20. <%
  21. Dim rssetup
  22. Dim rssetup_numRows
  23. Set rssetup = Server.CreateObject("ADODB.Recordset")
  24. rssetup.ActiveConnection = MM_conn_news_STRING
  25. rssetup.Source = "SELECT * FROM t_setup"
  26. rssetup.CursorType = 0
  27. rssetup.CursorLocation = 2
  28. rssetup.LockType = 1
  29. rssetup.Open()
  30. rssetup_numRows = 0
  31. %>
  32. <%
  33. Dim Repeat1__numRows
  34. Dim Repeat1__index
  35. Repeat1__numRows = (rssetup.Fields.Item("st_lnum").Value)
  36. Repeat1__index = 0
  37. rsn_numRows = rsn_numRows + Repeat1__numRows
  38. %>
  39. <%
  40. Dim Repeat2__numRows
  41. Dim Repeat2__index
  42. Repeat2__numRows = -1
  43. Repeat2__index = 0
  44. rst_numRows = rst_numRows + Repeat2__numRows
  45. %>
  46. <body bgcolor="#FFFFFF">
  47. <p class="title"></p>
  48. <div align="left">
  49. <table width="275" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
  50.   <% 
  51. While ((Repeat1__numRows <> 0) AND (NOT rsn.EOF)) 
  52. %>
  53.    <tr> 
  54.    <td width="275" height="23" background="../PIC/line2.gif"><font color="#FF9933">&nbsp;&nbsp;[<%=(rsn.Fields.Item("t_name").Value)%>]&nbsp;&nbsp;</font><a href="news/<%=(rsn.Fields.Item("n_tid").Value)%>/<%=(rsn.Fields.Item("n_fname").Value)%>" target="_blank"><%=(rsn.Fields.Item("n_title").Value)%></a> <% if rsn("n_index")=true then  %> <font color="#999900">(图)</font> <% End If %> </td>
  55.     <% If Session("MM_UserAuthorization")="3" Then %>
  56.     
  57.     <% End If %>
  58.     <% If Session("MM_UserAuthorization")="3" or Session("MM_UserAuthorization")="2" Then %>
  59.     <% End If %>
  60.     <% If  Session("MM_UserAuthorization")="2" or Session("MM_UserAuthorization")="3" Then %>
  61.    
  62.     <% End If %>
  63.   </tr>
  64.   <% 
  65.   Repeat1__index=Repeat1__index+1
  66.   Repeat1__numRows=Repeat1__numRows-1
  67.   rsn.MoveNext()
  68. Wend
  69. %>
  70. </table>
  71. </div>