<!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">
		<link rel="stylesheet" href="/static/web/css/daterangepicker.css">
		<script src="/static/web/js/jquery.min.js"></script>
		<script src="/static/web/js/moment.min.js"></script>
		<script src="/static/web/js/daterangepicker.js"></script>
	</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">
				<div class="card-header">文档批量维护</div>
				<div class="card-body">
					<form name="form1" action="content_batchup_action.php" method="post" target="stafrm">
						<input type="hidden" name="dopost" value="go">
						<div class="table-responsive">
							<table class="table table-borderless">
								<tbody>
									<tr>
										<td width="260">选定栏目</td>
										<td>
											<?php
											$tl = new TypeLink(0);
											$typeOptions = $tl->GetOptionArray(0,$admin_catalogs,0,1);
											echo "<select name='typeid' class='admin-input-sm'>";
											echo "<option value='0' selected>不限栏目</option>";
											echo $typeOptions;
											echo "</select>";
											?>
										</td>
									</tr>
									<tr>
										<td>会员登录id</td>
										<td><input name="userid" type="text" id="userid" class="admin-input-sm">（网址uid=后面跟的id）</td>
									</tr>
									<tr>
										<td>文档id</td>
										<td>
											<label>开始：<input name="startid" type="text" id="startid" class="admin-input-sm"></label>
											<label>结束：<input name="endid" type="text" id="endid" class="admin-input-sm"></label>
										</td>
									</tr>
									<tr>
										<td>文档发布时间</td>
										<td>
											<label>开始<?php $nowtime = GetDateTimeMk(time()-(24*3600*30));?>：<input type="text" name="starttime" id="starttime" class="datepicker admin-input-sm" value="<?php echo $nowtime;?>"></label>
											<label>结束<?php $nowtime = GetDateTimeMk(time());?>：<input type="text" name="endtime" id="endtime" class="datepicker admin-input-sm" value="<?php echo $nowtime;?>"></label>
											<label><input type="checkbox" name="seltime" id="seltime" value="1"> 启用时间筛选（移动或删除文档可用该选项）</label>
										</td>
									</tr>
									<tr>
										<td>文档操作</td>
										<td>
											<label><input type="radio" name="action" value="check" checked> 审核文档</label>
											<label><input type="radio" name="action" value="makehtml"> 更新网页</label>
											<label><input type="radio" name="action" value="move"> 移动文档</label>
											<label><input type="radio" name="action" value="del"> 删除文档</label>
											<label><input type="radio" name="action" value="delnulltitle"> 删除空标题文档</label>
											<label><input type="radio" name="action" value="delnullbody"> 删除空内容文档</label>
											<label><input type="radio" name="action" value="modddpic"> 更正缩图错误</label>
										</td>
									</tr>
									<tr>
										<td colspan="2" align="center"><button type="submit" class="btn btn-success btn-sm">开始执行</button></td>
									</tr>
									<tr>
										<td colspan="2">
											<div class="admin-win-iframe"><iframe name="stafrm" id="stafrm" frameborder="0" width="100%" height="100%"></iframe></div>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
					</form>
				</div>
			</div>
		</div>
		<script>
			$(document).ready(function() {
				$('.datepicker').daterangepicker({
					"singleDatePicker": true,
					"autoApply": true,
					"showDropdowns": true,
					"linkedCalendars": false,
					"timePicker": true,
					"timePicker24Hour": true,
					"timePickerSeconds": true,
					"showCustomRangeLabel": false,
					ranges: {
						'今日': [moment(), moment()],
						'昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
						'本月': [moment().startOf('month'), moment().startOf('month')],
						'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').startOf('month')]
					},
					"locale": {
						format: 'YYYY-MM-DD HH:mm:ss',
						applyLabel: '确定',
						cancelLabel: '取消',
						daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
						monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
						firstDay: 1
					}
				}, function(start) {
					$(this).val(start.format("YYYY-MM-DD HH:mm:ss"));
				});
			});
		</script>
	</body>
</html>