📄 ad_manage_ok.asp
字号:
<!--#include file="../setup.asp"-->
<!--#include file="login_admin.asp"-->
<%
'================================================================================
'Product:K-Search Version 2.1
'本“软件产品”受《中华人民共和国著作权法》和《中华人民共和国计算机软件保护条例》
'和国际条约的保护。如未经授权而擅自复制或传播本程序(或其中任何部分),将受到严厉
'的刑事及民事制裁,并将在法律许可的范围内受到最大可能的起诉!
'Homepage:http://www.lucoo.com/
'--------------------------------------------------------------------------------
'Copyright(c) 2005 lucoo.com All Rights Reserved 绿色互联 版权所有
'================================================================================
if session("rank")<>1 then
response.write "<Script>window.alert('您的管理员级别不能操作!');history.go(-1);</Script>"
response.end
end if
%>
<!--#include file="conn.asp"-->
<%
select case request("action")
case "add"
call add()
case "edit"
call edit()
case "del"
call delete()
end select
sub add()
dim rs
dim image
dim text
dim url
dim width
dim height
dim remark
image=request.form("image")
text=request.form("text")
url=request.form("url")
width=request.form("width")
height=request.form("height")
remark=request.form("remark")
set rs=server.createobject("adodb.recordset")
rs.open "select * from ad where id is null",conn,1,3
rs.addnew
rs("sort")=request.form("sort")
rs("locality")=request.form("locality")
rs("name")=request.form("name")
rs("contact")=request.form("contact")
if image="" then
rs("image")="无"
else
rs("image")=image
end if
if text="" then
rs("text")="无"
else
rs("text")=text
end if
if url="" then
rs("url")=null
else
rs("url")=url
end if
if width="" then
rs("width")="0"
else
rs("width")=width
end if
if height="" then
rs("height")="0"
else
rs("height")=height
end if
rs("time_out")=request.form("time_out")
if remark="" then
rs("remark")="无"
else
rs("remark")=remark
end if
rs("click")="0"
rs("time")=date()
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<Script>window.alert('广告添加成功');location.replace('ad_manage.asp');</Script>"
end sub
sub edit()
dim rs
dim image
dim text
dim url
dim width
dim height
dim remark
image=request.form("image")
text=request.form("text")
url=request.form("url")
width=request.form("width")
height=request.form("height")
remark=request.form("remark")
set rs=server.createobject("adodb.recordset")
rs.open "select * from ad where id="&request.form("id"),conn,1,3
rs("sort")=request.form("sort")
rs("locality")=request.form("locality")
rs("name")=request.form("name")
rs("contact")=request.form("contact")
if image="" then
rs("image")="无"
else
rs("image")=image
end if
if text="" then
rs("text")="无"
else
rs("text")=text
end if
if url="" then
rs("url")=null
else
rs("url")=url
end if
if width="" then
rs("width")="0"
else
rs("width")=width
end if
if height="" then
rs("height")="0"
else
rs("height")=height
end if
rs("time_out")=request.form("time_out")
if remark="" then
rs("remark")="无"
else
rs("remark")=remark
end if
rs("click")="0"
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<Script>window.alert('广告修改成功');location.replace('ad_manage.asp');</Script>"
end sub
sub delete()
conn.execute"delete from ad where id="&Request.QueryString("id")
conn.close
set conn=nothing
response.write "<Script>window.alert('广告删除成功');location.replace('ad_manage.asp');</Script>"
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -