<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/Commoncode.asp"-->
<!--#include file="../inc/CommonFunction.asp"-->
<%link="person_searchresult.asp"%>
<!--#include file="checkpmember.asp" -->
<%
numbers=Trim(Request("numbers"))
If numbers<>"" And IsNumeric(numbers) Then
	numbers=CLng(numbers)
Else
	numberss=Trim(Request("numberss"))
	If numberss<>"" And IsNumeric(numberss) Then
		numbers=CLng(numberss)
	Else
		numbers=20
	end if
End If
taxis=Trim(Request("taxis"))
If taxis<>"" And IsNumeric(taxis) Then
    taxis=CLng(taxis)
Else
	taxiss=Trim(Request("taxiss"))
	If taxiss<>"" And IsNumeric(taxiss) Then
		taxis=CLng(taxiss)
	Else
		taxis=1
	end if
End If
detail=Trim(Request("detail"))
If detail<>"" And IsNumeric(detail) Then
    detail=CLng(detail)
Else
	details=Trim(Request("details"))
	If details<>"" And IsNumeric(details) Then
		detail=CLng(details)
	Else
		detail=2
	end if
End If
usergroup=Replace(trim(request("usergroup")),"'","")
trade=Replace(trim(request("trade")),"'","")
position=Replace(trim(request("position")),"'","")
workadd=Replace(trim(request("workadd")),"'","")
datetime=Replace(trim(request("datetime")),"'","")
profession=Replace(trim(request("profession")),"'","")
edu1=Replace(trim(request("edu1")),"'","")
edu2=Replace(trim(request("edu2")),"'","")
experience1=Replace(trim(request("experience1")),"'","")
experience2=Replace(trim(request("experience2")),"'","")
sex=Replace(trim(request("sex")),"'","")
age=Replace(trim(request("age")),"'","")

keyword=Replace(trim(request("keyword")),"'","")
if keyword="关键字搜索..." then
keyword=""
end if
keywordtype=trim(request("keywordtype"))
if keywordtype<>"" And IsNumeric(keywordtype) then
keywordtype=Clng(keywordtype)
else
keywordtype=3
end if

Dim Action
Dim page,si
Dim totalPut
MaxPerpage=numbers
strFileName="person_searchresult.asp?numberss="&numbers&"&taxiss="&taxis&"&details="&detail&"&usergroup="&usergroup&"&trade="&trade&"&position="&position&"&workadd="&workadd&"&datetime="&datetime&"&datetimes="&datetimes&"&keyword="&keyword&"&keywordtype="&keywordtype&"&profession="&profession&"&edu1="&edu1&"&edu2="&edu2&"&sex="&sex&"&experience1="&experience1&"&experience2="&experience2&"&age="&age&""
page=Trim(Request("page"))
If page<>"" And IsNumeric(page) Then
	If page<1 Or Len(page)>10 Then
		page=1
	Else
    	page=CLng(page)
	End If
Else
	page=1
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>个人会员中心--<%=SiteTitle%></title>
<script language="javascript">
function confirmX(num)
{
	var ids = document.getElementsByName("checks");
	var check=false;
	var a=0;
	if (ids != null) 
	{
		for (i=0; i<ids.length; i++) 
		{
			var obj = ids(i);
			if (obj.checked==true)
			{
				check=true;
				a+=1
			}
		}
		if(check==false){alert("请选择操作对象！");return false;}
	}
	if(num==1)
	{
		document.simplesearch.action="person_resumesend.asp?action=hire";
		document.simplesearch.target="_blank";
		document.simplesearch.submit();		
	}
	if(num==2)
	{
		document.simplesearch.action="person_resumesend.asp?action=hire";
		document.simplesearch.target="_blank";
		document.simplesearch.submit();		
	}
	if(num==3)
	{
		document.simplesearch.action="person_favoriteadd.asp";
		document.simplesearch.target="_blank";
		document.simplesearch.submit();	
	}
	return false;	
}
function checkAll(box1) {
    var ids = document.getElementsByName("checks");
	if (ids != null) {
		for (i=0; i<ids.length; i++) {
			var obj = ids(i);
			obj.checked = box1.checked;
		}
	}
}
</script>
<link href="../css/<%=MainWebCss%>.css" rel="stylesheet" type="text/css" />
<link href="../member/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="memmenul">
<div class="leftmenutit"><span>职位搜索结果</span></div>
<div class="searchmaincon">
<%Set srcrs= Server.CreateObject(FR_HR_RS)
srcsql="select * from job_c_hire where hire_status=1"
srcsql=srcsql&" and datediff("&FR_HR_d&",hire_enddate,"&FR_HR_Now&")<=0"
if usergroup<>"" and IsNumeric(usergroup) then
	if usergroup<>3 and usergroup<>0 then
		srcsql=srcsql&" and hire_type="&usergroup
	end if
end if
if trade<>"" and trade<>"0000" then
mystring=split(trade,",")
  for i=0 to ubound(mystring)
  if i=0 then
    srcsql=srcsql&" and (hire_trade  like '%"&trim(mystring(i))&"%'"
   else
    srcsql=srcsql&" or hire_trade like '%"&trim(mystring(i))&"%'"
   end if
  next
   srcsql=srcsql&")"
end if
if position<>"" and position<>"0000" then
mystring=split(position,",")
  for i=0 to ubound(mystring)
  if i=0 then
    srcsql=srcsql&" and (hire_position like '%"&trim(mystring(i))&"%'"
   else
    srcsql=srcsql&" or hire_position like '%"&trim(mystring(i))&"%'"
   end if
  next
   srcsql=srcsql&")"
end if
if workadd<>"" and workadd<>"0000" then
mystring=split(workadd,",")
  for i=0 to ubound(mystring)
  if i=0 then
    srcsql=srcsql&" and (hire_workadd  like '%"&trim(mystring(i))&"%'"
   else
    srcsql=srcsql&" or hire_workadd like '%"&trim(mystring(i))&"%'"
   end if
  next
   srcsql=srcsql&")"
end if
if datetime<>"" and IsNumeric(datetime) then
	if datetime<>0 then 
		srcsql=srcsql&" and datediff("&FR_HR_d&",hire_announcedate,"&FR_HR_Now&"-"&datetime&")<=0"
	end if
end if
if keyword<>"" then
	select case keywordtype
	case 1
	srcsql=srcsql&" and hire_place like '%"&keyword&"%'"
	case 2
	srcsql=srcsql&" and hire_comname like '%"&keyword&"%'"
	case else
	srcsql=srcsql&" and (hire_place like '%"&keyword&"%' or hire_comname like '%"&keyword&"%')"
	end select
end if
if profession<>"" and profession<>"0000" then
mystring=split(profession,",")
	for i=0 to ubound(mystring)
	if i=0 then
		srcsql=srcsql&" and (hire_profession like '%"&trim(mystring(i))&"%'"
	else
		srcsql=srcsql&" or hire_profession like '%"&trim(mystring(i))&"%'"
	end if
	next
		srcsql=srcsql&")"
end if
if edu1<>"" and IsNumeric(edu1) then
srcsql=srcsql&" and hire_edu>="&edu1
end if
if edu2<>"" and IsNumeric(edu2) then
srcsql=srcsql&" and hire_edu<="&edu2
end if
if sex<>"" and IsNumeric(sex) then
	if sex<>0 then
		select case sex
		case 1
		srcsql=srcsql&" and hire_sex=1"
		case 2
		srcsql=srcsql&" and hire_sex=2"
		end select
	end if
end if
if experience1<>"" and IsNumeric(experience1) then
	srcsql=srcsql&" and hire_experience>="&experience1
end if
if experience2<>"" and IsNumeric(experience2) then
	srcsql=srcsql&" and hire_experience<="&experience2
end if

if age<>"" then
	if age<>0 then
		srcsql=srcsql&" and hire_age1<="&age&" and hire_age2>="&age&""
	end if
end if
select case taxis
	case 1
	srcsql=srcsql&" order by hire_command desc,hire_announcedate desc"
	case 2
	srcsql=srcsql&" order by hire_command desc,hire_announcedate asc"
	case 3
	srcsql=srcsql&" order by hire_command desc,hire_visitcount desc"
end select
srcrs.open srcsql,conn,1,1
if srcrs.eof and srcrs.bof then
Response.Write"<br><li>对不起，尚未找到符合您查询的结果！</li>"
else
	totalPut=srcrs.recordcount
	if (page-1)*MaxPerpage>totalput then
		if (totalPut mod MaxPerpage)=0 then
			page= totalPut \ MaxPerpage
		else
			page= totalPut \ MaxPerpage + 1
		end if
	end if
	if page=1 then
		Call MainInfo()
	else
		if (page-1)*MaxPerpage<totalPut then
			srcrs.move  (page-1)*MaxPerpage
			dim bookmark
			bookmark=srcrs.bookmark
			Call MainInfo()
		else
			page=1
			Call MainInfo()
		end if
	end if
end if
srcrs.close
set srcrs=nothing
%>
<%Sub MainInfo()%>
<form name="simplesearch" action="<%=InstallDir%>search/hire_searchresult.asp" method="post">
  <table width="100%" border="0" align="center" cellpadding="4" cellspacing="0">
    <tr>
      <td width="10%" style="background:url(../skin/System/tit_bg.gif) bottom repeat-x"><input type="checkbox" name="checkbox" value="checkbox" onClick="javascript: checkAll(this)" /> 
        全选 </td>
      <td width="90%" align="right" style="background:url(../skin/System/tit_bg.gif) bottom repeat-x"><!--<input name="Input" type="button" value="显示选中的职位" class="inputs" onClick="confirmX(1);" /> -->
        <input name="Input2" type="button" value="申请选中的职位" class="inputs" onClick="confirmX(2);" /> 
        <input name="Input3" type="button" value="放入收藏夹" class="inputs" onClick="confirmX(3);" /> 
        每页显示<select name="numbers" size="1" style="z-index:0" onchange="javascript:window.location='<%=JoinChar(strFileName)%>numbers='+this.options[this.selectedIndex].value;"><option value="10" <%if numbers=10 then Response.Write("selected")%>>10条</option><option value="20" <%if numbers=20 then Response.Write("selected")%>>20条</option><option value="50" <%if numbers=50 then Response.Write("selected")%>>50条</option></select> <select name="taxis" size="1" onchange="javascript:window.location='<%=JoinChar(strFileName)%>taxis='+this.options[this.selectedIndex].value;"><option value="1" <%if taxis=2 then Response.Write("selected")%> >按发布时间降序</option><option value="2" <%if taxis=2 then Response.Write("selected")%>>按发布时间升序</option><option value="3" <%if taxis=3 then Response.Write("selected")%>>按关注度排序</option></select> 查看<select name="detail" size="1" onchange="javascript:window.location='<%=JoinChar(strFileName)%>detail='+this.options[this.selectedIndex].value;"><option value="1" <%if detail=1 then Response.Write("selected")%> >列表</option><option value="2" <%if detail=2 then Response.Write("selected")%>>明细</option></select></td>
    </tr>
  </table>
  <%if detail=1 then%>
  <table width="100%" border="0" align="center" cellpadding="4" cellspacing="0" style=" background-color:#D9F3FF;border-bottom:1px #D9E9FF solid;white-space:normal;word-break:break-all;overflow:auto;">
    <tr>
      <td width="25%">职位名称</td>
      <td width="35%">公司名称</td>
      <td width="30%">工作地点</td>
      <td width="10%">发布时间</td>
    </tr>
  </table>
<%end if
si=0
do while not srcrs.eof
if detail=1 then
%>
  <table width="100%" border="0" align="center" cellpadding="4" cellspacing="0" onmouseover="this.style.background='#F7F8FE'" onmouseout="this.style.background=''" style="border-bottom:1px #D9E9FF solid;white-space:normal;word-break:break-all;overflow:auto;">
    <tr <%if srcrs("hire_command")="1" then Response.Write "bgcolor=""#FDF1CA"""%>>
      <td width="25%"><input name="checks" type="checkbox" value="<%=srcrs("hire_id")%>" /> <a href="<%=FormatLink(srcrs("hire_announcedate"),2,3,srcrs("hire_id"),0)%>" target="_blank"><%=left(srcrs("hire_place"),10)%></a> <%if srcrs("hire_command")="1" then%><img src="../Skin/System/commend.gif" width="16" height="15" align="absmiddle" /><%end if%></td>
      <td width="35%"><A href="<%=FormatLink(0,2,1,srcrs("company_id"),0)%>" target="_blank"><%=left(srcrs("hire_comname"),20)%></A></td>
      <td width="30%"><%=left(Hireworkadds(srcrs("hire_workadd")),18)%></td>
      <td width="10%"><%=FormatDate(srcrs("hire_announcedate"),8)%></td>
    </tr>
  </table>
<%else%>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="0" onmouseover="this.style.background='#F7F8FE'" onmouseout="this.style.background=''" style="border-bottom:1px #D9E9FF solid;white-space:normal;word-break:break-all;overflow:auto;">
	<tr <%if srcrs("hire_command")="1" then Response.Write "bgcolor=""#FDF1CA"""%>>
		<td width="3%"><input name="checks" type="checkbox" value="<%=srcrs("hire_id")%>" /></td>
	    <td width="26%"><span style="width:100%; font-weight:bold; font-size:14px">
		  <a href="<%=FormatLink(srcrs("hire_announcedate"),2,3,srcrs("hire_id"),0)%>" target="_blank"><font color="#0066CC"><u><%=replace(srcrs("hire_place"),keyword,"<font color=red>"&keyword&"</font>")%></u></font></a></span> <%if srcrs("hire_command")="1" then%><img src="../Skin/System/commend.gif" width="16" height="15" align="absmiddle" /><%end if%>　<%=FormatDate(srcrs("hire_announcedate"),8)%></td>
	    <td width="24%"><A href="<%=FormatLink(0,2,1,srcrs("company_id"),0)%>" target="_blank"><strong><FONT color="#0033cc"><%=replace(srcrs("hire_comname"),keyword,"<font color=red>"&keyword&"</font>")%></FONT></strong></A></td>
	    <td width="38%"><font color="#666666" style="font-weight:normal"><%=Hireworkadds(srcrs("hire_workadd"))%></font></td>
	    <td width="9%"><%=Hirepay(srcrs("hire_pay"))%></td>
	</tr>
	<tr <%if srcrs("hire_command")="1" then Response.Write "bgcolor=""#FDF1CA"""%>>
		<td>	</td>
	    <td colspan="4"><strong>工作经验：</strong><%=Hireexperience(srcrs("hire_experience"))%>　|　<strong>学历要求：</strong><%=Hireedu(srcrs("hire_edu"))%>　|　<strong>专业要求：</strong><%=Hireprofession(srcrs("hire_profession"))%>　|　<strong>招聘人数：</strong><%=srcrs("hire_number")%>人</td>
	    </tr>
	<tr <%if srcrs("hire_command")="1" then Response.Write "bgcolor=""#FDF1CA"""%>>
		<td>&nbsp;</td>
	    <td colspan="3">【职位描述】<%=left(CheckStrHTML(srcrs("hire_introduce")),110)%>　<a href="<%=FormatLink(srcrs("hire_announcedate"),2,3,srcrs("hire_id"),0)%>" target="_blank">更详细...</a></td>
	    <td><input name="" type="button" value="申请职位" class="inputs" onclick="window.open('../person/person_resumesend.asp?action=hire&checks=<%=srcrs("hire_id")%>')"/></td>
	</tr>
</table>
<%end if
si=si+1
if si>=MaxPerPage then exit do
srcrs.movenext
loop
%>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="0">
  <tr>
    <td width="10%">&nbsp;</td>
    <td width="90%"><%If totalput>0 Then
	Call Showpage(strFileName,totalput,MaxPerPage,false,true,"条")
End If%></td>
  </tr>
  <tr>
    <td style="background:url(../skin/System/tit_bg.gif) bottom repeat-x"><input type="checkbox" name="checkbox" value="checkbox" onClick="javascript: checkAll(this)" /> 
        全选 </td>
    <td align="right" style="background:url(../skin/System/tit_bg.gif) bottom repeat-x"><!--<input name="Input" type="button" value="显示选中的职位" class="inputs" onClick="confirmX(1);" /> -->
        <input name="Input2" type="button" value="申请选中的职位" class="inputs" onClick="confirmX(2);" /> 
        <input name="Input3" type="button" value="放入收藏夹" class="inputs" onClick="confirmX(3);" /> 
        每页显示<select name="numbers" size="1" style="z-index:0" onchange="javascript:window.location='<%=JoinChar(strFileName)%>numbers='+this.options[this.selectedIndex].value;"><option value="10" <%if numbers=10 then Response.Write("selected")%>>10条</option><option value="20" <%if numbers=20 then Response.Write("selected")%>>20条</option><option value="50" <%if numbers=50 then Response.Write("selected")%>>50条</option></select> <select name="taxis" size="1" onchange="javascript:window.location='<%=JoinChar(strFileName)%>taxis='+this.options[this.selectedIndex].value;"><option value="1" <%if taxis=2 then Response.Write("selected")%> >按发布时间降序</option><option value="2" <%if taxis=2 then Response.Write("selected")%>>按发布时间升序</option><option value="3" <%if taxis=3 then Response.Write("selected")%>>按关注度排序</option></select> 查看<select name="detail" size="1" onchange="javascript:window.location='<%=JoinChar(strFileName)%>detail='+this.options[this.selectedIndex].value;"><option value="1" <%if detail=1 then Response.Write("selected")%> >列表</option><option value="2" <%if detail=2 then Response.Write("selected")%>>明细</option></select></td>
  </tr>
</table>
</form>
<%End Sub%>
</div>
</div>
<%conn.close:set conn=nothing%>