<!--#include file="../Conn.asp" -->
<!--#include file="../Comm/Site_Class.asp" -->
<!--#include file="../Comm/Function.asp" -->
<%
Dim strMenu,PageTitle
strMenu = ""
PagePath = "../"

Set Qsite = New Site_Class

Qsite.SiteConfig()
Qsite.GotoErrPage()

PageTitle = Qsite.SiteName & " - 个人会员管理中心"
Qsite.SiteTopPerson()
%>
<!--#include file="Check_Login.asp" -->
<%
Dim Rs,i,CurrentPage,FileName
Dim TotalMail,NewMail
Set Rs = server.CreateObject("ADODB.recordset")

Rs.Open "select * from PersonBoxTbl where PerId = "& Session("PerId") , Conn , 1 , 1
	TotalMail = Rs.RecordCount
Rs.Close
Rs.Open "select * from PersonBoxTbl where PerId = "& Session("PerId") &" and IsRead = '0'" , Conn , 1 , 1
	NewMail = Rs.RecordCount
Rs.Close

FileName = "BoxList.asp?="
%>
<script language="javascript">
	function BoxDel()
	{
		var bid = document.getElementsByName("BoxId");
		var chkflag = true;
		var delboxid = "0";
		for(var i = 0; i < bid.length; i++)
		{
			if(bid[i].checked == true)
			{
				chkflag = false;
				break;
			}
		}
		if(chkflag)
		{
			alert("请先选择要删除的面试邀请");
			return false;
		}
		var question = confirm("你确定要删除选中的面试邀请吗？");
		if (question !="0")
		{
			for(i = 0; i < bid.length; i++)
			{
				if(bid[i].checked == true)
				{
					delboxid += "|" + bid[i].value;
				}
			}
			//alert(delboxid);
			window.showModalDialog("DelMail.asp?BoxId=" + delboxid,"DelMail","");
			location.reload();
		}
	}

	function selAll()
	{
		var selobj = document.getElementsByName("BoxId");
		for(var i = 0; i < selobj.length; i++)
		{
			selobj[i].checked = true;
		}
	}
	
	function removeAll()
	{
		var selobj = document.getElementsByName("BoxId");
		for(var i = 0; i < selobj.length; i++)
		{
			selobj[i].checked = false;
		}
	}
	
	function onclicksel()
	{
		var chkobj = document.all("BoxIdAll");
		if(chkobj.checked == true)
		{
			selAll();
		}
		else
		{
			removeAll();
		}
	}

	function ReadMail(BoxId , ComId)
	{
		window.open('ReadMail.asp?BoxId=' + BoxId + '&ComId=' + ComId , '' , '');
		location.reload();
	}
</script>
<table width="974" height="413" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr> 
        <td width="185" valign="top"> 
<!--#include file="Left_Menu.asp" -->
        </td>
        <td width="789" valign="top">

<table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="26" background="../images/Member_Center_r7_c8.jpg"><table width="768" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="60">&nbsp;</td>
                    <td width="708"><span style="font-size:14px;color:#FF7706"><b>邀请面试记录</b></span><span style="font-size:14px;color:#333333"> 
                      <strong>InviteMe</strong></span></td>
                  </tr>
                </table></td>
            </tr>
            <tr>
              <td height="136" align="left" valign="top" background="../images/Member_Center_r10_c8.jpg" style="padding-top:5px;padding-left:10px;padding-right:10px;padding-bottom:5px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr> 
                    <td width="100%" height="23"><img src="../images/ico_2.gif" width="15" height="12" align="absmiddle" />友情提示：本系统可自动保存单位邀请您面试的历史记录。</td>
                  </tr>
                </table>
                <table width="100%" height="7" border="0" cellpadding="0" cellspacing="0">
                  <tr height="1">
                    <td background="../images/ico_point.gif"></td>
                  </tr>
				  <tr height="6">
                    <td></td>
    
                </table>


<form id="ListForm" name="ListForm" method="post" action="" style="margin:0">
								<table width="100%" align=center border="0" cellpadding="5" cellspacing="3">
									<tr>
										<td width="7%" height="20" >&nbsp;</td>
												<td width="10%" height="20" align="center" ><strong>状态</strong></td>
												<td width="35%" height="20" ><strong>公司名称</strong></td>
												<td width="28%" ><strong>职位名称</strong></td>
												<td width="20%" height="20" align="center" ><strong>日期</strong></td>
									</tr>
	<%
Rs.Open "select * from PersonBoxTbl where PerId = "& Session("PerId") &" order by SendDate desc" , Conn , 1 , 1
If Rs.Eof Then
%>
									<tr>
										<td height="20" colspan="5" align="center">暂无信息</td>
									</tr>
	<%
Else
	Rs.PageSize = 20
	CurrentPage = Clng(Request("page"))
	If CurrentPage < 1 Then CurrentPage = 1
	If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
	Rs.AbsolutePage = CurrentPage
	i = 0
	Do While Not Rs.Eof
%>
									<tr>
										<td height="20" align="center" ><input name="BoxId" type="checkbox" id="BoxId" value="<%=Rs("BoxId")%>" /></td>
												<td height="20" align="center" >
													<%
											If Rs("IsRead") = "0" Then
												Response.Write("<img src=""../Images/Mail_New.gif"" width=""18"" height=""13"" border=""0"" />")
											Else
												Response.Write("<img src=""../Images/Mail_Old.gif"" width=""18"" height=""18"" border=""0"" />")
											End If
											%>											</td>
												<td height="20" ><a href="#" onclick="ReadMail('<%=Rs("BoxId")%>' , '<%=Rs("ComId")%>');return false;"><%=Company_Name(Rs("ComId"))%></a></td>
												<td height="20" ><%=Recruit_Name(Rs("RecruitId"))%>&nbsp;</td>
												<td height="20" align="center" ><%=Qsite.FormatDate(FormatDateTime(Rs("SendDate") , 2))%></td>
									</tr>
	<%
	i = i + 1
	Rs.MoveNext
	If i >= Rs.PageSize Then Exit Do
	Loop
%>
									<tr>
										<td height="20" align="center"><input name="BoxIdAll" type="checkbox" id="BoxIdAll" value="checkbox" onclick="onclicksel();" /></td>
												<td height="20" colspan="4"><table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td width="27%">全选 
															<input type="button" name="Submit" value=" 删  除 " class="input_bk_D2D2D2" onclick="BoxDel();" /></td>
														<td width="73%" align="right">
	<%
	Qsite.Page_Cn CurrentPage , Rs.PageCount , Rs.RecordCount , FileName
%>														</td>
													</tr>
													</table></td>
									</tr>
	<%
End If
Rs.Close
%>
								</table>
					</form><table width="100%" height="1" border="0" cellpadding="0" cellspacing="0">
                  <tr height="1">  
                    <td background="../images/ico_point.gif"></td>
                  </tr>
                </table></td>
            </tr>
            <tr height="14">
              <td height="14" background="../images/Member_Center_r18_c8.jpg"></td>
            </tr>
          </table></td>
      </tr>
    </table>
 
<table width="974" height="8" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr height="8">
        <td height="8"></td>
      </tr>
    </table>
<%
Qsite.Bottom()
%>