📄 zhaopin.asp
字号:
<%
const MaxPerPage=5
dim totalPut
dim CurrentPage
dim TotalPages
dim i
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from job where gsid="+cstr(id)+" order by jobid desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write"<SCRIPT language=JavaScript>alert('本公司暂不招聘工作人员...!');"
response.write"this.location.href='company.asp?id="&id&"'</SCRIPT>"
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
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
else
currentPage=1
showContent
end if
end if
end if
sub showContent
%>
<TABLE height=428 border=0 cellPadding=0 cellSpacing=0 width=100%>
<TBODY>
<TR>
<TD valign=top bgcolor=#ffffff align=center><BR>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="94%">
<TBODY>
<TR>
<TD align=right><%showpage totalput,MaxPerPage,""%></TD>
</TR>
</TBODY>
</TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="94%">
<TR><TD height="20" colspan="2" background="images/line_gr.gif"></TD></TR>
</TABLE>
<%do while not rs.eof%>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="94%">
<TBODY>
<TR height="30">
<TD><img border="0" src="images/add.gif"> <a href="job_info.asp?job_id=<%=rs("jobid")%>&id=<%=id%>"><b><%=rs("gangwei")%></b></a> 发布日期:<%=rs("begindate")%></TD>
</TR>
<TR height="30">
<TD>招聘人数:<%=rs("renshu")%></TD>
</TR>
<TR><TD height="20">工作地点:<%=rs("didian")%></TD></TR>
<TR><TD height="20" background="images/line_gr.gif"></TD></TR>
<TR><TD height="10"></TD></TR>
</TBODY>
</TABLE>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
rs.close
set rs=nothing
%>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="94%">
<TR><TD colspan="2"><%showpage totalput,MaxPerPage,""%></TD></TR>
</Table>
</TD>
</TR>
</TABLE>
<%
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 "<form method=Post action="&filename&">"
if CurrentPage<2 then
response.write "<table border=0 width=100% cellspacing=0 cellpadding=0>"
response.write "<tr height=20><td colspan=2></td></tr>"
response.write "<tr height=20>"
response.write "<td align=left valign=top>"
response.write "<font color=red><b>共"&n&"页 第"&CurrentPage&"页 "
response.write "共查询到"&totalnumber&" 条信息</b></font>"
response.write "</td>"
response.write "<td VALIGN=middle align=right >"
response.write "【最前页】【上一页】"
else
response.write "<table border=0 width=100% cellspacing=0 cellpadding=0>"
response.write "<tr height=20><td colspan=2></td></tr>"
response.write "<tr height=30>"
response.write "<td align=left valign=top>"
response.write "<font color=red><b>共"&n&"页 第"&CurrentPage&"页 "
response.write "共查询到"&totalnumber&" 条信息</b></font>"
response.write "</td>"
response.write "<td VALIGN=center align=right >"
response.write "【<a href="&filename&"?page=1&id="&gsid&">最前页</a>】"
response.write "【<a href="&filename&"?page="&CurrentPage-1&"&id="&gsid&">上一页</a>】"
end if
if n-currentpage<1 then
response.write "【下一页】【最后页】"
else
response.write "【<a href="&filename&"?page="&(CurrentPage+1)&"&id="&gsid&">"
response.write "下一页</a>】【 <a href="&filename&"?page="&n&"&id="&gsid&">最后页</a>】"
end if
response.write "</form>"
response.write "</td>"
response.write "</tr>"
response.write "</table>"
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -