<!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=b2b_shop_apply">待审核列表</a>
	<a class="item <?php if (get ( 'type' ) == 'pass'): ?>active<?php endif; ?>" href="<?php echo $this->_var['appadmin']; ?>?m=b2b_shop_apply&type=pass">已通过列表</a>
	<a class="item <?php if (get ( 'type' ) == 'forbid'): ?>active<?php endif; ?>" href="<?php echo $this->_var['appadmin']; ?>?m=b2b_shop_apply&type=forbid">已禁止列表</a>
</div>
<div class="main-body">
 <table class="tbs">
<thead>  <tr>
   <td>id</td>
   <td>名称</td>
   <td>联系人</td>
   <td>电话</td>
   <td>地址</td>
   <td>营业执照</td>
  
   <td>业务介绍</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']['title']; ?></td>
   <td><?php echo $this->_var['c']['nickname']; ?></td>
   <td><?php echo $this->_var['c']['telephone']; ?></td>
   <td><?php echo $this->_var['c']['address']; ?></td>
   <td><img src="<?php echo $this->_var['c']['yyzz']; ?>.100x100.jpg" width="50" /> </td>
   
   <td><?php echo $this->_var['c']['description']; ?></td>
<td>
	<div class="btn js-pass" v="<?php echo $this->_var['c']['id']; ?>">通过</div>
	<div class="btn btn-danger js-forbid" v="<?php echo $this->_var['c']['id']; ?>">不通过</div>
</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(){
		var id=$(this).attr("v");
		var obj=$(this);
		$.get("/moduleadmin.php?m=b2b_shop_apply&a=pass&ajax=1&id="+id,function(res){
			obj.parents("tr").remove();
		},"json")
	})
	$(document).on("click",".js-forbid",function(){
		var id=$(this).attr("v");
		var obj=$(this);
		$.get("/moduleadmin.php?m=b2b_shop_apply&a=forbid&ajax=1&id="+id,function(res){
			obj.parents("tr").remove();
		},"json")
	})
</script>
</body>
</html>