{dede:config.pagesize value='30'/}
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
		<title>文档单页管理</title>
		<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
		<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="/static/web/css/admin.css">
	</head>
	<body>
		<div class="container-fluid">
			<ol class="breadcrumb">
				<li class="breadcrumb-item"><a href="index_body.php">后台面板</a></li>
				<li class="breadcrumb-item active">文档单页管理</li>
			</ol>
			<div class="card shadow-sm mb-3">
				<div class="card-body">
					<form action="templets_one.php" name="sss">
						<input type="text" name="keyword" value="<?php if (!empty($keyword)) $keyword = '';?>" placeholder="请输入关键词" class="admin-input-lg mr-2">
						<?php
						$likeid = (!isset($likeid) ? '' : $likeid);
						echo "<select name='likeid' id='likeid' class='admin-input-sm'>";
						$dsql->Execute("s","Select likeid From `#@__sgpage` group by likeid ");
						echo "<option>不限</option>";
						while($arr = $dsql->GetArray('s'))
						{
							if ($likeid==$arr['likeid']) echo "<option value='{$arr['likeid']}' selected>{$arr['likeid']}</option>";
							else echo "<option value='{$arr['likeid']}'>{$arr['likeid']}</option>";
						}
						echo "</select>";
						?>
						<button type="submit" class="btn btn-success btn-sm">搜索</button>
						<a href="templets_one_add.php" class="btn btn-success btn-sm">添加一个单页</a>
						<a href="javascript:document.form1.submit();" class="btn btn-success btn-sm">更新选中单页</a>
						<a href="templets_one_edit.php?dopost=mkall" class="btn btn-success btn-sm">更新所有单页</a>
					</form>
				</div>
			</div>
			<div class="card shadow-sm">
				<div class="card-header">文档单页管理</div>
				<div class="card-body">
					<form name="form1" action="templets_one_edit.php">
						<input type="hidden" name="dopost" value="mksel">
						<div class="table-responsive">
							<table class="table table-borderless table-hover">
								<thead>
									<tr>
										<td scope="col">选择</td>
										<td scope="col">id</td>
										<td scope="col">页面名称</td>
										<td scope="col">需编译</td>
										<td scope="col">标识</td>
										<td scope="col">修改时间</td>
										<td scope="col">操作</td>
									</tr>
								</thead>
								<tbody>
									{dede:datalist}
									<tr>
										<td><input type="checkbox" name="ids[]" value="{dede:field.aid/}"></td>
										<td>{dede:field.aid/}</td>
										<td><a href="templets_one_edit.php?aid={dede:field.aid/}&dopost=edit">{dede:field.title/}</a></td>
										<td>{dede:field.ismake function='GetIsMake(@me)'/}</td>
										<td>{dede:field.likeid/}</td>
										<td>{dede:field.uptime function='GetDateMk(@me)'/}</td>
										<td>
											<a href="templets_one_edit.php?aid={dede:field.aid/}&dopost=edit" class="btn btn-light btn-sm"><i class="fa fa-pencil-square" title="修改"></i></a>
											<a href="templets_one_edit.php?aid={dede:field.aid/}&dopost=view" target="_blank" class="btn btn-light btn-sm"><i class="fa fa-eye" title="预览"></i></a>
											<a href="templets_one_edit.php?aid={dede:field.aid/}&dopost=delete" class="btn btn-danger btn-sm"><i class="fa fa-trash" title="删除"></i></a>
										</td>
									</tr>
									{/dede:datalist}
								</tbody>
							</table>
						</div>
					</form>
					{dede:pagelist listsize='6'/}
				</div>
			</div>
		</div>
	</body>
</html>