<extend name="Public:base" />
<block name="content">
<link rel="stylesheet" href="__CSS__/index.css" />	

<div class="row">
	<div class="col-xs-12">
		<!-- PAGE CONTENT BEGINS -->
			<div class="alert alert-block alert-success">
				<button type="button" class="close" data-dismiss="alert">
					<i class="icon-remove"></i>
				</button>
				<i class="icon-ok green"></i>
				欢迎使用
				<strong class="green">
					{$version}
					<?php if($isnew){ ?>
					<small>(最新版本)</small>
					<?php } else { ?>
					<small>( 可更新至最新版本:{$newsubversion} )</small>
					<?php } ?>
				</strong>.	<br/>
				<div style="margin:20px 0px;">
					<p>
						<font color="red">升级前一定要备份程序和数据库。非默认版安装、已经修改过程序的不支持覆盖升级。
						</font>
					</p>
				</div>
				<div style="margin: 20px 0px;">
					<?php if( !empty($version_meta) ){ ?>
						<?php foreach($version_meta as $key => $meta){ ?>
						<p>版本号：<strong style="font-size:16px;">{$key}</strong>,文件目录：{$meta['name']}  
						<a href="{$admin_domain}/seller.php?s=/Upgrade/down_version_file/version/{$key}/host/{$host}" target="_blank">下载</a></p>
						<p>更新内容：{$meta['desc']}</p>
						<br/>
						<?php } ?>
					<?php }else{ ?>
					<p>当前已是最新版本</p>				
					<?php } ?>		
				</div>
			</div>
		<!-- PAGE CONTENT ENDS -->
	</div>
	<div class="col-xs-12">	
		    <div class="row">
		      <div class="col-lg-4 col-md-4 col-sm-6">
					<div class="tile">
						<div class="tile-heading">
							今日订单
							<span class="pull-right"> 总{$total_order}单</span>
						</div>
						<div class="tile-body">
							<i class="fa icon-shopping-cart"></i>
							<h2 class="pull-right">{$today_order}</h2>
						</div>
						<div class="tile-footer">
							<a href="{:U('Order/index')}">显示详细...</a>
						</div>
					</div>
			  </div>
		      <div class="col-lg-4 col-md-4 col-sm-6">
					<div class="tile">
					<div class="tile-heading">
					今日销售额 
					<span class="pull-right"> 总{$total_money} </span>
					</div>
					<div class="tile-body">
					<i class="fa icon-credit-card"></i>
					<h2 class="pull-right">{$today_money}</h2>
					</div>
					<div class="tile-footer">
					<a href="{:U('Order/index')}">显示详细...</a>
					</div>
					</div> 	
		      </div>
		      <div class="col-lg-4 col-md-4 col-sm-6">
					<div class="tile">
					<div class="tile-heading">
					新增客户 
					<span class="pull-right"> 总{$total_member|default='0'}个</span>
					</div>
					<div class="tile-body">
					<i class="fa icon-user"></i>
					<h2 class="pull-right">{$today_member|default='0'}</h2>
					</div>
					<div class="tile-footer">
					<a href="{:U('Member/index')}">显示详细...</a>
					</div>
					</div>
			  </div>
		    </div>
			
			<div class="row">
				<div class="col-lg-4 col-md-4 col-sm-6">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">
							<i class="fa icon-gift"></i>
							待审核商品数量
							<a style="font-size: 14px" href="{:U('Goods/index', array('status' => 2))}" class="pull-right">更多..</a>
							</h3>
						</div>
						<ul class="list-group">
							<li class="list-group-item">
								<a href="{:U('Goods/index', array('status' => 2))}">待审核商品 <b class="red">{$total_wait_goods}</b> 个</a>
								<br>
							</li>
						</ul>
					</div>
					
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">
							<i class="fa icon-bookmark"></i>
							入驻待审核商家数量
							<a style="font-size: 14px" href="{:U('SellerManage/apply', array('state' => 0))}" class="pull-right">更多..</a>
							</h3>
						</div>
						<ul class="list-group">
							<li class="list-group-item">
								<a href="{:U('SellerManage/apply', array('state' => 0))}">待审核商家 <b class="red">{$total_wait_apply}</b> 个</a>
								<br>
							</li>
						</ul>
					</div>
				</div>
				<div class="col-lg-8 col-md-12 col-sm-12">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">
							<i class="fa icon-bookmark"></i>
							待审核活动数量
							</h3>
						</div>
						<ul class="list-group">
							<li class="list-group-item">
								<a href="{:U('Subject/index')}">主题活动待审核商品 <b class="red">{$subject_wait_count}</b> 个 </a>
							</li>
							<li class="list-group-item">
								<a href="{:U('Lottery/index')}">抽奖活动待审核商品 <b class="red">{$lottery_wait_count}</b> 个 </a>
							</li>
							<li class="list-group-item">
								<a href="{:U('Spike/index')}">限时秒杀待审核商品 <b class="red">{$spike_wait_count}</b> 个 </a>
							</li>
							
						</ul>
					</div>
				</div>
			  
		    </div>
			
		    <div class="row">
		      <div class="col-lg-4 col-md-12 col-sm-12 col-sx-12">
				  	<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">
							<i class="fa icon-calendar"></i>
							用户行为
							<a style="font-size: 14px" href="{:U('UserAction/index')}" class="pull-right">更多..</a>
							</h3>
						</div>
						<ul class="list-group">
							<volist name="uc_list" id="v" empty="$uc_empty">
							<li class="list-group-item">
							<if condition="$v['type'] eq '网站会员' ">	
							<a href='{:U("Member/info",array("id"=>$v["user_id"]))}'>{$v.uname}</a>
							<else /> 
							<a href='{:U("AdminUser/info",array("id"=>$v["user_id"]))}'>{$v.uname}</a>    
							</if>
							{$v.info}
							<br>
							<small class="text-muted">						
							{$v.add_time}
							</small>
							</li>	
							</volist>
						</ul>
					</div>
			  </div>
		      <div class="col-lg-8 col-md-12 col-sm-12 col-sx-12">
		      	<div class="panel panel-default">
		      		<div class="panel-heading">
						<h3 class="panel-title">
						<i class="fa icon-shopping-cart"></i>
						最新订单
						<a style="font-size: 14px" href="{:U('Order/index')}" class="pull-right">更多..</a>
						</h3>
					</div>
					<div class="table-responsive">
						<table class="table">
							<thead>
							<tr>
							<td>订单号</td>
							<td>客户名称</td>
							<td>状态</td>
							<td>生成日期</td>
							<td>金额</td>
							<td>操作</td>
							</tr>
							</thead>
							<tbody>
								
						<volist name="list" id="v" empty="$empty">
						<tr>
							<td>{$v.order_num_alias}</td>
							<td>{$v.uname}</td>
							<td>{$v.name}</td>
							<td>
								<?php echo date('Y-m-d H:i:s',$v['date_added']); ?>
							</td>
							<td>{$v.total}</td>
							<td>
								<a  class="btn btn-info" href='{:U("Order/show_order",array("id"=>$v["order_id"]))}'>
									<i class="icon-eye-open fa"></i>
								</a> 
								
							</td>
						</tr>
						</volist>	
							</tbody>
						</table>
						
					</div>
		      	</div>
			  </div>
		    </div>
	</div>
</div>
</block>
