<?php
echo ahead("微招聘列表");
?>
<script language="javascript" src="inc/admin.js"></script>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
  <form action="company_vhirelist.php" method="post">
  <tr>
    <th height="25">微招聘管理</th>
  </tr>
  <tr>
  <td height=25 class="pl20"><b>管理选项：</b><a href="company_vhirelist.php">管理首页</a>&nbsp;|&nbsp;<a href="?operate=0">待审微职位</a> | <a href="?operate=1">已审微职位</a>&nbsp;|&nbsp;[<a href="javascript:location.reload()">刷新页面</a>]</td>
  </tr>
    <tr> 
      <td height=25 class="pl20"><b>职位搜索：</b> 
          <input name="keyword" type="text" id="keyword" value="<?php echo $keyword;?>" size="20">
          <select name="segment" size="1" id="segment">
            <option value="v_place" <?php if($segment=="v_place") echo "selected";?>>职位名称</option>
            <option value="v_comname" <?php if($segment=="v_comname") echo "selected";?>>公司名称</option>
          </select>
          <input name="Submit" type="submit" class="inputs" value="搜索" /></td>
    </tr>
    </form>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder mt6">
<form name="form2" action="company_vhirelist.php" method="post">
<tr>
    <th colspan=9 height=25>微招聘列表</th>
</tr>
<tr align="center"> 
  <td width="8%">编号</td>
  <td width="65%">微招聘内容</td>
  <td width="18%">发布时间|IP</td>
  <td width="6%">状态</td>
  <td width="3%"><input name="checkSelect" type="checkbox" class="checkbox" onClick="javascript: checkAll(this)" value="checkbox"></td>
</tr>
<?php 
echo $hirelist;
?>
<tr><td height="25" align="right" colspan="9">
    <input type="hidden" name="members" value="">
    <input type="hidden" name="keyword" value="<?php echo $keyword;?>"> 
    <input type="hidden" name="segment" value="<?php echo $segment;?>">
    <input type="hidden" name="page" value="<?php echo $page;?>">
    <input name="button" type="button" class="inputs" id="button" onClick="confirmX(1);" value="审核职位">
    <input name="button" type="button" class="inputs" id="button" onClick="confirmX(2);" value="撤销审核">
    <input name="button" type="button" class="inputs" id="button" onClick="confirmX(5);" value="删除">
</td></tr>
<tr>
<td height="25" align="center" colspan="9" class="tdpage"><?php echo $getpageinfo['pagecode'];?></td></tr>
</form>
</table>
<script language="javascript">
function confirmX(num)
{
	var ids = document.getElementsByName("member");
	var check=false;
	var allSel="";
	var a=0;
	if (ids != null) {
		for (i=0; i<ids.length; i++) 
		{
			var obj = ids[i];
			if (obj.checked==true)
			{
				if(allSel==""){
				allSel=obj.value;
				}else{
				allSel=allSel+","+obj.value;
				}
				document.form2.members.value = allSel;
				check=true;
				a+=1
				
			}
		}
		if(check==false){alert("请选择操作对象！");return false;}
	}
	if(num==1)
	{
		if(confirm("你确定要审核你所选择的职位吗？"))	
		{
			document.form2.action="?do=audit";
			document.form2.submit();		
		}
	}
	if(num==2)
	{
		if(confirm("你确定要撤销审核你所选择的职位吗？"))	
		{
			document.form2.action="?do=unaudit";
			document.form2.submit();		
		}
	}
	if(num==5)
	{
		if(confirm("警告：此操作将会删除该职位！\n是否继续本操作？"))	
		{
			document.form2.action="?do=del";
			document.form2.submit();		
		}
	}
	return false;	
}
function checkAll(box1) {
    var ids = document.getElementsByName("member");
	if (ids != null) {
		for (i=0; i<ids.length; i++) {
			var obj = ids[i];
			obj.checked = box1.checked;
		}
	}
}
</script>
<?php echo acopy();?>