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

📄 admin_affiche_modify.asp

📁 [FIF]ASP互动视频VIP教程 书包
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% Option Explicit %>
<!-- 后台公告管理->修改公告 -->
<!-- #include file="../config/db.asp" -->
<!-- #include file="../config/function.inc.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>FIF VIP ASP教程后台管理--公告管理-&gt;修改公告</title>
<link href="../config/global.css" rel="stylesheet" type="text/css">
</head>

<body>
<%
dim rst,sql,myErrors
on error resume next
if request.QueryString("act")="update" then
  if not isnumeric(request.QueryString("id")) and isempty(request.QueryString("id")) then
    msgbox "错误的参数!"
  else
    set rst=server.createobject("adodb.recordset")
	sql="select * from tbl_affiche where a_id="&request.QueryString("id")
	rst.open sql,conn,1,3
	if rst.eof and rst.bof then
	  msgboxU "错误的参数或记录已经不存在!"
	else
	  rst("a_title")=request.form("f_title")
	  rst("a_content")=request.form("f_content")
	  rst.update
	end if
	rst.close
	set rst=nothing
	set myErrors=conn.errors
	if myErrors.count=0 then
	  msgboxU "修改成功!"
	else
	  msgboxU "修改失败!原因:"&myErrors.item(0).description
	end if
  end if
end if
if request.QueryString("act")="modify" then
  if not isnumeric(request.QueryString("id")) and isempty(request.QueryString("id")) then
    msgbox "错误的参数!"
  else
    set rst=server.createobject("adodb.recordset")
	sql="select * from tbl_affiche where a_id="&request.querystring("id")
	rst.open sql,conn,1,1
%>
<table width="548" border="1" cellspacing="0" cellpadding="0">
<form name="form1" method="post" action="admin_affiche_modify.asp?act=update&id=<%=request.querystring("id")%>">  <tr>
    <td colspan="2">FIF VIP ASP教程后台管理--公告管理-&gt;修改公告</td>
  </tr>
  <tr>
    <td width="99" height="29" align="right">公告标题:</td>
    <td width="443">
      <input name="f_title" type="text" id="f_title" size="60" value="<%=rst("a_title")%>">
    </td>
  </tr>
  <tr>
    <td height="202" align="right" valign="top">公告内容:</td>
    <td>
      <textarea name="f_content" cols="60" rows="15" wrap="VIRTUAL" id="f_content"><%=rst("a_content")%></textarea>
    </td>
  </tr>
  <tr align="center">
    <td height="23" colspan="2"><input type="submit" name="Submit" value="提交修改">
      </td>
  </tr></form>
</table>
<%
  end if
end if
%>
<%
rst.close
set rst=nothing
conn.close
set conn=nothing
%>

</body>
</html>

⌨️ 快捷键说明

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