⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edit.asp

📁 一个用ASP编制的电子留言板
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<% 
if Request.form("updatabutt")<>"" or Request.form("exitbutt")<>"" then 
Session("edit")=true
end if
IF Session("edit")=true THEN  
Session("edit")=false
Session("admin")=true %>
<!--#include file="head.asp"-->
  <table width="768" border="0" align="center" cellspacing="0">
     <tr>
       <td width="38" height="20" background="../img/ad_mqdhl.gif">&nbsp;</td>
       <td width="742" bgcolor="#E8F5E1"><span class="style3">当前位置 留言板\管理员面板</span></td>
     </tr>
</table>
<%
 response.expires = 0
 public sub display
%>

    <form name="form1" method="post" action="">
      <table width="520" height="346" border="0" align="center" cellspacing="1">
        <tr>
          <td height="19" bgcolor="#8BC067"><div align="center">记录号:</div></td>
          <td bgcolor="#E8F5E1"><%=rs("ID")%></td>
        </tr>
        <tr>
          <td width="83" height="19" bgcolor="#8BC067"><div align="center">昵 称:</div></td>
          <td width="433" bgcolor="#E8F5E1"><%=rs("name")%></div></td>
        </tr>
        <tr>
          <td bgcolor="#8BC067"><div align="center">QQ号码:</div></td>
          <td bgcolor="#E8F5E1"><%=rs("qq")%></div></td>
        </tr>
        <tr>
          <td bgcolor="#8BC067"><div align="center">Emill:</div></td>
          <td bgcolor="#E8F5E1"><%=rs("Emill")%></div></td>
        </tr>
        <tr>
          <td bgcolor="#8BC067"><div align="center">网 址:</div></td>
          <td bgcolor="#E8F5E1"><%=rs("web")%></div></td>
        </tr>
        <tr>
          <td height="20" bgcolor="#8BC067"><div align="center">表 情:</div></td>
          <td bgcolor="#E8F5E1"><%=rs("face")%></td>
        </tr>
        <tr>
          <td height="78" bgcolor="#8BC067"><div align="center">留言内容:</div></td>
          <td bgcolor="#E8F5E1"><%=rs("massage")%></div></td>
        </tr>
        <tr>
          <td bgcolor="#8BC067"><div align="center">留言时间:</div></td>
          <td bgcolor="#E8F5E1"><%=rs("m_time")%></div></td>
        </tr>
        <tr>
          <td height="65" bgcolor="#8BC067"><div align="center">回复内容:</div></td>
          <td bgcolor="#E8F5E1">
            <div align="center">
              <textarea name="reptmass" cols="60" rows="5" id="reptmass" ><%=rs("reversion")%></textarea>
            </div></td>
        </tr>
        <tr>
          <td bgcolor="#8BC067"><div align="center">回复时间:</div></td>
          <td bgcolor="#E8F5E1"><%=rs("r_time")%></div></td>
        </tr>
        <tr>
          <td colspan="2">
            <div align="center">

              <input name="updatabutt" type="submit" id="updatabutt4" value="修 改">
              <input name="exitbutt" type="submit" id="exitbutt2" value="退 出">
</div></td>
        </tr>
      </table>
<%
end sub
ID2=int(Request.QueryString("ID"))
WhereForm=Request.ServerVariables("HTTP_REFERER")
dim sql 
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath("../data/system.mdb") & ";Mode=ReadWrite|Share Deny None;Persist Security Info=False"
sql="select * from massage"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,3,2
   rs.move ID2-1
   if Request.form("updatabutt")<>"" then 
     rs("reversion")= Request.Form("reptmass")
     rs("r_time")=now()
     rs.update
	 rs.close
     conn.close
	 Set rs=Nothing
	 Set Conn=Nothing
	 Response.Redirect("admin.asp") 
    else
	if Request.form("exitbutt")<>"" then 
	 rs.close
     conn.close
	 Set rs=Nothing
	 Set Conn=Nothing
	 Response.Redirect("admin.asp") 
	else
	call display
	 rs.close
     conn.close
	 Set rs=Nothing
	 Set Conn=Nothing
     end if
	 end if
   else
   Response.Redirect("../error/index.asp?ID=1") 
   end if
%>
<!--#include file="foot.asp"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -