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

电子政务应用

开发平台:

HTML/CSS

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <!--#include file="Connections/conn_news.asp" -->
  3. <%
  4. ' *** Restrict Access To Page: Grant or deny access to this page
  5. MM_authorizedUsers="3"
  6. MM_authFailedURL="default.asp"
  7. MM_grantAccess=false
  8. If Session("MM_Username") <> "" Then
  9.   If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
  10.          (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
  11.     MM_grantAccess = true
  12.   End If
  13. End If
  14. If Not MM_grantAccess Then
  15.   MM_qsChar = "?"
  16.   If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
  17.   MM_referrer = Request.ServerVariables("URL")
  18.   if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
  19.   MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
  20.   Response.Redirect(MM_authFailedURL)
  21. End If
  22. %>
  23. <%
  24. Dim rst
  25. Dim rst_numRows
  26. Set rst = Server.CreateObject("ADODB.Recordset")
  27. rst.ActiveConnection = MM_conn_news_STRING
  28. rst.Source = "SELECT * FROM t_type ORDER BY t_id DESC"
  29. rst.CursorType = 0
  30. rst.CursorLocation = 2
  31. rst.LockType = 1
  32. rst.Open()
  33. rst_numRows = 0
  34. %>
  35. <%
  36. Dim rsn
  37. Dim rsn_numRows
  38. Set rsn = Server.CreateObject("ADODB.Recordset")
  39. rsn.ActiveConnection = MM_conn_news_STRING
  40. rsn.Source = "SELECT n_id, n_tid FROM t_news"
  41. rsn.CursorType = 0
  42. rsn.CursorLocation = 2
  43. rsn.LockType = 1
  44. rsn.Open()
  45. rsn_numRows = 0
  46. %>
  47. <html>
  48. <head>
  49. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  50. <title>业一新闻系统3.0正式版-------业一网络Yeyi.net制作</title>
  51. <link href="style/css.css" rel="stylesheet" type="text/css">
  52. </head>
  53. <body>
  54. <p> </p>
  55. <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
  56.   <tr>
  57.     <td height="50" colspan="2"><font color="#FF0000"><span class="title">警告!没有确认删除,如果执行删除操作将删除属于本类的所有新闻 
  58.       。</span></font> </td>
  59.   </tr>
  60.   <tr> 
  61.     <td colspan="2"> <form ACTION="yns_tsave.asp" METHOD="POST" name="form1">
  62.         <input name="t_name" type="text" id="t_name" size="22">
  63.         <input type="submit" name="Submit" value="添加类别">
  64.         <input type="hidden" name="MM_insert" value="form1">
  65.       </form></td>
  66.   </tr>
  67.   <tr> 
  68.     <td colspan="2"> <form name="form2" method="post" action="yns_tup.asp">
  69.         <select name="t_id" id="t_id">
  70.           <%
  71. While (NOT rst.EOF)
  72. %>
  73.           <option value="<%=(rst.Fields.Item("t_id").Value)%>"><%=(rst.Fields.Item("t_name").Value)%></option>
  74.           <%
  75.   rst.MoveNext()
  76. Wend
  77. If (rst.CursorType > 0) Then
  78.   rst.MoveFirst
  79. Else
  80.   rst.Requery
  81. End If
  82. %>
  83.         </select>
  84.         <input name="t_name" type="text" id="t_name" size="9">
  85.         <input type="submit" name="Submit2" value="更新类别">
  86.       </form></td>
  87.   </tr>
  88.   <tr> 
  89.     <td> <form name="form3" method="post" action="yns_tdel.asp">
  90.         <select name="t_iid" id="t_iid">
  91.           <%
  92. While (NOT rst.EOF)
  93. %>
  94.           <option value="<%=(rst.Fields.Item("t_id").Value)%>"><%=(rst.Fields.Item("t_name").Value)%></option>
  95.           <%
  96.   rst.MoveNext()
  97. Wend
  98. If (rst.CursorType > 0) Then
  99.   rst.MoveFirst
  100. Else
  101.   rst.Requery
  102. End If
  103. %>
  104.         </select>
  105.         <input type="submit" name="Submit3" value="删除类别">
  106.         <font color="#FF0000"><span class="title"> </span></font> 
  107.       </form></td>
  108.     <td> </td>
  109.   </tr>
  110.   <tr> 
  111.     <td colspan="2"> </td>
  112.   </tr>
  113. </table>
  114. <p> </p>
  115. </body>
  116. </html>
  117. <%
  118. rst.Close()
  119. Set rst = Nothing
  120. %>
  121. <%
  122. rsn.Close()
  123. Set rsn = Nothing
  124. %>