<!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">
		<script src="/static/web/js/jquery.min.js"></script>
		<script src="/static/web/js/bootstrap.min.js"></script>
		<script src="/static/web/js/admin.main.js"></script>
	</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="sys_admin_user.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 name="form1" action="sys_admin_user_add.php" method="post">
						<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
						<input type="hidden" name="dopost" value="add">
						<div class="table-responsive">
							<table class="table table-borderless">
								<tbody>
									<tr>
										<td width="260">账号</td>
										<td><input type="text" name="userid" id="userid" class="admin-input-sm" onkeyup="this.value=this.value.replace(/[^0-9a-zA-Z_@!\.-]/g,'');" required>（请使用数字0-9小写a-z大写A-Z符号_@!.-）</td>
									</tr>
									<tr>
										<td>昵称</td>
										<td><input type="text" name="uname" id="uname" class="admin-input-sm" required>（前后台显示文档作者的名称）</td>
									</tr>
									<tr>
										<td>密码</td>
										<td><input type="text" name="pwd" id="pwd" class="admin-input-sm" onkeyup="this.value=this.value.replace(/[^0-9a-zA-Z_@!\.-]/g,'');" required>（请使用数字0-9小写a-z大写A-Z符号_@!.-）</td>
									</tr>
									<tr>
										<td>会员组</td>
										<td>
											<select name="usertype" class="admin-input-sm">
												<?php
												$dsql->SetQuery("SELECT * FROM `#@__admintype` ORDER BY `rank` ASC");
												$dsql->Execute("ut");
												while($myrow = $dsql->GetObject("ut"))
												{
													echo "<option value='".$myrow->rank."'>".$myrow->typename."</option>";
												}
												?>
											</select>
											<a href="sys_group.php" class="btn btn-success btn-sm">会员组管理</a>
										</td>
									</tr>
									<tr>
										<td>授权栏目</td>
										<td>
											<select name="typeids[]" id="typeid" multiple="yes" class="admin-input-lg">
												<option value="0" selected>所有栏目</option>
												<?php echo $typeOptions?>
											</select>
											<span>（支持多选）</span>
										</td>
									</tr>
									<tr>
										<td>姓名</td>
										<td><input type="text" name="tname" id="tname" class="admin-input-sm"></td>
									</tr>
									<tr>
										<td>邮箱</td>
										<td><input type="text" name="email" id="email" autocomplete="off" class="admin-input-sm"></td>
									</tr>
									<tr>
										<td>验证安全码</td>
										<td>
											<input type="text" name="safecode" id="safecode" class="admin-input-sm">
											<input type="hidden" name="randcode" value="<?php echo $randcode;?>">
											<span>（安全码：<?php echo $safecode;?>）</span>
										</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>