⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cz_log.asp

📁 视频点播系统
💻 ASP
字号:
<!--#include file="chklogin.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>账号充值记录</title>
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
}
a:link {
	color: #0000FF;
	text-decoration: none;
}
a:visited {
	color: #0000FF;
	text-decoration: none;
}
a:hover {
	color: #FF0000;
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
-->
</style>
<script language="JavaScript">
function tourl(form1_url){
    location=form1_url;
    for(var i=0;i<document.form1.elements.length;i++){
        document.form1.elements[i].options[0].selected=true
    }
}
</script>
</head>

<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<table width="500" height="50" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">[<a href="agent_index.asp">管理中心首页</a>] [<a href="edit.asp">修改资料</a>] [<a href="cz.asp">账号充值</a>] [<span class="font3">充值记录</span>] [<a href="login.asp?action=logout">注销登陆</a>]</td>
  </tr>
</table>
<table width="550" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
  <tr>
    <td align="center"><strong class="font1">账号充值记录</strong></td>
  </tr>
</table>
<table width="550" height="30" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
  <tr>
<form name="form2" method="GET" action="<%=filename%>">
<%
set rs=server.createobject("adodb.recordset")
rs.open "select top 1 * from cz_log where agent_id='cnlong' order by cz_time",conn,1,1
min_year=year(rs("cz_time"))
rs.close
max_year=year(now)
%>
    <td align="center" bgcolor="#F7F7F7">查询日期为:
      <select name="cz_year" class="select1">
        <%
for y=min_year to max_year
%>
        <option value="<%=y%>" <%if cint(year(now))=cint(y) then%>selected<%end if%>><%=y%>年</option>
        <%
next
%>
      </select>
      <select name="cz_month" class="select1">
        <option value="" <%if Request.Querystring("action")<>"" and Request.Querystring("cz_month")="" then%>selected<%end if%>>整年</option>
        <%
for m=1 to 12
%>
        <option value="<%=m%>" <%if cint(month(now))=cint(m) then%>selected<%end if%>><%=m%>月</option>
        <%
next
%>
      </select>
      <select name="cz_day" class="select1">
        <option value="">整月</option>
        <%
for d=1 to 31
%>
        <option value="<%=d%>" <%if cint(day(now))=cint(d) then%>selected<%end if%>><%=d%>日</option>
        <%
next
%>
      </select>
    的充值记录
    <input name="action" type="hidden" id="action" value="search_time">
    <input name="Submit" type="submit" class="button1" value="确定">
    <input name="button" type="button" class="button1" id="button" value="所有记录" onclick="self.location='cz_log.asp';"></td>
    </form>
  </tr>
</table>
<%
if Request("action")="" then
	set rs=server.createobject("adodb.recordset")
	rs.open "select sum(cz_money) from cz_log where agent_id='"&request.cookies("username")&"'",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.cookies("username")&"' order by id desc",conn,1,1
end if
if Request("action")="search_time" then
	if isnull(Request.Querystring("cz_year"))=false and myobj.ChkNum(request.querystring("cz_year"))=false then
		response.write"<script language=javascript>alert('年份值类型错误');history.back();</Script>"
		response.end 
	end if
	if isnull(Request.Querystring("cz_month"))=false and myobj.ChkNum(Request.Querystring("cz_month"))=false then
		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.cookies("username")&"' 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.cookies("username")&"' 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.cookies("username")&"' 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.cookies("username")&"' 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.cookies("username")&"' 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.cookies("username")&"' 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%>
    &nbsp;&nbsp;充值金额统计:<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">&nbsp;详细&nbsp;</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="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>&nbsp;
          <%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")%>"><%end if%>首页<%if currentpage>1 then%></a><%end if%>
&nbsp;&nbsp;
        <%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")%>"><%end if%>上一页<%if currentpage>1 then%></a><%end if%>
&nbsp;&nbsp;&nbsp;
        <%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")%>"><%end if%>下一页<%if cint(currentpage)<totalpage then%></a><%end if%>
&nbsp;&nbsp;&nbsp;
        <%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")%>"><%end if%>尾页<%if cint(currentpage)<totalpage then%></a><%end if%>
&nbsp;<font face="Webdings">8</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 共有<span class="font3"><%=totalhow%></span>条记录&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;共<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")%>" <%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 + -