📄 agent_cz_log.asp
字号:
response.write"<script language=javascript>alert('月份值类型错误');history.back();</Script>"
response.end
end if
if isnull(Request.Querystring("cz_day"))=false and myobj.ChkNum(Request.Querystring("cz_day"))=false then
response.write"<script language=javascript>alert('日期值类型错误');history.back();</Script>"
response.end
end if
if Request.Querystring("cz_year")="" then
response.write"<script language=javascript>alert('关键参数值无法获取');history.back();</Script>"
response.end
end if
if Request.Querystring("cz_month")="" and Request.Querystring("cz_day")<>"" then
response.write"<script language=javascript>alert('您选择了查询整年的记录,因此你必须将日期也选择成“无条件”后才可以进行查询');history.back();</Script>"
response.end
end if
if Request.Querystring("cz_month")="" and Request.Querystring("cz_day")="" then
set rs=server.createobject("adodb.recordset")
rs.open "Select sum(cz_money) From cz_log where agent_id='"&request.Querystring("agent_id")&"' and datepart(year,cz_time)="&Request.Querystring("cz_year")&"",conn,1,1
Stat_money=rs(0)
rs.close
set rs=server.createobject("adodb.recordset")
rs.open "Select * From cz_log where agent_id='"&request.Querystring("agent_id")&"' and datepart(year,cz_time)="&Request.Querystring("cz_year")&" order by id desc",conn,1,1
end if
if Request.Querystring("cz_day")="" and Request.Querystring("cz_month")<>"" and Request.Querystring("cz_year")<>"" then
set rs=server.createobject("adodb.recordset")
rs.open "Select sum(cz_money) From cz_log where agent_id='"&request.Querystring("agent_id")&"' and datepart(year,cz_time)="&Request.Querystring("cz_year")&" and datepart(month,cz_time)="&Request.Querystring("cz_month")&"",conn,1,1
stat_money=rs(0)
rs.close
set rs=server.createobject("adodb.recordset")
rs.open "Select * From cz_log where agent_id='"&request.Querystring("agent_id")&"' and datepart(year,cz_time)="&Request.Querystring("cz_year")&" and datepart(month,cz_time)="&Request.Querystring("cz_month")&" order by id desc",conn,1,1
end if
if Request.Querystring("cz_year")<>"" and Request.Querystring("cz_month")<>"" and Request.Querystring("cz_day")<>"" then
search_time=cdate(Request.Querystring("cz_year")&"-"&Request.Querystring("cz_month")&"-"&Request.Querystring("cz_day"))
if isdate(search_time)=false then
response.write"<script language=javascript>alert('您选择的日期并不存在,请重新选择');history.back();</Script>"
response.end
else
set rs=server.createobject("adodb.recordset")
rs.open "Select sum(cz_money) From cz_log where agent_id='"&request.Querystring("agent_id")&"' and cz_time between '"&search_time&" 00:00:00' And '"&search_time&" 23:59:59'",conn,1,1
stat_money=rs(0)
rs.close
set rs=server.createobject("adodb.recordset")
rs.open "Select * From cz_log where agent_id='"&request.Querystring("agent_id")&"' and cz_time between '"&search_time&" 00:00:00' And '"&search_time&" 23:59:59' order by id desc",conn,1,1
end if
end if
end if
%>
<table width="550" height="25" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center">查询日期为:<span class="font3">
<%if Request.Querystring("cz_year")="" and Request.Querystring("cz_month")="" and Request.Querystring("cz_day")="" then%>所有充值记录</span><%end if%><%if Request.Querystring("cz_year")<>"" and Request.Querystring("cz_month")<>"" and Request.Querystring("cz_day")<>"" then%><%=Request.Querystring("cz_year")%>年<%=Request.Querystring("cz_month")%>月<%=Request.Querystring("cz_day")%></span> 的充值记录
<%end if%><%if Request.Querystring("cz_year")<>"" and Request.Querystring("cz_month")="" and Request.Querystring("cz_day")="" then%><%=Request.Querystring("cz_year")%>年</span> 的所有充值记录
<%end if%><%if Request.Querystring("cz_year")<>"" and Request.Querystring("cz_month")<>"" and Request.Querystring("cz_day")="" then%><%=Request.Querystring("cz_year")%>年<%=Request.Querystring("cz_month")%>月</span> 的所有充值记录
<%end if%>
充值金额统计:<span class="font3"><%if isnull(stat_money)=true then%>无充值金额<%else%><%=stat_money%></span> 元<%end if%></td>
</tr>
</table>
<%
if rs.eof and rs.bof then
%>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td height="100" align="center" bgcolor="#F7F7F7"><%if Request.Querystring("cz_year")="" and Request.Querystring("cz_month")="" and Request.Querystring("cz_day")="" then%>暂时还没有任何充值记录<%else%>没有查询到符合条件的充值记录<%end if%></td>
</tr>
</table>
<%
else
maxpage=10 '每页最大显示数
dim totalhow '数据库中的总记录数
dim totalpage '总共页数
dim CurrentPage '当前处于的页数
currentPage=request.Querystring("page")
totalhow=rs.recordcount
if totalhow mod maxpage=0 then
totalpage= totalhow \ maxpage
else
totalpage = totalhow \ maxpage +1
end if
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPage>totalhow then
if (totalhow mod MaxPage)=0 then
currentpage= totalhow \ MaxPage
else
currentpage= totalhow \ MaxPage + 1
end if
end if
if (currentPage-1)*MaxPage<totalhow then
rs.move (currentPage-1)*MaxPage
else
currentPage=1
end if
%>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td height="25" align="center" bgcolor="#F7F7F7">用户账号</td>
<td align="center" bgcolor="#F7F7F7">用户类型</td>
<td align="center" bgcolor="#F7F7F7">充值数量</td>
<td align="center" bgcolor="#F7F7F7">充值金额</td>
<td align="center" bgcolor="#F7F7F7">充值时间</td>
<td align="center" bgcolor="#F7F7F7"> 详细 </td>
</tr>
<%
i=0
do while not rs.eof
i=i+1
%>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF"><%=rs("member_id")%></td>
<td height="25" align="center" bgcolor="#FFFFFF"><%if rs("cz_type")=1 then%>
个人计点
<%end if%>
<%if rs("cz_type")=2 then%>
个人包月
<%end if%>
<%if rs("cz_type")=3 then%>
网吧包月
<%end if%></td>
<td height="25" align="center" bgcolor="#FFFFFF"><%if rs("cz_type")=1 then%>
<%=rs("cz_value")%>点
<%else%>
<%=rs("cz_value")%>个月
<%end if%></td>
<td height="25" align="center" bgcolor="#FFFFFF"><%=rs("cz_money")%>元</td>
<td height="25" align="center" bgcolor="#FFFFFF"><%=rs("cz_time")%></td>
<td height="25" align="center" bgcolor="#FFFFFF"><a href="agent_cz_view.asp?id=<%=rs("id")%>" target="_blank">查看</a></td>
</tr>
<%
if i>=maxpage then exit do
rs.movenext
loop
%>
</table>
<table width="550" height="40" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post">
<tr>
<td width="421" align="right"><!-- ########### 开始判断分页类型 ############### -->
<font face="Webdings">7</font>
<%if currentpage>1 then%><a href="<%=filename%>?action=<%=Request.Querystring("action")%>&cz_year=<%=Request.Querystring("cz_year")%>&cz_month=<%=Request.Querystring("cz_month")%>&cz_day=<%=Request.Querystring("cz_day")%>&agent_id=<%=request.Querystring("agent_id")%>"><%end if%>首页<%if currentpage>1 then%></a><%end if%>
<%if currentpage>1 then%><a href="<%=filename%>?page=<%=currentPage-1%>&action=<%=Request.Querystring("action")%>&cz_year=<%=Request.Querystring("cz_year")%>&cz_month=<%=Request.Querystring("cz_month")%>&cz_day=<%=Request.Querystring("cz_day")%>&agent_id=<%=request.Querystring("agent_id")%>"><%end if%>上一页<%if currentpage>1 then%></a><%end if%>
<%if cint(currentpage)<totalpage then%><a href="<%=filename%>?page=<%=currentPage+1%>&action=<%=Request.Querystring("action")%>&cz_year=<%=Request.Querystring("cz_year")%>&cz_month=<%=Request.Querystring("cz_month")%>&cz_day=<%=Request.Querystring("cz_day")%>&agent_id=<%=request.Querystring("agent_id")%>"><%end if%>下一页<%if cint(currentpage)<totalpage then%></a><%end if%>
<%if cint(currentpage)<totalpage then%><a href="<%=filename%>?page=<%=totalpage%>&action=<%=Request.Querystring("action")%>&cz_year=<%=Request.Querystring("cz_year")%>&cz_month=<%=Request.Querystring("cz_month")%>&cz_day=<%=Request.Querystring("cz_day")%>&agent_id=<%=request.Querystring("agent_id")%>"><%end if%>尾页<%if cint(currentpage)<totalpage then%></a><%end if%>
<font face="Webdings">8</font> 共有<span class="font3"><%=totalhow%></span>条记录 共<span class="font3"><%=currentPage%></span>/<span class="font3"><%=totalpage%></span>页</td>
<td width="129">
<select name="topage" size="1" class="select1" onChange="JavaScript:tourl(document.form1.topage.options[document.form1.topage.selectedIndex].value)">
<%
for j=1 to totalpage
%>
<option value="<%=filename%>?page=<%=j%>&action=<%=Request.Querystring("action")%>&cz_year=<%=Request.Querystring("cz_year")%>&cz_month=<%=Request.Querystring("cz_month")%>&cz_day=<%=Request.Querystring("cz_day")%>&agent_id=<%=request.Querystring("agent_id")%>" <%if cint(request.Querystring("page"))=j then%>selected<%end if%>> 第<%=j%>页 </option>
<%next%>
</select></td>
</form>
<!-- ############################ 判断分页类型结束 ######################## -->
</table>
<%
end if
%>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -