<!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>
		<table class="table shadow-sm my-3">
			<tr>
				<td colspan="4">标签源码管理</td>
			</tr>
			<tr>
				<td colspan="4">
					<div class="alert alert-warning mb-0">系统标签源码文件，修改不当会导致标签错误</div>
				</td>
			</tr>
			<tr 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_php.png"> <?php echo $filename;?></td>
				<td align="left"><?php echo $fileinfo;?></td>
				<td><?php echo $filetime;?></td>
				<td align="center"><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 colspan="4" align="center"><a href="tpl.php?action=addnewtag" class="btn btn-success btn-sm">添加标签</a></td>
			</tr>
		</table>
	</body>
</html>