📄 emp_ol.inc
字号:
<%
Function TableSearch()
'' 任务分类,0为所有任务,1为普通任务,2为会议相关的任务,3为审批相关的任务
'' 任务完成状况,0全部,1所有已完成任务,2所有未完成任务,3所有正常的未完成任务,4所有过时的未完成任务
'' 开始日期的日历,DrawCal函数定义在../common/commonpage.inc
'' 结束日期的日历
TableSearch = _
TableTitle("设 置 员 工 信 息 查 询 条 件", 600, "", "") & vbLF & _
"<table cellspacing=0 cellpadding=3 width=600 align=center border=0>" & vbLF & _
"<form name=""frmSearch"" method=post action=""emp_ol.asp"">" & vbLF & _
"<tr height=30 bgcolor=white>" & vbLF & _
" <td> 部门:" & vbLF & _
" <select name=""depart_id"">" & vbLF & _
" <option value=-1>全部</option>" & vbLF & _
SelectOptions(dbLocal, "t_node", "node_id", "node_name", pDepartId, "co_id = 1 and node_level = 2 and isgroup = 1") & vbLF & _
" </select></td>" & vbLF & _
" <td> 姓名:<input type=""text"" name=""name"" value=""" & pName & """ size=8 maxlength=10>" & vbLF & _
" <td> 职务:" & vbLF & _
" <select name=""pos"">" & vbLF & _
" <option value=-1>全部</option>" & vbLF & _
SelectOptions(dbLocal, "t_position", "position_id", "position_desc", pPos, "") & vbLF & _
" </select></td>" & vbLF & _
" <td> 职称:" & vbLF & _
" <select name=""title"">" & vbLF & _
" <option value=-1>全部</option>" & vbLF & _
SelectOptions(dbLocal, "t_title", "title_id", "title_desc", pTitle, "") & vbLF & _
" </select></td>" & vbLF & _
" <td><span id=btnSearch style=""cursor:hand"" title=""设置查询条件,然后点击查询按钮进行查询""><img border=0 src=""../images/search.gif"" style=""vertical-align:middle"">查询</span></td></tr>" & vbLF & _
"<tr height=10 bgcolor=white><td colspan=5></td></tr>" & vbLF & _
"</form>" & vbLF & _
"</table>" & vbLF
End Function
Function TableHeader()
TableHeader = _
"<table cellspacing=1 cellpadding=0 width=600 align=center bgcolor=silver style=""table-layout:fixed"">" & vbLF & _
"<tr style=""display:none"">" & vbLF & _
" <td width=70>这一行仅用于控制表格的宽度</td>" & vbLF & _
" <td width=50></td>" & vbLF & _
" <td width=80></td>" & vbLF & _
" <td width=90></td>" & vbLF & _
" <td width=90></td>" & vbLF & _
" <td width=110></td>" & vbLF & _
" <td width=""*""></td></tr>" & vbLF & _
"<tr height=20>" & _
"<td colspan=" & iCols & " bgcolor=""#0040a0"" align=center style=""color:white;font-weight:600"">员 工 信 息 查 询 结 果</td></tr>" & _
"<tr bgcolor=white>" & _
"<td class=tdHead align=center> <img src=""../images/bg/ar-y.gif"" width=8 height=8> " & TableHeaderField(sFileName, "name", "姓名", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "gender", "性别", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "education", "学历", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "pos", "职务", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "title", "职称", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "depart_id", "部门", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "position", "岗位", sFormParams, iSort, iSorted) & "</td>" & _
"</tr>"
End Function
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 iEmpSerial, sName, sGender, sEducation, sPos, sTitle, sDepartment, sPosition
''response.write sSQL : response.end
' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
if Not rs.EOF then
rs.Move (iCurrentPage - 1) * iRecordsPerPage
end if
while not rs.EOF and iCounter <= iRecordsPerPage
iEmpSerial = crs.GetValue("emp_serial")
sName = crs.GetValue("name")
sGender = crs.GetValue("gender")
sEducation = crs.GetValue("education")
sPos = crs.GetValue("pos")
sTitle = crs.GetValue("title")
sDepartment = crs.GetValue("depart_id") '' 部门标识
sPosition = crs.GetValue("position")
'' 部门标识 --> 部门名称
if CStr(sDepartment) <> "" then sDepartment = DLookUp(dbLocal, "t_node", "node_name", "node_id=" & sDepartment)
sTemp = sTemp & "<tr bgcolor=white height=20>" & _
"<td title=""点击可以察看“" & sName & "”的信息"" style=""cursor:hand;color:blue;"" onclick=""javascript:location.href='emp_op.asp?emp_serial=" & iEmpSerial & "';"" nowrap> <img src=""../images/bg/ar-g.gif"" width=8 height=8> " & sName & " </td>" & _
"<td align=center title=""" & sGender & """ nowrap> " & sGender & " </td>" & _
"<td align=center title=""" & sEducation & """ nowrap> " & sEducation & " </td>" & _
"<td align=center title=""" & sPos & """ nowrap> " & sPos & " </td>" & _
"<td align=center title=""" & sTitle & """ nowrap> " & sTitle & " </td>" & _
"<td align=center title=""" & sDepartment & """ nowrap> " & sDepartment & " </td>" & _
"<td align=center title=""" & sPosition & """ nowrap> " & sPosition & " </td>" & _
"</tr>"
iCounter = iCounter + 1
rs.movenext
wend
crs.Close()
' 填补空白行
sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage)
' 首页、前页、后页、尾页等分页信息
sTemp = sTemp & "<tr bgcolor=white height=20><td colspan=" & iCols & " align=right>" & _
Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _
" </td></tr>"
TableRecords = sTemp
End Function
Function TableLink()
dim sTemp : sTemp = ""
if IsHrAdmin then '' 只有人事管理员才显示管理链接
sTemp = _
" <img src=""../images/goto.gif""> <a href=""position.asp"">职务管理</a>" & vbLF & _
" " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""title.asp"">职称管理</a>" & vbLF & _
" " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""node_o.asp"">组织结构管理</a>" & vbLF & _
" " & vbLF
end if
TableLink = _
"<table width=600 cellspacing=0 cellpadding=0 border=0 align=center>" & vbLF & _
"<tr height=10>" & vbLF & _
" <td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & vbLF & _
"</tr>" & vbLF & _
"<tr>" & vbLF & _
" <td width=600> " & vbLF & _
sTemp & vbLF & _
" <img src=""../images/goto.gif""> <a href=""emp_odl.asp"">离职员工查询</a></td>" & vbLF & _
"</tr>" & vbLF & _
"</table>" & vbLF
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -