📄 index.asp
字号:
<%@ codepage ="936" %>
<%
if instr(session("flag"),"41")=0 then
response.redirect "../login.asp"
response.end
end if
%>
<!--#include file="../../conn/dbconn2.asp" -->
<!--#include file="../config.asp"-->
<link rel="stylesheet" type="text/css" href="../style.css">
<body bgcolor="#FFFFFF" marginheight=0 marginwidth=0 leftmargin=0>
<script language="javascript">
function job(mylink)
{
window.open(mylink,'','top=50,left=120,width=457,height=450,scrollbars=yes')
}
</script>
<%
DIM totalPut
DIM CurrentPage
DIM TotalPages
DIM i,j
IF not isempty(request("page")) then
currentPage=cint(request("page"))
ELSE
currentPage=1
END IF
DIM rs
DIM sql
if not isempty(request("selAnnounce")) then
idlist=request("selAnnounce")
if instr(idlist,",")>0 then
dim idarr
idArr=split(idlist)
dim id
for i = 0 to ubound(idarr)
id=clng(idarr(i))
call deleteannounce(id)
next
else
call deleteannounce(clng(idlist))
end if
end if
typeid=request("typeid")
set rs=server.createobject("adodb.recordset")
select case typeid
case ""
sql="select * from work where showname like '%"&request("txtitle")&"%' order by info_ID desc"
case "1"
sql="select * from work where showname like '%"&request("txtitle")&"%' and type='全职' order by info_ID desc"
case "2"
sql="select * from work where showname like '%"&request("txtitle")&"%' and type='兼职' order by info_ID desc"
case "3"
sql="select * from work where showname like '%"&request("txtitle")&"%' and type='应届生' order by info_ID desc"
end select
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.write "<p align='center'>对不起,没有您要查询的信息</p>"
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,"index.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"index.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"index.asp"
end if
end if
rs.close
end if
set rs=nothing
sub showContent
%>
<Form name="search" method="POST" action="index.asp">
<TABLE width="600" border=0 align="center" cellPadding=3 cellSpacing=0 bordercolor="#111111" style="border-collapse: collapse">
<TBODY>
<TR bgcolor="#ffffcc">
<TD align=left bgcolor="#FFFFFF">
<p align="center">
<img src="../images/search.gif"> 搜索关键字:<input type="text" name="txtitle" size="25" style="font-size: 9pt">
<select style="font-size: 9pt" name="typeid">
<option value="" selected>--选择类别--</option>
<option value="1">全职</option>
<option value="2">兼职</option>
<option value="3">应届生</option>
</select>
<INPUT align=absMiddle border=0 src="../images/search1.gif" type=image name="I2">
</td>
</TR>
</TBODY>
</TABLE>
<TABLE width="600" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#111111" bordercolorlight="#A6D2FF" bordercolordark="#A6D2FF" style="border-collapse: collapse">
<TR height=25 bgcolor="#cccccc">
<TD width="45" align="left" bgcolor="#CEE8FF"><font color="ff6600"><b>编号</b></font></td>
<TD width="342" align="center" bgcolor="#CEE8FF"><font color="ff6600"><b>招聘信息标题</b></font></td>
<TD width="95" align="center" bgcolor="#CEE8FF"><font color="#FF6600"><b>热点推荐</b></font></td>
<TD width="89" align="center" bgcolor="#CEE8FF"><font color="ff6600"><b>发布日期</b></font></td>
<TD width="53" align="center" bgcolor="#CEE8FF"><font color="#Ff6600"><b>修改</b></font></TD>
<TD width="51" align="center" bgcolor="#CEE8FF"><input type='submit' value='删除'></td>
</TR>
<%do while not rs.eof%>
<TR height="20" bgcolor="#ffffff">
<TD width="45" align="left"><font face="Arial"><b><%=rs("info_id")%></b></font> </td>
<TD width="342"><font color="#FF6600">【<%=rs("type")%>】</font><a href="javascript:job("../../company/work_info.asp?info_id=<%=rs("info_id")%>")"><%=rs("showname")%></a></td>
<TD width="95" align="center"><% if rs("Tjbz")=1 then %><a href="Tjbz1.asp?info_id=<%=rs("info_id")%>&page=<%=CurrentPage%>"><font color="#FF0000">招聘推荐</font></a><%else%><a href="Tjbz.asp?info_id=<%=rs("info_id")%>&page=<%=CurrentPage%>"><font color="#008000">暂无推荐</font></a><%end if%></td>
<TD width="89" align="center"><%=rs("dateandtime")%> </td>
<TD width="53" align="center"><a href="edit.asp?Info_id=<%=rs("info_id")%>"><img alt="修改信息" border="0" src="../images/edit.gif"></a></TD>
<TD width="51" align="center"><input type='checkbox' name='selAnnounce' value='<%=cstr(rs("info_ID"))%>'></td>
</TR>
<%i=i+1
IF i>=MaxPerPage then exit do
rs.movenext
loop
%>
</TABLE></FORM>
<%
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
if CurrentPage<2 then
response.write "<table border=0 width=600 cellspacing=0 cellpadding=0 align=center>"
response.write "<tr height=30>"
response.write "<td align=center>"
response.write "共<font color=ff6600><b>"&n&"</b></font>页 第<font color=ff6600><b>"&CurrentPage&"</b></font>页 共检索到<font color=ff6600><b>"&totalnumber&"</b></font>条信息</TD>"
response.write "<td align=right>"
response.write "【最前页】【上一页】"
else
response.write "<table border=0 width=600 cellspacing=0 cellpadding=0>"
response.write "<tr height=30>"
response.write "<td align=left>"
response.write "共<font color=ff6600><b>"&n&"</b></font>页 第<font color=ff6600><b>"&CurrentPage&"</b></font>页 共检索到<font color=ff6600><b>"&totalnumber&"</b></font>条信息"
response.write "<td align=right>"
response.write "【<a href="&filename&"?page=1&typeid="&tyeid&"&txtitle="&request("txtitle")&">最前页</a>】"
response.write "【<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&"&txtitle="&request("txtitle")&">上一页</a>】"
end if
if n-currentpage<1 then
response.write "【下一页】【最后页】"
else
response.write "【<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&"&txtitle="&request("txtitle")&">"
response.write "下一页</a>】【<a href="&filename&"?page="&n&"&typeid="&typeid&"&txtitle="&request("txtitle")&">最后页</a>】"
end if
response.write "</td>"
response.write "</tr>"
response.write "</table>"
response.write "</form>"
end function
sub deleteannounce(id)
dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="delete from [work] where info_id="&cstr(id)
conn.execute sql
if err.Number<>0 then
err.clear
response.write "删 除 失 败 !<br>"
end if
End sub
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -