📄 adminmodify.asp
字号:
<% response.Buffer=true %>
<!--#include file="a25175_top.asp"-->
<link href="../25175css_pro.css" rel="stylesheet" type="text/css">
<!--#include file="a25175_conn.asp"-->
<script language="JavaScript">
function checkdata() {
if (document.frm.title.value=='') {
window.alert ("请输入主题!")
return false}
if (document.frm.body.value=='') {
window.alert ("请输入您的内容!")
return false}
if (document.frm.password.value=='') {
window.alert ("请输入密码!")
return false}
return true
}
</script>
<HTML>
<HEAD>
<TITLE>教务处欢迎您!</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
</HEAD>
<BODY BGCOLOR=#FFFFFF>
<table width="970" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="163" align="center" valign="top" background=""><!--#include file="adminleft.asp"--></td>
<td width="623" align="left" valign="top" background="images/leftbgadmin.gif"><br>
<table width="90" border="0" align="center" bgcolor="#FFFFFF">
<form name="frm" action="" method="post" onSubmit="return checkdata()">
<tr>
<td colspan="3"><%
id=request("id")
strsql="select * from news where id="&id
set rs=db.execute(strsql)
show=replace(rs("body"),"<br>",chr(13))
%></td>
</tr>
<tr>
<td width="47">主题:</td>
<td colspan="2"><input name="title" type="text" size=30 maxlength="30" value=<%=rs("title")%>>
*限制输入字数30以内*</td>
</tr>
<tr>
<td colspan="3"><textarea name="body" cols="80" rows="25" wrap="PHYSICAL" ><%=show%></textarea></td>
</tr>
<tr>
<td>发布者</td>
<td colspan="2"><input type="text" name="person" size=20 value=<%=rs("person")%>></td>
</tr>
<tr>
<td align="right"> </td>
<td width="197" align="left">
<%
dim strsql,vartitle,varbody,varpassword,varperson
vartitle=request.form("title")
varbody=request.form("body")
varperson=request.form("person")
if vartitle<>"" and varbody<>""then
varbody=replace(varbody,chr(13),"<br>")
strsql="update news set title='"&vartitle&"',body='"&varbody&"',person='"&varperson&"' where id="&id
db.execute(strsql)
response.write"<script>alert('修改成功!')</script>"
response.Redirect "adminModify.asp?id="&id
end if
%></td>
<td width="321" align="left"><input name="submit" type="submit" value="确定修改">
<input name="reset" type="reset" value="重置"></td>
</tr>
</form>
</table></td></tr>
</table>
</BODY>
</HTML>
<!--#include file="../foot.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -