<!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/font/css/font-awesome.min.css">
  <link rel="stylesheet" href="../static/web/css/admin.css">
  <style>
    .linerow {
      border-bottom: 1px solid #CBD8AC;
    }
    td {
      padding-left: 6px;
    }
  </style>
</head>
<body>
  <table width="98%" cellspacing="1" cellpadding="0" align="center" class="table maintable mt-3 mb-3">
    <tr height="26" align="center">
      <td width="25%" background="../static/web/img/wbg.gif">标签文件名</td>
      <td width="33%" background="../static/web/img/wbg.gif" align="left">标签说明</td>
      <td width="22%" background="../static/web/img/wbg.gif">修改时间</td>
      <td width="20%" background="../static/web/img/wbg.gif">操作</td>
    </tr>
    <tr>
      <td colspan="4" height="26">
        <div style="float:left;line-height:26px">当前位置：标签源码碎片管理（文件存放在 ../system/taglib 文件夹）</div>
        <div style="float:right;padding-right:10px">
          <a href="tpl.php?action=addnewtag" class="btn btn-success btn-sm">增加一个新的标签</a>
        </div>
      </td>
    </tr>
    <tr>
      <td colspan="4" height="26">
        <div class="alert alert-danger mb-0">修改系统标签有风险，请小心操作</div>
      </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",$filetime);
      $fileinfo = GetHelpInfo(str_replace('.lib.php','',$filename));
    ?>
    <tr height="26" onmousemove="javascript:this.bgColor='#F8FCF1';" onmouseout="javascript:this.bgColor='#ffffff';">
      <td><img src="../static/web/img/htm.gif"><?php echo $filename; ?></td>
      <td><?php echo $fileinfo; ?></td>
      <td align="center"><?php echo $filetime; ?></td>
      <td align="center"><a href="tpl.php?action=edittag&filename=<?php echo $filename; ?>" class="btn btn-success btn-sm"><i class="fa fa-pencil-square-o"></i> 编辑</a></td>
    </tr>
    <?php } ?>
  </table>
</body>
</html>