<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Public/Person_Cookies.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<% 
Dim Rs,Cmd,Tmp,Action
Dim Perid,UserName,UserType,PerType,Develop,Other,JobContent
Action = Request.QueryString("action")
If Action = "submit" Then Call 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>"
 Response.End()
End if

'//调用存储过程
Set Cmd = Server.Createobject("ADODB.Command")
Cmd.ActiveConnection = Conn
Cmd.CommandText = "Per_Showme"
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职位意向
'//如：Tmp(0,0)表示 用户的姓名
CloseRs
Set Cmd = Nothing
'//功能代码
Best_Flag = Tmp(0,0)
Best_Ads = Tmp(1,0)
RealName = Tmp(2,0)
JobType = Tmp(3,0)
WorkWillClass1 = Tmp(4,0)
WorkWillClass2 = Tmp(5,0)
WorkWillClass3 = Tmp(6,0)

UserType = Cls_Usertype(JobType)
 %>
<!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>
<script language="JavaScript" src="../js/Person_Showme.js"></script>
<SCRIPT language=JavaScript src="../js/funlib.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/ua.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/ftiens4.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/persontreeviewnodes.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/areacityselector.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/joball.js"></SCRIPT>
<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_Base.asp" -->
          </td>
          <td width="5">&nbsp;</td>
          <td valign="top">
           
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <form action="?action=submit" name="theForm" method="post" onSubmit="return theForm_check();">
                <tr> 
                  <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
                      <tr> 
                        <td bgcolor="#FFFFFF"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td height="2"></td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
                            <tr> 
                              <td height="25" bgcolor="f5f5f5"><b><font color="#000000">&nbsp;我要自荐</font></b></td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td width="18%" height="25" align="right" bgcolor="f9f9f9">工作分类：</td>
                              <td width="82%" height="25" bgcolor="f9f9f9">(请选择您希望的工作岗位类别)</td>
                            </tr>
                            <tr> 
                              <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*&nbsp; </FONT></STRONG> </td>
                              <td height="25"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr> 
                                    <td width="40%" height="20"><FONT 
                              color=#333333>选择工作岗位</FONT></td>
                                    <td width="15%">&nbsp;</td>
                                    <td width="45%"><FONT 
                              color=#333333>已经选择的工作岗位[最多三个]</FONT></td>
                                  </tr>
                                  <tr> 
                                    <td><SELECT  id=select5  name=slt_category  style="width:180px">
                                      </SELECT> <br> <select  name=slt_subcategory size="6"  id=select6 style="width:180px">
                                      </select></td>
                                    <td><table width="98%" border="0" cellspacing="0" class="text01">
                                        <tr> 
                                          <td height="25" align="center"><input type="button" name="Submit2" value="添加&gt;&gt;" onclick="AddItemToList('slt_category','slt_subcategory','slt_selectedjobs',3, 1, '-')"></td>
                                        </tr>
                                        <tr> 
                                          <td height="25" align="center"><input type="button" name="Submit3" value="&lt;&lt;移除" onclick="DeleteListSelectedItem('slt_selectedjobs', 0)"></td>
                                        </tr>
                                      </table></td>
                                    <td><SELECT  multiple size=7 name=slt_selectedjobs style="width:200px">
                                        <%
If Tmp(2,0)<>"" Then Response.write "<option value="&WorkWillClass1&" selected>"&WorkWillClass1&"</option>"
If Tmp(3,0)<>"" Then Response.write "<option value="&WorkWillClass2&" selected>"&WorkWillClass2&"</option>"
If Tmp(4,0)<>"" Then Response.write "<option value="&WorkWillClass3&" selected>"&WorkWillClass3&"</option>"				
%>
                                      </SELECT></td>
                                  </tr>
                                </table></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 自荐广告词：</td>
                              <td height="25" bgcolor="f9f9f9">(阐明您的个人技能和专长,20字以内)</td>
                            </tr>
                            <tr> 
                              <td height="25" align="right">&nbsp;</td>
                              <td height="25"><input name="ads" type="text" id="ads2" size="35" maxlength="20" value="<%= Best_Ads %>"></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9">自荐期限：</td>
                              <td height="25" bgcolor="f9f9f9"> <select name="level" id="level">
                                  <option value="7">一周</option>
                                  <option value="14">两周</option>
                                  <option value="30">一个月</option>
                                  <option value="60">两个月</option>
                                  <option value="90">三个月</option>
                                  <option value="180">半年</option>
                                  <option value="365">一年</option>
                                </select> </td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td height="2"></td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td height="2"></td>
                            </tr>
                          </table></td>
                      </tr>
                    </table></td>
                </tr>
                <tr> 
                  <td height="40" align="center"><SCRIPT language=JavaScript>


  
  objJobCPSelector = new JobCategoryAssociateList(document.theForm.slt_category, null, document.theForm.slt_subcategory, PCLOptions);
  objJobCPSelector.init();
  objJobCCSelector = new JobCategoryAssociateList(document.theForm.slt_subcategory, document.theForm.slt_category, null, CCLOptions);
  objJobCCSelector.incPValue = true;
  objJobCCSelector.incPValueFormat = "%PText%－不限"
  objJobCCSelector.init();
  </SCRIPT> <input name="perid" type="hidden" id="perid" value="<%= Perid %>"> 
                    <input type="submit" name="Submit" value=" 确认自荐 " style="height:35px;"> 
                  </td>
                </tr>
              </form>
            </table></td>
        </tr>
      </table>

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

</body>
</html>
<% 
Sub Submit()
 Perid                = Session("Person")(2)
 WorkWillClass        = Split(Replace_Text(Request.Form("slt_selectedjobs")),",")
 Ads				  = Request.Form("ads")
 Level				  = Request.Form("level")

 SQL = "Update [pH_Person_Base] Set Nc_Best_Flag=0,Nc_Best_ApplyDate=getdate(),Nc_Best_Level="&Level&",Nc_Best_Ads='"&Ads&"',LastUpdate_Time=getdate() Where Perid='"&Perid&"'"
 Conn.Execute(SQL)
 '//希望的工作岗位
 Select Case Ubound(WorkWillClass)
  Case 0
   Conn.Execute("Update [pH_Person_Info] Set WorkWillClass1='"&WorkWillClass(0)&"',WorkWillClass2=Null,WorkWillClass3=Null Where Perid='"&Perid&"'")
  Case 1
   Conn.Execute("Update [pH_Person_Info] Set WorkWillClass1='"&WorkWillClass(0)&"',WorkWillClass2='"&WorkWillClass(1)&"',WorkWillClass3=Null Where Perid='"&Perid&"'")
  Case 2
   Conn.Execute("Update [pH_Person_Info] Set WorkWillClass1='"&WorkWillClass(0)&"',WorkWillClass2='"&WorkWillClass(1)&"',WorkWillClass3='"&WorkWillClass(2)&"' Where Perid='"&Perid&"'")
 End Select

 CloseDB
 Response.write "<script>alert('您的申请成功，我们将尽快审核您的申请...');location.href='User_Center.asp';</script>"
 Response.End()
End Sub


 %>
