📄 ztcx.asp
字号:
<%
dim conn,sql,rs,page
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database/rsxt.mdb")
sql="select * from [rsxt] order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
rs.pagesize=14
page=request("page")
if page<1 then page=1
if rs.pagecount>0 then rs.absolutepage=page
end if
%>
<!-- #include file="Inc/Head.asp" -->
<table width="100%" height="32" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#666666">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td width="100%" bgcolor="#F5F5F5"><table width="100%" height="110" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr bgcolor="#E3E3E3">
<td width="9%" height="30" align="center"><span style="color: #FF00FF; font-family: "隶书"; font-size: 16px;">序号</span></td>
<td width="9%" height="25"><span style="color: #FF00FF; font-family: "隶书"; font-size: 16px;"> 工号</span></td>
<td width="9%" height="25"><span style="color: #FF00FF; font-family: "隶书"; font-size: 16px;"> 姓名</span></td>
<td width="9%" height="25"><span style="color: #FF00FF; font-family: "隶书"; font-size: 16px;"> 性别</span></td>
<td width="9%" height="25"><span style="color: #FF00FF; font-family: "隶书"; font-size: 16px;"> 身份证号</span></td>
<td width="9%" height="25"><span style="color: #FF00FF; font-family: "隶书"; font-size: 16px;">入职时间</span></td>
<td width="9%" height="25"><span style="color: #FF00FF; font-family: "隶书"; font-size: 16px;"> 学历</span></td>
<td width="9%" height="25"><span style="color: #FF00FF; font-family: "隶书"; font-size: 16px;"> 证书编号</span></td>
<td width="9%" height="25"><span style="color: #FF00FF; font-family: "隶书"; font-size: 16px;"> 入职职位</span></td>
<td width="9%" height="25"><span style="color: #FF00FF; font-family: "隶书"; font-size: 16px;">部门</span></td>
<td width="10%" height="25"><span style="color: #FF00FF; font-family: "隶书"; font-size: 16px;">政治面目</span></td>
</tr> <%if not rs.eof then
for i=1 to rs.pagesize%>
<tr valign="top" bgcolor="#F5F5F5" class="h25">
<td height="25" align="center"><%=i%></td>
<td height="30"> <%=rs("gh")%></td>
<td height="25"> <%=rs("name")%></td>
<td height="25"> <%=rs("xb")%></td>
<td height="25"> <%=rs("sfzh")%></td>
<td height="25"> <%=rs("rzsj")%></td>
<td height="25"> <%=rs("xl")%></td>
<td height="25"> <%=rs("zsh")%></td>
<td height="25"> <%=rs("zw")%></td>
<td height="25"> <%=rs("bm")%></td>
<td height="25"> <%=rs("zzmm")%></td>
</tr><%rs.movenext
if rs.eof then exit for
next
%>
<tr bgcolor="#E3E3E3">
<td height="30" align="center">页码</td>
<td height="25" colspan="10">
<%
dim ij,url,myself
myself=request.servervariables("path_info")
url=myself&"?typeid="&cstr(typeid)
dim maxij,minij
if page="" or page<=6 then
minij=1
else
minij=page-5
end if
maxij=rs.pagecount
if maxij>10 then maxij=page+5
if page<=10 then maxij=page+5
if minij>1 then''''''''''''''''''''''''''''''''
response.write " [<a href="&url&"&page=1"
if int(page)=rs.pagecount then
response.write " class=e "
else
response.write " class=bc "
end if
response.write ">1</a>]..."
else''''''''''''''''''''''''''''''''''''''''''''
response.write "[<a href="&url&"&page=1"
if int(page)=1 then
response.write " class=e "
else
response.write " class=bc "
end if
response.write ">1</a>] "
end if''''''''''''''''''''''''''''''''''''''''''
if rs.pagecount>=2 then'***********************************************
for ij=minij+1 to maxij
if ij=rs.pagecount then exit for
response.write " [<a href="&url&"&page="&ij
if int(page)=ij then
response.write " class=e "
else
response.write " class=bc "
end if
response.write ">"&ij&"</a>] "
next
if maxij>=rs.pagecount-1 then'''''''''''''''
response.write " [<a href="&url&"&page="&rs.pagecount
if int(page)=rs.pagecount then
response.write " class=e "
else
response.write " class=bc "
end if
response.write ">"&rs.pagecount&"</a>] "
else'''''''''''''''''''''''''''''''''''''''''
response.write "...[<a href="&url&"&page="&rs.pagecount
if int(page)=rs.pagecount then
response.write " class=e "
else
response.write " class=bc "
end if
response.write ">"&rs.pagecount&"</a>] "
end if'''''''''''''''''''''''''''''''''''''''
end if''************************************************************
%>
总计:<%=rs.recordcount%>条</td>
</tr><%end if%>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -