<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员数据管理</title>
<LINK href="<?=base_url()?>csdj/admin/images/admin.css" type="text/css" rel="stylesheet">
<SCRIPT type="text/javascript" src="<?=base_url()?>csdj/admin/js/admin.js?v23"></script>
<script type="text/javascript" src="<?=base_url()?>csdj/admin/js/dialog.js"></script>
<script type="text/javascript" src="<?=base_url()?>csdj/admin/js/ajaxrequest.js"></script>
<script type="text/javascript" src="<?=base_url()?>csdj/admin/js/setcolor.js"></script>
</head>
<body style="margin:2px">
 
	<table align="center" border="1" cellspacing="0" cellpadding="5" bordercolor="#C4DFF4" width="100%" style="border-collapse:collapse;" id="m_Imgs">
	<form name=form method=post action="<?=site_url('admin/user/cion')?>">
	<tr><td align="center" height="20" colspan="7" class="title">会员积分账单    
	 ｜ <select OnChange="location.href='<?=site_url('admin/user/cion')?>?sid='+this.value" style='width:120px'><option value=''>快速查找</option><option value="1">收入</option><option value="2">支出</option></select>
	 &nbsp;&nbsp;会员名：<input style="width:150px" name="user" type="text" value="">&nbsp;&nbsp;<INPUT type="submit" name="Submit" class="italk-bt" value=" 搜 索 ">
	</td></tr></form>
	<form method="post" Name="myForm" action="<?=site_url('admin/user/cion_del')?>">
	<tr align="center">
		<td width="3%">选中</td>
		<td width="6%">ID</td>
		<td width="*">标题</td>
		<td width="10%">会员</td>
        <td width="8%">积分</td>
		<td width="6%">状态</td>
		<td width="8%">时间</td>
	</tr>
<?php
 if(empty($user)) echo '<tr align="center"><td colspan="7" align="center">当前没有记录!</td></tr>';
 foreach ($user as $row) { 
         $rowu=$this->db->query("SELECT CS_ID,CS_Name FROM ".CS_SqlPrefix."user where cs_id='".$row->CS_UID."'")->row();
		 if($rowu){
?>
	<tr>
		<td align="center"><input type=checkbox Name="CS_ID[]" id="CS_ID[]" Value="<?=$row->CS_ID?>"></td>
		<td align="center"><?=$row->CS_ID?></td>
		<td align="center"><?=$row->CS_Name?></td>
		<td align="center"><a href="<?=$this->CsdjSkins->userlink('index',$rowu->CS_ID,$rowu->CS_Name)?>" target="_blank"><?=$rowu->CS_Name?></a></td>
		<td align="center">
<?php
	if($row->CS_Cion>0){
          echo $row->CS_Cion;
    }else{
          echo $row->CS_Cion2;
    }
?>
		</td>
		<td align="center">
<?php
	if($row->CS_Cion>0){
          echo '<font color=#0000ff>+收入</font>';
    }else{
          echo '<font color=red>-支出</font>';
    }
?>
			</td>
<?php
		if(date("Y-m-d",$row->CS_AddTime)==date('Y-m-d')){
				$addtime="<font color=red>".date("Y-m-d",$row->CS_AddTime)."</font>";
		}else{
				$addtime=date("Y-m-d",$row->CS_AddTime);
		}
?>
		<td align="center"><?=$addtime?></td>
	</tr>
<?php } } ?>

	<tr><td colspan='7'><span style="float:right;">数据：<?=$nums?>条&nbsp;&nbsp;&nbsp;&nbsp;<?=$pages?></span>选中<input type="checkbox" name="chkall" onclick="CheckAll(this.form)" value="ON">
	&nbsp;&nbsp;<input type="submit" name="Submit1" class="italk-st3" value="批量删除所选" onClick="return confirm('您确定删除吗?')">
	</span>
	</td></tr></form></table>
</body>
</html>

