📄 pcard_l.inc
字号:
<%
Function TableSearch()
'' 任务分类,0为所有任务,1为普通任务,2为会议相关的任务,3为审批相关的任务
'' 任务完成状况,0全部,1所有已完成任务,2所有未完成任务,3所有正常的未完成任务,4所有过时的未完成任务
'' 开始日期的日历,DrawCal函数定义在../common/commonpage.inc
'' 结束日期的日历
TableSearch = _
TableTitle("设置查询条件", 600, "", "") & vbLF & _
"<table cellspacing=0 cellpadding=0 width=600 align=center border=0>" & vbLF & _
"<form name=""frmSearch"" method=post action=""pcard_l.asp"">" & vbLF & _
"<tr height=30>" & vbLF & _
" <td width=200>通讯录组:<select name=""card_group"" style=""width:86px"">" & vbLF & _
"<option value=-1>全部</option>" & vbLF & _
SelectOptions(dbLocal, "t_personalcardgroup", "group_id", "group_desp", pCardGroup, "emp_serial = " & iEmpSerial) & vbLF & _
" </select>" & vbLF & _
" </td>" & _
" <td width=200>公开状态:<select name=""ispublic"" style=""width:106px"">" & vbLF & _
" <option value=-1>全部</option>" & vbLF & _
" <option value=0>不公开</option>" & vbLF & _
" <option value=1>公开</option>" & vbLF & _
" </select>" & vbLF & _
" </td>" & vbLF & _
" <td> </td></tr>" & vbLF & _
"<tr>" & vbLF & _
" <td width=200>姓名关键字:<input type=""text"" name=""name"" value=""" & pName & """ size=10 maxlength=4></td>" & vbLF & _
" <td width=200>单位名称关键字:<input type=""text"" name=""company_name"" value=""" & pCompanyName & """ size=10 maxlength=4></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=15><td colspan=3></td></tr>" & vbLF & _
"</form>" & vbLF & _
"</table>" & vbLF & _
"<script language=""javascript"">document.all.card_group.value=""" & pCardGroup & """</script>" & vbLF & _
"<script language=""javascript"">document.all.ispublic.value=""" & pIsPublic & """</script>" & vbLF
End Function
Function TableHeader()
TableHeader = _
TableTitle("个人通讯录查询结果", 600, "", "#0040a0") & _
"<table cellspacing=0 cellpadding=0 width=600 align=center class=tablelist>" & _
"<tr>" & _
"<td class=tdHead> " & TableHeaderField(sFileName, "ispublic", "公开", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead> <img src=""../images/bg/ar-y.gif"" width=8 height=8> " & TableHeaderField(sFileName, "name", "姓名", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead> " & TableHeaderField(sFileName, "company_phone", "单位电话", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead> " & TableHeaderField(sFileName, "home_phone", "住宅电话", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead> " & TableHeaderField(sFileName, "mobile", "移动电话", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead> " & TableHeaderField(sFileName, "beep", "BP 机", sFormParams, iSort, iSorted) & "</td>" & _
"<td class=tdHead> " & TableHeaderField(sFileName, "fax", "传真", sFormParams, iSort, iSorted) & "</td>" & _
"</tr>"
' "<td class=tdHead> " & TableHeaderField(sFileName, "email", "Email", sFormParams, iSort, iSorted) & "</td>" & _
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 iSerial, sName, sComPhone, sHomePhone, sMobile, sBeep, sFax, IsPublic
' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
if Not rs.EOF then
rs.Move (iCurrentPage - 1) * iRecordsPerPage
end if
while not rs.EOF and iCounter <= iRecordsPerPage
iSerial = crs.GetValue("serial")
sName = crs.GetValue("name")
sComPhone = crs.GetValue("company_phone")
sHomePhone = crs.GetValue("home_phone")
sMobile = crs.GetValue("mobile")
sBeep = crs.GetValue("beep")
sFax = crs.GetValue("fax")
IsPublic = crs.GetValue("ispublic")
if CStr(IsPublic) = "1" then
IsPublic = "<img border=0 src=""../images/public.bmp"">"
else
IsPublic = ""
end if
sTemp = sTemp & "<tr>" & _
"<td width=50 class=tdlist align=center> " & IsPublic & " </td>" & _
"<td width=80 class=tdlist title=""" & sName & """ style=""cursor:hand"" onclick=""javascript:location.href='pcard_p.asp?serial=" & iSerial & "';""> <img src=""../images/bg/ar-g.gif"" width=8 height=8> " & Bref(sName,4) & " </td>" & _
"<td width=100 class=tdlist title=""" & sComPhone & """ align=left> " & Bref(sComPhone,12) & " </td>" & _
"<td width=90 class=tdlist title=""" & sHomePhone & """ align=left> " & Bref(sHomePhone,10) & " </td>" & _
"<td width=100 class=tdlist title=""" & sMobile & """ align=left> " & Bref(sMobile,12) & " </td>" & _
"<td width=90 class=tdlist title=""" & sBeep & """> " & Bref(sBeep, 12) & " </td>" & _
"<td width=80 class=tdlist title=""" & sFax & """> " & sFax & " </td>" & _
"</tr>"
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
End Function
Function TableLink()
TableLink = _
"<table width=600 cellspacing=0 cellpadding=0 border=0 align=center>" & _
"<tr height=10>" & _
" <td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & _
"</tr>" & _
"<tr height=20>" & _
" <td width=600> " & _
" <img src=""../images/goto.gif""> <a href=""pcard_e.asp"">新建联系人</a>" & _
" " & _
" <img src=""../images/goto.gif""> <a href=""pcard_g.asp"">个人通讯录类别管理</a>" & _
" " & _
" <img src=""../images/goto.gif""> <a href=""ccard_l.asp"">单位名录</a></td>" & _
"</tr>" & _
"</table>"
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -