📄 news_edit.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Inc/AdminChk.asp"-->
<!--#include file="Conn.asp"-->
<!--#include file="../Inc/FormChk.asp"-->
<!--#include file="../Inc/msgbox.asp"-->
<%
IF Trim(Request("Submit"))<>Empty Then
Dim StrSql,Rs,title,body,typ
title=Request.Form("title")
body=HtmlEncode2(Encodestr(request.Form("body")))
typ=Request.Form("typ")
set rs=server.CreateObject("adodb.recordset")
strsql="select * from [news] where id="&request.form("id")
rs.open strsql,conn,1,3
rs("title")=title
rs("typ")=typ
rs("body")=body
rs.update
rs.close
set rs=nothing
call msgbox("修改成功","GoUrl","news_List.asp")
response.End()
End IF
dim strsq1,id,rs1
id=request.QueryString("id")
strsq1="select * from [news] where id="&id
set rs1=conn.execute(strsq1)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改新闻</title>
<LINK href="../style.css" type=text/css rel=stylesheet>
</head>
<body><!--#include file="top.asp"-->
<table width="600" border="0">
<tr>
<td align="center">
<form method="post" action="" name="input" id="input">
<input name="id" type="hidden" id="id" value="<%=id%>">
<table width="98%" border="1">
<tr>
<td align="right">新闻标题:</td>
<td><input name="title" type="text" id="title" value="<%=rs1("title")%>"></td>
</tr>
<tr>
<td align="right">新闻类别:</td>
<td><select name="typ" id="typ">
<option value="<%=rs1("typ")%>" selected><%=rs1("typ")%></option>
<option value="本站新闻">本站新闻</option><option value="校园资讯" selected>校园资讯</option>
<option value='中介信息'>中介信息</option><option value='友情帮助'>友情帮助</option>
</select></td>
</tr>
<tr>
<td align="right">新闻内容:</td>
<td><textarea name="body" cols="40" rows="8" id="body"><%=rs1("body")%></textarea></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table><!--#include file="copy.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -