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

电子政务应用

开发平台:

HTML/CSS

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <!--#include file="Connections/conn_news.asp" -->
  3. <%
  4. '请尊重作者劳动成果不要删除以上信息
  5. '业一新闻系统3.0正式版
  6. '主页:http://yeyi.net
  7. '论坛:http://bbs.yeyi.net
  8. '业一网络 承接各种网站制作
  9. '程序开发 软件开发业务
  10. '业务联系
  11. '电话: 13007310512
  12. '联系人:郝亚平
  13. 'QQ:24344842 (只谈业务,技术问题请访问论坛)
  14. '请尊重作者劳动成果不要删除以上信息
  15. %>
  16. <%
  17. Dim rsmenu
  18. Dim rsmenu_numRows
  19. Set rsmenu = Server.CreateObject("ADODB.Recordset")
  20. rsmenu.ActiveConnection = MM_conn_news_STRING
  21. rsmenu.Source = "SELECT * FROM t_type"
  22. rsmenu.CursorType = 0
  23. rsmenu.CursorLocation = 2
  24. rsmenu.LockType = 1
  25. rsmenu.Open()
  26. rsmenu_numRows = 0
  27. %>
  28. <%
  29. Dim Repeat1__numRows
  30. Dim Repeat1__index
  31. Repeat1__numRows = -1
  32. Repeat1__index = 0
  33. rsmenu_numRows = rsmenu_numRows + Repeat1__numRows
  34. %>
  35. <%
  36. Dim MM_paramName 
  37. %>
  38. <%
  39. ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
  40. Dim MM_keepNone
  41. Dim MM_keepURL
  42. Dim MM_keepForm
  43. Dim MM_keepBoth
  44. Dim MM_removeList
  45. Dim MM_item
  46. Dim MM_nextItem
  47. ' create the list of parameters which should not be maintained
  48. MM_removeList = "&index="
  49. If (MM_paramName <> "") Then
  50.   MM_removeList = MM_removeList & "&" & MM_paramName & "="
  51. End If
  52. MM_keepURL=""
  53. MM_keepForm=""
  54. MM_keepBoth=""
  55. MM_keepNone=""
  56. ' add the URL parameters to the MM_keepURL string
  57. For Each MM_item In Request.QueryString
  58.   MM_nextItem = "&" & MM_item & "="
  59.   If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
  60.     MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  61.   End If
  62. Next
  63. ' add the Form variables to the MM_keepForm string
  64. For Each MM_item In Request.Form
  65.   MM_nextItem = "&" & MM_item & "="
  66.   If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
  67.     MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  68.   End If
  69. Next
  70. ' create the Form + URL string and remove the intial '&' from each of the strings
  71. MM_keepBoth = MM_keepURL & MM_keepForm
  72. If (MM_keepBoth <> "") Then 
  73.   MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
  74. End If
  75. If (MM_keepURL <> "")  Then
  76.   MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
  77. End If
  78. If (MM_keepForm <> "") Then
  79.   MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
  80. End If
  81. ' a utility function used for adding additional parameters to these strings
  82. Function MM_joinChar(firstItem)
  83.   If (firstItem <> "") Then
  84.     MM_joinChar = "&"
  85.   Else
  86.     MM_joinChar = ""
  87.   End If
  88. End Function
  89. %>
  90. document.write('<link href="../../beauty.css" rel="stylesheet" type="text/css">'); 
  91. document.write('<font color="#CC0000">|</font> <a href="default.asp" class="red">首页</a> <font color="#CC0000">|</font>'); 
  92. <% While ((Repeat1__numRows <> 0) AND (NOT rsmenu.EOF)) %>
  93. document.write(' <A HREF="news/list1.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "t_id=" & rsmenu.Fields.Item("t_id").Value %>" class="red"><%=(rsmenu.Fields.Item("t_name").Value)%></A> <font color="#CC0000">|</font> '); 
  94. <% 
  95.   Repeat1__index=Repeat1__index+1
  96.   Repeat1__numRows=Repeat1__numRows-1
  97.   rsmenu.MoveNext()
  98. Wend %><%
  99. rsmenu.Close()
  100. Set rsmenu = Nothing
  101. %>