📄 money_stat_del.asp
字号:
<!--#include file="chklogin.asp"-->
<%
call myobj.chkrq()
if request("money_type")="" or request("money_type")=0 then '类型为0时,删除所有记录
if request("stat_year")="" then '没有年份选择的时候显示所有记录
conn.execute"delete from money_stat"
response.write"<script language=javascript>alert('所有收入统计记录已全部清空');location.href = 'money_stat.asp';</Script>"
response.end
end if
if request("stat_year")<>"" and request("stat_month")="" then '如果年份有选择而月份没选择则显示全年
conn.execute"delete from money_stat where datepart(year,money_time)="&request("stat_year")&""
response.write"<script language=javascript>alert('已删除"&request("stat_year")&"年的所有收入统计记录');location.href = 'money_stat.asp';</Script>"
response.end
end if
if request("stat_year")<>"" and request("stat_month")<>"" and request("stat_day")="" then '如果年份有选择月份有选择而日期没选择则显示全月
conn.execute"delete from money_stat where datepart(year,money_time)="&request("stat_year")&" and datepart(month,money_time)="&request("stat_month")&""
response.write"<script language=javascript>alert('已删除"&request("stat_year")&"年"&request("stat_month")&"月的所有收入统计记录');location.href = 'money_stat.asp';</Script>"
response.end
end if
if request("stat_year")<>"" and request("stat_month")<>"" and request("stat_day")<>"" then '如果年月日都有选择
search_time=cdate(request("stat_year")&"-"&request("stat_month")&"-"&request("stat_day"))
conn.execute"delete from money_stat where money_time between '"&search_time&" 00:00:00' And '"&search_time&" 23:59:59'"
response.write"<script language=javascript>alert('已删除"&request("stat_year")&"年"&request("stat_month")&"月"&request("stat_day")&"日的收入统计记录');location.href = 'money_stat.asp';</Script>"
response.end
end if
end if
if request("money_type")=1 then '类型为1时,删除所有影卡充值记录
if request("stat_year")="" then '没有年份选择的时候显示所有记录
conn.execute"delete from money_stat where money_type=1"
response.write"<script language=javascript>alert('所有影卡充值的收入统计记录已全部清空');location.href = 'money_stat.asp';</Script>"
response.end
end if
if request("stat_year")<>"" and request("stat_month")="" then '如果年份有选择而月份没选择则显示全年
conn.execute"delete from money_stat where money_type=1 and datepart(year,money_time)="&request("stat_year")&""
response.write"<script language=javascript>alert('已删除"&request("stat_year")&"年所有影卡充值的收入统计记录');location.href = 'money_stat.asp';</Script>"
response.end
end if
if request("stat_year")<>"" and request("stat_month")<>"" and request("stat_day")="" then '如果年份有选择月份有选择而日期没选择则显示全月
conn.execute"delete from money_stat where money_type=1 and datepart(year,money_time)="&request("stat_year")&" and datepart(month,money_time)="&request("stat_month")&""
response.write"<script language=javascript>alert('已删除"&request("stat_year")&"年"&request("stat_month")&"月所有影卡充值的收入统计记录');location.href = 'money_stat.asp';</Script>"
response.end
end if
if request("stat_year")<>"" and request("stat_month")<>"" and request("stat_day")<>"" then '如果年月日都有选择
search_time=cdate(request("stat_year")&"-"&request("stat_month")&"-"&request("stat_day"))
conn.execute"delete from money_stat where money_type=1 and money_time between '"&search_time&" 00:00:00' And '"&search_time&" 23:59:59'"
response.write"<script language=javascript>alert('已删除"&request("stat_year")&"年"&request("stat_month")&"月"&request("stat_day")&"日影卡充值的收入统计记录');location.href = 'money_stat.asp';</Script>"
response.end
end if
end if
if request("money_type")=2 then '类型为2时,删除所有代理商账号充值记录
if request("stat_year")="" then '没有年份选择的时候显示所有记录
conn.execute"delete from money_stat where money_type=2"
response.write"<script language=javascript>alert('所有代理商账号充值的收入统计记录已全部清空');location.href = 'money_stat.asp';</Script>"
response.end
end if
if request("stat_year")<>"" and request("stat_month")="" then '如果年份有选择而月份没选择则显示全年
conn.execute"delete from money_stat where money_type=2 and datepart(year,money_time)="&request("stat_year")&""
response.write"<script language=javascript>alert('已删除"&request("stat_year")&"年所有代理商账号充值的收入统计记录');location.href = 'money_stat.asp';</Script>"
response.end
end if
if request("stat_year")<>"" and request("stat_month")<>"" and request("stat_day")="" then '如果年份有选择月份有选择而日期没选择则显示全月
conn.execute"delete from money_stat where money_type=2 and datepart(year,money_time)="&request("stat_year")&" and datepart(month,money_time)="&request("stat_month")&""
response.write"<script language=javascript>alert('已删除"&request("stat_year")&"年"&request("stat_month")&"月所有代理商账号充值的收入统计记录');location.href = 'money_stat.asp';</Script>"
response.end
end if
if request("stat_year")<>"" and request("stat_month")<>"" and request("stat_day")<>"" then '如果年月日都有选择
search_time=cdate(request("stat_year")&"-"&request("stat_month")&"-"&request("stat_day"))
conn.execute"delete from money_stat where money_type=2 and money_time between '"&search_time&" 00:00:00' And '"&search_time&" 23:59:59'"
response.write"<script language=javascript>alert('已删除"&request("stat_year")&"年"&request("stat_month")&"月"&request("stat_day")&"日代理商账号充值的收入统计记录');location.href = 'money_stat.asp';</Script>"
response.end
end if
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -