talk.asp
上传用户:qyswxdl
上传日期:2013-06-01
资源大小:1373k
文件大小:4k
源码类别:

家庭/个人应用

开发平台:

ASP/ASPX

  1. <!--#include file="../checkpost.asp"-->
  2. <!--#include file="articleconn.asp" -->
  3. <!--#include file="security.asp"-->
  4. <%
  5. if session("flag")>2 then
  6. response.write "<br><p align=center>您没有操作的权限</p>"
  7. response.end
  8. end if
  9. %>
  10. <%
  11. if request.form("talk")="" and request.form("talk1")="" then
  12. set rs=server.createobject("adodb.recordset")
  13. sql="select * from talk where id=22" 
  14. rs.open sql,conn,1,1
  15. talk=replace(rs("talk"),"<br>",vbcrlf)
  16. talk=replace(talk,"&nbsp;"," ")
  17. end if
  18. if request.form("talk")<>"" then
  19. set rs=server.createobject("adodb.recordset")
  20. sql="select * from talk where id=22" 
  21. rs.open sql,conn,1,3
  22. talk=request.form("talk")
  23. rs("talk")=replace(talk,vbcrlf,"<br>")
  24. rs.update
  25. response.redirect "talk.asp"
  26. end if
  27. %>
  28. <html>
  29. <head>
  30. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  31. <title>公告管理</title>
  32. <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
  33. <LINK href="inc/Admin_STYLE.CSS" rel="stylesheet" type="text/css">
  34. <SCRIPT language=JavaScript>
  35. <!--
  36. function makenote(id)
  37. {
  38. var filename="makenote.asp?id="+id;
  39. window.open(filename,"显示窗口","scrollbars=yes,width=300,height=100,status=yes,resizable=no");
  40. }
  41. function makenoteall(id)
  42. {
  43. var filename="makeallnote.asp";
  44. window.open(filename,"显示窗口","scrollbars=yes,width=300,height=100,status=yes,resizable=no");
  45. }
  46. function dfile(id)
  47. {
  48. if(confirm("确定要删除吗?")==true)
  49. {
  50. var filename="delnote.asp?id="+id;
  51. window.open(filename,"显示窗口","scrollbars=yes,width=300,height=100,status=yes,resizable=no");
  52. }
  53. }
  54. function CheckAll(v)
  55. {
  56. var i;
  57. for (i=0;i<document.forms.elements.length;i++)
  58. {
  59. var e = document.forms.elements[i];
  60.         e.checked = v;
  61. }
  62. }
  63. function OnDelete()
  64.  {
  65. var del, a, i;
  66. del = new String("");
  67. for(i = 0; i < document.forms.elements.length ; i ++)
  68. {
  69. var e = document.forms.elements[i];
  70. if(e.name == 'selAnnounce')
  71. {
  72.    if ( e.checked == true)
  73.    {
  74.     a = e.value;
  75. del = del + a + ";";
  76.    }
  77. };
  78. }
  79.  if(del == "")
  80. {
  81. alert("请选择要删除的公告")
  82. }
  83. else
  84. {
  85. if(confirm("确定要删除吗?")==true)
  86.  {
  87. document.forms.submit();
  88. }
  89. }
  90. }
  91. //-->
  92. </SCRIPT>
  93. </head>
  94. <!--#include file="conn.asp"-->
  95. <%
  96.     const MaxPerPage=20
  97.     dim totalPut   
  98.     dim CurrentPage
  99.     dim TotalPages
  100.     dim i,j
  101.     dim idlist
  102.     dim title
  103.     if not isempty(request("page")) then
  104.        currentPage=cint(request("page"))
  105.     else
  106.        currentPage=1
  107.     end if
  108.    if not isempty(request("selAnnounce")) then
  109.       idlist=request("selAnnounce")
  110.       if instr(idlist,",")>0 then
  111. dim idarr
  112. idArr=split(idlist)
  113. dim id
  114. for i = 0 to ubound(idarr)
  115.         id=clng(idarr(i))
  116.         call deleteannounce(id)
  117. next
  118.       else
  119. call deleteannounce(clng(idlist))
  120.       end if
  121.    end if 
  122.     dim sql
  123.     dim rs
  124. %>
  125. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  126. <!--#include file="top1.asp"-->
  127. <br><form method="POST" action="talk.asp">
  128.   <table class="border" width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
  129.     <tr class="title"> 
  130.       <td height="22" colspan="5" align="center" valign="middle"><font color="#FF0000"><b>公告发布修改</b></font></td>
  131.     </tr>
  132.     <tr class="tdbg"> 
  133.       <td colspan="5" align="center" valign="middle">      <div align="center">
  134.         <textarea rows="18" name="talk" cols="79" style="border-style: solid; border-width: 1"><%=talk%></textarea>
  135.       </div></td>
  136.     </tr>
  137.    
  138.     <tr class="tdbg"> 
  139.       <td height="19" colspan="5" align="center" valign="middle">
  140.         <div align="center">
  141.           <input name="submit" type="submit" value="修改">
  142.         </div></td>
  143.     </tr>
  144.   </table>
  145. <table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
  146.   <tr> 
  147.     <td width="100%" align="center">&nbsp; </td>
  148.   </tr>
  149.   <tr> 
  150.     <td width="100%" align="center">
  151. <%rs.close
  152. set rs=nothing
  153. conn.close
  154. set conn=nothing
  155. %>
  156. </body> 
  157. </html>