<%dbdns="../../"%>
<!--#include file="../../inc/conn.asp"-->
<!--#include file="../cook.asp"-->
<%if fla6<>1 then
response.write "<script>alert('操作权限出错，您没有权限操作些功能');history.go(-1);</Script>"
Response.End 
end if%>
<%if request("Submit")="删 除" then
id=replace(request("id")," ","")
id=split(id,",")
for i=0 to UBound(id)
conn.execute("delete from dlxf_job_zp where dlxf_id=" & id(i))
next

elseif request("Submit")="审 核" then
id=replace(request("id")," ","")
id=split(id,",")
for i=0 to UBound(id)
conn.execute("update dlxf_job_zp set dlxf_key1=1 where dlxf_id="&id(i))
next
end if

%>
<script>
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }
</script>
<script>
function oa_tool1(){
window.parent.mm.rows="20,200,10,*";
}
</script>
<%=citycss%>
<body style="margin:5">
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#6C90D1" bordercolordark="#FFFFFF">
<form name="form1" method="post" action="job.asp">
<tr align=center bgcolor=#D6DFF7><td height=25 align=center><input type="text" name="word">　　<input type="submit" name="Submit" value="职位搜索">
　　<a href=job.asp?zc=yes>正常招聘</a>　<a href=job.asp?key3=yes>正常推荐</a>　<a href=job.asp?key1=yes>待审</a>　<a href=job.asp?gq=yes>过期</a>　<a href=job.asp?close=yes>关闭</a>　<a href=job.asp?cq=0>长期有效</a>　<a href=job.asp>全部</a></td></tr>
</form>
</table>

<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#6C90D1" bordercolordark="#FFFFFF">
<form name="from1" method="post" action="job.asp?word=<%=request("word")%>&zc=<%=request("zc")%>&key1=<%=request("key1")%>&key3=<%=request("key3")%>&close=<%=request("close")%>&gq=<%=request("gq")%>&cq=<%=request("cq")%>">
<tr align=center bgcolor=#D6DFF7>
<%
if request("word")<>"" then
sql="select * from dlxf_job_zp where ((dlxf_lastdate-"&dlxf_citytime&")>0 or dlxf_yxq=0) and dlxf_job_name like'%"&request("word")&"%' or dlxf_yq like'%"&request("word")&"%' and dlxf_key1=1 order by dlxf_id desc"
elseif request("zc")<>"" then
sql="select * from dlxf_job_zp where ((dlxf_lastdate-"&dlxf_citytime&")>0 or dlxf_yxq=0) and dlxf_key1=1 and dlxf_key2=1 order by dlxf_id desc"
elseif request("key1")<>"" then
sql="select * from dlxf_job_zp where ((dlxf_lastdate-"&dlxf_citytime&")>0 or dlxf_yxq=0) and dlxf_key1=0 and dlxf_key2=1 order by dlxf_id desc"
elseif request("key3")<>"" then
sql="select * from dlxf_job_zp where ((dlxf_lastdate-"&dlxf_citytime&")>0 or dlxf_yxq=0) and dlxf_key1=1 and dlxf_key2=1 and dlxf_key3=1 order by dlxf_id desc"
elseif request("cq")<>"" then
sql="select * from dlxf_job_zp where dlxf_yxq=0 and dlxf_key1=1 and dlxf_key2=1 order by dlxf_id desc"
elseif request("close")<>"" then
sql="select * from dlxf_job_zp where dlxf_key2=0 order by dlxf_id desc"
elseif request("gq")<>"" then
sql="select * from dlxf_job_zp where (dlxf_lastdate-"&dlxf_citytime&")<=0 and dlxf_yxq<>0 order by dlxf_id desc"
else
sql="select * from dlxf_job_zp order by dlxf_id desc"
end if


set rs=server.createobject("adodb.recordset")                     
rs.open sql,conn,1,1                     
if rs.eof and rs.bof then                     
	response.write "暂无内容"
