📄 list_user.inc
字号:
<%
'************************************************************************************************
' 函数名 : TableSearch()
' 输 入 :
' 输 出 : 一个用于查询会议的表单
' 功能描述:
' 调用模块: list_user.asp
' 作 者 : 蔡晓燕
' 日 期 : 2002-07-23
' 版 本 :
'************************************************************************************************
Function TableSearch()
TableSearch = _
TableTitle("设置查询条件", 600, "", "") & _
"<table cellspacing=0 cellpadding=0 width=600 align=center border=0 >" & _
"<form name=""frmSearchUser"" method=post action=""list_user.asp"">" & _
"<tr height=30>"&_
" <td colspan=3 width=600> 用户名:<input type=text name=accountid size=13 maxlength=20 value="""&sAccountid&""">"&_
" </td>" & _
"</tr>"&_
"<tr height=30>"&_
" <td width=200>用户角色:<select name=""roleid"" style=""width:86px"">" &_
" <option value=0> 所有角色</option>"&_
RoleSelectOptions(iRoleid)&_
" </select>" & _
" </td>" & _
" <td width=200>用户状态:<select name=""status"" style=""width:86px"">" &_
" <option value=0> 正常</option>"&_
" <option value=1> 锁定</option>"&_
" </select>"&_
" <script language=""javascript"">document.all.status.selectedIndex=" & (iStatus)& "</script>" & _
"</td>" & _
" <td width=200><span id=btnSearch style=""cursor:hand"" title=""设置查询条件,然后点击查询按钮进行查询""><img border=0 src=""../images/search.gif"" style=""vertical-align:middle"">查询</span></td></tr>" & _
"<tr height=10><td colspan=3 width=600> </td></tr>" & _
"</form>" & _
"</table>"
End Function
'************************************************************************************************
' 函数名 : TableHeader()
' 输 入 :
' 输 出 : 一个用于显示用户列表的表头(包括4列:用户名、姓名、用户角色、账号状态)
' 功能描述:
' 调用模块: list_user.asp
' 作 者 : 蔡晓燕
' 日 期 : 2002-08-02
' 版 本 :
'************************************************************************************************
Function TableHeader()
Response.Write TableTitle("用户列表", 600, "", "#0040a0")
TableHeader = _
"<table cellspacing=0 cellpadding=0 width=600 align=center class=tablelist style=""table-layout:fixed"">" & _
"<tr>" & _
"<td class=tdHead width=150 align=center> <img src=""../images/bg/ar-y.gif"" width=8 height=8> " & TableHeaderField(sFileName, "account_id", "用户名", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead width=150 align=center> 姓名 </td>" & _
"<td class=tdHead width=150 align=center> " & TableHeaderField(sFileName, "role_id", "用户角色", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead width=150 align=center> " & TableHeaderField(sFileName, "status", "账号状态", sFormParams, iSort, iSorted) & "</td>" & _
"</tr>"
End Function
'************************************************************************************************
' 函数名 : TableRecords(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages,
' sFileName, sFormParams, sSortParams)
' 输 入 : 查询语句,栏目数量,每页记录条数,总记录条数,当前页码,总页数,文件名,查询表单参数,排序参数
' 输 出 : 显示满足查询条件的会议列表
' 功能描述: 根据输入参数,显示相应的结果
' 调用模块: list_user.asp
' 作 者 : 蔡晓燕
' 日 期 : 2002-07-18
' 版 本 :
'************************************************************************************************
Function TableRecords(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams)
dim sTemp : sTemp = "" ' 临时字符串变量
dim j ' 临时循环变量
'------------------------------------
' 分页所需的变量定义
'------------------------------------
Dim iCounter : iCounter = 1
Dim iPrevPage, iNextPage
'------------------------------------
' 获取数据库连接
'------------------------------------
dim crs : set crs = New CRecordset
dim rs : set rs = crs.open(dbLocal,sSQL)
dim sAccountid, iStatus, iRoleid
' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
if Not rs.EOF then
rs.Move (iCurrentPage - 1) * iRecordsPerPage
end if
while not rs.EOF and iCounter <= iRecordsPerPage
iRoleid = crs.GetValue("role_id")
sAccountid = crs.GetValue("account_id")
iStatus = crs.GetValue("status")
sTemp = sTemp & "<tr>" & _
"<td class=tdlist ><a href=""user.asp?accountid=" & sAccountid & "&roleid1=" & iRoleid & "&status=" & iStatus &"&page="&iCurrentPage& """ ><img border=0 src=""../images/bg/ar-g.gif"" width=8 height=8> " & Tohtml(sAccountid) & "</a> </td>" & _
"<td class=tdlist nowrap > " & TransEmpId(dbLocal,sAccountid)& " </td>" &_
"<td class=tdlist nowrap > " & TransRole(dbLocal, iRoleid) & " </td>" & _
"<td class=tdlist nowrap > " & TransRoleStatus(iStatus) & " </td>"
iCounter = iCounter + 1
rs.movenext
wend
crs.Close()
' 填补空白行
sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage)
' 首页、前页、后页、尾页等分页信息
sTemp = sTemp & "<tr><td class=tdlist colspan=" & iCols & " align=right>" & _
Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _
" </td></tr>"
TableRecords = sTemp&"</table>"
End Function
'************************************************************************************************
' 函数名 : TableLink()
' 输 入 :
' 输 出 :
' 功能描述: 会议申请表页面上到其他页面的连接
' 调用模块: applymeeting.asp
' 作 者 : 蔡晓燕
' 日 期 : 2002-07-11
' 版 本 :
'************************************************************************************************
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=""list_role.asp"">角色管理</a>" & _
" " & _
" <img src=""../images/goto.gif"" width=11 height=11> <a href=""../hr/emp_oa.asp"">增加用户</a>" & _
" " & _
" <img src=""../images/goto.gif"" width=11 height=11> <a href=""list_user.asp"">用户管理</a></td>" & _
"</tr>" & _
"</table>"
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -