<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Public/Person_Cookies.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<% 
Dim Rs,SQL
Dim UserName,Perid,RealName,JobType
Dim Action

Action = Request.QueryString("action")
If Action = "up" Then Call Up_Submit() '跳转到保存函数

'//获取个人用户的登陆标记
If IsArray(Session("Person")) Then
 Perid = Session("Person")(2)
 UserName = Session("Person")(0)
Else
 Session.Abandon() 
 Response.write "<script>alert('-登录后才能进行该操作！-');location.href='../Public/MemberLogin.asp';</script>"
End if

'//调用存储过程
Set Cmd = Server.CreateObject("ADODB.Command")
Cmd.ActiveConnection = Conn
Cmd.CommandText = "Per_UserCenter"
Cmd.CommandType = 4
Cmd.Parameters.Append Cmd.CreateParameter("@Perid",200,1,30)
Cmd.Parameters("@Perid") = Perid
Set Rs = Cmd.Execute

If Rs.Eof Then
 CloseRs
 Set Cmd = Nothing
 CloseDB
 Response.write "没有找到会员资料！"
 Response.End()
End if
Tmp = Rs.GetRows() '//将数据填充到数组

'//0邮件地址,1注册时间,2最后登陆时间,3登陆次数,4姓名,5求职意向,6技能关键字,7会员类型,8有无视频,9视频状态,10开通时间,11截止时间,12视频简历路径,13自我评价,14简历保密状态,15更新时间,16查看次数,26审核与否,27是否屏蔽图片,28图片文件

'//如：Tmp(0,0)表示 邮件地址
Rs.Close
Set Cmd = Nothing

RealName            = Tmp(4,0)
LastDate            = Tmp(2,0)
LoginCount          = Tmp(3,0)
Appraise            = Tmp(13,0)
Skill_Key           = Tmp(6,0)
WorkWillClass       = Tmp(5,0)
ResumeKeep          = Tmp(14,0)
LastUpdate_Time     = Tmp(15,0)
ViewClicks          = Tmp(16,0)
Nc_Video            = Tmp(8,0)
Video_Date          = Tmp(10,0)
Video_EndDate       = Tmp(11,0)
Flag 				= Tmp(26,0)
PhotoKeep			= Tmp(27,0)
PhotoUrl 			= Tmp(28,0)

'获取会员的类别
Flag_Str = ""
If Flag = True Then '已经通过审核
   Flag_Str = "您是"&Cls_WebName&"<font color=#ff0000>正式个人会员</font> ;"
Else
   Flag_Str = "您是<font color=#ff0000>未审核会员</font>, 请及时填写您的求职简历以便通过网站审核 ;"
End if

'获取收件夹信件数
InBox_Num          = 0 
InBox_NewNum       = 0
'收件夹信件数
Set Rs = Conn.Execute("Select Count(*) From [pH_Person_InBox] Where Perid='"&Perid&"'")
If Not Rs.Eof Then InBox_Num = Rs(0)
Rs.Close
'收件夹新信件数
Set Rs = Conn.Execute("Select Count(*) From [pH_Person_InBox] Where Perid='"&Perid&"' And Flag=0")
If Not Rs.Eof Then InBox_NewNum = Rs(0) 
Rs.Close

'获取收藏夹
Favouriate_Num    = 0
Favouriate_NewNum = 0
'收藏夹数
Set Rs = Conn.Execute("Select Count(*) From [pH_Person_Favouriate] Where Perid='"&Perid&"'")
If Not Rs.Eof Then Favouriate_Num = Rs(0)
Rs.Close
'收藏夹中过期的职位数目
Set Rs = Conn.Execute("Select Count(F.Ncid) From pH_Person_Favouriate As F,pH_Job_Base As J Where J.JobId=F.JobId And F.Perid='"&Perid&"' And DateDiff(d,J.End_Date,GetDate())>0")
If Not Rs.Eof Then Favouriate_NewNum = Rs(0)
Rs.Close
'发件夹记录
OutBox_Num        = 0
Set Rs = Conn.Execute("Select Count(*) From [pH_Person_OutBox] Where Perid='"&Perid&"'")
If Not Rs.Eof Then OutBox_Num = Rs(0)
Rs.Close

'//简历完成状态
'基本信息
If Appraise <> "" Then
 BasicInfo_Flag = "<u>已完成</u>"
Else
 BasicInfo_Flag = "<u><font color=#ff0000>未填写</font></u>"
End if
'教育培训
Edu_Num      = 0
Set Rs = Conn.Execute("Select Count(*) From [pH_Person_Education] Where Perid='"&Perid&"'")
If Not Rs.Eof Then Edu_Num = Rs(0)
Rs.Close
If Edu_Num > 0 Then
 Edu_Flag = "<u>已完成</u>"
Else
 Edu_Flag = "<u><font color=#ff0000>未填写</font></u>"
End if
'工作经历
Work_Num      = 0
Set Rs = Conn.Execute("Select Count(*) From [pH_Person_Work] Where Perid='"&Perid&"'")
If Not Rs.Eof Then Work_Num = Rs(0)
Rs.Close
If Work_Num > 0 Then
 Work_Flag = "<u>已完成</u>"
Else
 Work_Flag = "<u><font color=#ff0000>未填写</font></u>"
End if

'技能特长
If Skill_Key <> "" Then
 Skill_Flag = "<u>已完成</u>"
Else
 Skill_Flag = "<u><font color=#ff0000>未填写</font></u>"
End if

'求职意向
If WorkWillClass <> "" Then
 WorkWill_Flag = "<u>已完成</u>"
Else
 WorkWill_Flag = "<u><font color=#ff0000>未填写</font></u>"
End if
'总体完成的状态
Resume_Flag = ""
If Appraise <> "" And Edu_Num > 0 And Work_Num > 0 And Skill_Key <> "" And WorkWillClass <> "" Then
 Resume_Flag = "简历已经填写完整 ,现在可以进行求职 ;"
End if

'//简历保密
If ResumeKeep = 0 Then
 ResumeStr = "<u>公开</u>"
Else
 ResumeStr = "<u><font color=#ff0000>保密</font></u>"
End if

'判断会员是否有视频简历
Video_Str = ""
If Nc_Video = True Then

 If DateDiff("d",Video_Date,Date()) >= 0 And DateDiff("d",Video_EndDate,Date()) <= 0 Then
  Video_Str = "您的视频简历开通时间：<u>"&Formatdatetime(Video_Date,2)&"</u> 截止时间：<u>"&Formatdatetime(Video_EndDate,2)&"</u>"
 Elseif DateDiff("d",Video_EndDate,Date()) > 0  Then
  Video_Str = "您的视频简历截止，截止时间：<u>"&Formatdatetime(Video_EndDate,2)&"</u>"
 End if
 
Else
 Video_Str = "您还没有制作视频简历 ,<a href=../Person/Per_Rec_Record.asp target=_blank><u>在线录制视频简历</u></a>"
End if

 %>
 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../Css/Style.css" type=text/css rel=stylesheet>
<title><%= Cls_WebName %> -- 简历中心</title>
</head>
<body>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td>
      <!--#include file="../Header/Person_Resume.asp" -->
    </td>
  </tr>
</table>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td><table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td height="4"></td>
        </tr>
        
      </table>
      <table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="175" valign="top"> 
            <!--#include file="../Lefter/Person_BasicInfo.asp" -->
          </td>
          <td width="5">&nbsp;</td>
          <td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
                    <tr> 
                      <td height="25" bgcolor="f5f5f5"><b><font color="#000000">&nbsp;求职信息</font></b></td>
                    </tr>
                  </table></td>
                <td width="150" rowspan="2" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td align="center"> <% 
If PhotoKeep = 0 Then
 If PhotoUrl <> Null or PhotoUrl <> "" Then
  If Left(PhotoUrl,1) = "p" Then
   Response.write "<img src=""../UpLoadFiles/PersonFile/"&PhotoUrl&""">"
  Else
   Response.write "<img src=""../UpLoadFiles/PersonFile/"&PhotoUrl&""" width=""135"" height=""160"">"
  End if
 Else
  Response.write "<img src=""../UpLoadFiles/DefaultFile/Person.gif"" width=""135"" height=""160"">"
 End if
Else
 Response.Write "照片被屏蔽"
End if
 %> </td>
                    </tr>
                    <tr> 
                      <td height="4"></td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="25"><img src="../Images/icon2.gif" width="12" height="16"> 
                        尊敬的<%= Cls_WebName %>用户：<font color=#ff0000><%= RealName %></font> 
                        , 欢迎您进入个人求职管理中心 </td>
                    </tr>
                    <tr> 
                      <td height="25"><img src="../Images/icon2.gif" width="12" height="16"> 
                        <%= Flag_Str %> </td>
                    </tr>
                    <tr> 
                      <td height="25"><img src="../Images/icon2.gif" width="12" height="16"> 
                        您目前收件夹中有 <u><font color=#ff0000><%= InBox_Num %></font></u> 封邮件，其中 <u><font color=#ff0000><%= InBox_NewNum %></font></u> 封是新邮件 ;</td>
                    </tr>
                    <tr> 
                      <td height="25"><img src="../Images/icon2.gif" width="12" height="16"> 
                        您的职位收藏夹中有 <u><font color=#ff0000><%= Favouriate_Num %></font></u> 个职位，其中 <u><font color=#ff0000><%= Favouriate_NewNum %></font></u> 个已过期 ; </td>
                    </tr>
                    <tr> 
                      <td height="25"><img src="../Images/icon2.gif" width="12" height="16"> 
                        您的求职记录(发件夹)共有 <u><font color=#ff0000><%= OutBox_Num %></font></u> 条 ;</td>
                    </tr>
                    <tr> 
                      <td height="25"><img src="../Images/icon2.gif" width="12" height="16"> 
                        上次登录时间：<u><font color=#ff0000><%= LastDate %></font></u>，登录次数： <u><font color=#ff0000><%= LoginCount %></font></u> 次 ;</td>
                    </tr>
                  </table></td>
              </tr>
            </table>
            <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
              <tr> 
                <td height="25" bgcolor="f5f5f5"><b><font color="#000000">&nbsp;我的简历</font></b></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="25"><img src="../Images/icon2.gif" width="12" height="16"> 
                  简历完成状态：
                  <% 
				  If Resume_Flag <> "" Then
				   Response.write Resume_Flag
				  Else
				   %>
                  基本信息<%= BasicInfo_Flag %>;教育培训<%= Edu_Flag %>;工作经历<%= Work_Flag %>;技能专长<%= Skill_Flag %>;求职意向<%= WorkWill_Flag %> ; 
                  <% End if %> </td>
              </tr>
              <tr> 
                <td height="25"><img src="../Images/icon2.gif" width="12" height="16"> 
                  简历保密状态： 当前简历处于 <%= ResumeStr %> 状态 ;</td>
              </tr>
              <tr> 
                <td height="25"><img src="../Images/icon2.gif" width="12" height="16"> 
                  简历已被查看： <u><%= ViewClicks %></u> 次 ;</td>
              </tr>
              <tr> 
                <td height="25"><img src="../Images/icon2.gif" width="12" height="16"> 
                  简历更新时间：<u><%= LastUpdate_Time %></u> <a href="?action=up"><u>刷新简历</u></a> ;</td>
              </tr>
              <tr>
                <td height="25"><img src="../Images/icon2.gif" width="12" height="16"> 
                  视频简历状态：<%= Video_Str %> .</td>
              </tr>
            </table>
            
          </td>
        </tr>
      </table>

<!--#include file="../Include/Footer.asp" -->
	  </td>
  </tr>
</table>

</body>
</html>
<% 
Sub Up_Submit()
 '//接收参数
 Perid             = Session("Person")(2)
 Conn.Execute("Update [pH_Person_Base] Set LastUpdate_Time=Getdate() Where Perid='"&Perid&"'")
 Response.write "<script>alert('简历已被刷新！');location.href='User_Center.asp';</script>"
 
End Sub


CloseDB
 %>
