📄 b2b_newsedit.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
else
if request.cookies("Buy2Buy")("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
end if
end if
'限制添加权限管理员
if session("rank")=2 then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('您的管理权限未达到此操作等级!');history.go(-1);</script>"
response.End
end if
dim newsid
newsid=SafeRequest("id",1)
if FormatSQL(SafeRequest("action",0))="save" then
if session("rank")=2 then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('你无权编辑新闻!');history.go(-1);</script>"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from news where newsid="&newsid,conn,1,3
rs("newsname")=trim(request.form("newsname"))
rs("addname")=trim(request.form("addname"))
rs("categoryid")=trim(request.form("categoryid"))
Dim strNewsContent
For i = 1 To Request.Form("newscontent").Count
strNewsContent = strNewsContent & Request.Form("newscontent")(i)
Next
rs("newscontent")=strNewsContent
rs("adddate")=now()
rs.update
rs.close
set rs=nothing
response.write "<script language=javascript>alert('更改成功!');history.go(-1);</script>"
response.End
end if
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from news where newsid="&newsid,conn,1,1%>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.STYLE1 {color: #000000;
font-weight: bold;
}
.style4 {color: #FF0000}
-->
</style>
<table width="99%" border="5" align="center" cellpadding="5" cellspacing="5" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<tr>
<td background="images/topbg.gif"><span class="STYLE1"><img src="images/pic5.gif" width="28" height="22" align="absmiddle" />您现在所在的位置是: <a href="adminhelp.asp">管理首页</a> -> <span class="style4">新闻修改</span></span></td>
</tr>
<tr>
<td height="50" valign="top" bgcolor="#FFFFFF">
<form name="form1" method="post" action="b2b_cs.asp">
<br>
<table width="80%" border="2" align="center" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF">
<td width="13%" height="25" bgcolor="#F7F7F7"><strong>新闻主题:</strong></td>
<td width="39%" height="25">
<input name="newsname" type="text" class="input_sr" id="newsname" value=<%=trim(rs("newsname"))%> size="40"> </td>
<td width="17%" height="25"><strong>发 表 人:</strong></td>
<td width="31%"><input name="addname" type="text" class="input_sr" id="addname" value=<%=trim(rs("addname"))%> /></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" valign="top" bgcolor="#F7F7F7"><strong>新闻内容:</strong></td>
<td height="25" colspan="3"><INPUT type="hidden" name="newscontent" value="<% = Server.HtmlEncode(rs("newscontent")) %>">
<iframe ID="newscontent" src="htmledit/ewebeditor.asp?id=newscontent&style=standard" frameborder="0" scrolling="no" width="550" HEIGHT="350"></iframe> </td>
</tr>
<tr bgcolor="#F7F7F7" align="center">
<td height="28" colspan="4" style="PADDING-LEFT: 6px">
<input name="Submit" type="submit" class="input_bot" value="提交发表"> </td>
</tr>
</table>
<br>
</form></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -