<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>点卡业务记录</title>
<link href="base.css" rel="stylesheet" type="text/css">
<script language="javascript">
//获得选中项
function getCheckboxItem()
{
	var allSel="";
	if(document.form1.aids.value) return document.form1.aids.value;
	for(i=0;i<document.form1.aids.length;i++)
	{
		if(document.form1.aids[i].checked)
		{
			if(allSel=="")
				allSel=document.form1.aids[i].value;
			else
				allSel=allSel+"`"+document.form1.aids[i].value;
		}
	}
	return allSel;	
}
function ReSel()
{
	for(i=0;i<document.form1.aids.length;i++)
	{
		if(document.form1.aids[i].checked) document.form1.aids[i].checked = false;
		else document.form1.aids[i].checked = true;
	}
}
function DelSel()
{
	var nid = getCheckboxItem();
	if(nid==""){
		alert("请选择要删除的卡!\r\n");
		return ;
	}
	//location.href = "";
}
</script>
</head>
<body background='img/allbg.gif' leftmargin='8' topmargin='8'>
<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#98CAEF" align="center">
  <tr> 
    <td height="20" colspan="7" background='img/tbg.gif'><table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="30%"> <strong><a href="co_main.php"><u>会员管理</u></a> &gt; 
            点卡业务管理：</strong> </td>
          <td width="45%" align="right" > <input type="button" name="ss13" value="未使用" style="width:50px;margin-right:6px" onClick="location='member_card.php?isexp=0';" class='nbt'> 
            <input type="button" name="ss14" value="已售出" style="width:50px;margin-right:6px" onClick="location='member_card.php?isexp=1';" class='nbt'> 
            <input type="button" name="ss15" value="已使用" style="width:50px;margin-right:6px" onClick="location='member_card.php?isexp=-1';" class='nbt'> 
            <input type="button" name="ss16" value="全部" style="width:40px;margin-right:6px" onClick="location='member_card.php';" class='nbt'> 
          </td>
          <td width="25%" align="right"> <input type="button" name="ss1" value="生成点卡" style="width:70px;margin-right:6px" onClick="location='member_card_make.php';" class='nbt'> 
            <input type="button" name="ss12" value="点卡产品分类" style="width:90px;margin-right:6px" onClick="location='member_card_type.php';" class='nbt'> 
          </td>
        </tr>
      </table></td>
  </tr>
  <tr align="center" bgcolor="#F8FBFB"> 
    <td width="8%">选择</td>
    <td width="28%">卡号</td>
    <td width="18%">点卡类型</td>
    <td width="12%">生成日期</td>
    <td width="12%">使用日期</td>
    <td width="8%">状态</td>
    <td width="14%">使用会员</td>
  </tr>
  <form name="form1">
  <?php 
  $mylist = $dlist->GetDataList();
  while($row = $mylist->GetArray('dm'))
  {
 ?>
  <tr align="center" bgcolor="#FFFFFF"> 
    <td><input type='checkbox' name='aids' value='<?php echo $row['aid']?>' class='np'></td>
      <td><?php echo $row['cardid']?></td>
      <td><?php echo $TypeNames[$row['ctid']]?></td>
      <td><?php echo GetDateMk($row['mtime'])?></td>
      <td>
	  <?php 
	  if(!empty($row['utime'])) echo GetDateMk($row['utime']);
	  else echo "0";
	  ?>
	  </td>
      <td><?php echo GetSta($row['isexp'])?></td>
      <td><?php echo GetMemberID($dlist->dsql,$row['uid'])?></td>
  </tr>
 <?php  } ?>
</form>
  <tr> 
    <td height="24" colspan="7" bgcolor="#FCFDF7">&nbsp;
<input type="button" name="b7" value="反选" style="width:40" onClick="ReSel();" class='nbt'>
      　　　　 </td>
  </tr>
  <tr> 
    <td height="24" colspan="7" bgcolor="#FCFDF7" align="center">
    <?php echo $dlist->GetPageList(7);?>
    </td>
  </tr>
</table>
</body>
</html>
