savepinglun.asp

来自「创建和运行动态、交互的Web服务器应用程序」· ASP 代码 · 共 33 行

ASP
33
字号
<!--#include file="conn.asp"-->
<%
dim action
    action=request.QueryString("action")
select case action
       case "del"
if request("shenhe").count=0 then
   response.write "<script language=javascript>alert('您没有选择要删除的评论!');window.location.reload('javascript:history.go(-1)')</script>"
   response.End
end if
conn.execute ("delete from shop_pinglun where pinglunid in ("&request("shenhe")&")")
response.write "<script language=javascript>alert('删除成功!');window.location.reload('managepinglun.asp?action=no')</script>"
response.end
       case "shenhe"
if request("shenhe").count=0 then
   response.write "<script language=javascript>alert('您没有选择要审核的评论?');window.location.reload('javascript:history.go(-1)')</script>"
   response.End
end if
conn.execute "update shop_pinglun set shenhe=1 where pinglunid in ("&request("shenhe")&")"
response.write "<script language=javascript>alert('审核成功!');window.location.reload('managepinglun.asp?action=no')</script>"
response.end
       case "delzhou"
dim week_day
    week_day=date-7
conn.execute ("delete from shop_pinglun where pinglundate<#"&week_day&"# and shenhe=0")
response.write "<script language=javascript>alert('已删除一周前未审核评论!');window.location.reload('managepinglun.asp?action=no')</script>"
response.end
       case "delall"
conn.execute ("delete from shop_pinglun where shenhe=0")
response.write "<script language=javascript>alert('已删除所有未审核评论!');window.location.reload('managepinglun.asp?action=no')</script>"
response.end
end select
%>

⌨️ 快捷键说明

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