📄 newsedit.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="session2.asp"-->
<%
dim newsid
newsid=request.QueryString("id")
if not isnumeric(newsid) then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
response.end
end if
if request.QueryString("action")="save" then
Content=Request.Form("Content")
session("content")=content
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from wq_news where newsid="&newsid,conn,1,3
rs("newsname")=trim(request("newsname"))
rs("addname")=trim(request("addname"))
rs("newscontent")=content
rs("adddate")=now()
rs.update
rs.close
set rs=nothing
session("content")=""
response.write "<script language=javascript>alert('更改成功!');window.location.href='"&request("linkaddress")&"';</script>"
response.End
end if
%>
<html><head><title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from wq_news where newsid="&newsid,conn,1,1%>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td class="forumRowHighlight" colspan="4" align="center" background="../images/admin_bg_1.gif"><b><font color="#ffffff">更改网站新闻</font></b></td>
</tr>
<tr>
<td class="forumRowHighlight" valign="top">
<form name="form1" method="post" action="newsedit.asp?action=save&id=<%=newsid%>" OnSubmit="return checkdata()" onReset="return ResetForm();">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr >
<td class="forumRowHighlight" width="30%" align="right">新闻主题:</td>
<td class="forumRowHighlight" width="70%" style="PADDING-LEFT: 10px">
<input name="newsname" type="text" id="newsname" value=<%=trim(rs("newsname"))%>>
</td>
</tr>
<tr >
<td class="forumRowHighlight" align="right">发 表 人:</td>
<td class="forumRowHighlight" style="PADDING-LEFT: 10px">
<input name="addname" type="text" id="addname" value=<%=trim(rs("addname"))%>>
</td>
</tr>
<tr >
<td class="forumRowHighlight" align="right" valign="top">新闻内容:</td>
<td class="forumRowHighlight" style="PADDING-LEFT: 10px"><textarea name="Content" style="display:none"><%=Server.HTMLEncode(rs("newscontent"))%></textarea>
<iframe ID="content" src="../webedit/ewebeditor.asp?id=Content&style=standard" frameborder="0" scrolling="no" width="550" HEIGHT="350"></iframe> </td>
</tr>
<tr>
<td class="forumRowHighlight" align="right" ></td>
<td class="forumRowHighlight" height="30" style="PADDING-LEFT: 10px">
<input type="submit" name="Submit" value="修改保存" OnClick="document.form1.Content.value = frames.message.document.body.innerHTML;">
<input type="button" value=" 返 回 " onClick="javascript:history.go(-1)" class="unnamed5" name="button">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -