managerrole.asp
来自「网络考试系统最终备份」· ASP 代码 · 共 86 行
ASP
86 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.inc"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<link rel="stylesheet" type="text/css" href="css.css">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<script language="javascript">
function addrole()
{
form1.action ="roleadd.asp";
form1.submit();
}
function delrole(myform)
{
if (confirm("确定删除?"))
{
myform.action="roledelete.asp";
myform.submit();
}
}
</script>
<body>
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2" height="25">
<tr>
<td width="100%">当前位置:<a href="news.asp">系统管理</a> > 角色管理</td>
</tr>
</table>
<form name="form1" method="post" action="">
<table width="87%" border="0">
<tr>
<th width="77%" scope="row"><div align="right"> </div></th>
<td width="23%">
<div align="right"> </div>
<div align="right">
<input name="Submit3" type="submit" class="s02" value="角色添加" onClick="addrole();">
<input name="Submit22" type="button" class="s02" value="角色删除" onClick="delrole(this.form);">
</div>
<div align="right"> </div></td>
</tr>
</table>
<table border="1" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#C0C0C0" width="87%" id="AutoNumber1">
<tr bgcolor="#E1E1E1">
<th width="3%" scope="row"> </th>
<th width="4%" scope="row">序号</th>
<td width="12%"><strong>角色名称</strong></td>
<td width="21%"><strong>角色权限</strong></td>
<td width="56%"><strong>角色路径role_path</strong></td>
<td width="4%">操作</td>
</tr>
<%
i=1
sql="select * from role_info"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
do while not rs.eof
if not rs.eof then
rid = rs("RoleID")
rname = rs("RoleName")
rright = rs("Roleright")
rpatch=rs("RoleAddress")
%>
<tr bordercolor="#FFFFFF">
<th scope="row" bgcolor="#E1E1E1"><input type="checkbox" name="frid" value="<%=rid%>"></th>
<th height="14" scope="row"><%=i%></th>
<td><%=rname%> </td>
<td><%=rright%> </td>
<td><%=rpatch%> </td>
<td><a href="roleedit.asp?rid=<%=rid%>&rname=<%=rname%>&rpatch=<%=rpatch%>&rright=<%=rright%>">修改</a></td>
</tr>
<%
rs.movenext
i=i+1
end if
loop
%>
</table>
<p> </p>
</form>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?