<!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>
		<div class="container-fluid">
			<ol class="breadcrumb">
				<li class="breadcrumb-item"><a href="index_body.php">后台面板</a></li>
				<li class="breadcrumb-item"><a href="mytag_main.php">自定义宏标记</a></li>
				<li class="breadcrumb-item active">修改自定义宏标记</li>
			</ol>
			<div class="card shadow-sm">
				<div class="card-header">修改自定义宏标记</div>
				<div class="card-body">
					<form action="mytag_edit.php" method="post" enctype="multipart/form-data" name="form1">
						<input type="hidden" name="aid" value="<?php echo $aid?>">
						<input type="hidden" name="dopost" value="saveedit">
						<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
						<div class="table-responsive">
							<table class="table table-borderless">
								<tbody>
									<tr>
										<td>标记名称</td>
										<td><?php echo $row['tagname']?></td>
									</tr>
									<tr>
										<td width="260">所属栏目</td>
										<td>
											<?php
											$tl = new TypeLink(0);
											$typeOptions = $tl->GetOptionArray($row['typeid'],0,0);
											echo "<select name='typeid' class='admin-input-lg'>";
											echo "<option value='0' selected>没有继承本标记所有栏目</option>";
											echo $typeOptions;
											echo "</select>";
											?>
										</td>
									</tr>
									<tr>
										<td>时间限制</td>
										<td>
											<label><input name="timeset" type="radio" value="0" <?php if ($row['timeset']==0) echo 'checked';?>> 不限时间</label>
											<label><input type="radio" name="timeset" value="1" <?php if ($row['timeset']==1) echo 'checked';?>> 限制时间</label>
										</td>
									</tr>
									<tr>
										<td>开始时间</td>
										<td><input type="text" name="starttime" id="starttime" value="<?php echo GetDateTimeMk($row['starttime'])?>" class="admin-input-md"></td>
									</tr>
									<tr>
										<td>结束时间</td>
										<td><input type="text" name="endtime" id="endtime" value="<?php echo GetDateTimeMk($row['endtime'])?>" class="admin-input-md"></td>
									</tr>
									<tr>
										<td>标记内容</td>
										<td><textarea name="normbody" id="normbody" class="admin-textarea-xl"><?php echo $row['normbody']?></textarea></td>
									</tr>
									<tr>
										<td>过期内容</td>
										<td><textarea name="expbody" id="expbody" class="admin-textarea-xl"><?php echo $row['expbody']?></textarea> </td>
									</tr>
									<tr>
										<td colspan="2" align="center">
											<button type="submit" class="btn btn-success btn-sm">保存</button>
											<button type="reset" class="btn btn-outline-success btn-sm">重置</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
					</form>
				</div>
			</div>
		</div>
	</body>
</html>