📄 list_role.inc
字号:
<%
'************************************************************************************************
' 函数名 : TableHeader()
' 输 入 :
' 输 出 : 一个用于显示角色列表的表头
' 功能描述:
' 调用模块: list_role.asp
' 作 者 : 蔡晓燕
' 日 期 : 2002-08-01
' 版 本 :
'************************************************************************************************
Function TableHeader()
Response.Write TableTitle("系统现有的角色列表", 600, "", "#0040a0")
TableHeader = _
"<table cellspacing=1 cellpadding=3 width=600 align=center style=""table-layout:fixed"" bgcolor=""silver"">" & _
"<tr bgcolor=""#eeeeee"">" & _
"<td class=tdHead width=100> <img src=""../images/bg/ar-y.gif"" width=8 height=8> " & TableHeaderField(sFileName, "role_desp", "角色名称", sFormParams, sSorting, sSorted) & "</td>" & _
"<td class=tdHead width=100 align=center>客户意见管理</td>" & _
"<td class=tdHead width=80 align=center>库存管理</td>" & _
"<td class=tdHead width=80 align=center>采购管理</td>" & _
"<td class=tdHead width=80 align=center>人事管理</td>" & _
"<td class=tdHead width=80 align=center>工作单管理</td>" & _
"<td class=tdHead width=""*"" align=center>设备管理</td>" & _
"</tr>"
End Function
'************************************************************************************************
' 函数名 : TableRecords(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages,
' sFileName, sFormParams, sSortParams)
' 输 入 : 查询语句,栏目数量,每页记录条数,总记录条数,当前页码,总页数,文件名,查询表单参数,排序参数
' 输 出 : 显示待审批的会议列表
' 功能描述: 根据输入参数,显示相应的结果
' 调用模块: list_role.asp
' 作 者 : 蔡晓燕
' 日 期 : 2002-07-11
' 版 本 :
'************************************************************************************************
Function TableRecords(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams)
dim sTemp : sTemp = "" ' 临时字符串变量
dim j ' 临时循环变量
'------------------------------------
' 分页所需的变量定义
'------------------------------------
Dim iCounter : iCounter = 1
Dim iPrevPage, iNextPage
'------------------------------------
' 获取数据库连接
'------------------------------------
dim rs : set rs = openRS(conn,sSQL)
dim iRole_id, sRole_desp,iRcustomer,iRstock,iRpurchase,iRhr,iRworksheet,iRequipment
' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
if Not rs.EOF then
rs.Move (iCurrentPage - 1) * iRecordsPerPage
end if
while not rs.EOF and iCounter <= iRecordsPerPage
iRole_id = GetValue(rs,"role_id")
sRole_desp = GetValue(rs,"role_desp")
iRcustomer=GetValue(rs,"customer_right")
iRstock=GetValue(rs,"stock_right")
iRpurchase=GetValue(rs,"purchase_right")
iRhr=GetValue(rs,"hr_right")
iRworksheet=GetValue(rs,"worksheet_right")
iRequipment=GetValue(rs,"equipment_right")
sTemp = sTemp & "<tr bgcolor=white>" & _
"<td style=""cursor:hand;color:blue;"" align=left nowrap title=""" & Tohtml(iRole_id) & """ ><a href=""newrole.asp?roleid=" & iRole_id &""" ><img border=0 src=""../images/bg/ar-g.gif"" width=8 height=8> " & ToHTML(sRole_desp) & "</a> </td>" & _
"<td align=left title=""customer_right"" nowrap> " & ToRightDesp(iRcustomer) & " </td>" & _
"<td align=left title=""stock_right"" nowrap> " & ToRightDesp(iRstock) & " </td>" & _
"<td align=left title=""purchase_right"" nowrap> " & ToRightDesp(iRpurchase) & " </td>" & _
"<td align=left title=""hr_right"" nowrap> " & ToRightDesp(iRhr) & " </td>" & _
"<td align=left title=""worksheet_right"" nowrap> " & ToRightDesp(iRworksheet) & " </td>" & _
"<td align=left title=""equipment_right"" nowrap> " & ToRightDesp(iRequipment) & " </td>" & _
"</tr>"
iCounter = iCounter + 1
rs.movenext
wend
CloseRS(rs)
' 填补空白行
sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage)
' 首页、前页、后页、尾页等分页信息
sTemp = sTemp & "<tr bgcolor=white><td class=tdlist colspan=" & iCols & " align=right>" & _
Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _
" </td></tr>"
TableRecords = sTemp&"</table>"
End Function
'************************************************************************************************
' 函数名 : TableLink()
' 输 入 :
' 输 出 :
' 功能描述: 角色管理相关连接
' 调用模块: list_role.asp
' 作 者 : 蔡晓燕
' 日 期 : 2002-08-01
' 版 本 :
'************************************************************************************************
Function TableLink()
TableLink = _
"<table width=600 cellspacing=0 cellpadding=0 border=0 align=center>" & _
"<tr height=30>" & _
" <td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & _
"</tr>" & _
"<tr height=30>" & _
" <td width=600> " & _
" <img src=""../images/goto.gif"" width=11 height=11> <a href=""newrole.asp"">新增角色</a>" & _
" " & _
" <img src=""../images/goto.gif"" width=11 height=11> <a href=""list_user.asp"">用户列表</a></td>" & _
"</tr>" & _
"</table>"
End Function
Function ToRightDesp(right)
select case right
case 0
ToRightDesp="无权"
case 1
ToRightDesp="查询"
case 2
ToRightDesp="更新"
case else
ToRightDesp="未知"
end select
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -