<?php if (!defined('THINK_PATH')) exit();?><!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=/share_bonus/';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; ?>
<script type="text/javascript" src="/Public/script/MyDate/WdatePicker.js"></script><link rel="stylesheet" type="text/css" href="/Application/Runtime/statics/8999a4c51e95f631f78fa62c32848b0f.css" /><script type="text/javascript" src="/Application/Runtime/statics/c8c832ebc136ce326e6a08cc70b55d8f.js"></script><script type="text/javascript">$(function(){$("#myform").Validform({tiptype:3});})</script>
<div class="pad-lr-10 col-sm-12">
	<div>
		<form name="searchform" action="/admin.php?s=/share_bonus/share_log" method="POST" >
            <div class="toolbars-hanchao mt15 clearfix">
				<div>时间：
                <input class="Wdate form-control w110" name="start_time" type="text" id="start_time" size="20" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{ $dp.$D(\'end_time\')}'})" value="<?php echo (isset($start_time)?$start_time:''); ?>"> - <input class="Wdate form-control w110" name="end_time" type="text" id="end_time" size="20" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{ $dp.$D(\'start_time\')}'})" value="<?php echo (isset($end_time)?$end_time:''); ?>">
                </div>
                <div>状态：<select id="status" class="form-control" name="status" ><?php if(!empty($status_type)){ $selectdvalue=0;foreach($status_type as $key=>$val) { if(empty($status) && !is_numeric($status))$status=array();$statusarr=remove_empty_array($status);if(in_array($key,$statusarr)) { ?><option selected="selected" value="<?php echo $key ?>"><?php echo $val;$selectdvalue=1; ?></option><?php }else { ?><option value="<?php echo $key ?>"><?php echo $val ?></option><?php } } } ?></select></div>
                <div><button type="submit" class="btn btn-primary">搜索</button></div>
            </div>
        </form>
	   <form id="myform" name="myform" action="<?php echo U('delete');?>" method="post">
            <table class="table table-hover table-striped table-hanchao mt15 table-bordered">
                <thead>
                    <tr>
                        <th width="60"><?php echo orderurl('LAN_ID','id');;?></th>
                        <th width="150"><?php echo orderurl('    起始时间','start_time');;?></th>
                        <th width="160"><?php echo orderurl('截止时间','end_time');;?></th>
                        <th width="110"><?php echo orderurl('分红总额','money');;?></th>
                        <th width="110"><?php echo orderurl('分红总人数','user_num');;?></th>
                        <th width="110"><?php echo orderurl('分红总权重','sum_weight');;?></th>
                        <th width="180"><?php echo orderurl('LAN_STATUS','status');;?></th>
                        <th width="150"><?php echo L('MANAGE');?></th>
                    </tr>
                </thead>
            <tbody>
        		<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
                        <td><?php echo (isset($vo["id"])?$vo["id"]:''); ?></td>
                        <td><?php echo (time_format($vo["start_time"],"Y-m-d")); ?></td>
                        <td><?php echo (time_format($vo["end_time"],"Y-m-d")); ?></td>
						<td><?php echo (format_decimal($vo["money"])); ?></td>
						<td><?php echo (isset($vo["user_num"])?$vo["user_num"]:''); ?></td>
                        <td><?php echo (isset($vo["sum_weight"])?$vo["sum_weight"]:''); ?></td>
                        <td><?php if(($vo["status"]) == "0"): ?>未开始<?php endif; if(($vo["status"]) == "1"): ?>进行中<?php endif; if(($vo["status"]) == "2"): ?>已完成<?php endif; ?></td>
                        <td>
                            <a href="<?php echo geturl('MarketingForm/index',array('fhid'=>$vo['id'],'type'=>8,'status'=>20),true,true,true);?>">查看分红记录</a>
                            <?php if(($vo["status"]) == "0"): ?><a href="<?php echo U('Admin/ShareBonus/share_bonus',array('id'=>$vo['id'],'type'=>1));?>">开始</a><?php endif; ?>
                            <?php if(($vo["status"]) == "1"): ?><a href="<?php echo U('Admin/ShareBonus/share_bonus',array('id'=>$vo['id'],'type'=>2));?>">继续</a><?php endif; ?>
                        </td>
                    </tr><?php endforeach; endif; else: echo "" ;endif; ?>
            </tbody>
            </table>
		
        <nav class="pages_hanchao" id="pages"><?php echo (isset($_page)?$_page:''); ?></nav>
		</form>
    </div>
</div>
</body>
</html>