📄 addnews.asp
字号:
<!--#include virtual="/include/check.asp"-->
<% CheckAdminIsLogin("信息管理") %>
<!--#include virtual="/include/conn.asp"-->
<!--#include virtual="/include/UpLoadClass.asp"-->
<%
dim okid,okid1,okid2
if request.querystring("action")="add" then
if request2.form("ProductName")="" then
response.write "<script>alert('信息标题不能为空!');window.location.href='AddNews.asp';</script>"
response.end
end if
okid=trim(request2.form("seleClassID"))
if okid<>empty then
if instr(okid,"*")>0 then
okid1=left(okid,instr(okid,"*")-1)
okid2=right(okid,len(okid)-instr(okid,"*"))
else
okid1=okid
okid2=okid
end if
else
okid1=okid
okid2=okid
end if
set rs=server.CreateObject("adodb.recordset")
sql="select * from Product where ProductID is null"
rs.open sql,conn,3,3
rs.addnew
rs("ClassID")=okid1
rs("anClassID")=okid2
rs("ProductName")=request2.form("ProductName")
rs("SmallPic")=request2.form("SmallPic")
rs("ChangeDate")=date()
rs("Content")=request2.form("Content")
if request2.form("phflag")<>empty then rs("phflag")=request2.form("phflag")
if request2.form("ggflag")<>empty then rs("ggflag")=request2.form("ggflag")
if request2.form("xyflag")<>empty then rs("xyflag")=request2.form("xyflag")
if request2.form("jyflag")<>empty then rs("jyflag")=request2.form("jyflag")
if session("AdminName")=empty then
rs("user")="管理员"
else
rs("user")=session("AdminName")
end if
rs.update
RsClose()
response.write "<script>alert('提交成功!');window.location.href='?';</script>"
end if
%>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript" src="../../js/Manage.js" type="text/javascript"></script>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
.style1 {
color: #FF0000;
}
</style>
</head>
<body style="margin-bottom: 20px">
<form name="form1" method="post" action="?action=add" enctype="multipart/form-data">
<INPUT type="hidden" name="NewsContent" value="">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
<tr><th colspan="9">== 添加信息 ==</th></tr>
<tr>
<td height="22" align="right" class="forumRowHighlight" style="width: 11%">
所属栏目:</td>
<td width="88%" class="forumRow" colspan="8">
<select name="seleClassID" class="px12" id="SelSClass">
<%set rs=server.createobject("adodb.recordset")
rs.Open "select * from anclass where classname<>'特殊内容' and classname<>'网站首页' and classname<>'首页' order by anclassidorder",conn,1,1
do while not rs.eof %>
<option value=<%=rs("anclassid")%>><%=trim(rs("classname"))%></option>
<%rs.movenext
loop
rs.close
rs.Open "select * from nclass order by anclassid,nclassidorder",conn,1,1
do while not rs.eof %>
<option value=<%=rs("nclassid") &"*" &rs("anclassid")%>><%=trim(rs("classname"))%></option>
<%rs.movenext
loop
rs.close
set rs=nothing
%>
</select><font color="#FF0000">*</font></td>
</tr>
<tr>
<td height="22" align="right" class="forumRowHighlight" style="width: 11%">
信息标题:</td>
<td width="88%" class="forumRow" colspan="8">
<input type="text" name="ProductName" size="50">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td height="22" align="right" class="forumRowHighlight" style="width: 11%">
信息图像:</td>
<td width="88%" class="forumRow" colspan="8">
<input name="SmallPic" type="file" size="40" value="">(图像大小260*180)</td>
</tr>
<tr>
<td align="right" class="forumRowHighlight" style="width: 11%">信息内容:</td>
<td width="88%" class="forumRow" colspan="8">
<INPUT type="hidden" name="Content" value="">
<IFRAME ID="eWebEditor1" src="/ewebeditor/ewebeditor.htm?id=Content&style=coolblue" frameborder="0" scrolling="no" width="680" height="400"></IFRAME>
</td>
</tr>
<tr>
<td height="22" align="right" class="forumRowHighlight" style="width: 11%">
文章带图像:</td>
<td width="3%" class="forumRow">
<input type="checkbox" name="phflag" value="1"></td>
<td width="13%" class="forumRow" style="background-color: #EAEAF3">
<p align="right">加入公告栏目:</td>
<td width="2%" class="forumRow">
<input type="checkbox" name="ggflag" value="1"></td>
<td width="12%" class="forumRow" style="background-color: #EAEAF3">
<p align="right">加入校园动态:</td>
<td width="2%" class="forumRow">
<input type="checkbox" name="xyflag" value="1"></td>
<td width="17%" class="forumRow">
<p align="right">加入底部滚动图像区:</td>
<td width="34%" class="forumRow">
<input type="checkbox" name="jyflag" value="1"></td>
<td width="3%" class="forumRow">
</td>
</tr>
<tr>
<td height="22" align="center" class="forumRowHighlight" colspan="9">
<input type=Submit class=button value="提 交" name=Submit>
<input type=reset name=Submit2 class=button value="清 除"> </td>
</tr>
</table>
</form>
</body>
</html>
<% ConnClose() %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -