<?php
if (!defined('ROOT'))
	exit ;
?>
<!DOCTYPE html>
<html>

	<head>
		<title>积分日志</title>
		<meta name="description" content="">
		<meta name="keywords" content="">
		<?php
		include 'Inc_files.php';
		?>
	</head>

	<body data-type="index" class="theme-white">
		<div class="am-g tpl-g">
			<?php include 'Inc_head.php'?>
			<!-- 侧边导航栏 -->
			<?php
				include 'Inc_left.php';
			?>

			<!-- 内容区域 -->
			<div class="tpl-content-wrapper">
				<div class="row-content am-cf">
					<div class="row">
						<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
							<div class="widget am-cf">
								<div class="widget-head am-cf">
									<div class="widget-title  am-cf">
										<?php
										$uid=session("user_auth.id");
										$score=M('scorelog')->where(array('uid'=>$uid))->getField('sum(score)');
										$score=$score?$score:'0';
										echo '积分日志(合计 '.$score.' 分)';
										?>
										
									</div>
								</div>
								<div class="widget-body  am-fr">

									<div class="am-u-sm-12">
									  <div class="am-form-group">
									      <input type="text" size="50" value="<?php echo C('DOMAIN_INDEX');?>?from=<?php echo session('user_auth.id');?>" class="" id="doc-ipt-email-1"> 
								        复制链接地址，分享给你朋友；成功邀请一位朋友你将获得 <?php echo C('SCORE_REG');?> 积分									    </div>
									</div>
									<div class="am-u-sm-12">
										<table width="100%" class="am-table am-table-compact tpl-table-black am-table-hover" >
											<thead>
												<tr>
													<th width="100">id</th>
													<th class="tc" width="100">积分</th>
													<th class="tc">说明</th>
													<th class="tc" width="180">生成时间</th>
												</tr>
											</thead>
											<tbody>
												<?php foreach($list as $k=>$v){?>
												<tr>
													<td><?php echo $v['id'];?></td>
													<td class="tc"><?php echo $v['score'];?></td>
													<td class="tc"><?php echo $v['about'];?></td>
													<td class="tc"><?php echo wd_date('Y-m-d H:i:s',$v['ctime']);?></td>
												</tr>
												<?php }?>
											</tbody>
										</table>
									</div>
									<div class="am-u-lg-12 am-cf">

										<div class="am-fr">
											<div class="am-pagination tpl-pagination">
												<?php echo $page;?>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<?php
		include 'Inc_files_boot.php';
		?>
		<script type="text/javascript">
		jQuery(document).on('change','[name="ctime"],[name="type"]',function () {
		    var the=jQuery(this);
		    the.closest('form').submit();        
		})
		</script>
	</body>

</html>