<!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">
	<tr><td align="center" height="20" colspan="8" class="title">积分礼品管理    
	 ｜ <select OnChange="location.href='<?=site_url('admin/gifts/lists')?>?sid='+this.value" style='width:120px'><option value=''>快速查找</option><option value="1">A类礼品</option><option value="2">B类礼品</option></select>
	 ｜ <a title="添加增加" href="<?=site_url('admin/gifts/add/')?>">增加礼品</a>
	</td></tr>
	<tr align="center">
		<td width="6%">ID</td>
		<td width="8%">图片</td>
		<td width="*">标题</td>
		<td width="10%">数量</td>
        <td width="8%">积分</td>
		<td width="12%">分类</td>
		<td width="6%">类型</td>
		<td width="10%">操作</td>
	</tr>
<?php
 if(empty($gifts)) echo '<tr align="center"><td colspan="8" align="center">当前没有记录!</td></tr>';
 foreach ($gifts as $row) { 
?>
	<tr>
		<td align="center"><?=$row->CS_ID?></td>
		<td align="center">
<?php
if(empty($row->CS_Pic)){
       echo '--';
}else{
       echo '<img src="'.$this->CsdjSkins->piclink('gifts',$row->CS_Pic).'" style="cursor:url('.base_url().'csdj/images/zoomin.cur),auto" onload="ResizeImages(this,50,30);" onclick="PreviewImage(this);">';
}
?>
                </td>
		<td align="center"><?=$row->CS_Name?></td>
		<td align="center"><?=$row->CS_Nums?></td>
		<td align="center"><?=$row->CS_Cion?></td>
		<td align="center">
<?php
if($row->CS_TID==1){
	echo 'QQ币卡';
}elseif($row->CS_TID==2){
	echo '手机充值卡';
}elseif($row->CS_TID==3){
	echo '站内金币';
}else{
	echo '实物礼品';
}
?>
		</td>
		<td align="center">
<?php
if($row->CS_TID==3){
	if($row->CS_SID==1){
	    echo '可以提现';
	}else{
	    echo '不可提现';
	}
}else{
	echo '---';
}
?>
		</td>
		<td align="center">
			<a href="<?=site_url('admin/gifts/edit/'.$row->CS_ID)?>">编辑</a> ｜
			<a href="<?=site_url('admin/gifts/del/'.$row->CS_ID)?>" onClick="return confirm('确定删除此会员吗?');">删除</a>
        </td>
	</tr>
<?php } ?>

	<tr><td colspan='8'><span style="float:right;">数据：<?=$nums?>条&nbsp;&nbsp;&nbsp;&nbsp;<?=$pages?></span>
	</td></tr></table>
</body>
</html>

