<{include file="./admin/header.html"}>
<{include file="./admin/left.html"}>
<{include file="./admin/nav.html"}>
<{include file="get_kindeditor.html"}>

<div id="activity_container">

<div class="activity_center">
<{include file="./admin/activity/common_nav.html"}>


	查看:
	<{if $action == 'all'}>
	<span class="text-muted">全部</span> &nbsp;
	<{else}>
	<a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserParticipateLog&a=PageList&events_id=<{$eventData.id}>&action=all">全部</a> &nbsp;
	<{/if}>
	<{if $action == 'member'}>
	<span class="text-muted">用户</span> &nbsp;
	<{else}>
	<a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserParticipateLog&a=PageList&groupByUid=true&events_id=<{$eventData.id}>&action=member">用户</a> &nbsp;
	<{/if}>
	<{if $eventData.forms}>
	<{if $action == 'form'}>
	<span class="text-muted">表单</span> &nbsp;
	<{else}>
	<a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserParticipateLog&a=PageEventFormData&events_id=<{$eventData.id}>&action=form">表单</a> &nbsp;
	<{/if}>
	<{/if}>
	<{if $action == 'win'}>
	<span class="text-muted">中奖</span> &nbsp;
	<{else}>
	<a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserParticipateLog&a=PageLotteryDataList&events_id=<{$eventData.id}>&action=win">中奖</a> &nbsp;
	<{/if}>

	<{if $eventData.type == 4}>
	<a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserHelp&a=PageList&events_id=<{$eventData.id}>">助力排行</a> &nbsp;
	<{/if}>
	
	<{if $download_url}>
	<a href="<{$download_url}>" target="_blank" class="" style="padding:0 10px;margin-left:10px;"><i class="fa fa-download"></i> 导出数据</a>
	<{/if}>
	<{*
	<a href="" target="_blank" class="button button-primary button-small" style="width:; float:right" ><i class="fa fa-download"></i> 导出数据报表 </a>
	*}>
	
	<div class="block_10"></div>
	
	<div  class="panel panel-default">
		<div class="panel-body">	
			<div class="form-group">
				<div>
					<table class="table table-hover">
						<thead>
							<tr>
								<th>参与人</th>
								<th>UID</th>
								<th>时间</th>
								<th>行为</th>
							</tr>
						</thead>
						<tbody>
							<{if $lotteryData}>
							<{foreach from=$lotteryData item=data}>
							<tr>
								<td>
								
									<{if $userData[$data.uid].headimgurl}>
									<img class="img-rounded" width="48" height="48" src="<{$userData[$data.uid].headimgurl}>" />
									<{else}>
									<img class="img-rounded" width="48" height="48" src="http://news.mydrivers.com/Img/20110518/04481549.png" />
									<{/if}>
									<{if $userData[$data.uid].nickname}><{$userData[$data.uid].nickname}><{else}>游客<{/if}></td>
								<td><{$data.uid}></td>
								<td><{"Y-m-d H:i:s"|date:$data.create_time}></td>

								<{if $data.prize_id}>
								<td>
									获得奖品: <span class="text-muted"><{$prizeData[$data.prize_id].prize_name}></span>&nbsp; 
									<{if $data.express}>
									<br><br>用户收货地址: <span class="text-muted">姓名:<{$data.express.user_name}>  收货地址:<{$data.express.address}> 电话:<{$data.express.phone}></span>&nbsp; 

									<{elseif $newUserExpData[$data.uid].user_name}>
									<br><br>用户收货地址: <span class="text-muted">姓名:<{$newUserExpData[$data.uid].user_name}>  收货地址:<{$newUserExpData[$data.uid].address}> 电话:<{$newUserExpData[$data.uid].phone}></span>&nbsp; 
									<{/if}>
									</td>
								<{else}>
								<td>
									获得奖品: <span class="text-muted"><{$data.run_time_data.prize[0].prize_name}></span>&nbsp; 

									<{if $data.express1111}>
									<br><br>用户收货地址: <span class="text-muted">姓名:<{$data.express.user_name}>  收货地址:<{$data.express.address}> 电话:<{$data.express.phone}></span>&nbsp; 

									<{elseif $newUserExpData[$data.uid].user_name111}>
									<br><br>用户收货地址: <span class="text-muted">姓名:<{$newUserExpData[$data.uid].user_name}>  收货地址:<{$newUserExpData[$data.uid].address}> 电话:<{$newUserExpData[$data.uid].phone}></span>&nbsp; 
									<{/if}>

									<{if $formUserData[$data.uid]}>
									<br><br>
									表单信息:<br />
									<{foreach from=$formType item=name}>
									<{$name}>:<span class="text-muted"><{$formUserData[$data.uid][$name]}></span>&nbsp;  
									<{/foreach}>
									<{/if}>
									</td>
								<{/if}>
							</tr>
							<{/foreach}>
							<{else}>
							<tr>
								<td colspan="3" align="center" class="text-muted">无中奖数据</td>
							</tr>
							<{/if}>
						</tbody>
					</table>
					<div class="page"><{$page_html}></div><p  style="float:right" >参与人数:<{$total_num}></p>
				</div>
			</div>
		</div>
	</div>
</div>

<{include file="./admin/activity/common_right.html"}>
<div style="clear:both;"></div>
</div>


<script>
KISSY.use('node, io, event', function (S, Node, IO, Event) {
	var $ = S.all;
	
});
</script>

<{include file="./admin/bottom.html"}>