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

电子政务应用

开发平台:

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. ' *** Restrict Access To Page: Grant or deny access to this page
  18. MM_authorizedUsers="3"
  19. MM_authFailedURL="default.asp"
  20. MM_grantAccess=false
  21. If Session("MM_Username") <> "" Then
  22.   If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
  23.          (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
  24.     MM_grantAccess = true
  25.   End If
  26. End If
  27. If Not MM_grantAccess Then
  28.   MM_qsChar = "?"
  29.   If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
  30.   MM_referrer = Request.ServerVariables("URL")
  31.   if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
  32.   MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
  33.   Response.Redirect(MM_authFailedURL)
  34. End If
  35. %>
  36. <%
  37. Dim rs
  38. Dim rs_numRows
  39. Set rs = Server.CreateObject("ADODB.Recordset")
  40. rs.ActiveConnection = MM_conn_news_STRING
  41. rs.Source = "SELECT * FROM t_mob"
  42. rs.CursorType = 0
  43. rs.CursorLocation = 2
  44. rs.LockType = 1
  45. rs.Open()
  46. rs_numRows = 0
  47. %>
  48. <%
  49. Dim rst
  50. Dim rst_numRows
  51. Set rst = Server.CreateObject("ADODB.Recordset")
  52. rst.ActiveConnection = MM_conn_news_STRING
  53. rst.Source = "SELECT * FROM t_type"
  54. rst.CursorType = 0
  55. rst.CursorLocation = 2
  56. rst.LockType = 1
  57. rst.Open()
  58. rst_numRows = 0
  59. %>
  60. <%
  61. Dim rsm
  62. Dim rsm_numRows
  63. Set rsm = Server.CreateObject("ADODB.Recordset")
  64. rsm.ActiveConnection = MM_conn_news_STRING
  65. rsm.Source = "SELECT * FROM t_mob"
  66. rsm.CursorType = 0
  67. rsm.CursorLocation = 2
  68. rsm.LockType = 1
  69. rsm.Open()
  70. rsm_numRows = 0
  71. %>
  72. <%
  73. Dim Repeat1__numRows
  74. Dim Repeat1__index
  75. Repeat1__numRows = -1
  76. Repeat1__index = 0
  77. rs_numRows = rs_numRows + Repeat1__numRows
  78. %>
  79. <%
  80. Dim MM_paramName 
  81. %>
  82. <%
  83. ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
  84. Dim MM_keepNone
  85. Dim MM_keepURL
  86. Dim MM_keepForm
  87. Dim MM_keepBoth
  88. Dim MM_removeList
  89. Dim MM_item
  90. Dim MM_nextItem
  91. ' create the list of parameters which should not be maintained
  92. MM_removeList = "&index="
  93. If (MM_paramName <> "") Then
  94.   MM_removeList = MM_removeList & "&" & MM_paramName & "="
  95. End If
  96. MM_keepURL=""
  97. MM_keepForm=""
  98. MM_keepBoth=""
  99. MM_keepNone=""
  100. ' add the URL parameters to the MM_keepURL string
  101. For Each MM_item In Request.QueryString
  102.   MM_nextItem = "&" & MM_item & "="
  103.   If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
  104.     MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  105.   End If
  106. Next
  107. ' add the Form variables to the MM_keepForm string
  108. For Each MM_item In Request.Form
  109.   MM_nextItem = "&" & MM_item & "="
  110.   If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
  111.     MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  112.   End If
  113. Next
  114. ' create the Form + URL string and remove the intial '&' from each of the strings
  115. MM_keepBoth = MM_keepURL & MM_keepForm
  116. If (MM_keepBoth <> "") Then 
  117.   MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
  118. End If
  119. If (MM_keepURL <> "")  Then
  120.   MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
  121. End If
  122. If (MM_keepForm <> "") Then
  123.   MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
  124. End If
  125. ' a utility function used for adding additional parameters to these strings
  126. Function MM_joinChar(firstItem)
  127.   If (firstItem <> "") Then
  128.     MM_joinChar = "&"
  129.   Else
  130.     MM_joinChar = ""
  131.   End If
  132. End Function
  133. %>
  134. <html>
  135. <head>
  136. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  137. <title>业一新闻系统3.0正式版-------业一网络Yeyi.net制作</title>
  138. <link href="style/css.css" rel="stylesheet" type="text/css">
  139. </head>
  140. <body>
  141. <table width="600" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
  142.   <tr> 
  143.     <form name="form1" method="post" action="yns_cab.asp">
  144.       <td width="297"> <select style="font-family: 宋体; font-size: 9pt" name="t_id" id="t_id">
  145.           <%
  146. While (NOT rst.EOF)
  147. %>
  148.           <option value="<%=(rst.Fields.Item("t_id").Value)%>"><%=(rst.Fields.Item("t_name").Value)%></option>
  149.           <%
  150.   rst.MoveNext()
  151. Wend
  152. If (rst.CursorType > 0) Then
  153.   rst.MoveFirst
  154. Else
  155.   rst.Requery
  156. End If
  157. %>
  158.         </select> <select style="font-family: 宋体; font-size: 9pt" name="m_id" id="m_id">
  159.           <%
  160. While (NOT rsm.EOF)
  161. %>
  162.           <option value="<%=(rsm.Fields.Item("m_id").Value)%>"><%=(rsm.Fields.Item("m_name").Value)%></option>
  163.           <%
  164.   rsm.MoveNext()
  165. Wend
  166. If (rsm.CursorType > 0) Then
  167.   rsm.MoveFirst
  168. Else
  169.   rsm.Requery
  170. End If
  171. %>
  172.         </select> <input style="font-family: 宋体; font-size: 9pt" type="submit" name="Submit" value="转换模板"> </td>
  173.       <td width="303">批量转换模板,或者当模板修改以后的批量更新。</td>
  174.     </form>
  175.   </tr>
  176. </table>
  177. <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
  178.   <tr bgcolor="#CCCCCC"> 
  179.     <td height="3" colspan="2"></td>
  180.   </tr>
  181.   <tr class="bg"> 
  182.     <td width="70%" height="25">&nbsp;&nbsp;&nbsp; 模板名称</td>
  183.     <td height="25" align="center">操作</td>
  184.   </tr>
  185. </table>
  186. <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
  187.   <% 
  188. While ((Repeat1__numRows <> 0) AND (NOT rs.EOF)) 
  189. %>
  190.   <tr> 
  191.     <td width="70%" height="25">&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="yns_mup.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "m_id=" & rs.Fields.Item("m_id").Value %>"><%=(rs.Fields.Item("m_name").Value)%></A></td>
  192.     <td width="12%" height="25"><A HREF="yns_mdel.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "m_id=" & rs.Fields.Item("m_id").Value %>">删除模板</A></td>
  193.     <td width="1%" height="25">&nbsp;</td>
  194.     <td width="17%" height="25"><A HREF="yns_mup.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "m_id=" & rs.Fields.Item("m_id").Value %>">更新模板</A></td>
  195.   </tr>
  196.   <% 
  197.   Repeat1__index=Repeat1__index+1
  198.   Repeat1__numRows=Repeat1__numRows-1
  199.   rs.MoveNext()
  200. Wend
  201. %>
  202. </table>
  203. </body>
  204. </html>
  205. <%
  206. rs.Close()
  207. Set rs = Nothing
  208. %>
  209. <%
  210. rst.Close()
  211. Set rst = Nothing
  212. %>
  213. <%
  214. rsm.Close()
  215. Set rsm = Nothing
  216. %>