<!DOCTYPE html>
<html>
	<?php echo $this->fetch('head.html'); ?>
	<body>
<div class="tabs-border">
	<a class="item <?php if (get ( 'type' ) == ''): ?>active<?php endif; ?>" href="<?php echo $this->_var['appadmin']; ?>?m=paotui_sender_apply">全部</a>
	<a class="item <?php if (get ( 'type' ) == 'pass'): ?>active<?php endif; ?>" href="<?php echo $this->_var['appadmin']; ?>?m=paotui_sender_apply&type=pass">通过</a>
	<a class="item <?php if (get ( 'type' ) == 'forbid'): ?>active<?php endif; ?>" href="<?php echo $this->_var['appadmin']; ?>?m=paotui_sender_apply&type=forbid">不通过</a>
</div>
<div class="main-body">
 <table class="tbs">
<thead>  <tr>
   <td>id</td>
 
   <td>truename</td>
   <td>userno</td>
   <td>telephone</td>
 
 
<td>操作</td></tr>
  </tr>
</thead> <?php $_from = $this->_var['list']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
<tr>
   <td><?php echo $this->_var['c']['id']; ?></td>
    
   <td><?php echo $this->_var['c']['truename']; ?></td>
   <td><?php echo $this->_var['c']['userno']; ?></td>
   <td><?php echo $this->_var['c']['telephone']; ?></td>
  
   
<td>
<?php if ($this->_var['c']['status'] == 0): ?>	
<a class="btn-small js-pass" v="<?php echo $this->_var['c']['id']; ?>">通过</a> 
 <a  class="btn-small js-forbid" v="<?php echo $this->_var['c']['id']; ?>">不通过</a>
 <?php endif; ?>
  <?php if ($this->_var['c']['status'] != 1): ?>
	<a href="javascript:;" class="js-delete btn-small" url="/module.php?m=paotui_sender_apply&a=delete&id=<?php echo $this->_var['c']['id']; ?>">删除</a>
	<?php endif; ?>
	</td>
 
  </tr>
   <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
 </table>
<div><?php echo $this->_var['pagelist']; ?></div>
</div> 
<?php echo $this->fetch('footer.html'); ?>
<script>
	$(document).on("click",".js-pass",function(){
		if(confirm("确认通过审核吗?")){
			var that=$(this);
			$.ajax({
				url:"/moduleadmin.php?m=paotui_sender_apply&a=pass&ajax=1&id="+$(this).attr("v"),
				dataType:"json",
				success:function(res){
					skyToast(res.message);
					if(!res.error){
						that.parents("tr").remove();
					}
					
				}
			})
		}
	})
	$(document).on("click",".js-forbid",function(){
		if(confirm("确认不通过审核吗?")){
			var that=$(this);
			$.ajax({
				url:"/moduleadmin.php?m=paotui_sender_apply&a=forbid&ajax=1&id="+$(this).attr("v"),
				dataType:"json",
				success:function(res){
					skyToast(res.message);
					if(!res.error){
						that.parents("tr").remove();
					}
					
				}
			})
		}
	})
</script>
</body>
</html>