else  
'分页的实现 
listnum=23
Rs.pagesize=listnum
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum
i=0
nn=request("page")
if nn="" then
n=0
else
nn=nn-1
n=listnum*nn
end if%>
 <td width="4%" height=22>编号</td>
 <td width=*>招聘职位<font color=red>(点击查看)</font></td>
 <td width="5%">点击</td>
 <td width="16%">添加时间</td>
 <td width="10%">到期时间</td>
 <td width="10%">剩余</td>
 <td width="5%">状态</td>
 <td width="5%">操作</td>
 <td width="5%">选择</td>
</tr>
<%do while not rs.eof and i<listnum
n=n+1%>
<tr align=center height=22>
 <td><%=n%></td>
 <td align=left>&nbsp;<a href=# onClick="javascript:window.open('job_view.asp?id=<%=rs("dlxf_id")%>','_n','width=780,height=400,scrollbars=yes')"><%=rs("dlxf_job_name")%></a> <%if rs("dlxf_key1")=0 then%><font color=red>[待审]</font><%end if%><%if rs("dlxf_key3")=1 then%><font color=green><strong>[推荐]</strong></font><%end if%></td>
 <td><%=rs("dlxf_htc")%></td>
 <td><%=rs("dlxf_date")%></td>
 <td><%=rs("dlxf_lastdate")%></td>
<%if rs("dlxf_yxq")=0 then
aaa="长期"
else
if rs("dlxf_lastdate")-date()<0 then
aaa="-/"&rs("dlxf_yxq")
else
aaa=rs("dlxf_lastdate")-date()&"/"&rs("dlxf_yxq")
end if
end if
%>
 <td title="剩余天数/服务天数<%=vbCrLf%>“-”表示已过期"><strong><%=aaa%></strong></td>
 <td><%if rs("dlxf_key2")=1 then%>开通<%else%><font color=red>关闭</font><%end if%></td>
 <td><a href=lx.asp?id=<%=rs("dlxf_id")%> onClick="oa_tool1()" target=top>操作</a></td>
 <td><input type="checkbox" name="ID" value="<%=rs("dlxf_id")%>" style="border:0"></td>
</tr>
<%rs.movenext 
i=i+1 
j=j-1
loop%>
<tr>
<%filename="job.asp?word="&request("word")&"&zc="&request("zc")&"&key1="&request("key1")&"&key3="&request("key3")&"&close="&request("close")&"&gq="&request("gq")&"&cq="&request("cq")&""%>
<td colspan=10 align=right bgcolor=#6C90D1><%=Rs.recordcount%> 条招聘&nbsp;&nbsp;<%=listnum%> 条招聘/页&nbsp;&nbsp;共 <%=Rs.pagecount%> 页 
      <% if page=1 then %>
      <%else%>
      <a href=<%=filename%>><strong>|<<</strong></a>&nbsp; 
      <a href=<%=filename%>&page=<%=page-1%>><strong><<</strong></a>&nbsp; 
      <a href=<%=filename%>&page=<%=page-1%>><b>[<%=page-1%>]</b></a>&nbsp; 
      <%end if%>
<% if Rs.pagecount=1 then %>
<%else%>
	  <b>[<%=page%>]</b>
<%end if%>
	  <% if Rs.pagecount-page <> 0 then %>
      <a href=<%=filename%>&page=<%=page+1%>><b>[<%=page+1%>]</b></a>&nbsp; 
      <a href=<%=filename%>&page=<%=page+1%>><strong>>></strong></a>&nbsp; 
      <a href=<%=filename%>&page=<%=Rs.pagecount%>><strong>>>|</strong></a>&nbsp; 
	  <%end if%>　<input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form)" style="border:0">全选　<input type="submit" name="Submit" value="审 核"<%if request("key1")="" then%> disabled<%end if%>>　<input type="submit" name="Submit" value="删 除">&nbsp;&nbsp;</td>
<%end if%></tr>
</form>
</table>
