📄 modifynews.asp
字号:
<!--#include virtual="/include/check.asp"-->
<!--#include virtual="/include/conn.asp"-->
<!--#include virtual="/include/UpLoadClass.asp"-->
<!--#include virtual="/include/FunctionManage.asp"-->
<%
dim okid,okid1,okid2
set rs=conn.execute("Select * from Product where ProductID="&request.querystring("id") )
ClassID=rs("ClassID")
ProductName=rs("ProductName")
SmallPic=rs("SmallPic")
Content=rs("Content")
phflag=rs("phflag")
ggflag=rs("ggflag")
xyflag=rs("xyflag")
jyflag=rs("jyflag")
RsClose()
%>
<%
if request.querystring("action")="modify" then
if request2.form("ProductName")="" then
response.write "<script>alert('信息标题不能为空!');window.location.href='AddNews.asp';</script>"
response.end
end if
url="action="&action&"&keyword="&Request.QueryString("keyword")&"&class="&Request.QueryString("class")&"&page="&Request.QueryString("page")
set rs=server.createobject("adodb.recordset")
sql="select * from Product where ProductID="&request.querystring("id")
rs.open sql,conn,3,3
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
rs("ClassID")=okid1
rs("anClassID")=okid2
rs("ProductName")=request2.form("ProductName")
rs("ChangeDate")=date()
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 Request2.form("SmallPic")<>"" then
DelFile(SmallPic)
rs("SmallPic")=request2.form("SmallPic")
end if
rs("Content")=request2.form("Content")
if session("AdminName")=empty then
rs("user")="管理员"
else
rs("user")=session("AdminName")
end if
rs.update
RsClose()
response.write "<script>alert('提交成功!');window.location.href='ManageNews.asp?"&url&"';</script>"
end if
%>
<html>
<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">
</head>
<body style="margin-bottom: 20px">
<form name="form1" method="post" action="?action=modify&id=<%=Request.QueryString("id")%>&keyword=<%=Request.QueryString("keyword")%>&class=<%=Request.QueryString("class")%>&page=<%=Request.QueryString("page")%>" enctype="multipart/form-data" >
<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")%>" <% if ClassID=rs("anClassID") then %> selected="selected" <% end if %>><%=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")%>" <% if ClassID=rs("nClassID") then %> selected="selected" <% end if %>><%=rs("ClassName")%></option>
<%rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
<span><font color="red">*</font></span></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" value="<%=ProductName%>"></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 height="22" align="right" class="forumRowHighlight" style="width: 11%">
信息内容:</td>
<td width="88%" class="forumRow" colspan="8">
<INPUT type="hidden" name="Content" value="<%=server.HTMLEncode(Content)%>">
<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="4%" class="forumRow">
<input type="checkbox" name="phflag" value="1" <%if phflag=1 then%>checked><%end if%></td>
<td width="12%" class="forumRow" style="background-color: #EAEAF3">
<p align="right">加入公告栏目:</td>
<td width="4%" class="forumRow">
<input type="checkbox" name="ggflag" value="1" <%if ggflag=1 then%>checked><%end if%></td>
<td width="12%" class="forumRow" style="background-color: #EAEAF3">
<p align="right">加入校园动态:</td>
<td width="3%" class="forumRow">
<input type="checkbox" name="xyflag" value="1" <%if xyflag=1 then%>checked><%end if%></td>
<td width="18%" class="forumRow">
<p align="right">加入底部滚动图像区:</td>
<td width="24%" class="forumRow">
<input type="checkbox" name="jyflag" value="1" <%if jyflag=1 then%>checked><%end if%></td>
<td width="9%" 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 + -