modifyok.asp

来自「实现对图片的基本处理:打开、增加、删除等。」· ASP 代码 · 共 54 行

ASP
54
字号
<!--#include file="check.asp"-->
<!--#include file="conn.asp"-->
<%   
function encodestr(str)
	dim i
	str=trim(str)
	str=replace(str,"<","&lt;")
	str=replace(str,">","&gt;")
	str=replace(str,"'","""")
	str=replace(str,vbCrLf&vbCrlf,"</p><p>")
	str=replace(str,vbCrLf,"<br>")
	encodestr=replace(str,"  "," ")
end function
    id=Request.Form("id")
if id="" or isnull(id) then
   Response.Write("<script language=javascript>alert('非法操作!!!');history.back()</script>")
   Response.End()
End If
   
	title=encodestr(request.form("title"))
	news_content=replace(trim(request.form("news_content")),"'","''")
	guestcontent=encodestr(request.form("guestcontent"))
	classname=Request.Form("classname")
	if news_content="" then
		sql="select news_content from imgbook where id=" & id
		set rs=conn.execute(sql)
	    newimg=rs("news_content")
    else
		newimg=news_content
	end if
	sql2="update imgbook set title='"&title&"',news_content='"&newimg&"',guestcontent='"&guestcontent&"',classname='"&classname&"' where ID=" & id
	conn.execute(sql2)
	connclose()
     %>
<html>
<head>
<title>图片加入数据库成功!</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="1;URL=manage.asp">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<div align="center"><br>
  <br>
  <br>
  <br>
  <br>
  <br>
  <font size="2">您的图片成功修改。<a href="javascript:history.back()">请返回继续管理</a>! 
  </font></div>
</body>
</html>

⌨️ 快捷键说明

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