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

电子政务应用

开发平台:

HTML/CSS

  1. <%@LANGUAGE="VBSCRIPT"%>
  2. <!--#include file="Connections/conn_news.asp" -->
  3. <% dim s
  4. s=request("s")
  5. %>
  6. <%
  7. Dim rs__MMColParam
  8. rs__MMColParam = "1"
  9. If (Request.QueryString("t_id")  <> "") Then 
  10.   rs__MMColParam = Request.QueryString("t_id") 
  11. End If
  12. %>
  13. <%
  14. Dim rs
  15. Dim rs_numRows
  16. Set rs = Server.CreateObject("ADODB.Recordset")
  17. rs.ActiveConnection = MM_conn_news_STRING
  18. rs.Source = "SELECT *  FROM t_news  WHERE n_tid = " + Replace(rs__MMColParam, "'", "''") + " and n_check = true  ORDER BY n_id DESC"
  19. rs.CursorType = 0
  20. rs.CursorLocation = 2
  21. rs.LockType = 1
  22. rs.Open()
  23. rs_numRows = 0
  24. %>
  25. <%
  26. Dim Repeat1__numRows
  27. Dim Repeat1__index
  28. Repeat1__numRows = s
  29. Repeat1__index = 0
  30. rs_numRows = rs_numRows + Repeat1__numRows
  31. %>
  32. <SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
  33. function DoDateTime(str, nNamedFormat, nLCID)
  34. dim strRet
  35. dim nOldLCID
  36. strRet = str
  37. If (nLCID > -1) Then
  38. oldLCID = Session.LCID
  39. End If
  40. On Error Resume Next
  41. If (nLCID > -1) Then
  42. Session.LCID = nLCID
  43. End If
  44. If ((nLCID < 0) Or (Session.LCID = nLCID)) Then
  45. strRet = FormatDateTime(str, nNamedFormat)
  46. End If
  47. If (nLCID > -1) Then
  48. Session.LCID = oldLCID
  49. End If
  50. DoDateTime = strRet
  51. End Function
  52. </SCRIPT>
  53. <% 
  54. While ((Repeat1__numRows <> 0) AND (NOT rs.EOF)) 
  55. %>
  56. document.write('<table width="98%" border="0" cellspacing="0" cellpadding="0"><tr> <td width="5%" align="center" height="20"><img src="news/pic_site/arrow.gif" width="30" height="10"></td><td><a href="news/<%=(rs.Fields.Item("n_tid").Value)%>/<%=(rs.Fields.Item("n_fname").Value)%>" target="_blank"><%=(rs.Fields.Item("n_title").Value)%></a></td><td width="20%"></td></tr></table>');
  57. <% 
  58.   Repeat1__index=Repeat1__index+1
  59.   Repeat1__numRows=Repeat1__numRows-1
  60.   rs.MoveNext()
  61. Wend
  62. %><%
  63. rs.Close()
  64. Set rs = Nothing
  65. %>