⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 list_role.inc

📁 物业管理和办公自动化系统
💻 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>&nbsp;<img src=""../images/bg/ar-y.gif"" width=8 height=8>&nbsp;" &  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> &nbsp;" & ToHTML(sRole_desp) & "</a>&nbsp;</td>" & _
				"<td align=left title=""customer_right""  nowrap>&nbsp;" & ToRightDesp(iRcustomer) & "&nbsp;</td>" & _
				"<td align=left title=""stock_right""  nowrap>&nbsp;" & ToRightDesp(iRstock) & "&nbsp;</td>" & _
				"<td  align=left title=""purchase_right""  nowrap>&nbsp;" & ToRightDesp(iRpurchase) & "&nbsp;</td>" & _
				"<td  align=left title=""hr_right""  nowrap>&nbsp;" & ToRightDesp(iRhr) & "&nbsp;</td>" & _
				"<td  align=left title=""worksheet_right""  nowrap>&nbsp;" & ToRightDesp(iRworksheet) & "&nbsp;</td>" & _
				"<td  align=left title=""equipment_right""  nowrap>&nbsp;" & ToRightDesp(iRequipment) & "&nbsp;</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) & _
				"&nbsp;</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>&nbsp;" & _
		"		<img src=""../images/goto.gif"" width=11 height=11>&nbsp;<a href=""newrole.asp"">新增角色</a>" & _
		"		&nbsp;&nbsp;&nbsp;" & _
		"		<img src=""../images/goto.gif"" width=11 height=11>&nbsp;<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 + -