prop.asp
来自「一个不错的个人商务网站的源码」· ASP 代码 · 共 118 行
ASP
118 行
<%dim nowplace
nowplace="product"
dim dbpath
dbpath="../"
%>
<!--#include file="chk.asp"-->
<!--#include file="../db_conn.asp" -->
<!--#include file="../comm/my_request.asp" -->
<!--#include file="../comm/my_lib.asp" -->
<%
pid=my_request("pid",0)
chflag=my_request("chflag",1)
if pid="" or chflag="" then
wnourl("必选项没有选择")
response.end
end if
pids=split(pid,",")
select case chflag
case 1
call chflag1()
case 2
call chflag2()
case 3
call chflag3()
case 4
call chflag4()
case 5
call chflag5()
case 6
call chflag6()
case 7
call chflag7()
case 8
call chflag8()
case 9
call chflag9()
case else
wnourl("发生错误")
end select
sub chflag1()
call upbase("3","flag")
end sub
sub chflag2()
call upbase("2","flag")
end sub
sub chflag3()
call upbase("1","flag")
end sub
sub chflag4()
call upbase("1","issale")
end sub
sub chflag5()
call upbase("2","issale")
end sub
sub chflag6()
bid=my_request("bid",1)
sid=my_request("sid",1)
if bid="" or sid="" then
wnourl("大类和小类都必须选择")
response.end
else
for i=0 to ubound(pids)
id=cint(trim(pids(i)))
conn.execute ("update yqj_product set bid="&bid&",sid="&sid&" where id="&id)
next
call wurl("操作成功","AdminProductList.asp")
end if
end sub
sub chflag7()
for i=0 to ubound(pids)
id=cint(trim(pids(i)))
conn.execute ("delete from yqj_product where id="&id)
next
call wurl("操作成功","AdminProductList.asp")
end sub
sub upbase(cid,tvid)
for i=0 to ubound(pids)
id=cint(pids(i))
conn.execute ("update yqj_product set "&tvid&"='"&cid&"' where id="&id)
next
call wurl("操作成功","AdminProductList.asp")
end sub
sub chflag8()
call upbase("4","flag")
end sub
sub chflag9()
zklv=my_request("zklv",1)
zkd=my_request("zkd",0)
if zklv="" and zkd="" then
wnourl("折扣率和要转移的类型必须填写或选择!")
end if
for i=0 to ubound(pids)
id=cint(trim(pids(i)))
set rs=server.createobject("adodb.recordset")
sql="select flag,p_mmoney from yqj_product where id="&id
rs.open sql,conn,1,3
rs("flag")=zkd
rs("p_mmoney")=rs("p_mmoney")*zklv
rs.update
rs.close
set rs=nothing
next
call wurl("操作成功","AdminProductList.asp")
end sub
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?