<%
year2=request("year")
month2=request("month")
date2=request("date")
year1=request("year1")
month1=request("month1")
date1=request("date1")
if cint(year2)>cint(year1) then
response.write "<script>alert('起始时间应该小于终结时间!');history.back();</script>"
elseif cint(year2)=cint(year1) and cint(month2)>cint(month1) then
response.write "<script>alert('起始时间应该小于终结时间!');history.back();</script>"
elseif cint(year2)=cint(year1) and cint(month2)=cint(month1) and cint(date2)>cint(date1) then
response.write "<script>alert('起始时间应该小于终结时间!');history.back();</script>"
end if
if month2="2" then
if (cint(year2) mod 4)<>0 and cint(date2)>28 then
response.write "<script>alert('请选择正确的时间!');history.back();</script>"
elseif (cint(year2) mod 4)=0 and cint(date2)>29 then
response.write "<script>alert('请选择正确的时间!');history.back();</script>"
end if
end if
if month1="2" then
if (cint(year1) mod 4)<>0 and cint(date1)>28 then
response.write "<script>alert('请选择正确的时间!');history.back();</script>"
elseif (cint(year1) mod 4)=0 and cint(date1)>29 then
response.write "<script>alert('请选择正确的时间!');history.back();</script>"
end if
end if
if month2="4" or month2="6" or month2="9" or month2="11" then
if date2="31" then
response.write "<script>alert('请选择正确的时间!');history.back();</script>"
end if
end if
if month1="4" or month1="6" or month1="9" or month1="11" then
if date1="31" then
response.write "<script>alert('请选择正确的时间!');history.back();</script>"
end if
end if
straccess="select * from law where (addtime between CONVERT(datetime(8), '" & year2 & "-" & month2 & "-" & date2 & " 00:00:00') and CONVERT(datetime(8),'" & year1 & "-" & month1 & "-" & date1 & " 00:00:00'))"
set rst=server.createobject("adodb.recordset")
rst.cursortype=1
rst.locktype=3
rst.open straccess,conn
do while not rst.eof
rst.delete
rst.updatebatch
rst.movenext
loop
rst.close
set rst=nothing
response.write "<script>alert('成功删除!');window.location.href='manage2.asp';</script>"
%>