saveedit.asp

来自「实现一个用JSP、Servlet技术实现的小型物流网站系统。实现功能如下:管理员」· ASP 代码 · 共 117 行

ASP
117
字号
<%@ codepage ="936" %>
<%
if session("globalecmaster")="" or session("masterflag")="" then
response.write "<script language='javascript'>"
response.write"parent.location.href='../login.asp';</SCRIPT>" 
response.end
end if
if instr(session("masterflag"),"63")=0 then
response.redirect "../err.asp"
response.end
end if
%>
<%
if request.form("id")="" then
Response.Redirect ("/login/chklogin.asp?login=4")
end if

if Chkrequest(request.form("id")) then
id=Replace_Text(request.form("id"))
else
Response.Redirect ("/login/chklogin.asp?login=4")
end if
%>
<% data_path="../../" 'ACC连接数据库路径,对SQL无效 %>
<!--#include file="../../conn/conn.asp"-->
  <!--#include file="../../inc/filesystem.asp"-->
 <!--#include file="../../inc/safe.asp"-->
<link rel="stylesheet" type="text/css" href="../css/style.css">
<%
if Not ChkPost then 
response.redirect ("/login/chklogin.asp?login=4")
response.end
end if

IncludePic=Replace_Text(request.form("IncludePic"))
title=Replace_Text(request.form("title"))
TitleFontColor=request.form("TitleFontColor")
if title="" then
response.write"<SCRIPT language=JavaScript>alert('您没有填写标题内容,请返回重新填写!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end

end if
if IncludePic>"" then
title=IncludePic&title
end if
if TitleFontColor>"" then
title="<font color="&TitleFontColor&">"&title&"</font>"
end if
typeid=Replace_Text(request.form("typeid"))
tj=Replace_Text(request.form("tj"))
if tj="" then
tj=0
else
tj=1
end if
picture=Replace_Text(request.form("picture"))
oldpic=Replace_Text(request.form("oldpic"))
nfrom=Replace_Text(request.form("nfrom"))
content=request.form("content")   
if content="" then
response.write"<SCRIPT language=JavaScript>alert('您没有填写详细内容,请返回重新填写!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

set rs=server.CreateObject ("adodb.recordset")
sql="select * from Yixiang_expoinfo where id="&id&""
rs.open sql,conn,1,3
rs("title")=title
rs("typeid")=typeid
rs("tj")=tj
rs("nfrom")=nfrom

if Replace_Text(Request("cimg"))=1 then
   '删除新上传的而又不使用的图片^^^^^^^^^^^^^^^^^^ 
    if picture<>oldpic then
	if picture<>"nopicture.gif" then
 	 call FileDel(HOPE_InstallDir&"UploadFile/"&picture)
	 end if
 	end if
   '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   end if
  if Replace_Text(Request("cimg"))=2 then
     rs("picture")=picture
   '删除原有图片^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    if picture<>oldpic then
	if oldpic<>"nopicture.gif" then
 	 call FileDel(HOPE_InstallDir&"UploadFile/"&oldpic)
	 end if
 	end if
   '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  end if

 rs("content")=content
rs("dateandtime")=now()
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>操作成功</title>
</head>
<table cellpadding=2 cellspacing=1 border=0 width=400 class=tableBorder align=center><TR>
  <TH class=tableHeaderText colSpan=2 height=25>修改展会资讯信息</TH>
<TR><tr><td height=85 valign=top class=forumRow><div align=center><br><br>
<iframe src="../../manage/makehtml/expo/makedetail_info.asp?all=update&id1=<%=id%>&id2=<%=id%>" width=1 height=1 iframeborder=0></iframe>

修改展会资讯信息成功!</div></td></tr><tr align=center><td height=30 class=forumRowHighlight><a href='info.asp'>&lt;&lt; 返回上一页</a></td>
</tr></table>
</html>
<br>
<!--#include file="../copy.asp" -->

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?