<?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">
		<script src="<?php echo C('TMPL_PARSE_STRING.__TPL__'); ?>/assets/js/theme.js"></script>
		<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">
										帮助中心
									</div>
								</div>
								<div class="widget-body  am-fr">
									<div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
										<div class="am-form-group">
											<div class="am-btn-toolbar">
												<div class="am-btn-group am-btn-group-xs">
													<a href="/recharge/add" type="button" class="am-btn am-btn-default am-btn-success">
													<span class="am-icon-plus"></span> 添加
													</a>
												</div>
											</div>
										</div>
									</div>
									<form class="form-horizontal" method="post" role="form" action="<?php echo ('V/lists') ;?>">
									<input type="hidden" name="model_id" value="31" />
									<input type="hidden" name="category" value="1" />
									<input type="hidden" name="uid" value="<?php echo session('user_auth.id');?>" />
									<div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
										<div class="am-form-group tpl-table-list-select">
										</div>
									</div>
									<div class="am-u-sm-12 am-u-md-12 am-u-lg-3">
										<div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
											<input type="text" name="title" class="am-form-field" placeholder="标题">
											<span class="am-input-group-btn">
											<button class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search" type="submit"></button> </span>
										</div>
									</div>
									</form>
									<?php 
										$list = M('news')->where(array('uid'=>session('user_auth.id'),'category'=>2))->select();
									?>
									<div class="am-u-sm-12">
										<table width="100%" class="am-table am-table-compact tpl-table-black am-table-hover" >
											<thead>
												<tr>
													<th>ID</th>
													<th>新闻标题</th>
													<th>发布时间</th>
													<th>操作</th>
												</tr>
											</thead>
											<tbody>
												<?php foreach($list as $k=>$v){?>
												<tr>
													<td><?php echo $k+1;?></td>
													<td><?php echo $v['title'];?></td>
													<td><?php echo wd_date('Y-m-d H:i:s',$v['ctime']);?></td>
													<td>
														<a href="news/mod/<?php echo $v['id'];?>"><button type="button" style="float: left;color: #838FA1;margin-right: 10px;">编辑</button></a>
														
														<form action="V/del" method="post">
															<input type="hidden" name="model_id" value="31" />
															<input type="hidden" name="id" value="<?php echo $v['id'];?>" />
															<button type="submit" style="float: left;">删除</button>
														</form>
													</td>
												</tr>
												<?php }?>
											</tbody>
										</table>
									</div>
									<div class="am-u-lg-12 am-cf">
										<div class="am-fr">
											<ul class="am-pagination tpl-pagination">
											</ul>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<?php
		include 'Inc_files_boot.php';
		?>

	</body>

</html>