<?php $this->display(tpl('head',true)); ?>
	<style>
		.my-tabel tr td:first-child {
		    width: 3%;
		}
		.my-tabel thead tr th{
			text-align: center;
		}
		.my-tabel tr td p{
			font-size: 12px;
			color: #7A7A7A;
			
		}
	</style>
<div class="body">
	<form class="layui-form" method="post" action="">
		<table class="layui-table my-tabel">
			<thead>
				<tr>
					<th	width="1%">ID</th>
					<th width="30%">标题</th>
					<th width="9%">所在栏目</th>
					<th width="15%">发布时间</th>
					<th width="14%">状态</th>
					<th width="11%">操作</th>
				</tr>
			</thead>
			<tbody>
				<?php foreach((array)$data AS $row){
					extract(\\temmoku\\db::from(jab.'content')->select('count(*) AS NUM')->where("aid= '$row[aid]' ")->row());
					$row['posttime']=date('Y-m-d H:i:s',$row['posttime']);
					$state="<span class='red'>【待审】</span>";
					if($row[state]){
						$state="<span class='green'>【已审】</span>";
					}
					$is_recommend="<span class='red' style='padding-left: 5px;'>【未推】</span>";
					if($row['is_recommend']){
						$is_recommend="<span class='green' style='padding-left: 5px;'>【已推】</span>";
					}
					$row[all_title]=$row[title];
					$row[title]=Get_word_strpos($row[title],'20');
					$url=U(['aid'=>$row[aid],'cid'=>$row[cid]],MODULE);
					$curl=U(['cid'=>$row[cid]],MODULE);
				?>
		
				<tr>
					<td class="center">
						<?php echo $row[aid] ?>
					</td>
					<td title="<?php echo $row[all_title] ?>">
						<a href="<?php echo $url ?>" target="_blank"><?php echo $row[title] ?></a>
						<p>
							浏览量：(<?php echo  $row[clicks]?>)
							评论：(<?php echo $row[comment_num] ?>)
							页数：(<?php echo $NUM ?>)
						</p>
					</td>
					<td class="center">
						<a target="_blank" href="<?php echo $curl ?>"><?php echo $row[name] ?></a>
					</td>

					<td class="center" style="font-size: 12px;">
						<?php echo $row[posttime] ?>
					</td>
					<td class="center" style="font-size: 13px;">
						<?php echo $state; echo $is_recommend ?>
							
					</td>
					<td class="center">
						<a class="layui-btn layui-btn-xs layui-btn-warm" href="/user/articles/edit/aid/<?php echo $row[aid] ?>">编辑</a>
						<a class="layui-btn layui-btn-xs layui-btn-danger" href="/user/articles/del/aid/<?php echo $row[aid] ?>">删除</a>
					</td>
				</tr>
				<?php } ?>
			</tbody>
		</table>
	</form>
	<?php if($Get_Page){ ?>
	<table class="layui-table  my-tabel">
		<tr>
			<td class="my-button page">
				<?php echo $Get_Page ?>
			</td>
		</tr>
	</table>
	<?php } ?>
</div>
<script>
	
	layui.use(['form','table'], function() {
		var form = layui.form;
		var table = layui.table;
		
	});
</script>

<?php $this->display(tpl('foot',true)); ?>
