<!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>
		<form name="form1" action="adtype_main.php" method="post">
			<table class="table shadow-sm my-3">
				<tr>
					<td colspan="3"><input type="hidden" name="dopost" value="save">广告分类管理</td>
				</tr>
				<tr align="center">
					<td width="6%">id</td>
					<td width="80%">广告分类</td>
					<td>状态</td>
				</tr>
				<?php
				$dsql->SetQuery("SELECT * FROM `#@__myadtype`");
				$dsql->Execute();
				$k=0;
				while($row = $dsql->GetObject())
				{
					$k++;
				?>
				<tr>
					<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="w-100"></td>
					<td><label><input type="checkbox" name="check_<?php echo $k?>" id="check_<?php echo $k?>" value="1" checked> 保留</label></td>
				</tr>
				<?php }?>
				<input type="hidden" name="idend" value="<?php echo $k?>">
				<tr>
					<td></td>
					<td><input type="text" name="pname_new" id="pname_new"class="w-100"></td>
					<td><label><input type="checkbox" name="check_new" id="check_new" value="1" checked> 新增</label></td>
				</tr>
				<tr>
					<td colspan="3" align="center"><input name="submit" type="submit" class="btn btn-success btn-sm" value="确定"></td>
				</tr>
			</table>
		</form>
	</body>
</html>