<?php if (!defined('THINK_PATH')) exit(); $CSSARR[]=THEME_PATH."/common/css/index_main1.css" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="author" content="HANCHAO"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<?php $csscommon="/Public/bootstrap/css/bootstrap.min.css" ?>
<?php $csscommon.="|/Public/HanChaoUI/css/hanchaoui.css" ?>
<?php $CSSARR[]=THEME_PATH."/common/css/main.css" ?>
<?php $CSSARR[]="/Public/HanChaoUI/css/weebox.css" ?>
<link rel="stylesheet" href="<?php echo min_css($CSSARR,$csscommon);?>" media="all"/>
<?php $jscommon="/Public/script/jquery.min.js" ?>
<?php $jscommon.="|/Public/bootstrap/js/bootstrap.min.js" ?>
<?php $JSARR['min2']=THEME_PATH."/common/js/common.js" ?>
<?php $JSARR['min3']="/Public/HanChaoUI/js/weebox.js" ?>
<script language="javascript">var URL = '/admin.php?s=/public/';var THEME_COLOR = '';var ROOT_PATH = '/';var APP   =   '/admin.php?s=/';var CONTROLLER_NAME   =   '<?php echo (CONTROLLER_NAME); ?>';var THEME_PATH   =   '<?php echo (TPL_PATH); ?>/';</script>
<script type="text/javascript" src="<?php echo min_js($JSARR,$jscommon);?>"></script><!--[if IE]>
<link href="/Public/bootstrap/css/bootstrap.ie.css" rel="stylesheet" type="text/css"/>
 <script src="/Public/bootstrap/js/html5shiv.js"></script>
<![endif]-->
<script language="javascript">
$(function($){
    $(window.parent.document).find('#loading').hide();
    var topid='<?php echo ($_GET['topid']); ?>';
    var leftid='<?php echo ($_GET['leftid']); ?>';
    changemenu(topid,leftid);
});
function changemenu(topid,leftid){
    if(!topid && !leftid)return false;
    if(topid)parent._OPENleft(topid);
    if(leftid){
        $(window.parent.document).find('#_OPENright'+leftid).parent().prev().click();
        $(window.parent.document).find('#_OPENright'+leftid+' a').click();
    }
}
</script>
<title><?php echo (L("website_manage")); ?>Powered by hanchao</title>
</head>
<body><?php if(!empty($big_menu)): ?><div class="pad-lr-10 col-sm-12">
    <div class="btn-handle mt15">
   <?php if(is_array($big_menu)): foreach($big_menu as $k=>$vo): ?><a class="btn <?php if(!empty($menu_hover)): if(in_array(($k), is_array($menu_hover)?$menu_hover:explode(',',$menu_hover))): ?>btn-primary<?php else: ?>btn-default<?php endif; ?>                
   <?php else: ?>btn-primary<?php endif; ?>" href="<?php echo (isset($vo)?$vo:''); ?>"><?php echo (isset($k)?$k:''); ?></a>&nbsp;&nbsp;<?php endforeach; endif; ?>
    </div>
</div><?php endif; ?>
<style>
	.hot .tuijian1{width:16%;}
	.tuijian1 .img{margin-left:0;}
	.tuijian1 .font{width:auto;}
    .row_left{height: 400px !important;}
</style>
<div class="pad-lr-10 col-sm-12">
    <div class="content">
		<div class="hot clearfix">
            <ul class="tuijian1 clearfix">
				<li class="img"><img src="<?php echo (THEME_PATH); ?>/common/images/icon6.png" /></li>
				<li class="font">
					<span>今日新增销售额</span>
					<p><?php if(!empty($order_money)): echo (isset($order_money)?$order_money:''); else: ?>0<?php endif; ?></p>
				</li>
			</ul>
            <ul class="tuijian1 clearfix">
                <li class="img"><img src="<?php echo (THEME_PATH); ?>/common/images/icon8.png" /></li>
                <li class="font">
                    <span>昨日新增销售额</span>
                    <p><?php if(!empty($yesterday_order_money)): echo (isset($yesterday_order_money)?$yesterday_order_money:''); else: ?>0<?php endif; ?></p>
                </li>
            </ul>
			<a href="<?php echo U('OrderInfo/wm_index',array('is_content'=>7,'topid'=>113,'leftid'=>661));?>">
				<ul class="tuijian1 clearfix">
					<li class="img"><img src="<?php echo (THEME_PATH); ?>/common/images/icon1.png" /></li>
					<li class="font">
						<span>今日新增订单</span>
						<p><?php echo ((isset($today_order_count) && ($today_order_count !== ""))?($today_order_count):0); ?></p>
					</li>
				</ul>
			</a>
            <a href="<?php echo U('OrderInfo/wm_index',array('is_content'=>7,'topid'=>113,'leftid'=>661));?>">
                <ul class="tuijian1 clearfix">
                    <li class="img"><img src="<?php echo (THEME_PATH); ?>/common/images/icon2.png" /></li>
                    <li class="font">
                        <span>昨日新增订单</span>
                        <p><?php echo ((isset($yesterday_order_count) && ($yesterday_order_count !== ""))?($yesterday_order_count):0); ?></p>
                    </li>
                </ul>
            </a>
			<ul class="tuijian1 clearfix">
				<li class="img"><img src="<?php echo (THEME_PATH); ?>/common/images/icon4.png" /></li>
				<li class="font">
					<span>今日新增会员</span>
					<p><?php echo ((isset($member_count) && ($member_count !== ""))?($member_count):0); ?></p>
				</li>
			</ul>
			<ul class="tuijian1 clearfix">
				<li class="img"><img src="<?php echo (THEME_PATH); ?>/common/images/icon4.png" /></li>
				<li class="font">
					<span>昨日新增会员</span>
					<p><?php echo ((isset($yesterday_member_count) && ($yesterday_member_count !== ""))?($yesterday_member_count):0); ?></p>
				</li>
			</ul>
		</div>
		<div class="stat_plate stat_plate1 border_b">
			<h2>今日概况</h2>
			<div class="sp_main">
				<ul>
					<li>
						<h3>商品销售</h3>
						<div class="sp_cont">
                            <span>订单总额：<em><?php if(!empty($xs_money)): echo (isset($xs_money)?$xs_money:''); else: ?>0<?php endif; ?></em></span>
                            <span>订单单数：<em><?php echo (isset($xs_num)?$xs_num:''); ?></em></span>
							<span>退款总额：<em><?php if(!empty($tui_money)): echo (isset($tui_money)?$tui_money:''); else: ?>0<?php endif; ?></em></span>
							<span>退款单数：<em><?php echo (isset($tui_num)?$tui_num:''); ?></em></span>
						</div>
					</li>
					<li>
						<h3>会员充值</h3>
						<div class="sp_cont">
							<span>充值总额：<em><?php if(!empty($c_money)): echo (isset($c_money)?$c_money:''); else: ?>0<?php endif; ?></em></span>
							<span>充值总数：<em><?php echo (isset($c_num)?$c_num:''); ?></em></span>
						</div>
					</li>
				</ul>
				<ul>
					<li>
						<h3>资金</h3>
						<div class="sp_cont">
							<span>总收入（元）：<em><?php echo (isset($income)?$income:''); ?></em></span>
							<span>总支出（元）：<em><?php echo (isset($outcome)?$outcome:''); ?></em></span>
						</div>
					</li>
                    <li>
                        <h3>待处理事项</h3>
                        <div class="sp_cont">
                            <span>库存预警：<em><?php if(!empty($stock_count)): echo (isset($stock_count)?$stock_count:''); else: ?>0<?php endif; ?></em></span>
                            <span>待付款：<em><?php if(!empty($unpay_count)): echo (isset($unpay_count)?$unpay_count:''); else: ?>0<?php endif; ?></em></span>
                            <span>待备货：<em><?php if(!empty($pre_count)): echo (isset($pre_count)?$pre_count:''); else: ?>0<?php endif; ?></em></span>
                            <span>待发货：<em><?php if(!empty($unsend_count)): echo (isset($unsend_count)?$unsend_count:''); else: ?>0<?php endif; ?></em></span>
                            <span>待退货退款：<?php if(!empty($return_count)): echo (isset($return_count)?$return_count:''); else: ?>0<?php endif; ?></span>
                            <span>待提现：<em><?php if(!empty($withdrawals_count)): echo (isset($withdrawals_count)?$withdrawals_count:''); else: ?>0<?php endif; ?></em></span>
                        </div>
                    </li>
				</ul>
			</div>
		</div>
		<div class="rows border_b mb_20 clearfix mt_20">
			<h2>营业概况</h2>
			<div class="row_left">
				 <div class="row_left_pic">
					<div id="Area_countm" style="width:100%; height:400px;"></div>
					<script src="/Public/script/echarts/echarts.js"></script>
					<?php echo (isset($Area_count)?$Area_count:''); ?>
                 </div>
			</div>
            <div class="row_right">
                <div id="Area_count_member" style="width:100%;height: 400px; float: right;">
                    <?php echo (isset($Area_count_member)?$Area_count_member:''); ?>
                </div>
            </div>
		</div>
      	<div class="gongbox border_b mb_20">
			<h2>常用功能</h2>
			<div class="gongn clearfix">
				<ul>

                    <li class="g1"><a href="<?php echo U('Member/index',array('is_content'=>7,'topid'=>48,'leftid'=>53));?>">会员管理</a></li>
                    <li class="g2"><a href="<?php echo U('Goods/add_purchase',array('is_content'=>7,'topid'=>49));?>">发布商品</a></li>
                    <li class="g3"><a href="<?php echo U('Goods/index',array('is_content'=>7,'topid'=>49,'leftid'=>326));?>">商品管理</a></li>
                    <li class="g4"><a href="<?php echo U('Member/index',array('is_content'=>7,'topid'=>756,'leftid'=>371));?>">订单管理</a></li>
                    <li class="g5"><a href="<?php echo U('ExtensionSetting/index',array('is_content'=>7,'topid'=>728,'leftid'=>733));?>">分销设置</a></li>
					<li class="g6"><a href="<?php echo U('WxCoupon/index',array('is_content'=>7,'topid'=>227,'leftid'=>331));?>">优惠券</a></li>
				</ul>
			</div>
		</div>
		<div class="mb_20 clearfix">
			<div class="index_text f_r index_box">
				<h3>官网公告</h3>
				<ul id="hanchao_notice" class="ggbox">
				</ul>
			</div>
			<div class="index_text f_l index_box">
				<h3>正在进行的活动</h3>
				<ul>
				<?php if($hytq >= 1): ?><li class="clearfix">
						<a href="<?php echo geturl('MemberMarketing/many_points',array('is_content'=>7,'topid'=>227,'leftid'=>357));?>">
						<span class="f_l"><i class="acti"></i>会员等级特权</span>
						<!-- <span class="hous f_r">2017.09.30&nbsp;12:00</span> -->
						</a>
				   </li><?php endif; ?>
				<?php if($xpcj >= 1): ?><li class="clearfix">
						<a href="<?php echo geturl('ReceiptDraw/index',array('is_content'=>7,'topid'=>227,'leftid'=>338));?>">
						<span class="f_l"><i class="acti"></i>小票抽奖</span>
						</a>
						<!-- <span class="hous f_r">2017.09.30&nbsp;12:00</span> -->
				   </li><?php endif; ?>
				<?php if($xscx >= 1): ?><li class="clearfix">
						<a href="<?php echo geturl('PromotAct/limit_time',array('is_content'=>7,'topid'=>227,'leftid'=>290));?>">
						<span class="f_l"><i class="acti"></i>仓库限时促销</span>
						</a>
				   </li><?php endif; ?>
				<?php if($mddjq >= 1): ?><li class="clearfix">
						<a href="<?php echo geturl('Bonu/shop_bonu',array('is_content'=>7,'topid'=>227,'leftid'=>348));?>">
						<span class="f_l"><i class="acti"></i>仓库代金券</span>
						</a>
				   </li><?php endif; ?>
				<?php if($mdmj >= 1): ?><li class="clearfix">
						<a href="<?php echo geturl('TakeoutPromote/mj_edit',array('is_content'=>7,'topid'=>227,'leftid'=>386));?>">
						<span class="f_l"><i class="acti"></i>满减活动</span>
						</a>
				   </li><?php endif; ?>
				<?php if($sdlj >= 1): ?><li class="clearfix">
						<a href="<?php echo geturl('TakeoutPromote/index',array('is_content'=>7,'topid'=>227,'leftid'=>350));?>">
						<span class="f_l"><i class="acti"></i>首单立减</span>
						</a>
				   </li><?php endif; ?>
				<?php if($qmfq >= 1): ?><li class="clearfix">
						<a href="<?php echo geturl('Toker/coupon_send',array('is_content'=>7,'topid'=>227,'leftid'=>338));?>">
						<span class="f_l"><i class="acti"></i>全民发券</span>
						</a>
				   </li><?php endif; ?>
				</ul>
			</div>
		</div>
    </div>
</div>
<style type="text/css">
    .index_texts ul li{line-height: 18px !important;}
	.mt_20{margin-top: 25px;}
</style>
<script>
var HANCHAO_type='<?php echo (HANCHAO_PRODUCT); ?>';
var endtime=<?php echo (HANCHAO_RELEASE); ?>;
$(function($){
    var data=<?php echo F('vesionupdate'.$_SERVER['HTTP_HOST']);?>;
    $('#hanchao_notice').html(data.html);
    $('#hanchao_authname').html(data.auth);
    var version=data.version;
    if(version>endtime){        
        $('#hanchao_authname').append('<a href="http://auth.hanchao9999.com/index.php/Index/update/domain/<?php echo I("server.SERVER_NAME");;?>/type/'+HANCHAO_type+'" target="_blank" style="color:#f00">存在更新VERSION:'+version+'</a>');
    }
});
</script>
</body>
</html>