<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> 
<%Session.CodePage=936%> 
<!--#include file="../../conn/conn.asp" -->
<!--#include file="../../Inc/Commoncode.asp" -->
<!--#include file="../../inc/CommonFunction.asp"-->
<!--#include file="../../inc/sendmail.asp" -->
<!--#include file="../checkvalid.asp" -->
<!--#include file="../../inc/md5.asp"-->
<!--#include file="../../API/API_Config.asp"-->
<!--#include file="../../API/API_Function.asp"-->
<%sUploadDir=UpFilesPath("Company")
If Not FRAdminLevel(303) Then Call ErrorMsg()
Response.Expires = 0 
Response.CacheControl = "no-cache" 
Response.ExpiresAbsolute = Now() - 1 
keyword=CheckStr(trim(request("keyword"))) 
segment=CheckStr(trim(request("segment")))
operate=trim(request("operate"))
group=trim(request("group"))
order=trim(request("order"))
Dim Action
Dim page,i
Dim totalPut
const MaxPerpage=20
strFileName="cmember_searchlist.asp?segment="&segment&"&keyword="&keyword&"&operate="&operate&"&group="&group&"&order="&order&""
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
'seturl="cmember_searchlist.asp"
%>
<%
if trim(request("step"))<>"" then
step=trim(request("step"))
member=request("member")
select case step
 case "del"
   if member<>"" then
		pp=ubound(split(member,","))+1 
		for v=1 to pp
		member=request("member")(v)		
		conn.execute("delete from job_c_myexpert where myexpert_cmember='"&member&"'")
		conn.execute("delete from job_c_myreceive where myreceive_cmember='"&member&"'")
		conn.execute("delete from job_c_interview where cominterview_cmember='"&member&"'")
		conn.execute("delete from job_c_recycle where comrecycle_cmember='"&member&"'")
		conn.execute("delete from job_c_dept where dept_cmember='"&member&"'")
		conn.execute("delete from job_c_hire where hire_cmember='"&member&"'")
		conn.execute("delete from job_member where member_login='"&member&"'")
		'添加对整合接口的支持
		If API_Enable Then
			'重置错误状态和信息
			set sMyXmlHTTP=server.createobject("MSXML2.ServerXMLHTTP")
			sMyXmlHTTP.setTimeouts API_Timeout, API_Timeout, API_Timeout * 6, API_Timeout * 6
			Dim intIndex
				For intIndex = 0 To UBound(ArrUrls)
				sMyXmlHTTP.open "POST",ArrUrls(intIndex),false
				sMyXmlHTTP.setRequestHeader "Content-Type", "text/xml; charset=gb2312"
				sMyXmlHTTP.Send "<root><appid>finereason</appid><action>delete</action><syskey>"&MD5(member&API_SysKey, 16)&"</syskey><username>"&member&"</username><userstatus>0</userstatus></root>"
				Next
		End If
		next
   end if
case "logo" '审核LOGO
 	if member<>"" then
 		pp=ubound(split(member,","))+1 
			for v=1 to pp
			member=request("member")(v)
 			conn.execute("update job_member set member_logostatus=1 where member_login='"&member&"' and member_typeid=2")
			next
    end if
case "unlogo" '撤销LOGO审核
 	if member<>"" then
 		pp=ubound(split(member,","))+1 
			for v=1 to pp
			member=request("member")(v) 
 			conn.execute("update job_member set member_logostatus=0 where member_login='"&member&"' and member_typeid=2")
			next
    end if
case "cancle" 'LOGO推荐
       response.redirect "company_logo.asp?segment="&segment&"&member="&member&"&keyword="&keyword&"&operate="&operate&"&group="&group&"&page="&page&""
case "uncancle" '撤销LOGO推荐
	if member<>"" then
 		pp=ubound(split(member,","))+1 
			for v=1 to pp
			member=request("member")(v) 
 conn.execute("update job_member set member_logocommand=0,member_logostartdate=null,member_logoenddate=null where member_login='"&member&"' and member_typeid=2")
  			next
	end if  
 case "audit" 
 	if member<>"" then
 		pp=ubound(split(member,","))+1 
			for v=1 to pp
			 member=request("member")(v)
			 conn.execute("update job_member set member_flag=1 where member_login='"&member&"' and member_typeid=2")
			 If emailsendcomflag=1 Then
				 cMemberEmail=OutInfo("job_member","member_login","member_email",member,"code")
				 If cMemberEmail<>"未知" then
				 	mail_tit=CreateHTMLReplace(LoadMailTemp("company_flag",0))
					mail_con=CreateHTMLReplace(LoadMailTemp("company_flag",1))
					mail_tit=replace(mail_tit,"{$FR_会员用户名}",member)
					mail_con=replace(mail_con,"{$FR_会员用户名}",member)
				 Call SendMail(cMemberEmail,mail_tit,mail_con)
				 End If
			 End IF
			next
    end if
case "unaudit"
	if member<>"" then
 		pp=ubound(split(member,","))+1 
			for v=1 to pp
			member=request("member")(v)
			conn.execute("update job_member set member_flag=0 where member_login='"&member&"' and member_typeid=2")
			conn.execute("update job_c_hire set hire_status=0 where hire_cmember='"&member&"' and (hire_status=1 or hire_status=2)")
 			next
	end if
case "command":response.redirect "company_command.asp?segment="&segment&"&member="&member&"&keyword="&keyword&"&operate="&operate&"&group="&group&"&page="&page&""
case "uncommand"
	if member<>"" then
 		pp=ubound(split(member,","))+1 
			for v=1 to pp
			member=request("member")(v) 
 			conn.execute("update job_member set member_command=0,member_commandstartdate=null,member_commandenddate=null where member_login='"&member&"' and member_typeid=2")
			next
    end if
case "setactive" '刷新企业
 	if member<>"" then
 		pp=ubound(split(member,","))+1 
			for v=1 to pp
			member=request("member")(v) 
 			conn.execute("update job_member set Member_activedate='"&now()&"' where member_login='"&member&"' and member_typeid=2")
			next
    end if
case "sendmail":response.redirect "../websys/admin_mail.asp?member="&member&""
case "edit"
	if member<>"" then
	 member=request("member")(1)
	 set rsw=conn.execute("select member_id from job_member where member_login='"&member&"' and member_typeid=2")
	 if not rsw.eof then
	 company_id=rsw("member_id")
	 end if
	 response.redirect "company_modi.asp?id="&company_id&"&keyword="&keyword&"&page="&page&"&segment="&segment&"&operate="&operate&"&group="&group&""
 	 response.end
	end if
 case "reload"
	set Cmrs=Server.CreateObject("ADODB.RecordSet")
	Cmsql="select * from JOB_Group where Group_membertype=2 and Group_IsDefault="&FR_HR_True&""
	Cmrs.open Cmsql,conn,1,1
	if not Cmrs.eof then
	Group_id=Cmrs("Group_id")
	Group_unit=Cmrs("Group_unit")
	Group_term=Cmrs("Group_term")
	Member_startdate=date()
	Select Case Group_unit
		case "日":Member_enddate=DateAdd("d",Group_term,Member_startdate)
		case "月":Member_enddate=DateAdd("m",Group_term,Member_startdate)
		case "季":Member_enddate=DateAdd("q",Group_term,Member_startdate)
		case "年":Member_enddate=DateAdd("yyyy",Group_term,Member_startdate)
	end select
	conn.execute("update job_member set Member_groupid="&Group_id&",Member_enddate='"&Member_enddate&"' where datediff("&FR_HR_d&",member_enddate,"&FR_HR_Now&")>0 and member_typeid=2")
	end if
	Cmrs.close:set Cmrs=nothing
 end select
end if
%>
<html>
<head>
<title>企业会员列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/style<%=sk%>.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../inc/input.js"></script>
<script language="javascript" src="../Inc/Admin.js"></script>
<script language="javascript" src="../../Js/Sms.js"></script>
<style type="text/css">
<!--
.style1 {
	color: #0066CC;
	font-weight: bold;
}
.STYLE2 {color: #FF0000}
.style11 {	color: #0066CC;
	font-weight: bold;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1"  class="tableBorder">
   <tr> 
	   <th  height=25 class="tableHeaderText">企业招聘管理</th>
   </tr>
  <form action="cmember_searchlist.asp" method="post">
    <tr>
      <td height="28" align="left"><font color="ff6600"><b class="style1">　管理选项</b></font>：&nbsp;<a href="cmember_searchlist.asp">管理首页</a> | <a href="company_add.asp">企业添加</a> | <a href="cmember_searchlist.asp">企业管理</a> | <a href="hire_add.asp">职位添加</a> | <a href="hire_searchlist.asp">职位管理</a> | <a href="hire_search.asp" target="main">职位查询</a> | <a href="company_service.asp">服务申请管理</a> | [<a href="javascript:location.reload()">刷新页面</a>]</td>
    </tr>
    <tr>
      <td height="28" align="left"><font color="ff6600"><b class="style11">　二级选项</b></font>： <a href="?operate=0">待审</a> | <a href="?operate=1">已审</a> | <a href="?operate=2">名企</a> | <a href="?operate=3">LOGO待审</a> | <a href="?operate=4">LOGO已审</a> | <a href="?operate=5">LOGO推荐</a> | <a href="?operate=6">已过期</a> | <a href="?operate=7">一周内到期</a> | <a href="?operate=8">30天内到期</a> | <a href="?operate=9">已过期一周</a> | <a href="?operate=10">已过期30天</a> </td>
    </tr>
    <tr>
      <td height="28" align="left"><font color="ff6600"><b class="style11">　服务选项</b></font>： <%set rss=conn.execute("select Group_id,Group_name from job_Group where Group_membertype=2")
	  if not rss.eof then
	  do while not rss.eof%><a href="?operate=<%=operate%>&group=<%=rss("Group_id")%>"><%=rss("Group_name")%></a> | <%rss.movenext
		loop
		end if
		set rss=nothing%></td>
    </tr>
    <tr> 
      <td height="28" align="left"><font color="ff6600"><b class="style11">　会员查询</b></font>： 
          <input name="keyword" type="text" id="keyword" value="<%=keyword%>" size="20">
          <select name="segment" size="1" id="segment">
            <option value="cmember_login" <%if segment="cmember_login" then response.Write "selected"%>>会员帐号</option>
            <option value="cmember_name" <%if segment="cmember_name" then response.Write "selected"%>>公司名称</option>
            <option value="cmember_email" <%if segment="cmember_email" then response.Write "selected"%>>邮箱地址</option>
            <option value="cmember_tel" <%if segment="cmember_tel" then response.Write "selected"%>>联系电话</option>
            <option value="cmember_mob" <%if segment="cmember_mob" then response.Write "selected"%>>手机号码</option>
          </select>
          <input name="Submit" type="submit" class="inputs" value="搜索">
     &nbsp;<a href="cmember_searchlist.asp?step=reload">刷新账户状态</a> （刷新数据库，将<span class="STYLE2">过期</span>企业用户转成默认用户）</td>
    </tr>
  </form>
</table>
<%Call main()
if FoundErr=True then
	call Show_Err()
end if
%>
<%sub main()
sql="select * from job_member where Member_typeid=2 and"  
select case segment
	case "cmember_name":sql=sql&" member_name like '%"& keyword &"%'"
	case "cmember_login":sql=sql&" member_login like '%"& keyword &"%'"
	case "cmember_email":sql=sql&" member_email like '%"& keyword &"%'"
	case "cmember_tel":sql=sql&" member_tel like '%"& keyword &"%'"
	case "cmember_mob":sql=sql&" member_mobile like '%"& keyword &"%'"
	case else:sql=sql&" member_login like '%"& keyword &"%'"
end select
if operate<>"" then
	select case operate
		case 0:sql=sql&" and member_flag=0"
		case 1:sql=sql&" and member_flag=1"
		case 2:sql=sql&" and member_command=1"
		case 3:sql=sql&" and member_logostatus=0"
		case 4:sql=sql&" and member_logostatus=1"
		case 5:sql=sql&" and member_logocommand=1"
		case 6:sql=sql&" and datediff("&FR_HR_d&",member_enddate,"&FR_HR_Now&")>0"
		case 7:sql=sql&" and datediff("&FR_HR_d&",member_enddate,"&FR_HR_Now&")>-7 and datediff("&FR_HR_d&",member_enddate,"&FR_HR_Now&")<=0"
		case 8:sql=sql&" and datediff("&FR_HR_d&",member_enddate,"&FR_HR_Now&")>-30 and datediff("&FR_HR_d&",member_enddate,"&FR_HR_Now&")<=0"
		case 9:sql=sql&" and datediff("&FR_HR_d&",member_enddate,"&FR_HR_Now&")>7"
		case 10:sql=sql&" and datediff("&FR_HR_d&",member_enddate,"&FR_HR_Now&")>30"
	end select	
end if
if group<>"" then
	sql=sql&" and Member_groupid="&group&""
end if
select case order
	case "1":sql=sql&" order by member_regdate desc"
	case "2":sql=sql&" order by member_logindate desc"
	case "3":sql=sql&" order by member_enddate asc"
	case else:sql=sql&" order by member_id desc"
end select
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
	FoundErr=True
	ErrMsg=ErrMsg & "<br><li>暂无企业用户，请添加后再进行管理！</li>"
	exit sub
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
end sub	
%>
<%Sub MainInfo()%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1"  class="tableBorder">
        <tr> 
    		<th  height=25 colspan="8" class="tableHeaderText">企业会员列表（<a href="cmember_searchlist.asp?segment=<%=segment%>&keyword=<%=keyword%>&operate=<%=operate%>&group=<%=group%>&order=1">最近注册</a> | <a href="cmember_searchlist.asp?segment=<%=segment%>&keyword=<%=keyword%>&operate=<%=operate%>&group=<%=group%>&order=2">最近登陆</a> | <a href="cmember_searchlist.asp?segment=<%=segment%>&keyword=<%=keyword%>&operate=<%=operate%>&group=<%=group%>&order=3">最近到期</a>）</th>
  		</tr>
<form name="form2" action="cmember_searchlist.asp" method="post">
		<tr> 
          <td width="5%" align="center"><b>编号</b></td>
		  <td width="18%" align="center"><b>会员名|状态|名称</b></td>
          <td width="15%" align="center"><b>登录|注册时间</b></td>
          <td width="7%" align="center"><b>标志</b></td>
          <td width="10%" align="center"><b>联系方式</b></td>
          <td width="12%" align="center"><b>服务|余额|消费</b></td>
          <td width="30%" align="center"><b>统计(登|职|人|简|邀|意|短)</b></td>
          <td width="4%" align="center"><input name="checkSelect" type="checkbox" class="checkbox" onClick="javascript: checkAll(this)" value="checkbox"></td>
    </tr>
	<%set rsc=server.createobject("ADODB.Recordset")
	do while not rs.eof%>
        <tr onMouseOver="this.style.background='#FFFFCC'" onMouseOut="this.style.background='#EEF7FD'">
		<td height="25" align="center"><%=rs("Member_id")%></td>
          <td><a href="../../member/index.asp?login=<%=rs("Member_login")%>&pwd=<%=rs("Member_pwd")%>&types=cmember&name=<%=rs("member_name")%>" title="点击进入会员中心！<br>最近访问时间：<%=rs("member_logindate")%>" target="_blank"><%=rs("Member_login")%></a>(<%if rs("member_flag")=1 then
		  response.write"正常"
		  elseif rs("member_flag")=0 then
		  response.write"<font color='#999999'>待审</font>"
		  end if%>)<br>
          <a href="#" title="点击查看<%=rs("member_name")%>基本信息！" onClick="window.open ('cmember_info.asp?id=<%=rs("Member_id")%>','newwindow','height=500,width=550,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no') ">
          <%member_command=rs("member_command")
		  member_commandenddate=rs("member_commandenddate")	  
			  if member_command=1 then
			  		if cdate(member_commandenddate)>date() then
					response.Write "<font color=red>"&left(rs("member_name"),10)&"</font>"
				    elseif cdate(member_commandenddate)<date() then
					response.Write "<font color=red>"&left(rs("member_name"),10)&"</font>(<font color=blue>名企过期</font>)"
			  		end if
			  else
			  		response.Write left(rs("member_name"),10)
			  end if		  
		  %></a><%if rs("member_name")<>"" and rs("member_hirenums")>0 then%>|<a href="hire_searchlist.asp?segment=2&search=<%=rs("member_name")%>" title="点击查看该企业的招聘职位列表！"><font color=red>聘</font></a><%end if%>
          </td>
          <td align="left"><%if rs("member_logindate")<>rs("member_regdate") then%><font color="#ff0000"><%=rs("member_logindate")%></font><%else%><font color='#666666'>尚未再次登录</font><%end if%><br><%=rs("member_regdate")%></td>
          <td align="center">
            <%if rs("member_logo")<>"" or not isnull(rs("member_logo")) then %>
            <img src="../images/haveimg.gif" alt="Logo图片：&lt;br&gt;&lt;img src=<%=sUploadDir&rs("member_logo")%> border=1 width=196 height=60&gt;" width="12" height="12" border="0" onClick="if (confirm('确实要修改logo吗？')) window.open ('company_uploadlogo.asp?id=<%=rs("member_id")%>','newwindow','height=220,width=550,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no') ">
            <%if rs("member_logostatus")<>1 then	  
		  			response.write "<font color='#666666'>未审</font>"
				else
					response.write "已审"
				end if
				if rs("member_logocommand")=1 then
					if rs("member_logoenddate")>date() then
					response.Write "|推荐"
					else
					response.Write "|<font color=red>过期</font>"
					end if					
				end if
			else
		    %>
            <a href="#"  onClick="if (confirm('确实要上传logo吗？')) window.open ('company_uploadlogo.asp?id=<%=rs("member_id")%>','newwindow','height=220,width=550,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no') "><font color='#666666'>上传</font></a>
          <%end if%></td>
          <td align="center" title="电话:<%=rs("member_tel")%><br>手机:<%=rs("Member_mobile")%>"><%=left(rs("member_tel"),12)%><br><%if rs("Member_mobile")<>"" then%><a onClick="sendsms('<%=rs("member_login")%>',2,'<%=rs("Member_mobile")%>','<%=rs("member_name")%>','<%=SiteUrl&InstallDir%>');" style="cursor:pointer"><span id="s_<%=rs("member_login")%>">发短信</span></a><%else%><font color='#666666'>发短信</font><%end if%></td>
          <td align="center"><a href="#" title="点击可进入设置<%=rs("member_name")%>会员类型及会员服务时间！<br>会员服务:<%=rs("member_startdate")%>—<%=rs("member_enddate")%>" onClick="if (confirm('确实要修改用户类型吗？')) window.open ('../user/admin_usertypemodi.asp?id=<%=rs("member_id")%>&member_typeid=<%=rs("member_typeid")%>','newwindow','height=260,width=550,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no') ">
		  <%if rs("Member_groupid")<>0 or rs("Member_groupid")<>"" then
		  set rst=conn.execute("select Group_name from job_Group where Group_membertype=2 and Group_id="&rs("Member_groupid")&"")
			  if not rst.eof then
			  Response.Write rst("Group_name")
			  else
			  Response.Write("未归类")
			  end if
		end if
		  if rs("member_enddate")<date() then
		  	response.Write "(<font color=red>已过期</font>)"
			end if %></a><br>
            <a href="#" title="点击可进入设置<%=rs("member_name")%>帐户余额，可实现管理员后台充值！" onClick="if (confirm('确定要修改此帐户的余额吗？')) window.open ('cmember_userpointmodi.asp?id=<%=rs("member_id")%>','win_point','height=230,width=550,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')"><%=rs("Member_balance")%></a>元 <a href="../user/admin_paypoint.asp?keyword=<%=rs("Member_login")%>&membertype=2">消费查看</a></td>
          <td align="left">登录<%=rs("member_loginnum")%>次|职位<%=rs("Member_hirenum")%>/<%=rs("Member_hirenums")%>|人才<%=rs("Member_expertnum")%>/<%=rs("Member_expertnums")%>|简历<%=rs("Member_contactnum")%>/<%=rs("Member_contactnums")%><br>邀请<%=rs("Member_interviewnum")%>/<%=rs("Member_interviewnums")%>|意向<%sqlc="select count(*) as myreceivecount from job_c_myreceive where myreceive_cmember='"&rs("Member_login")&"'"
	rsc.open sqlc,conn,1,1
	response.Write rsc("myreceivecount")
	rsc.close%>人|短信<%=rs("Member_smsnum")%>/<%=rs("Member_smsnums")%>|点击<%=rs("member_hits")%>次</td>
          <td align="center"><input name="member" type="checkbox" class="checkbox" value="<%=rs("member_login")%>"></td>
        </tr>
        <%
		i=i+1
		if i>=MaxPerPage then exit do
		rs.movenext
		loop
		set rsc=nothing
  %>
  <tr align="right"> 
	<input type="hidden" name="keyword" value="<%=keyword%>"> 
	<input type="hidden" name="segment" value="<%=segment%>">
    <td height="25" colspan="8" aligh="right">
	<input name="button" type="button" class="inputs" id="button" onClick="confirmX(1);" value="审核LOGO" title="审核LOGO图片">
   <input name="button" type="button" class="inputs" id="button" onClick="confirmX(2);" value="撤消审核" title="撤消LOGO图片审核">
   <input name="button" type="button" class="inputs" id="button" onClick="confirmX(3);" value="推荐LOGO" title="推荐LOGO图片">
   <input name="button" type="button" class="inputs" id="button" onClick="confirmX(4);" value="撤消推荐" title="撤消LOGO图片推荐">
   <input name="button" type="button" class="inputs" id="button" onClick="confirmX(5);" value="审核企业" title="审核企业">
   <input name="button" type="button" class="inputs" id="button" onClick="confirmX(6);" value="撤消审核" title="撤销企业审核">
   <input name="button" type="button" class="inputs" id="button" onClick="confirmX(7);" value="推荐名企" title="推荐企业">
   <input name="button" type="button" class="inputs" id="button" onClick="confirmX(8);" value="撤消名企" title="撤销推荐">
   <input name="button" type="button" class="inputs" id="button" onClick="confirmX(13);" value="刷新企业" title="刷新企业活动时间">
   <!--<input name="button" type="button" class="inputs" id="button" onClick="confirmX(11);" value="类型">-->
   <input name="button" type="button" class="inputs" id="button" onClick="confirmX(12);" value="邮件" title="发送邮件">
   <input name="button" type="button" class="inputs" id="button" onClick="confirmX(9);" value="修改" title="修改企业信息">
   <input name="button" type="button" class="inputs" id="button" onClick="confirmX(10);" value="删除" title="删除企业信息">
</td>
    </tr>  
  <tr> 
    <td height="25" colspan="8"><%If totalput>0 Then
	Call Showpage(strFileName,totalput,MaxPerPage,false,true,"家企业")
End If%></td>
  </tr>
</form>
</table>
<%end sub%>
<!--#include file="../inc/copy.asp" -->
</body>
</html>
<%Conn.Close:Set Conn=Nothing%>
<script language="javascript">
function confirmX(num)
{
	var ids = document.getElementsByName("member");
	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)
	{
		if(confirm("你确定要审核你所选择的LOGO吗？"))	
		{
			document.form2.action="cmember_searchlist.asp?step=logo";
			document.form2.submit();		
		}
	}
	if(num==2)
	{
		if(confirm("你确定要撤销审核你所选择的LOGO吗？"))	
		{
			document.form2.action="cmember_searchlist.asp?step=unlogo";
			document.form2.submit();		
		}
	}
	if(num==3)
	{
		if(confirm("你确定要推荐所选择的公司的LOGO吗？"))	
		{
			document.form2.action="cmember_searchlist.asp?step=cancle";
			document.form2.submit();		
		}
	}
	if(num==4)
	{
		if(confirm("你确定要撤消推荐所选择的公司的LOGO吗？"))	
		{
			document.form2.action="cmember_searchlist.asp?step=uncancle";
			document.form2.submit();		
		}
	}
	if(num==5)
	{
		if(confirm("你确定要审核你所选择的公司吗？"))	
		{
			document.form2.action="cmember_searchlist.asp?step=audit";
			document.form2.submit();		
		}
	}
	if(num==6)
	{
		if(confirm("你确定要撤销审核你所选择的公司吗？"))	
		{
			document.form2.action="cmember_searchlist.asp?step=unaudit";
			document.form2.submit();		
		}
	}
	if(num==7)
	{
		if(confirm("你确定要推荐你所选择的企业为名企吗？"))	
		{
			document.form2.action="cmember_searchlist.asp?step=command";
			document.form2.submit();		
		}
	}
	if(num==8)
	{
		if(confirm("你确定要撤销推荐你所选择的名企吗？"))	
		{
			document.form2.action="cmember_searchlist.asp?step=uncommand";
			document.form2.submit();		
		}
	}
	if(num==9)
	{
		if(a==1){
		if(confirm("你确定要修改你所选择的公司资料吗？"))	
		{
			document.form2.action="cmember_searchlist.asp?step=edit";
			document.form2.submit();		
		}
		}
		else
		{
		alert("同一时刻只能选择一个操作对象进行修改!")
		return false;
		}
	}
	if(num==10)
	{
		if(confirm("警告：此操作将会删除该公公司的信息及该公司发布的所有相关信息！\n是否继续本操作？"))	
		{
			document.form2.action="cmember_searchlist.asp?step=del";
			document.form2.submit();		
		}
	}
	if(num==11)
	{
		if(confirm("你确定要修改你所选择的企业类型吗？"))	
		{
			document.form2.action="cmember_usertypemodi.asp?step=settype";
			document.form2.submit();		
		}
	}
	if(num==12)
	{
		if(confirm("你确定要给选定的企业发送邮件吗？"))	
		{
			document.form2.action="cmember_searchlist.asp?step=sendmail";
			document.form2.submit();		
		}
	}
	if(num==13)
	{
		if(confirm("你确定要刷新选定的企业吗？"))	
		{
			document.form2.action="cmember_searchlist.asp?step=setactive";
			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>