📄 zhaopian1.asp
字号:
<!--#include file="Conn.asp"-->
<html>
<head>
<title>∷企业生产管理信息系统:.</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">
<SCRIPT language=javascript src="js/selectcity.js"></script>
<script language="JavaScript" src="js/validate.js" type="text/JavaScript"></script>
<SCRIPT language=javascript src="css/init.js"></SCRIPT>
<style type="text/css">
<!--
td { font-family: "宋体"; font-size: 9pt}
body { font-family: "宋体"; font-size: 9pt}
select { font-family: "宋体"; font-size: 9pt}
A {text-decoration: none; color: #336699; font-family: "宋体"; font-size: 9pt}
A:hover {text-decoration: underline; color: #FF0000; font-family: "宋体"; font-size: 9pt}
-->
</style>
<body topmargin="0" leftmargin="0">
<!--#include file="Top.Asp"-->
<%
ClassName=Request("ClassName")
const MaxPerPage=8
dim totalPut
dim CurrentPage
if not isempty(request("page")) then
currentPage=Request("page",1)
else
currentPage=1
end if
On Error Resume Next
set rs=server.createobject("adodb.recordset")
if ClassName="" then
Sql = "Select * from [ImgData] order by id desc"
Else
Sql = "Select * from [ImgData] where ClassName='"&ClassName&"' order by id desc"
End IF
rs.open sql,conn,1,1
if rs.eof and rs.bof then
Response.Write "<div align=center>还没有任何员工照片。</div>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"zhaopian.Asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"zhaopian.Asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"zhaopian.Asp"
end if
end if
rs.close
set rs = nothing
end if
sub showContent
dim m
m=1
%><div align="center">
<table border="1" width="770" cellspacing="5" cellpadding="5" height="300"><%do while not rs.eof%> <tr align="center"><%for k=1 to 4
if rs.eof then exit for%> <td><table border="0" cellspacing="0" cellpadding="0" width="175" background="images/imgbg.gif" height="160"><tr align="center"><td height="8"></td></tr><tr align="center"><td height="122"><a href="View.Asp?ID=<%=rs("id")%>"><img width="95" src="ShowImg.Asp?ID=<%=rs("id")%>" border="1" style="border: 1px solid #E1E1E1" height="132"></a></td></tr><tr><td height="30" align="center" valign="top"><a href="View.Asp?ID=<%=rs("id")%>" title="<%=rs("Photo_Name")%>"><%=left(rs("Photo_Name"),10)%></a></td></tr></table></td><%rs.movenext
m=m+1
next%> </tr><%
if m>MaxPerPage then exit do
loop%> </table></div><%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<table cellspacing=1 width='100%' border=0 colspan='4' ><form method=Post action="""&filename&"""><tr><td align=center> "
if CurrentPage<2 then
response.write "共<b><font color=red>"&totalnumber&"</font></b>幅员工照片 首页 上一页 "
else
response.write "共<b><font color=red>"&totalnumber&"</font></b>幅员工照片 <a href="&filename&"?ClassName="&ClassName&"&page=1>首页</a> "
response.write "<a href="&filename&"?ClassName="&ClassName&"&page="&CurrentPage-1&">上一页</a> "
end if
if n-currentpage<1 then
response.write "下一页 尾页"
else
response.write "<a href="&filename&"?ClassName="&ClassName&"&page="&(CurrentPage+1)&">"
response.write "下一页</a> <a href="&filename&"?ClassName="&ClassName&"&page="&n&">尾页</a>"
end if
response.write " 页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
response.write " <b>"&maxperpage&"</b>幅员工照片/页 "
%> </td></tr></table><%end function%><br>
<P>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR vAlign=center>
<TD align=middle width="100%"><!--#include file="footer.htm"--></TD>
</TR></TBODY></TABLE></P></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -