⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ccard_l.inc

📁 物业管理和办公自动化系统
💻 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=""ccard_l.asp"">" & vbLF  & _
		"<tr height=30>" & vbLF & _
		"	<td>名录类别:<select name=""card_group"" style=""width:86px"">" & vbLF & _
			"<option value=-1>全部</option>" & vbLF & _
			SelectOptions(dbLocal, "t_customercardgroup", "group_id", "group_desp", pCardGroup, "") & vbLF & _
		"		</select>" & vbLF & _
		"	</td>" & _
		"	<td>单位名称关键字:<input type=""text"" name=""name"" value=""" & pCompanyName & """ size=10 maxlength=8></td>" & vbLF & _
		"	<td>联系人关键字:<input type=""text"" name=""contact_person"" value=""" & pContactPerson & """ 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=10><td colspan=4></td></tr>" & vbLF & _
		"</form>" & vbLF & _
		"</table>" & vbLF
End Function

Function TableHeader()
	TableHeader = _
		"<table cellspacing=0 cellpadding=0 width=600 align=center class=tablelist>" & _
		"<tr>" & _
		"<td colspan=" & iCols & " bgcolor=""#0040a0"" align=center style=""color:white;font-weight:600"" height=20 >单 位 名 录 查 询 结 果</td></tr>" & _
		"<tr>" & _
		"<td class=tdHead width=240>&nbsp;<img src=""../images/bg/ar-y.gif"" width=8 height=8>&nbsp;" & TableHeaderField(sFileName, "name", "单位名称", sFormParams, iSort, iSorted) & "</td>" & _
		"<td class=tdHead width=70>&nbsp;" & TableHeaderField(sFileName, "contact_person", "联系人", sFormParams, iSort, iSorted) & 	"</td>" & _
		"<td class=tdHead width=80>&nbsp;" & TableHeaderField(sFileName, "contact_phone", "联系电话", sFormParams, iSort, iSorted) & "</td>" & _
		"<td class=tdHead width=80>&nbsp;" & TableHeaderField(sFileName, "fax", "传真", sFormParams, iSort, iSorted) & "</td>" & _
		"<td class=tdHead width=120>&nbsp;" & TableHeaderField(sFileName, "email", "电子信箱", 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 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 & "<tr bgcolor=white>" & _
				"<td class=tdlist title=""" & sCompanyName & """ style=""cursor:hand"" onclick=""javascript:location.href='ccard_p.asp?serial=" & iSerial & "';"">&nbsp;<img src=""../images/bg/ar-g.gif"" width=8 height=8>&nbsp;" & Bref(sCompanyName,18) & "&nbsp;</td>" & _
				"<td class=tdlist title=""" & sContactPerson & """ align=left>&nbsp;" & Bref(sContactPerson,12) & "&nbsp;</td>" & _
				"<td class=tdlist title=""" & sContactPhone & """ align=left>&nbsp;" & Bref(sContactPhone,10) & "&nbsp;</td>" & _
				"<td class=tdlist title=""" & sFax & """ align=left>&nbsp;" & Bref(sFax,12) & "&nbsp;</td>" & _
				"<td class=tdlist title=""" & sEmail & """>&nbsp;" & Bref(sEmail, 17) & "&nbsp;</td>" & _
				"</tr>"
		iCounter = iCounter + 1
		rs.movenext
	wend
	crs.Close()

	' 填补空白行
	sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage)

	' 首页、前页、后页、尾页等分页信息
	sTemp = sTemp & "<tr bgcolor=white><td class=tdlist colspan=" & iCols & " align=right>" & _
				Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _
				"&nbsp;</td></tr>"
	TableRecords = sTemp
End Function


Function TableLink()
	dim sTemp : sTemp = ""
	if IsCustomerAdmin then
		sTemp = _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""ccard_e.asp"">新建单位名录</a>" & vbLF & _
		"		&nbsp;&nbsp;&nbsp;" & vbLF & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""ccard_g.asp"">单位名录类别管理</a>" & vbLF & _
		"		&nbsp;&nbsp;&nbsp;" & 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 height=20>" & vbLF & _
		"	<td width=600>&nbsp;" & vbLF & _
		sTemp & vbLF & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""pcard_l.asp"">我的个人通讯录</a></td>" & vbLF & _
		"</tr>" & vbLF & _
		"</table>" & vbLF
End Function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -