<!--#include file="../../conn/conn.asp" -->
<!--#include file="../../Inc/Commoncode.asp" -->
<!--#include file="../checkvalid.asp" -->
<%
sUploadDir=UpFilesPath("Company")
If Not FRAdminLevel(602) Then
	Call ErrorMsg()
End If

step=trim(request("step"))
currentpage=trim(request("currentpage"))
usergroup=trim(request("usergroup"))
company_id=request("member")
ac=request.QueryString("ac")
if ac="all" then
	conn.execute("delete from JOB_Member where Member_logo='error.gif'")
	response.write "<script language=javascript>alert('清理成功！');location.href='img.asp';</script>"
end if
if trim(request("step"))<>"" then
select case step
 case "del"
 	if company_id<>"" then
   	sql="select * from JOB_Member where member_id="&company_id
   	set rs=conn.execute(sql)
   
   Set fso = CreateObject("Scripting.FileSystemObject")
	  if fso.FileExists(server.MapPath(sUploadDir&rs("Member_logo")&"")) Then    '判断文件夹是否存在
		 fso.DeleteFile(server.MapPath(sUploadDir&rs("Member_logo")&""))
	  end if  
	  rs.close
	  set rs=nothing  
   conn.execute("update JOB_Member set Member_logo='error.gif' where Member_id="&company_id)
   end if
end select
end if
%>
<!--#include file="../../inc/memberpagelist.asp" -->
<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=javascript1.2 src="iXs_Main.js"></script>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"  class="tableBorder">
   <tr> 
	   <th  height=25 class="tableHeaderText">上传管理</th>
   </tr>
   <tr>
   <td height="24"> 　上传管理: <a href="img.asp?ac=all">清理垃圾数据</a>（已经删除的数据）</td>
   </tr>
</table> 
 <br>
<table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
        <tr> 
    		<th  height=25 colspan="7" class="tableHeaderText">上传列表</th>
  		</tr>
<form name="form2" action="img.asp" method="post">	
		<tr>
        <%
  sql="select * from JOB_Member where Member_typeid=2 and Member_logo is not null and Member_logo<>'error.gif'"
  sql=sql&" order by Member_id desc"
  pgsz=20
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,1,1
  If not rs.eof then
   rs.pagesize=pgsz
	   if request("Gocurrentpage")<>"" then
		ipage=request("Gocurrentpage")
	   else
		ipage=request("currentpage")
	   end if
	   
	   if ipage="" or ipage=0 then
		ipage=1
	   else
		   if cint(ipage)>cint(rs.pagecount) then
			ipage=rs.pagecount
		   end if
	   end if 
  rs.absolutepage=ipage
  for i=1 to rs.pagesize
  %>
<td align="center" class="forumRow">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center">
	  <%
	  Set fso = CreateObject("Scripting.FileSystemObject")
	  if fso.FileExists(server.MapPath(sUploadDir&rs("Member_logo")&"")) Then    '判断文件夹是否存在
	  %>
	  	<img src="<%=sUploadDir&rs("Member_logo")%>" width="160px" height="60px">	</td>
	  <%
	  else
	  %>
	  	<img src="<%=sUploadDir&rs("Member_logo")%>" width="160px" height="60px">	</td>
	  <%
	  end if  
	  %>
  </tr>
  <tr>
    <td align="center"><%=rs("Member_name")%>
	  <%
	  Set fso = CreateObject("Scripting.FileSystemObject")
	  if fso.FileExists(server.MapPath(sUploadDir&rs("Member_logo")&"")) Then    '判断文件夹是否存在
	  if rs("Member_logo")<>"error.gif" then%>
		<input name="member" type="radio" value="<%=rs("Member_id")%>" class="checkbox"></td>
	  <%end if
	  end if %>
	
  </tr>
</table>
</td>
        <%
		if i mod 4=0 then
			response.write "</tr><tr>"
		end if
  rs.movenext
  if rs.eof then 
    exit for
  end if  
  next
  %>
  </tr>
	<input type="hidden" name="currentpage" value="<%=ipage%>">
  <tr bgcolor="#FFFFFF" class="tabbgcolorli">
    <td colspan="4" align="right" aligh="right">
	  &nbsp;&nbsp;
	  <input name="button" type="button" class="inputs" onClick="confirmX(5);" value="删  除">    </td>
  </tr>
</form>
  <tr bgcolor="#FFFFFF" class="tabbgcolorli">
    <td colspan="4" aligh="right"> 
     <%call pagelist("img.asp","segment="&segment&"usergroup="&usergroup&"&openness="&openness&"",rs.pagecount,cint(ipage),rs.recordcount)%>    </td>
  </tr>
 <%
 end if
 rs.close
 set rs=nothing
 conn.close
 set conn=nothing
  %>
</table>
<!--#include file="../inc/copy.asp" -->
</body>
</html>
<script language="javascript">
function confirmX(num)
{
	var ids = document.getElementsByName("member");
	var check=false;
	if (ids != null) {
		
		for (i=0; i<ids.length; i++) 
		{
			var obj = ids(i);
			if (obj.checked==true)
			{
				check=true;
				
			}
		}
		if(check==false){alert("请选择操作对象！");return false;}
	}
	if(num==5)
	{
		if(confirm("警告:您确定要删除此信息吗！\n是否继续操作？"))	
		{
			document.form2.action="img.asp?step=del";
			document.form2.submit();		
		}
	}
	return false;	
}
</script></html>