<!DOCTYPE html>
<html>
	<head>
		<meta charset="<?php echo $cfg_soft_lang; ?>">
		<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
		<title>更新标签</title>
		<link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="../static/web/css/select2.min.css">
		<link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
		<link rel="stylesheet" href="../static/web/css/admin.css">
		<script language="javascript" src="../static/web/js/jquery.min.js"></script>
		<script language="javascript" src="../static/web/js/select2.full.min.js"></script>
		<script language="javascript" src="../static/web/js/i18n/zh-CN.js"></script>
		<script>
			function onTagSubmit() {
				document.form1.submit();
			}
		</script>
	</head>
	<body>
		<table width="98%" cellpadding="3" cellspacing="1" align="center" class="table maintable mt-3 mb-3">
			<form name="form1" action="makehtml_tag_action_list.php" method="get" target='stafrm'>
				<tr>
					<td height="26" colspan="2" background="../static/web/img/tbg.gif">
						<table width="98%" cellpadding="0" cellspacing="0" class="table table-borderless">
							<tr>
								<td width="30%" style="padding-left:10px">更新标签</td>
								<td width="70%" align="right">
									<a href="tags_main.php" class="btn btn-success btn-sm">标签管理</a>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<?php
				if($tagid > 0) {
					$row = $dsql->GetOne("Select tag From `#@__tagindex` where id = '$tagid' ");
				?>
				<tr>
					<td width="260" height="26">输入标签：</td>
					<td height="26"><input type="hidden" name="tagid" value="<?php echo $tagid;?>"><?php echo $row['tag'];?> <a class="text-success" href="makehtml_taglist.php">重新选择</a></td>
				</tr>
				<?php
				} else {
				?>
				<tr>
					<td width="260" height="26">起始ID：</td>
					<td height="26"><input name="startid" type="text" id="startid" style="width:60px">（空或0表示从头开始）</td>
				</tr>
				<tr>
					<td height="26">结束ID：</td>
					<td height="26"><input name="endid" type="text" id="endid" style="width:60px">（空或0表示直到结束ID）</td>
				</tr>
				<?php
				}
				?>
				<tr>
					<td height="26">生成位置：</td>
					<td height="26"><input name="tagsdir" type="text" id="tagsdir" value="<?php echo $cfg_tags_dir;?>" style="width:260px" disabled> <a href="sys_info.php">系统设置</a>-其他选项中“TAGS生成目录”项进行调整</td>
				</tr>
				<tr>
					<td height="26">每次最大创建页数：</td>
					<td height="26"><input name="maxpagesize" type="text" id="maxpagesize" value="50" style="width:60px"> 个文件</td>
				</tr>
				<tr>
					<td height="26">标签说明：</td>
					<td height="26">
						生成静态文件后，访问动态文件则直接跳转到静态文件，如果需要动态访问，删除对应文件即可<br>
						Tag首页模板文件：<?php echo $cfg_templets_dir; ?>/<?php echo $cfg_df_style?>/tag.htm<br>
						Tag列表页模板文件：<?php echo $cfg_templets_dir; ?>/<?php echo $cfg_df_style?>/taglist.htm<br>
					</td>
				</tr>
				<tr>
					<td height="26" bgcolor="#F8FCF1" colspan="2" align="center">
						<button name="b112" type="button" class="btn btn-success btn-sm" onClick="document.form1.action='makehtml_taglist_action.php';onTagSubmit();">生成标签</button>
					</td>
				</tr>
			</form>
			<tr>
				<td height="26" colspan="2">
					<table width="100%" class="table table-borderless">
						<tr>
							<td width="70%">结果：</td>
							<td width="30%" align="right">
								<script language='javascript'>
									function ResizeDiv(obj, ty) {
										if (ty == "+") document.all[obj].style.pixelHeight += 50;
										else if (document.all[obj].style.pixelHeight > 80) document.all[obj].style.pixelHeight = document.all[obj].style.pixelHeight - 50;
									}
								</script>
								<a href="javascript:;" onClick="ResizeDiv('mdv','+');" class="btn btn-success btn-sm">增大</a>
								<a href="javascript:;" onClick="ResizeDiv('mdv','-');" class="btn btn-success btn-sm">缩小</a>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td colspan="2" id="mtd">
					<div id="mdv" style="width:100%;height:360px">
						<iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe>
					</div>
				</td>
			</tr>
		</table>
	</body>
</html>