📄 newsedit.asp
字号:
<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登录!');window.location.reload('login.asp')</script>"
response.End
else
if session("flag")>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限!</b></font></div>"
response.End
end if
end if
dim newsid
newsid=request.QueryString("id")
if request.QueryString("action")="save" then
function HTMLEncode2(fString)
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
fString = Replace(fString, CHR(10), "<BR>")
HTMLEncode2 = fString
end function
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_news where newsid="&newsid,conn,1,3
rs("newsname")=trim(request("newsname"))
rs("addname")=trim(request("addname"))
rs("newscontent")=htmlencode2(trim(request("newscontent")))
rs("adddate")=now()
rs.update
rs.close
set rs=nothing
response.write "<script language=javascript>alert('更改成功!');window.location.reload('editnews.asp')</script>"
response.End
end if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css.css" rel="stylesheet" type="text/css">
</head>
<body><%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_news where newsid="&newsid,conn,1,1%>
<table width="80%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#6B8FC8">
<tr>
<td bgcolor="#9933FF"><div align="center">更改网站新闻</div></td>
</tr>
<tr>
<td height="168" valign="top" bgcolor="#99CCFF"><form name="form1" method="post" action="newsedit.asp?action=save&id=<%=newsid%>">
<br>
<table width="80%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#99CCFF">
<td width="18%" style="PADDING-LEFT: 6px">新闻主题:</td>
<td width="82%" style="PADDING-LEFT: 6px"><input name="newsname" type="text" id="newsname" value=<%=trim(rs("newsname"))%>></td>
</tr>
<tr bgcolor="#99CCFF">
<td style="PADDING-LEFT: 6px">发 表 人:</td>
<td style="PADDING-LEFT: 6px"><input name="addname" type="text" id="addname" value=<%=trim(rs("addname"))%>></td>
</tr>
<tr bgcolor="#99CCFF">
<td style="PADDING-LEFT: 6px">新闻内容:</td>
<td style="PADDING-LEFT: 6px"><textarea name="newscontent" cols="36" rows="6" id="newscontent"><%=trim(rs("newscontent"))%></textarea></td>
</tr>
<tr bgcolor="#99CCFF">
<td height="28" colspan="2" style="PADDING-LEFT: 6px"><div align="center">
<input type="submit" name="Submit" value="修改">
</div></td>
</tr>
</table>
</form></td>
</tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -