historyorder.asp
来自「国内第一数字点卡销售程序。功能强大。 完整无错!数据文件经MD5加密!经严格测」· ASP 代码 · 共 171 行
ASP
171 行
<!--#include file="conn.asp"-->
<link rel="stylesheet" type="text/css" href="css.css">
<%
set rs4=server.createobject("adodb.recordset")
set rs3=server.createobject("adodb.recordset")
rs4.cursorlocation=3
rs3.cursorlocation=3
%>
<%
if session("admin_rank")<>1 and session("admin_rank")<>3 then
response.write("<script>alert('您无权查看本页,SORRY!');window.location=('login.asp')</script>")
response.end
end if
%>
<%
if request("ryear")="" then
tyear=year(date())
tmonth=month(date())
tday=day(date())
else
tyear=int(request("ryear"))
tmonth=int(trim(request("rmonth")))
tday=int(trim(request("rday")))
end if
%>
<%
select case tmonth
case 1
kk=31
case 2
if (tmonth mod 4)=0 then
kk=29
else
kk= 28
end if
case 3
kk=31
case 3
kk=30
case 4
kk=30
case 5
kk=31
case 6
kk=30
case 7
kk=31
case 8
kk=31
case 9
kk=30
case 10
kk=31
case 11
kk=30
case 12
kk=31
end select
%>
<%
tdate=tyear&"-"&tmonth&"-"&"1"
dim tt(35)
for i=1 to 35
tt(i)=" "
next
j=weekday(tdate)
%>
<%
for i=1 to kk
start_day=tyear & "-" &tmonth& "-" & i & " 00:00:00"
end_day=tyear & "-" & tmonth & "-" & i & " 23:59:59"
set rs1=conn.execute("select sum(sub_totalcash) from sub where sub_payok=false and sub_date > #"&start_day&"# and sub_date < #"&end_day&"#")
rs3.open "select sub_id from sub where sub_payok=false and sub_date > #"&start_day&"# and sub_date < #"&end_day&"#",conn,3,3
rs4.open "select sub_id from sub where sub_payok=true and sub_date > #"&start_day&"# and sub_date < #"&end_day&"#",conn,3,3
set rs2=conn.execute("select sum(sub_totalcash) from sub where sub_payok=true and sub_date > #"&start_day&"# and sub_date < #"&end_day&"#")
a2=rs1(0)
a1=rs3.recordcount
a4=rs2(0)
a3=rs4.recordcount
if rs1(0)&"1"="1" then
a1=0
a2=0
end if
if rs2(0)&"1"="1" then
a3=0
a4=0
end if
tt(i)=tyear&"-"&tmonth&"-"&i
tt(i)=tt(i)&"<br>"&a1&"/"&formatcurrency(a2)&"<br>"&a3&"/"&formatcurrency(a4)
rs3.close
rs4.close
next
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="46">
<form name="AccountDetail" method="post" action="historyorder.asp"><tr>
<td align="center"> </td>
<tr>
<td noWrap height="40">
<p align="center"> <select name="ryear">
<%for i=2000 to 2050
if i=tyear then%>
<option value="<%=i%>" selected><%=i%></option>
<%else%>
<option value="<%=i%>"><%=i%></option>
<%end if
next%>
</select>年 <select name="rmonth">
<%for i=1 to 12
if i=tmonth then%>
<option value="<%=i%>" selected><%=i%></option>
<%else%>
<option value="<%=i%>"><%=i%></option>
<%end if
next%>
</select>月 <select name="rday">
<%for i=1 to 31
if i=tday then%>
<option value="<%=i%>" selected><%=i%></option>
<%else%>
<option value="<%=i%>"><%=i%></option>
<%end if
next%>
</select>日 <input type="submit" value="查询" name="B1"> </form></td>
</tr>
</table>
<table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" height="314">
<tr>
<td bgcolor="#EFEFEF" height="51" align="center">
<font color="#FF0000" size="3"><b>日</b></font></td>
<td bgcolor="#EFEFEF" align="center" height="51"><b><font size="3">一</font></b></td>
<td bgcolor="#EFEFEF" align="center" height="51"><b><font size="3">二</font></b></td>
<td bgcolor="#EFEFEF" align="center" height="51"><b><font size="3">三</font></b></td>
<td bgcolor="#EFEFEF" align="center" height="51"><b><font size="3">四</font></b></td>
<td bgcolor="#EFEFEF" align="center" height="51"><b><font size="3">五</font></b></td>
<td bgcolor="#EFEFEF" align="center" height="51">
<font color="#FF0000" size="3"><b>六</b></font></td>
</tr>
<tr>
<%for i=1 to 35%>
<%if i<j then%>
<td<%if day(date())=i-j+1 then%> bgcolor="#EBEBEB"<%end if%>><p align="center"> </td>
<%else%>
<td<%if day(date())=i-j+1 then%> bgcolor="#EBEBEB"<%end if%>> <p align="center">
<a href="todayorder.asp?start_year=<%=tyear%>&start_month=<%=tmonth%>&start_date=<%=i-j+1%>"><%=tt(i-j+1)%></a> </td>
<%end if%>
<%if (i mod 7)=0 then%></tr><tr><%end if%>
<%next%>
</tr>
</table><br><br>
<b><font color="#FF0000">注:</font></b>以下图示表示,未付款有2条记录,未付款总金额为20.00元,已付款有3条记录,付款总金额为66.30元<br>
<br>
2/¥20.00<br>
3/¥66.30
<br>
<%
set rs=nothing
conn.close
set conn=nothing%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?