rolesave.asp
来自「网络考试系统最终备份」· ASP 代码 · 共 50 行
ASP
50 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<link rel="stylesheet" type="text/css" href="css.css">
<!--#include file="conn.inc"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<%
v_name=trim(request("rolename"))
v_patch=trim(request("patch"))
if v_path="角色路径" or v_path="" then
v_path="default.asp"
end if
sucess=0
v_right = trim(request("roleright"))
if v_right ="角色权限" or v_right="" then
v_right="一般用户"
end if
sql = "select * from role_info where RoleName='"&v_name&"'"
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,3,2
if rs.eof then
rs.addnew
rs("RoleName")=v_name
rs("Roleright")=v_right
rs("RoleAddress")=v_path
rs.update
sucess =1
conn.close
set conn = nothing
Response.Write("<script>alert(""添加角色成功"");location.href=""managerrole.asp"";</script>")
else
conn.close
set conn = nothing
Response.Write("<script>alert(""添加角色重复"");location.href=""managerrole.asp"";</script>")
end if
%>
<body>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?