📄 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=""node_id"">" & vbLF & _
" <option value=-1>全部</option>" & vbLF & _
SelectOptions(conn,"select * from t_node where mark=0", "node_id", "node_desp", pNodeId) & vbLF & _
" </select></td>" & vbLF & _
" <td> 姓名:<input type=""text"" name=""name"" value=""" & pName & """ size=8 maxlength=10>" & vbLF & _
" <td> 职务:<input type=""text"" name=""pos"" value=""" & pPos & """ size=8 maxlength=10>" & vbLF & _
" <td> 职称:<input type=""text"" name=""title"" value=""" & pTitle & """ size=8 maxlength=10>" & 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=3 width=600 align=center bgcolor=silver style=""table-layout:fixed"">" & vbLF & _
"<tr style=""display:none"">" & vbLF & _
" <td width=80>这一行仅用于控制表格的宽度</td>" & vbLF & _
" <td width=50></td>" & vbLF & _
" <td width=80></td>" & vbLF & _
" <td width=90></td>" & vbLF & _
" <td width=90></td>" & vbLF & _
" <td width=100></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=15 height=8> " & TableHeaderField(sFileName, "name", "姓名", sFormParams, sSorting, sSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "gender", "性别", sFormParams, sSorting, sSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "education", "学历", sFormParams, sSorting, sSorted) & "</td>" & _
"<td class=tdHead align=center> 政治面貌</td>" & _
"<td class=tdHead align=center> 部门</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "pos", "职务", sFormParams, sSorting, sSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "title", "职称", sFormParams, sSorting, sSorted) & "</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 rs : set rs = openRS(conn,sSQL)
dim iEmpid, sName, sGender, sEducation,sPolitical,sNode,sPos, sTitle
''response.write sSQL : response.end
' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
if Not rs.EOF then
rs.Move (iCurrentPage - 1) * iRecordsPerPage
end if
while not rs.EOF and iCounter <= iRecordsPerPage
iEmpid = GetValue(rs,"emp_id")
sName = GetValue(rs,"name")
sGender = GetValue(rs,"gender")
sEducation = GetValue(rs,"education")
sPolitical = GetValue(rs,"political")
sNode = GetValue(rs,"node") '' 部门标识
sPos = GetValue(rs,"pos")
sTitle = GetValue(rs,"title")
'' 部门标识 --> 部门名称
'if CStr(sNode) <> "" then sDepartment = DLookUp(dbLocal, "t_node", "node_desp", "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_id=" & iEmpid & "';"" 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=""" & sPolitical & """ nowrap> " & sPolitical & " </td>" & _
"<td align=center title=""" & sNode & """ nowrap> " & sNode & " </td>" & _
"<td align=center title=""" & sPos & """ nowrap> " & sPos & " </td>" & _
"<td align=center title=""" & sTitle & """ nowrap> " & sTitle & " </td>" & _
"</tr>"
iCounter = iCounter + 1
rs.movenext
wend
CloseRS(rs)
' 填补空白行
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 = ""
dim sTemp1:sTemp1=""
if iRight=2 then
sTemp1=" <img src=""../images/goto.gif""> <a href=""emp_oa.asp"">新增员工</a>" & vbLF & _
" " & vbLF
end if
sTemp = _
" <img src=""../images/goto.gif""> <a href=""node.asp"">部门管理</a>" & vbLF & _
" " & vbLF
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 & _
sTemp1& vbLF & _
" <img src=""../images/goto.gif""> <a href=""emp_odl.asp"">离职员工查询</a> " & vbLF & _
sTemp & vbLF & _
"</td></tr>" & vbLF & _
"</table>" & vbLF
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -