<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<% 
Dim SQL,Rs
publishdate = Replace_Text(Request("publishdate"))
Key = Replace_Text(Request("JobName"))

SQL = "Select Ncid,Corid,JobName,Com_Name,Number,AddDate From [pH_Intro_Job] Where Flag=1 And JobName Like '%"&Key&"%'"

If publishdate <> "0" Then
  SQL = SQL & " And DateDiff(d,AddDate,Getdate())<="&publishdate
End if

SQL = SQL & "  Order by AddDate Desc"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open SQL,Conn,1,1
Rs.Pagesize = 20
Psize       = Rs.PageSize
PCount      = Rs.PageCount
RCount      = Rs.RecordCount

PageNo = Cint(Request.QueryString("PageNo"))
If PageNo < 1 Then
 PageNo = 1
Elseif PageNo > PCount Then
 PageNo = PCount
End if
If Not Rs.Eof Then Rs.AbsolutePage = PageNo

 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../Css/Style.css" type=text/css rel=stylesheet>
<title><%= Cls_WebName %> -- 招聘职位搜索(中介机构发布)</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td><!--#include file="../Header/Intro_User.asp" --></td>
  </tr>
</table>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td align="center">
<table width="950" border="0" cellspacing="0" cellpadding="4">
        <tr> 
          <td width="50%" height="25">共<Font color="#FF0000"><%= RCount %></Font>条 分<Font color="#FF0000"><%= PCount %></Font>页 | 当前第<Font color="#FF0000"><%= PageNo %></Font>页</td>
          <td width="50%" align="right">
		  <% 
		  If PageNo > 1 Then
		   Response.write "<a href=""?PageNo=1&publishdate="&publishdate&"&Jobname="&Key&""">首页</a>&nbsp;"
		   Response.write "<a href=""?PageNo="&PageNo-1&"&publishdate="&publishdate&"&Jobname="&Key&""">上页</a>&nbsp;"    
		  Else
		   Response.write "首页&nbsp;"
		   Response.write "上页&nbsp;" 
		  End if
		   %>
           <select name="menu1" onChange="MM_jumpMenu('parent',this,0)" style="width:40px;">
		    <% For i = 1 to PCount %>
                <option value="?PageNo=<%= i %>&publishdate=<%= publishdate %>&Jobname=<%= Key %>" <% If i = PageNo Then Response.write "Selected"%>><%=i%></option>
		    <% Next %>
           </select>
            <% 
		  If PageNo < PCount Then
		   Response.write "<a href=""?PageNo="&PageNo+1&"&publishdate="&publishdate&"&Jobname="&Key&""">下页</a>&nbsp;"
		   Response.write "<a href=""?PageNo="&PCount&"&publishdate="&publishdate&"&Jobname="&Key&""">尾页</a>"   
		  Else
		   Response.write "下页&nbsp;"
		   Response.write "尾页" 
		  End if
		   %>

		  
		  </td>
        </tr>
      </table>
      <table width="950" border="0" align="center" cellpadding="2" cellspacing="1">
        <tr align="center" bgcolor="#BF0500"> 
          <td width="15%" height="25"><strong><font color="#FFFFFF">职位编号</font></strong></td>
          <td width="30%" height="25"><strong><font color="#FFFFFF">职位名称</font></strong></td>
          <td width="25%" height="25"><strong><font color="#FFFFFF">单位名称</font></strong></td>
          <td width="15%" height="25"><strong><font color="#FFFFFF">招聘人数</font></strong></td>
          <td height="25"><strong><font color="#FFFFFF">加入时间</font></strong></td>
        </tr>
        <% 

For i = 1 to Psize
 If Rs.Eof Then Exit For
Ncid = Rs("Ncid")
Corid = Rs("Corid")
JobName = Rs("JobName")
Com_Name = Rs("Com_Name")
Number = Rs("Number")
AddDate = FormatDateTime(Rs("AddDate"),2)

Id = Year(AddDate)&Month(AddDate)&Cls_Ncidstr(Ncid)
If Number = 0 Then Number = "若干人" 
 %>
        <tr align="center"  <% If i mod 2 = 0 Then %> bgcolor="#f5f5f5" <% End if %>> 
          <td height="25"><a href="../Intro/Info/Job.asp?Corid=<%= Corid %>&Param=<%= Ncid %>" target="_blank"><%= Id %></a></td>
          <td height="25"><%= JobName %></td>
          <td height="25"><%= Com_Name %></td>
          <td height="25"><%= Number %></td>
          <td height="25"><%= AddDate %></td>
        </tr>
        <%
 Rs.Movenext 
Next
 %>
      </table>
      <table width="950" border="0" cellspacing="0" cellpadding="4">
        <tr> 
          <td width="50%" height="25">共<Font color="#FF0000"><%= RCount %></Font>条 分<Font color="#FF0000"><%= PCount %></Font>页 | 当前第<Font color="#FF0000"><%= PageNo %></Font>页</td>
          <td width="50%" align="right">
		  <% 
		  If PageNo > 1 Then
		   Response.write "<a href=""?PageNo=1&publishdate="&publishdate&"&Jobname="&Key&""">首页</a>&nbsp;"
		   Response.write "<a href=""?PageNo="&PageNo-1&"&publishdate="&publishdate&"&Jobname="&Key&""">上页</a>&nbsp;"    
		  Else
		   Response.write "首页&nbsp;"
		   Response.write "上页&nbsp;" 
		  End if
		   %>
           <select name="menu1" onChange="MM_jumpMenu('parent',this,0)" style="width:40px;">
		    <% For i = 1 to PCount %>
                <option value="?PageNo=<%= i %>&publishdate=<%= publishdate %>&Jobname=<%= Key %>" <% If i = PageNo Then Response.write "Selected"%>><%=i%></option>
		    <% Next %>
           </select>
            <% 
		  If PageNo < PCount Then
		   Response.write "<a href=""?PageNo="&PageNo+1&"&publishdate="&publishdate&"&Jobname="&Key&""">下页</a>&nbsp;"
		   Response.write "<a href=""?PageNo="&PCount&"&publishdate="&publishdate&"&Jobname="&Key&""">尾页</a>"   
		  Else
		   Response.write "下页&nbsp;"
		   Response.write "尾页" 
		  End if
		   %>

		  
		  </td>
        </tr>
      </table>
</td>
  </tr>
</table>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td>
      <!--#include file="../Include/Footer.asp" -->
    </td>
  </tr>
</table>

</body>
</html>
<% 
Rs.Close
Set Rs = Nothing
Call CloseDB
 %>
