<?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="35" />
									<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="no" 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>
									<div class="am-u-sm-12">
										<?php 
										$list = D('member_tpl')->where(array('uid'=>session('user_auth.id')))->select();
										foreach($list as $k=>&$v){
											$v['developer'] = M('developer')->find($v['developer_id']);
											$v['etime'] = date('Y-m-d',$v['etime']);
										}
										?>
										<table width="100%" class="am-table am-table-compact tpl-table-black am-table-hover" >
											<thead>
												<tr>
													<th>开发者</th>
													<th>电话</th>
													<th>微信</th>
													<th>QQ</th>
													<th>授权截止时间</th>
													<form method="post" action="/membertpl/qiyong">
														<input type="hidden" name="uid" value="<?php echo session('user_auth.id');?>" />
														<th><button type="submit">恢复默认</button></th>
													</form>
												</tr>
											</thead>
											<tbody>
												<?php foreach($list as $k=>$v){?>
													<form method="post" action="/V/mod">
													<input type="hidden" name="model_id" value="48" />
													<input type="hidden" name="status" value="1" />
													<input type="hidden" name="uid" value="<?php echo session('user_auth.id');?>" />
													<input type="hidden" name="id" value="<?php echo $v['id'] ;?>" />
													<tr>
														<td><?php echo $v['developer']['name'];?></td>
														<td><?php echo $v['developer']['mobile'];?></td>
														<td><?php echo $v['developer']['weixin'];?></td>
														<td><?php echo $v['developer']['qq'];?></td>
														<td><?php echo $v['etime'];?></td>
														<td><button type="submit">启用</button></td>
													</tr>
													</form>
												<?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>