<!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/gifts')?>">
	<tr><td align="center" height="20" colspan="9" class="title">会员赠送礼物记录    
	 ｜ 会员名：<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/lw/del')?>">
	<tr align="center">
		<td width="3%">选中</td>
		<td width="6%">ID</td>
		<td width="*">礼物标题</td>
		<td width="12%">赠送者</td>
		<td width="12%">接受者</td>
        <td width="8%">金币</td>
		<td width="6%">数量</td>
		<td width="8%">时间</td>
	</tr>

<?php
 if(empty($gifts)) echo '<tr align="center"><td colspan="9" align="center">当前没有记录!</td></tr>';
 foreach ($gifts as $row) { 
      $rowuc=$this->db->query("SELECT CS_Name,CS_RMB FROM ".CS_SqlPrefix."lw where cs_id=".$row->CS_DID."")->row();
      $rowu=$this->db->query("SELECT CS_ID,CS_Name,CS_Nichen FROM ".CS_SqlPrefix."user where cs_id=".$row->CS_Uidb."")->row();
      $rowu2=$this->db->query("SELECT CS_ID,CS_Name,CS_Nichen FROM ".CS_SqlPrefix."user where cs_id=".$row->CS_Uida."")->row();
?>
	<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"><?=$rowc->CS_Name?></td>
		<td align="center"><a href="<?=$this->CsdjSkins->userlink('index',$rowu->CS_ID,$rowu->CS_Name)?>" target="_blank"><?=empty($rowu->CS_Name)?$rowu->CS_Name:$rowu->CS_Nichen?></a></td>
		<td align="center"><a href="<?=$this->CsdjSkins->userlink('index',$rowu2->CS_ID,$rowu2->CS_Name)?>" target="_blank"><?=empty($rowu2->CS_Name)?$rowu2->CS_Name:$rowu2->CS_Nichen?></a></td>
		<td align="center"><?=$rowc->CS_RMB?></td>
		<td align="center"><?=$row->CS_Nums?></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='9'><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>

