<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
		<title>标签源码管理</title>
		<link rel="stylesheet" href="../static/web/font/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>
		<table align="center" class="table maintable my-3">
			<tr>
				<td colspan="4" bgcolor="#f5f5f5">标签源码管理</td>
			</tr>
			<tr>
				<td colspan="4">
					<div class="alert alert-danger mb-0">修改系统标签有风险，请小心操作，文件存放在 ../system/taglib文件夹</div>
				</td>
			</tr>
			<tr bgColor="#e9ecef" align="center">
				<td width="26%">标签文件名</td>
				<td width="26%">标签说明</td>
				<td width="26%">修改时间</td>
				<td>操作</td>
			</tr>
			<?php
			$dh = dir($libdir);
			while($filename=$dh->read())
			{
				if (!preg_match("#\.php$#", $filename)) continue;
				$filetime = filemtime($libdir.'/'.$filename);
				$filetime = MyDate("Y-m-d H:i:s",$filetime);
				$fileinfo = GetHelpInfo(str_replace('.lib.php','',$filename));
			?>
			<tr align="center">
				<td align="left"><img src="../static/web/img/icon_htm.png"><?php echo $filename;?></td>
				<td><?php echo $fileinfo;?></td>
				<td><?php echo $filetime;?></td>
				<td align="left"><a href="tpl.php?action=edittag&filename=<?php echo $filename;?>" class="btn btn-light btn-sm"><i class="fa fa-pencil-square"></i> 修改</a></td>
			</tr>
			<?php }?>
			<tr>
				<td bgcolor="#f5f5f5" colspan="4" align="center"><a href="tpl.php?action=addnewtag" class="btn btn-success btn-sm">添加标签</a></td>
			</tr>
		</table>
	</body>
</html>