📄 modifyok.asp
字号:
<!--#include file="conn.asp"-->
<%
Function checkPermission()
If Session("admin")<>"" then
checkPermission=TRUE
Else
checkPermission=FALSE
End if
End Function
tmp=checkPermission()
If tmp=TRUE then
%>
<%
function encodestr(str)
dim i
str=trim(str)
str=replace(str,"<","<")
str=replace(str,">",">")
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>
<%
Else
response.redirect "../../login.asp?postion=2"
End if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -