<%@ LANGUAGE=VBScript codepage ="936" %>
<!--#include file="check.asp"-->
<%Response.Expires=0
Response.Buffer=true
sjjh_grade=Session("sjjh_grade")
lb=LCase(trim(Request.QueryString("lb")))
if lb="" then lb="1"
dim czclb(12)
czclb(1)="普通月卡"
czclb(2)="高级月卡"
czclb(3)="黄金月卡"
czclb(4)="钻石月卡"
czclb(5)="普通半年"
czclb(6)="高级半年"
czclb(7)="黄金半年"
czclb(8)="钻石半年"
czclb(9)="银两1 亿"
czclb(10)="金币1000"
czclb(11)="金12000"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("sjjh_usermdb")
%>
<html><head><title>充值卡列表</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link href="jh.css" rel="stylesheet" type="text/css"></head>
<script language=JavaScript>
function del(url)
{if(confirm("此操作将要删除此充值卡，您确定删除此项目吗？"))parent.mainFrame.location.href=url;}
</script>
<div align="center"><a href="czclist.asp?lb=1">所有点卡列表</a> <a href="czclist.asp?lb=2">未使用充值卡列表</a> 
  <a href="czclist.asp?lb=3">已充值卡列表</a> <font color="#FF0000"><strong>[</strong><a href="jhgl.asp?act=delallczc"> 
  删除所有已用卡</a><strong> ]</strong> </font></div>
<table width="98%" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#000000" bordercolordark="#FFFFFF">
  <tr align="center" bgcolor="#d7ebff"> 
    <td height="11" colspan="7">现有充值卡列表</td>
  </tr>
  <tr align="center" bgcolor="#d7ebff"> 
    <td width="39" height="20">ID</td>
    <td width="51">类别</td>
    <td width="166" height="20">SN号码</td>
    <td width="38" height="20">状态</td>
    <td width="220">说明</td>
    <td width="113">时间</td>
    <td width="60" height="20">操作</td>
  </tr>
  <%
  if lb="2" then 
 	sql="SELECT * from sjjh_czc where cz_use=0 order by cz_time,id desc"
  elseif lb="3" then
  	sql="SELECT * from sjjh_czc where cz_use=1 order by cz_time,id desc"
  else
  	sql="SELECT * from sjjh_czc order by cz_time,id desc"
  end if
Set Rs=conn.Execute(sql)
do while not rs.bof and not rs.eof
%>
  <tr align="center" bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';"> 
    <td width="39" height="20"><%=rs("id")%></td>
    <td align="left"><%=czclb(rs("type"))%></td>
    <td height="20" align="left"> <%=rs("sn")%> </td>
    <td width="38" height="20" align="center"> 
      <%if rs("cz_use")=1 then%><font color=red>使用</font><%else%>未用<%end if%>
    </td>
    <td width="220" align="left"><a title="说明:<%=rs("remark")%>">
      <%if len(rs("remark"))>20 then %>
      <%=left(rs("remark"),20)%> 
      <%else%>
      <%=rs("remark")%> 
      <%end if%></a>
    </td>
    <td width="113"> <%=rs("cz_time")%> </td>
    <td width="60" height="20"><a href="modiczc.asp?id=<%=rs("id")%>">修改</a> 
      <a href=Javascript:del("jhgl.asp?act=delczc&sn=<%=rs("sn")%>");>删除</a></td>
  </tr>
  <%rs.movenext
loop
set rs=nothing
conn.close
set conn=nothing
%>
</table>
</body>
</html>
