📄 b2b_addnews.asp
字号:
<!--#include file="conn.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
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
if request.form("action") = "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",conn,1,3
rs.addnew
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("viewnum")=0
rs.update
rs.close
set rs=nothing
response.write "<script language=javascript>alert('新闻添加成功!');history.go(-1);</script>"
response.End
end if
%>
<title>添加首页新闻</title>
<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 height="20" 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="168" 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%" bgcolor="#F7F7F7"><strong>新闻主题:</strong></td>
<td width="39%"><input name="newsname" type="text" class="input_sr" id="newsname" size="40" /> </td>
<td width="17%"><strong>发 表 人:</strong></td>
<td width="31%"><input name="addname" type="text" class="input_sr" id="addname" value="<% = session("admin") %>" /></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top" bgcolor="#F7F7F7"><strong>新闻内容:</strong></td>
<td colspan="3"><input type="hidden" name="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">
<td height="28" colspan="4" align="center"><input name="action" type="hidden" value="save" />
<input name="Submit" type="submit" class="input_bot" value="提交发表" /> </td>
</tr>
</table>
</form></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -