<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<!--#include file="cinfo.asp"-->
<!--#include file="../inc/char.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/sql.asp"-->
<%
	end if
	action=ReplaceBadChar(Request("action"))
	id=Trim(Request.Form("j_id"))
	
	if action="delete" then
		sql="delete from zp_person where id in("&id&") and cuname='"& ReplaceBadChar(Request.Cookies("admin_company_name")) &"'"
		conn.Execute sql
		response.write"<SCRIPT language=JavaScript>alert('人才信息删除成功，现在正为您返回，请稍等');"
		response.write"window.location.href = 'msjl.asp'"&" </script>"
		response.end
	end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<LINK href="images/css.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.style4 {color: #000000}
-->
</style>
</head>
<script language="JavaScript">
function checkBoxStatus() {
    var someBoxChecked=false;
      if (document.all.JID_BOX!=null) {
       if (document.all.JID_BOX.length==null) {
         if (document.all.JID_BOX.checked==true) {
          someBoxChecked=true;
        }
      } else {
        for (var i=0 ;i<document.all.JID_BOX.length;i++) {
          if (document.all.JID_BOX[i].checked==true){
            someBoxChecked=true;
            break;
          }
        }
      }
    }
     if (!someBoxChecked) {
      return false;
    } else {
      return true;
    }
  }

function deleteJobs() {
  if (!checkBoxStatus()) {
    alert("请选中至少一个人才信息！");
    return ;
  }
  document.zwgl.action.value='delete';
  if (confirm("是否确定要删除该人才信息？")) {
    document.zwgl.submit();
  }
}
function checkAll() {
  if (document.all.JID_BOX!=null) {
      if (document.all.JID_BOX.length==null) {
        document.all.JID_BOX.checked=document.all.CKALL.checked;
      } else {
        for (var i=0;i<document.all.JID_BOX.length;i++) {
          document.all.JID_BOX[i].checked=document.all.CKALL.checked;
        }
      }
  }
}
function cloneJob() {
if (!checkBoxStatus()) {
    alert("请选中至少一个人才信息！");
    return ;
  }
  var jidString="";
if (document.all.JID_BOX.length==null) {
  if (document.all.JID_BOX.checked==true) {
    jidString=document.all.JID_BOX.value;
  }
} else {
  for (var i=0 ;i<document.all.JID_BOX.length;i++) {
    if (document.all.JID_BOX[i].checked==true){
      if (jidString=="") {
        jidString=document.all.JID_BOX[i].value;
      } else {
        jidString=jidString+","+document.all.JID_BOX[i].value;;
      }
    }
  }
}
  if (jidString=="") {
    alert("请至少选择一份人才信息来克隆！");
    return ;
  }
  document.clonejobform.jidlist.value=jidString;
  document.clonejobform.submit();
}
</script>
<body>
<!--#include file="bottom.asp"-->
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top" bgcolor="#FFFFFF">
    <form name="zwgl" action="?" method=post>
        <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="1" style="border:1 solid #cccccc;">
          <tr align="center" valign="middle" bgcolor="#D2E9FB">
            <td height="30" colspan="2" bordercolorlight="#999999" bordercolordark="#f3f3f3" bgcolor="#D2E9FB"><span class="style4">姓名</span></td>
            <td bordercolorlight="#999999" bordercolordark="#f3f3f3" bgcolor="#D2E9FB"><span class="style4">年龄</span></td>
            <td width="54" bordercolorlight="#999999" bordercolordark="#f3f3f3"><span class="style4">学历</span></td>
            <td width="111" bordercolorlight="#999999" bordercolordark="#f3f3f3"><span class="style4">毕业学校</span></td>
            <td width="106" bordercolorlight="#999999" bordercolordark="#f3f3f3">所学专业</td>
            <td width="103" bordercolorlight="#999999" bordercolordark="#f3f3f3" bgcolor="#D2E9FB"><span class="style4">联系电话</span></td>
            <td width="166" bordercolorlight="#999999" bordercolordark="#f3f3f3" bgcolor="#D2E9FB"><span class="style4">期望职位</span></td>
            <td width="148" bordercolorlight="#999999" bordercolordark="#f3f3f3" bgcolor="#D2E9FB"><span class="style4">入库时间</span></td>
            <td width="106" bordercolorlight="#999999" bordercolordark="#f3f3f3" bgcolor="#D2E9FB"><font color="#FF0000">招聘状态</font></td>
          </tr>
<%
	uname=ReplaceBadChar(Request.Cookies("admin_company_name"))
	dim i,intPage,page,pre,last,filepath'定义变量
	set rs_user = server.CreateObject("adodb.recordset")'创建对象
	sql="select * from zp_person where cuname='"&uname&"' order by id desc"'定义SQL语句
	rs_user.PageSize = 20 '这里设定每页显示的记录数
	rs_user.CursorLocation = 3
	rs_user.Open sql,conn,0,2,1 '这里执行你查询SQL并获得结果记录集
	if rs_user.eof and rs_user.bof then
%>
          <tr align="center" bgcolor="#F9F9F9" onMouseOver="this.style.backgroundColor='F0F0F0'" onMouseOut ="this.style.backgroundColor='FFFFFF'">
            <td height="25" colspan="10"><font color="#990000">您 暂 时 还 没 有 邀 请 人 才 加 入 </font></td>
          </tr>	
<%
	else
	pre = true
	last = true
	page = trim(Request.QueryString("page"))'变量是跳转页面时的值

	if len(page) = 0 then
		intpage = 1
		pre = false
	else
		if cint(page) =< 1 then
			intpage = 1
			pre = false
		else
			if cint(page) >= rs_user.PageCount then
				intpage = rs_user.PageCount
				last = false
			else
				intpage = cint(page)
			end if
		end if
	end if
	if not rs_user.eof then
		rs_user.AbsolutePage = intpage
	end if
	for i=1 to rs_user.PageSize
	if rs_user.EOF or rs_user.BOF then exit for
%>
<%
	set rs_user1 = server.CreateObject("adodb.recordset")
	sql1="select person.*,Resume_cn.jobs,Resume_cn.nianling,Resume_cn.edu,Resume_cn.school,Resume_cn.zym,phone from person,Resume_cn where person.id="&rs_user("pid")&" and person.Resume_id=Resume_cn.id" 
	rs_user1.open sql1,conn,1,1
	jobnameid=int(rs_user1("jobs"))
%>
<!--#include file="../inc/jobname.asp"-->
	 <tr align="center" bgcolor="#F9F9F9" onMouseOver="this.style.backgroundColor='F0F0F0'" onMouseOut ="this.style.backgroundColor='FFFFFF'">
            <td width="20" height="30"><input name="j_id" type="checkbox" ID="JID_BOX" value="<%=rs_user("id")%>"></td>
            <td width="76"><a href="../view_person.asp?id=<%=rs_user1("id")%>" target="_blank" title="浏览 <%=rs_user1("iname")%> 的详细信息"><%=rs_user1("iname")%></a></td>
            <td width="46"><%=rs_user1("nianling")%></td>
            <td><%=rs_user1("edu")%></td>
            <td><%=rs_user1("school")%></td>
            <td><%=rs_user1("zym")%></td>
            <td><%=rs_user1("phone")%></td>
            <td><%=jobname%></td>
            <td><%=rs_user("stime")%></td>
            <td><% if rs_user("zhuangtai")=0 then Response.Write("未回复")%><% if rs_user("zhuangtai")=1 then Response.Write("同意应聘")%><% if rs_user("zhuangtai")=2 then Response.Write("拒绝应聘")%></td>
          </tr>
<%
	rs_user1.close
	set rs_user1 = nothing
	rs_user.movenext
	next
	end if
%>
        </table>
<table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" borderColorLight=#808080 borderColorDark=#ffffff>
<tr>
<%if rs_user.pagecount > 0 then%>
<td width="13%" align="left">当前页<%=intpage%>/<%=rs_user.PageCount%></td>
<%else%>
<td width="41%" align="left">当前页0/0</td><%end if%>
<td width="46%" align="right"> <a href="?page=1">首页</a>|
<%if pre then%>
<a href="?page=<%=intpage -1%>">上页</a>| <%end if%>
<%if last then%>
<a href="?page=<%=intpage +1%>">下页</a> |<%end if%>
<a href="?page=<%=rs_user.PageCount%>">尾页</a>|转到第
<select name="sel_page" onchange=javascript:location.href=this.options[this.selectedIndex].value>
<%
	for i = 1 to rs_user.PageCount
	if i = intpage then
%>
<option value="?page=<%=i%>" selected><%=i%></option>
<%else%> 
<option value="?page=<%=i%>"><%=i%></option>
<%
	end if
	next
%>
</select>页</font>
</td>
</tr>
</table>
        <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
          <tr>
            <td align="right"><input type="checkbox" ID="CKALL" name="checkallbox" onClick="checkAll()" value="checkbox">
              选中所有人才</td>
          </tr>
          <tr>
            <td align="center"><img src="images/button_15.gif" width="46" height="20" style="cursor:hand" onClick="deleteJobs()"> &nbsp;&nbsp;</td>
          </tr>
          <TR>
            <TD bgColor=#000000 height=1></TD>
          </TR>
          <tr>
            <td align="left"><span class="p3">　　说明：直接点击人才的姓名即可看到该人才的详细信息，点删除可删除该人才信息。</span></td>
          </tr>
        </table>
        <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
          <tr>
            <td align="center"><img src="images/button_15.gif" width="46" height="20"></td>
            <td align="left"> 即对“已经过期了的人才信息”，以后不再需要招聘的人才彻底进行删除。</td>
          </tr>
        </table>
        <input type="hidden" name="action" value="">
      </form>
	  </td>
  </tr>
</table>
<%
	rs_user.close
	set rs_user = nothing
	conn.close
	set conn = nothing
%>
</body>
</html>
