<?php include_once(mvc::$cfg['PATH_TPL'].'public/topUser.php');?>
<div class="maintb">
	<?php include_once(mvc::$cfg['PATH_TPL'].'user/leftMenu.php');?>
	<div class="main_middle">
		<div class="mod-main">
			<form name="Sform" action="/user/integral" method="get">
				<input type="hidden" name="type" value="<?php echo $Params['type'];?>"/>
				<div class="act_row">
					&nbsp;&nbsp;<a href="/user/integral"<?php if(empty($Params['type'])){ ?>class="active"<?php } ?>><b>积分明细</b></a>&nbsp;&nbsp;|&nbsp;&nbsp;
					<a href="/user/integral?type=1"<?php if($Params['type']==1){ ?>class="active"<?php } ?>><b>积分收入</b></a>&nbsp;&nbsp;|&nbsp;&nbsp;
					<a href="/user/integral?type=-1" <?php if($Params['type']== -1){ ?>class="active"<?php } ?>><b>积分支出</b></a>&nbsp;&nbsp;&nbsp;&nbsp;
					<select name="time" onchange="Sform.submit()" class="form-control">
						
						<?php foreach ($TimeArr as $K => $V) { ?>
							<option value="<?php echo $K;?>"<?php if($Params['time'] == $K){echo "selected";}?>><?php echo $V;?></option>
						<?php } ?>

					</select>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>当前积分余额：<span class="red"><?php echo $UserBase['ub_integral'];?></span></b>
				</div>
			</form>
			<div class="clear"></div>
			<table class="table table-bordered">
				<thead>
					<tr>
						<th width="250px">日期</th>
						<th width="150px">积分变化</th>
						<th width="150px">变化后积分</th>
						<th>详细说明</th>
					</tr>
				</thead>
				<tbody>



	
				<?php if(!empty($ListArr)){ ?>
					<?php foreach ($ListArr as  $V){ ?>
						<tr>
							<td><?php echo date('Y-m-d H:i:s', $V['inl_add_time']);?></td>
							<td><b
				<?php if($V['inl_change']>0){echo 'class="red"';}elseif($V['inl_change']<0){echo 'class="green"';}?>>
								<?php echo $V['inl_change'];?></b></td>
							<td><b><?php echo $V['inl_has'];?></b></td>
							<td><?php echo $V['inl_des'];?></td>
						</tr>
					<?php } ?>
				<?php }else{ ?>
					<tr>
						<td colspan="4" class="center warn">非常抱歉，未找到符合条件的积分记录</td>
					</tr>
				<?php } ?>

				</tbody>
			</table>
			<div class="padtb5"></div>
			<?php echo $Page;?>
		</div>
	</div>
	<div class="clear"></div>
</div>
<?php include_once(mvc::$cfg['PATH_TPL'].'public/footAll.php');?>
<script type="text/javascript" src="/static/js/user.js?ver=<?php echo mvc::$cfg['VER']['js'];?>"></script>