📄 modify_s.asp
字号:
<% option explicit %>
<!-- #include virtual="/admin/level/_lib.asp" -->
<%
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
' 功能:权限管理
' @Language=VBscript
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Dim sql,rs,i
Dim uid '---管理员ID
Dim id , username , pwd , realname , adm_level , tel , email , op_id
Dim flag1 , flag2
call DB_Connect(strconn)
'---验证身份----
uid = session("admID")
call IsValidUser(uid,sAdmin_Level,1,"../error.htm",oConn)
id = getForm("id")
if not isnumeric(id) then id = 0
'---取管理员信息----
sql="select * from userinfo where usr_id=" & id
set rs = oConn.execute(sql)
if not rs.eof then
username = rs("usr_name")
pwd = rs("usr_pwd")
realname = rs("usr_realname")
adm_level = rs("usr_level")
tel = rs("usr_tel")
email = rs("usr_email")
end if
rs.close
set rs=nothing
'-----订单管理员,取相关数据----
if cint(adm_level) and sOrder_level then
flag1=1
sql="select op_id from abor where usr_id=" & id
set rs = oConn.execute(sql)
if not rs.eof then
op_id=rs(0)
end if
rs.close
set rs=nothing
end if
'----库存管理员,取相关数据----
if cint(adm_level) and sStore_level then
flag2=2
end if
'----取物品的基本管理权限的子程序----
sub getBasic(typeid,byref oConn)
dim sqltemp,rstemp
sqltemp="select * from basicpower order by bp_id"
set rstemp=oConn.execute(sqltemp)
if not rstemp.eof then
do while not rstemp.eof
response.write "<INPUT TYPE='checkbox' NAME='basicpower' VALUE='" & typeid & "/" & rstemp("bp_id") & "' "
call DisplayCheck(typeid,id,rstemp("bp_id"))
response.write ">" & rstemp("bp_name") & " "
rstemp.movenext
loop
end if
rstemp.close
set rstemp=nothing
end sub
'---list type of product
sub ListTypeLevel(typeid,num,byref oConn)
dim sqlt,rst,temp,j,bgcolor
if typeid="all" then
sqlt="select st_id,st_name from storetype where st_fid is null order by st_sort"
else
sqlt="select st_id,st_name from storetype where st_fid='" & typeid & "' order by st_sort"
end if
set rst=oConn.execute(sqlt)
if not rst.eof then
do while not rst.eof
if typeid="all" then
bgcolor="#CCCCCC"
else
bgcolor="#ffffff"
end if
response.write "<TR><TD bgcolor=" & bgcolor & ">"
temp=""
if typeid<>"all" then
for j=1 to num
temp=temp & "-"
next
end if
response.write temp & rst("st_name") & "</TD><TD bgcolor=" & bgcolor & ">"
call getBasic(rst("st_id"),oConn)
response.write "</TD></TR>"
call ListTypeLevel(rst("st_id"),num+1,oConn)
rst.movenext
loop
rst.close
set rst=nothing
else
exit sub
end if
end sub
'--显示checkbox的状态
sub DisplayCheck(typeid,usr_id,bp_id)
dim sqlt,rst
sqlt="select count(*) from absr where usr_id=" & usr_id & " and st_id='" & typeid & "' and bp_id=" & bp_id & " and st_diy='Y'"
set rst=oConn.execute(sqlt)
if rst(0)<>0 then
response.write "checked"
end if
end sub
%>
<HTML>
<HEAD>
<title>诺基亚网络在线订购</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<LINK REL="stylesheet" HREF="../../inc/css/pub.css" TYPE="TEXT/CSS">
</HEAD>
<BODY BGCOLOR=#ffffff TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<!--#include file="../../inc/all_top.asp" -->
<!--#include file="../../inc/all_first_top.asp"-->
<!--#include file="../../inc/all_second_top.asp"-->
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=710>
<TR>
<TD COLSPAN=3><IMG SRC="../../images/dot.gif" WIDTH="1" HEIGHT="10" BORDER=0 ALT=""></TD>
</TR>
<TR>
<TD WIDTH=170 ALIGN=right VALIGN=top>
<!--#include file="../../inc/default_left.asp"-->
</TD>
<TD WIDTH=15><IMG SRC="../../images/dot.gif" WIDTH="15" HEIGHT="1" BORDER=0 ALT=""></TD>
<TD VALIGN=top>
<TABLE WIDTH=525 BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR>
<TD VALIGN="TOP"> <BR>
<% if flag1=1 then %>
<FORM NAME="form1" METHOD="post" ACTION="savem_o.asp">
<TABLE WIDTH="100%" BORDER="1" CELLSPACING="0" CELLPADDING="3" ALIGN="CENTER" BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#666666">
<TR ALIGN="CENTER" BGCOLOR="#e1e1e1">
<TD COLSPAN="2">订单管理员详细权限设定</TD>
</TR>
<TR>
<TD WIDTH="20%" ALIGN="RIGHT">用户名:</TD>
<TD WIDTH="80%"> <%=username%></TD>
</TR>
<TR>
<TD WIDTH="20%" ALIGN="RIGHT">权限:</TD>
<TD WIDTH="80%">
<SELECT NAME="oplevel">
<OPTION VALUE="1" <% if cint(op_id)=1 then %>SELECTED<% end if %>>订单确认管理员</OPTION>
<OPTION VALUE="2" <% if cint(op_id)=2 then %>SELECTED<% end if %>>订单发货管理员</OPTION>
</SELECT>
</TD>
</TR>
<TR ALIGN="CENTER">
<TD COLSPAN="2">
<INPUT TYPE="hidden" NAME="id" VALUE="<%=id%>">
<INPUT TYPE="submit" NAME="Submit" VALUE="提 交">
<INPUT TYPE="RESET" NAME="Submit2" VALUE="取 消">
<INPUT TYPE="BUTTON" NAME="Submit4" VALUE="返 回" onClick="javascript:history.go(-1);">
</TD>
</TR>
</TABLE>
</FORM>
<BR>
<BR>
<BR>
<% end if
if flag2=2 then
%>
<FORM NAME="form2" METHOD="post" ACTION="savem_s.asp">
<TABLE WIDTH="100%" BORDER="1" CELLSPACING="0" CELLPADDING="3" ALIGN="CENTER" BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#666666">
<TR ALIGN="CENTER" BGCOLOR="#e1e1e1">
<TD COLSPAN="2">库存管理员详细权限设定<br>
<font color="#FF0000">(子类的权限继承自父类的权限)<br> (例如:期刊只有浏览的权限,其子类设定的非浏览的权限也不起作用)</font></TD>
</TR>
<TR>
<TD WIDTH="20%" ALIGN="RIGHT">用户名:</TD>
<TD WIDTH="80%"><%=username%> </TD>
</TR>
<TR>
<TD WIDTH="20%" ALIGN="RIGHT" valign="top">权限:</TD>
<TD WIDTH="80%">
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="3">
<TR>
<TD>物品分类</TD>
<TD>基本权限</TD>
</TR>
<% call ListTypeLevel("all",1,oConn) %>
</TABLE>
</TD>
</TR>
<TR ALIGN="CENTER">
<TD COLSPAN="2">
<INPUT TYPE="hidden" NAME="id" VALUE="<%=id%>">
<INPUT TYPE="submit" NAME="Submit3" VALUE="提 交">
<INPUT TYPE="RESET" NAME="Submit22" VALUE="取 消">
<INPUT TYPE="BUTTON" NAME="Submit42" VALUE="返 回" onClick="javascript:history.go(-1);">
</TD>
</TR>
</TABLE>
</FORM>
<% end if %>
<BR>
<BR>
<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR>
<TD BACKGROUND="../../images/gotop_bg.gif"><A HREF="#top"><IMG SRC="../../images/gotop.gif" BORDER="0"></A></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<!--#include file="../../inc/default_end.asp"-->
</BODY>
</HTML>
<%
call DB_DisConnect
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -