<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/Commoncode.asp"-->
<!--#include file="../inc/CommonFunction.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
trade=Replace(trim(request("trade")),"'","")
trades=Replace(trim(request("trades")),"'","")
position=Replace(trim(request("position")),"'","")
positions=Replace(trim(request("positions")),"'","")
workadd=Replace(trim(request("workadd")),"'","")
workadds=Replace(trim(request("workadds")),"'","")
datetime=Replace(trim(request("datetime")),"'","")
datetimes=Replace(trim(request("datetimes")),"'","")
keyword=CheckStrHTML(trim(request("keyword")))
if keyword="输入公司/职位关键字" then
keyword=""
end if
keywordtype=trim(request("keywordtype"))
if keywordtype<>"" And IsNumeric(keywordtype) then
keywordtype=Clng(keywordtype)
end if
Dim Action
Dim page,si
Dim totalPut
MaxPerpage=numbers
strFileName="hire_searchresult.asp?numberss="&numbers&"&taxiss="&taxis&"&details="&detail&"&trade="&trade&"&trades="&trades&"&position="&position&"&positions="&positions&"&workadd="&workadd&"&workadds="&workadds&"&datetime="&datetime&"&datetimes="&datetimes&"&keyword="&keyword&"&keywordtype="&keywordtype&""
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" />
<meta http-equiv="Content-Language" content="gb2312" />
<meta content="all" name="robots" />
<meta name="author" content="web@yjys.net,嘉挚科技" />
<meta name="Copyright" content="www.yjys.net,版权所有,请勿转载" />
<title>职位搜索结果-职位搜索中心-<%=SiteTitle%></title>
<link href="../css/<%=MainWebCss%>" rel="stylesheet" type="text/css">
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
</head>
<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/person_resumesend.asp?action=hire";
		document.simplesearch.target="_blank";
		document.simplesearch.submit();		
	}
	if(num==2)
	{
		document.simplesearch.action="../person/person_resumesend.asp?action=hire";
		document.simplesearch.target="_blank";
		document.simplesearch.submit();		
	}
	if(num==3)
	{
		document.simplesearch.action="../person/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>
<body>
<%call head()%>
<div class="container">
	<div class="navdh">您现在的位置：<a href="<%=Siteurl%>"><%=Sitename%></a> &gt;&gt; 职位搜索结果</div>
</div>
<div class="container">
<div class="maintabal">
	<div class="maintabalh">
		<div class="main_tit">行业招聘</div>
		<div class="main_con"><%=GetTradeList("hire_searchresult.asp",100,"[order] asc","_self")%></div>
	</div>
</div>
<div class="maintabar">
<div class="main_tit">职位搜索结果</div>
<div class="main_con"><form name="hiresimplesearch" action="hire_searchresult.asp?numberss=<%=numbers%>&taxiss=<%=taxis%>&details=<%=detail%>" method="post">
<ul style="width:100%;"><li style="width:33%">行　业：<input type="hidden" value="<%=trade%>" name="trade"><input type="text" name="trades" value="<%if trades<>"" then%><%=trades%><%else%>选择行业<%end if%>" class="search_case" onClick="JumpSearchLayers(2,0,4,'hiresimplesearch','trades','trade');" readonly /></li>
<li style="width:33%">职　位：<input type="hidden" value="<%=position%>" name="position"><input type="text" name="positions" value="<%if positions<>"" then%><%=positions%><%else%>选择职位<%end if%>" class="search_case" onClick="JumpSearchLayers(0,0,1,'hiresimplesearch','positions','position');" readonly /></li>
<li style="width:34%">工作地：<input type="hidden" value="<%=workadd%>" name="workadd"><input type="text" name="workadds" value="<%if workadds<>"" then%><%=workadds%><%else%>选择地点<%end if%>" class="search_case" onClick="JumpSearchLayers(0,0,2,'hiresimplesearch','workadds','workadd');" readonly /></li></ul>
<ul><li style="width:33%">日　期：<input type="hidden" value="<%=datetime%>" name="datetime"><input type="text" name="datetimes" value="<%if datetimes<>"" then%><%=datetimes%><%else%>选择日期<%end if%>" class="search_case" onClick="JumpSearchDate('hiresimplesearch','datetimes','datetime');" readonly /></li>
<li style="width:67%">关键字：<input name="keyword" type="text" size="15" class="input165" value="<%=keyword%>" />　<input name="keywordtype" type="radio" value="1" checked />公司 <input name="keywordtype" type="radio" value="2" checked />职位　<input type="submit" name="Submit3" value="搜 索" class="inputs" /></li></ul></form>
</div>
<div class="searchmaincon">
<%Set rs= Server.CreateObject(FR_HR_RS)
sql="select hire_id,hire_announcedate,hire_place,company_id,hire_comname,hire_workadd,hire_introduce,hire_command from job_c_hire where hire_status=1"
sql=sql&" and datediff("&FR_HR_d&",hire_enddate,"&FR_HR_Now&")<=0"
if trade<>"" then
sql=sql&" and hire_trade like '%"&trade&"%'"
end if
if position<>"" then
sql=sql&" and hire_position like '%"&position&"%'"
end if
if workadd<>"" then
sql=sql&" and hire_workadd like '%"&workadd&"%'"
end if
if datetime<>"" and IsNumeric(datetime) then
	sql=sql&" and datediff("&FR_HR_d&",hire_announcedate,"&FR_HR_Now&"-"&datetime&")<=0"
end if
if keyword<>"" then
	if keywordtype<>"" then
		if keywordtype=1 then
		sql=sql&" and (hire_comname like '%"&keyword&"%' or hire_introduce like '%"&keyword&"%')"
		else
		sql=sql&" and (hire_place like '%"&keyword&"%' or hire_introduce like '%"&keyword&"%')"
		end if
	else
		sql=sql&" and (hire_comname like '%"&keyword&"%' or hire_place like '%"&keyword&"%' or hire_introduce like '%"&keyword&"%')"
	end if
end if
select case taxis
	case 1
	sql=sql&" order by hire_command desc,hire_announcedate desc"
	case 2
	sql=sql&" order by hire_command desc,hire_announcedate asc"
	case 3
	sql=sql&" order by hire_command desc,hire_visitcount desc"
end select
rs.open sql,conn,1,1
if rs.eof and rs.bof then
Response.Write"<br><li>对不起，尚未找到符合您查询的结果！</li>"
else
	totalPut=rs.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
			rs.move  (page-1)*MaxPerpage
			dim bookmark
			bookmark=rs.bookmark
			Call MainInfo()
		else
			page=1
			Call MainInfo()
		end if
	end if
end if
rs.close
set rs=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="7%" 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="93%" 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 rs.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 rs("hire_command")="1" then Response.Write "bgcolor=""#FDF1CA"""%>>
      <td width="25%"><input name="checks" type="checkbox" value="<%=rs("hire_id")%>" /> <a href="<%=FormatLink(rs("hire_announcedate"),2,3,rs("hire_id"),0)%>" target="_blank"><%=left(rs("hire_place"),10)%></a> <%if rs("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,rs("company_id"),0)%>" target="_blank"><%=left(rs("hire_comname"),20)%></A></td>
      <td width="30%"><%=left(Hireworkadds(rs("hire_workadd")),18)%></td>
      <td width="10%"><%=FormatDate(rs("hire_announcedate"),8)%></td>
    </tr>
  </table>
<%else%>
<table width="100%" border="0" align="center" cellpadding="2" 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 rs("hire_command")="1" then Response.Write "bgcolor=""#FDF1CA"""%>>
		<td><span style="width:100%; font-weight:bold; font-size:14px">
		  <input name="checks" type="checkbox" value="<%=rs("hire_id")%>" /> <a href="<%=FormatLink(rs("hire_announcedate"),2,3,rs("hire_id"),0)%>" target="_blank"><font color="#0066CC"><u><%=replace(rs("hire_place"),keyword,"<font color=red>"&keyword&"</font>")%></u></font></a></span> <%if rs("hire_command")="1" then%><img src="../Skin/System/commend.gif" width="16" height="15" align="absmiddle" /><%end if%></td>
	</tr>
	<tr <%if rs("hire_command")="1" then Response.Write "bgcolor=""#FDF1CA"""%>>
		<td><li style="width:70%; font-weight:bold; color:#333333; margin:0;"><A href="<%=FormatLink(0,2,1,rs("company_id"),0)%>" target="_blank"><FONT color="#333333"><%=replace(rs("hire_comname"),keyword,"<font color=red>"&keyword&"</font>")%></FONT></A><font color="#666666" style="font-weight:normal"> （工作地点:<%=Hireworkadds(rs("hire_workadd"))%>）</font></li>
	<li style="width:18%; margin:0;">发布时间：<%=FormatDate(rs("hire_announcedate"),8)%></li>
	<li style="width:12%; margin:0;"><input name="" type="button" value="申请职位" class="inputs" onClick="window.open('../person/person_resumesend.asp?action=hire&checks=<%=rs("hire_id")%>')"/></li></td>
	</tr>
	<tr <%if rs("hire_command")="1" then Response.Write "bgcolor=""#FDF1CA"""%>>
		<td>职位描述:<%hire_introduce=CheckStrHTML(rs("hire_introduce"))
		if instr(hire_introduce,keyword)>55 then
		hire_introduce=mid(hire_introduce,instr(hire_introduce,keyword)-55)
		end if
		hire_introduce=left(hire_introduce,110)
		Response.Write replace(hire_introduce,keyword,"<font color=red>"&keyword&"</font>")
		%></td>
	</tr>
</table>
<%end if
si=si+1
if si>=MaxPerPage then exit do
rs.movenext
loop
%>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="0">
  <tr>
    <td width="7%">&nbsp;</td>
    <td width="93%" align="right"><%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>
</div>
<div class="container">
	<div class="copyright"><center><%call bottom()%></center></div>	
</div>
<div id="bodyly" style="position:absolute;top:0px;FILTER: alpha(opacity=80);background-color:#333; z-index:0;left:0px;display:none;"></div>
<script language = "JavaScript" src="<%=InstallDir%>Js/gettrade.js"></script>
<script language = "JavaScript" src="<%=InstallDir%>Js/getposition.js"></script>
<script language = "JavaScript" src="<%=InstallDir%>Js/GetProvince.js"></script>
<script language = "JavaScript" src="<%=InstallDir%>Js/getprofession.js"></script>
<div id="SearchDivhire" style="border:1px #8BC3F6 solid; position:absolute;background-color:#FFFFFF;width:560px;font-size:12px;  z-index:999; display:none;">
	<div class="memmenul">
		<div style="width:538px; font-size:13px;color:#166AB6; font-weight:bold;" class="leftmenutit"><span style="float:right;font-size:12px; padding-right:10px; font-weight:normal; cursor:pointer;" onClick="unSearchLayers();">[关闭]</span><span id="wintit"></span></div>
		<div style="width:100%;">
			<div id="hiretypes" style="margin-left:20px; margin-top:10px;"></div>
			<div id="hiretype" style="margin-left:20px; width:540px;"></div>
		</div>
	</div>
</div>
</body>
</html>
<script language="javascript" src="../js/searchjs.js"></script>