www.pudn.com > manager050315.rar > ccard_l.inc


<% 
Function TableSearch() 
	'' 任务分类,0为所有任务,1为普通任务,2为会议相关的任务,3为审批相关的任务 
	'' 任务完成状况,0全部,1所有已完成任务,2所有未完成任务,3所有正常的未完成任务,4所有过时的未完成任务 
	'' 开始日期的日历,DrawCal函数定义在../common/commonpage.inc 
	'' 结束日期的日历 
 
	TableSearch = _ 
		TableTitle("设 置 单 位 名 录 查 询 条 件", 600, "", "") & vbLF & _ 
		"" & vbLF & _ 
		"" & vbLF  & _ 
		"" & vbLF & _ 
		"	" & _ 
		"	" & vbLF & _ 
		"	" & vbLF & _ 
		"	" & vbLF & _ 
		"" & vbLF & _ 
		"" & vbLF & _ 
		"
名录类别:" & vbLF & _ " 单位名称关键字:联系人关键字:查询
" & vbLF End Function Function TableHeader() TableHeader = _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" 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, sCompanyName, sContactPerson, sContactPhone, sFax, sEmail, sCardGroup ''response.write sSQL : response.end ' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行 if Not rs.EOF then rs.Move (iCurrentPage - 1) * iRecordsPerPage end if while not rs.EOF and iCounter <= iRecordsPerPage iSerial = crs.GetValue("serial") sCompanyName = crs.GetValue("name") sContactPerson = crs.GetValue("contact_person") sContactPhone = crs.GetValue("contact_phone") sFax = crs.GetValue("fax") sEmail = crs.GetValue("email") sCardGroup = crs.GetValue("card_group_desp") sTemp = sTemp & "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" iCounter = iCounter + 1 rs.movenext wend crs.Close() ' 填补空白行 sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage) ' 首页、前页、后页、尾页等分页信息 sTemp = sTemp & "" TableRecords = sTemp End Function Function TableLink() dim sTemp : sTemp = "" if IsCustomerAdmin then sTemp = _ "  新建单位名录" & vbLF & _ "    " & vbLF & _ "  单位名录类别管理" & vbLF & _ "    " & vbLF end if TableLink = _ "
单 位 名 录 查 询 结 果
  " & TableHeaderField(sFileName, "name", "单位名称", sFormParams, iSort, iSorted) & " " & TableHeaderField(sFileName, "contact_person", "联系人", sFormParams, iSort, iSorted) & " " & TableHeaderField(sFileName, "contact_phone", "联系电话", sFormParams, iSort, iSorted) & " " & TableHeaderField(sFileName, "fax", "传真", sFormParams, iSort, iSorted) & " " & TableHeaderField(sFileName, "email", "电子信箱", sFormParams, iSort, iSorted) & "
  " & Bref(sCompanyName,18) & "  " & Bref(sContactPerson,12) & "  " & Bref(sContactPhone,10) & "  " & Bref(sFax,12) & "  " & Bref(sEmail, 17) & " 
" & _ Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _ " 
" & vbLF & _ "" & vbLF & _ " " & vbLF & _ "" & vbLF & _ "" & vbLF & _ " " & vbLF & _ "" & vbLF & _ "
 " & vbLF & _ sTemp & vbLF & _ "  我的个人通讯录
" & vbLF End Function %>