<?php defined('APP_NAME') || exit('Access Denied'); 
?><!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="Author" content="QQ:401421567" />
<link rel="stylesheet" href="<?php echo(isset($C['admin_static']) ? $C['admin_static'] : ''); ?>admin/css/bootstrap.min.css" />
<link rel="stylesheet" href="<?php echo(isset($C['admin_static']) ? $C['admin_static'] : ''); ?>admin/css/me.css" />
<script>var admin_static = "<?php echo(isset($C['admin_static']) ? $C['admin_static'] : ''); ?>" , cookie_pre = "<?php echo(isset($C['cookie_pre']) ? $C['cookie_pre'] : ''); ?>",_vip_key = "<?php echo(isset($vip['_key']) ? $vip['_key'] : ''); ?>",api_url = "<?php echo(isset($vip['api_url']) ? $vip['api_url'] : ''); ?>",_control = "<?php echo(isset($_GET['control']) ? $_GET['control'] : ''); ?>",_action = "<?php echo(isset($_GET['action']) ? $_GET['action'] : ''); ?>",version = '<?php echo(isset($vip['version']) ? $vip['version'] : ''); ?>',release = '<?php echo(isset($vip['release']) ? $vip['release'] : ''); ?>',vip_key = _vip_key;</script>
<script src="<?php echo(isset($C['admin_static']) ? $C['admin_static'] : ''); ?>admin/js/jquery.js"></script>
<script src="<?php echo(isset($C['admin_static']) ? $C['admin_static'] : ''); ?>admin/js/bootstrap.min.js"></script>
<script src="<?php echo(isset($C['admin_static']) ? $C['admin_static'] : ''); ?>js/layer/layer.js"></script>
<script src="<?php echo(isset($C['admin_static']) ? $C['admin_static'] : ''); ?>admin/js/global.js"></script>
<!--[if lt IE 9]>
  <script src="<?php echo(isset($C['admin_static']) ? $C['admin_static'] : ''); ?>admin/js/html5.js"></script>
  <script src="<?php echo(isset($C['admin_static']) ? $C['admin_static'] : ''); ?>admin/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
	var webdir = '<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>';
	layer.config({
		extend: 'extend/layer.ext.js',
		shift: -1
	});
	var pKey = "<?php echo(isset($_pkey) ? $_pkey : ''); ?>", urlKey = "<?php echo(isset($_ukey) ? $_ukey : ''); ?>", place = "<?php echo(isset($_place) ? $_place : ''); ?>";
	//全选与全不选
	function selectall(name,obj) {
		if ($(obj).is(':checked')) {
			$("input[name='"+name+"']").each(function() {
				$(this).prop('checked', true);
			});
		} else {
			$("input[name='"+name+"']").each(function() {
				$(this).prop('checked', false);
			});
		}
	}
</script>
<title><?php echo(isset($_title) ? $_title : ''); ?></title>
</head>
<body>
<div class="container-fluid">
	<div class="panel panel-default">
		<?php if (!empty($list)) { ?>
		<table class="table table-bordered table-hover">
			<tr class="tit3">
				<th class="text-center" width="50">id</th>
				<th class="text-center" width="200">订单号</th>
				<th class="text-center">资源名称</th>
				<th class="text-center" width="150">下单人</th>
				<th class="text-center" width="150">价格</th>
				<th class="text-center" width="200">是否已评 <a href="javascript:;" title="一键3天后自动好评" onclick="auto_comment();"><span class="glyphicon glyphicon-check"></span></a></th>
				<th class="text-center" width="200">时间</th>
			</tr>
			<?php if(isset($list) && is_array($list)) { foreach($list as &$v) { ?>
			<tr class="li">
				<td class="text-center"><?php echo(isset($v['id']) ? $v['id'] : ''); ?></td>
				<td class="text-center"><?php echo(isset($v['order_id']) ? $v['order_id'] : ''); ?></td>
				<td><a href="<?php echo(isset($v['data']['url']) ? $v['data']['url'] : ''); ?>" target="_blank"><?php echo(isset($v['data']['title']) ? $v['data']['title'] : ''); ?></a></td>
				<td><?php echo(isset($v['user']['uid']) ? $v['user']['uid'] : ''); ?>：<?php echo(isset($v['user']['username']) ? $v['user']['username'] : ''); ?></td>
				<td class="text-right"><?php echo(isset($v['totalprice']) ? $v['totalprice'] : ''); ?></td>
				<td class="text-center"><?php if ($v['is_comments']) { ?>√<?php }else{ ?>-<?php } ?></td>
				<td class="text-center"><?php  echo date('Y-m-d H:i', $v['dateline']); ?></td>
			</tr>
			<?php }} ?>
		</table>
		<div class="panel-footer text-center"><nav><ul class="pagination"><?php echo(isset($pages) ? $pages : ''); ?></ul></nav></div>
		<?php } ?>
	</div>
</div>
<script type="text/javascript">
$("#cid").change(function(){
	location.href = "index.php?u=book-index-cid-"+ $(this).val();
});
function edit(id,cid){
	parent.oneTab("book-edit-cid-"+cid+"-id-"+id);
}
function auto_comment(){
	ppajax.postd("index.php?u=book-auto_comment-ajax-1", {}, function(data){
		ppajax.alert(data);
		if(window.ppdata.err==0) setTimeout(function(){ window.location.reload(); }, 1000);
	});
}
</script>
</body>
</html>