<!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">
</head>
<body>
<table width="98%" cellpadding="3" cellspacing="1" align="center" class="table maintable mt-3 mb-3">
  <form name="form1" action="adtype_main.php" method="post">
    <tr>
      <td bgcolor="#f8f8f8" colspan="7"><input type="hidden" name="dopost" value="save"/>广告分类管理<a href="ad_main.php" class="btn btn-success btn-sm ml-3">广告管理</a></td>
    </tr>
    <tr bgcolor="#F8FCF1">
      <td width="9%" align="center">类型ID</td>
      <td width="55%" align="center">广告分类</td>
      <td width="36%" align="center">状态</td>
    </tr>
    <?php
  	$dsql->SetQuery("Select * From #@__myadtype");
  	$dsql->Execute();
  	$k=0;
  	while($row = $dsql->GetObject())
  	{
      $k++;
  	?>
    <tr align="center">
      <td><input type="hidden" name="ID_<?php echo $k?>" value="<?php echo $row->id?>"/><?php echo $row->id; ?></td>
      <td><input type="text" name="pname_<?php echo $k?>" value="<?php echo $row->typename?>" id="pname_<?php echo $k?>" class="pubinputs" style="width:90%"></td>
      <td><label><input type="checkbox" name="check_<?php echo $k?>" id="check_<?php echo $k?>" value="1" checked="1"> 保留</label></td>
    </tr>
    <?php
  	}
  	?>
    <input type="hidden" name="idend" value="<?php echo $k?>">
    <tr bgcolor="#F8FCF1">
      <td colspan="5" bgcolor="#f8f8f8">新增一个广告类型：</td>
    </tr>
    <tr align="center">
      <td colspan="2"><input type="text" name="pname_new" id="pname_new" class="pubinputs" style="width:90%"></td>
      <td align="center"><label><input type="checkbox" name="check_new"  id="check_new" value="1" checked="1"> 新增</label></td>
    </tr>
    <tr>
      <td colspan="5" align="center" bgcolor="#f8f8f8"><input name="submit" type="submit" class="btn btn-success btn-sm" value="确定"></td>
    </tr>
  </form>
</table>
</body>
</html>