📄 list_firm.inc
字号:
<%Function TableSearch() TableSearch = _ TableTitle("设 置 商 户 信 息 查 询 条 件", 600, "", "") & vbLF & _ "<table cellspacing=0 cellpadding=3 width=600 align=center border=0>" & vbLF & _ "<form name=""frmSearch"" method=post action=""list_firm.asp"">" & vbLF & _ "<tr height=30 bgcolor=white>" & vbLF & _ " <td> 商户名称:<input type=""text"" name=""name"" value=""" & pName & """ size=20 maxlength=20>" & vbLF & _ " <td> 联系人姓名:<input type=""text"" name=""person"" value=""" & pPerson & """ size=12 maxlength=12>" & 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>" & vbLFEnd FunctionFunction 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=200>这一行仅用于控制表格的宽度</td>" & vbLF & _ " <td width=100></td>" & vbLF & _ " <td width=80></td>" & vbLF & _ " <td width=80></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, "person", "联系人姓名", sFormParams, sSorting, sSorted) & "</td>" & _ "<td class=tdHead align=center> " & TableHeaderField(sFileName, "phone", "联系电话", sFormParams, sSorting, sSorted) & "</td>" & _ "<td class=tdHead align=center> " & TableHeaderField(sFileName, "fax", "传真", sFormParams, sSorting, sSorted) & "</td>" & _ "<td class=tdHead align=center> " & TableHeaderField(sFileName, "email", "电子信箱", sFormParams, sSorting, sSorted) & "</td>" & _ "</tr>"End FunctionFunction 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 iId, sName,sPerson,sPhone,sFax,sEmail ' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行 if Not rs.EOF then rs.Move (iCurrentPage - 1) * iRecordsPerPage end if while not rs.EOF and iCounter <= iRecordsPerPage iID = GetValue(rs,"id") sName = GetValue(rs,"name") sPerson = GetValue(rs,"person") sPhone = GetValue(rs,"phone") sFax = GetValue(rs,"fax") sEmail = GetValue(rs,"email") sTemp = sTemp & "<tr bgcolor=white height=20>" & _ "<td title=""点击可以察看“" & sName & "”的信息"" style=""cursor:hand;color:blue;"" onclick=""javascript:location.href='newfirm.asp?firmid=" & iID & "';"" nowrap> <img src=""../images/bg/ar-g.gif"" width=8 height=8> " & sName & " </td>" & _ "<td align=center title=""" & sPerson & """ nowrap> " & sPerson & " </td>" & _ "<td align=center title=""" & sPhone & """ nowrap> " & sPhone & " </td>" & _ "<td align=center title=""" & sFax & """ nowrap> " & sFax & " </td>" & _ "<td align=center title=""" & sEmail & """ nowrap> " & sEmail & " </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 = sTempEnd FunctionFunction TableLink() dim sTemp : sTemp = "" if Iright=2 then '' 只有人事管理员才显示管理链接 sTemp = _ " <img src=""../images/goto.gif""> <a href=""newfirm.asp"">新增商户</a>" & 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 & _ "</tr>" & vbLF & _ "</table>" & vbLFEnd Function%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -