<!--#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_JobWill"
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发展方向,17其他要求,18职位类型,19求职信,20行业类别
'//如：Tmp(0,0)表示 用户的姓名
CloseRs
Set Cmd = Nothing
'//功能代码
RealName = Tmp(0,0)
UserType = Cls_Usertype(Tmp(1,0))

PerType     = Tmp(18,0)
Develop     = Tmp(16,0)
Other       = Tmp(17,0)
JobContent  = Tmp(19,0)
Industry	= Tmp(20,0)

If Develop<>"" Then Develop = Replace(Develop,"<br>",Chr(13)) 
If Other<>""   Then Other   = Replace(Other,"<br>",Chr(13)) 
If JobContent<>"" Then JobContent = Replace(JobContent,"<br>",Chr(13))

 %>
<!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_JobWill.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_Basicinfo.asp" -->
          </td>
          <td width="5">&nbsp;</td>
          <td valign="top">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="2"></td>
              </tr>
            </table>
            <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 bgcolor="f9f9f9"> 
                              <td width="18%" height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 职位类型：</td>
                              <td width="82%" height="25"> 
                                <input type="radio" name="pertype" value="1" <% If PerType = 1 Then Response.write "Checked" %>>
                                全职 
                                <input type="radio" name="pertype" value="2" <% If PerType = 2 Then Response.write "Checked" %>>
                                兼职 </td>
                            </tr>
                            <tr>
                              <td height="25" align="right">行业类别：</td>
                              <td height="25"><!--#include file="../Include/Class_Industry.asp" --></td>
                            </tr>
                            <tr> 
                              <td width="18%" height="25" align="right" bgcolor="f9f9f9">希望工作岗位：</td>
                              <td height="25" bgcolor="f9f9f9">先选择上排的大类，再在下排选择相应的子类，然后按添加<br>
                                如果想要删出选好的工作岗位，请先选中该项，然后按移除</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="1"  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=3 name=slt_selectedjobs style="width:200px">
                                        <%
If Tmp(2,0)<>"" Then Response.write "<option value="&Tmp(2,0)&" selected>"&Tmp(2,0)&"</option>"
If Tmp(3,0)<>"" Then Response.write "<option value="&Tmp(3,0)&" selected>"&Tmp(3,0)&"</option>"
If Tmp(4,0)<>"" Then Response.write "<option value="&Tmp(4,0)&" selected>"&Tmp(4,0)&"</option>"				
%>
                                      </SELECT></td>
                                  </tr>
                                </table></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9">职位名称：</td>
                              <td height="25" bgcolor="f9f9f9">(例如：程序员、销售经理)</td>
                            </tr>
                            <tr> 
                              <td height="25" align="right">&nbsp;</td>
                              <td height="25"><strong> 1. 
                                <input name="workwill1" type="text" id="workwill1" size="20" maxlength="20"  style="width:100px" value="<%= Tmp(5,0) %>">
                                2. 
                                <input name="workwill2" type="text" id="workwill2" size="20" maxlength="20"  style="width:100px" value="<%= Tmp(6,0) %>">
                                3. 
                                <input name="workwill3" type="text" id="workwill3" size="20" maxlength="20"  style="width:100px" value="<%= Tmp(7,0) %>">
                                </strong> </td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9">希望工作地区：</td>
                              <td height="25" bgcolor="f9f9f9">先选择上排的省区，再在下排选择相应的城市，然后按添加<br>
                                如果想要删出选好的工作地点，请先选中该项，然后按移除</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%"><FONT 
                              color=#333333>选择工作地点</FONT></td>
                                    <td width="15%">&nbsp;</td>
                                    <td width="45%"><FONT 
                              color=#333333>已经选择的工作地点[最多三个]</FONT></td>
                                  </tr>
                                  <tr> 
                                    <td><select style="width:180px"  name=slt_workplacearea>
                                      </select> <select name=slt_workplacecity size="1" 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="Submit22" value="添加&gt;&gt;" onclick="AddItemToList('slt_workplacearea','slt_workplacecity','slt_selectedplaces',3, 2, '-')"></td>
                                        </tr>
                                        <tr> 
                                          <td height="25" align="center"><input type="button" name="Submit32" value="&lt;&lt;移除" onclick="DeleteListSelectedItem('slt_selectedplaces', 0)"></td>
                                        </tr>
                                      </table></td>
                                    <td><SELECT  name=slt_selectedplaces size=3 multiple   id=select8 style="width:200px">
                                        <% 
If Tmp(8,0)<>"" Then Response.write "<option value="&Tmp(8,0)&" selected>"&Tmp(8,0)&"</option>"
If Tmp(9,0)<>"" Then Response.write "<option value="&Tmp(9,0)&" selected>"&Tmp(9,0)&"</option>"
If Tmp(10,0)<>"" Then Response.write "<option value="&Tmp(10,0)&" selected>"&Tmp(10,0)&"</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"> <input name="deal" type="text" size="20" maxlength="20"  style="width:100px" value="<%= Tmp(11,0) %>">
                                元/月 
                                <input name="interview" type="checkbox" id="interview" value="1"  <% If Tmp(12,0) = True Then Response.write "Checked" %>>
                                可面议 
                                <input name="providehouse" type="checkbox" id="providehouse" value="1"  <% If Tmp(13,0) = 1 Then Response.write "Checked" %>>
                                要求提供住房 </td>
                            </tr>
                            <tr> 
                              <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 到岗时间：</td>
                              <td height="25"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr> 
                                    <td height="25"> <input type="radio" name="post" value="0" <% If Tmp(14,0) = 0 Then Response.write "Checked" %>>
                                      随时到岗</td>
                                  </tr>
                                  <tr> 
                                    <td height="25"> <input type="radio" name="post" value="1" <% If Tmp(14,0) = 1 Then Response.write "Checked" %>> 
                                      <select name="posts" id="posts">
                                        <option  value="10" <% If Tmp(15,0) = 10 Then Response.write "Selected" %>>三天内</option>
                                        <option  value="20" <% If Tmp(15,0) = 20 Then Response.write "Selected" %>>一周内</option>
                                        <option  value="30" <% If Tmp(15,0) = 30 Then Response.write "Selected" %>>两周内</option>
                                        <option  value="40" <% If Tmp(15,0) = 40 Then Response.write "Selected" %>>三周内</option>
                                        <option  value="50" <% If Tmp(15,0) = 50 Then Response.write "Selected" %>>一个月内</option>
                                        <option  value="60" <% If Tmp(15,0) = 60 Then Response.write "Selected" %>>三个月内</option>
                                        <option  value="70" <% If Tmp(15,0) = 70 Then Response.write "Selected" %>>半年内</option>
                                        <option  value="80" <% If Tmp(15,0) = 80 Then Response.write "Selected" %>>一年内</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">(阐明您的意向求职岗位，更重要的是强调如何发挥您的才能，而不是期望从中得到的待遇,500字以内)</td>
                            </tr>
                            <tr> 
                              <td height="25" align="right">&nbsp;</td>
                              <td height="25"><textarea name="develop" cols="50" rows="6" id="develop"><%= Develop %></textarea></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9">其他要求：</td>
                              <td height="25" bgcolor="f9f9f9">(例如:福利要求、培训机会...等信息)</td>
                            </tr>
                            <tr> 
                              <td height="25" align="right">&nbsp;</td>
                              <td height="25"><textarea name="other" cols="50" rows="6" id="textarea2"><%= Other %></textarea></td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                              <td><hr size="1" color="#CCCCCC"></td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1">
                            <tr bgcolor="f9f9f9"> 
                              <td width="18%" height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 求职信：</td>
                              <td height="25">(输入在求职时发生给企业的自我介绍性文字...)</td>
                            </tr>
                            <tr>
                              <td width="18%" height="25" align="right">&nbsp;</td>
                              <td height="25"><textarea name="jobcontent" cols="50" rows="6" id="jobcontent"><%= JobContent %></textarea></td>
                            </tr>
                          </table>
                          <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td width="18%" height="30" align="right">保存后返回：</td>
                              <td height="30"> <select name="prevurl">
                                  
                                  <option value="2">-求职意向-</option>
                                  <option value="3">-会员中心-</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>
  var objJobCPSelector, objJobCCSelector, objAreaSelector, objCitySelector

  objAreaSelector = new PlaceAssociateList(document.theForm.slt_workplacearea, null, document.theForm.slt_workplacecity, ALOptions);
  objAreaSelector.init();
  objCitySelector = new PlaceAssociateList(document.theForm.slt_workplacecity, document.theForm.slt_workplacearea, null, CLOptions);
  objCitySelector.incPValue = true;
  objCitySelector.incPValueFormat = "%PText%－不限"
  objCitySelector.init();

  
  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()
 Call Check_url()    '防止外部站点提交数据
 '//提交数据
 Perid                = Session("Person")(2)
 'Response.write Request.Form("slt_selectedjobs")
 'Response.End()
 WorkWillClass        = Split(Replace_Text(Request.Form("slt_selectedjobs")),",")
 
 WorkWill1            = Replace_Text(Request.Form("WorkWill1"))
 WorkWill2            = Replace_Text(Request.Form("WorkWill2"))
 WorkWill3            = Replace_Text(Request.Form("WorkWill3"))
 Industry			  = Replace_Text(Request.Form("Industry"))
 AreaWill             = Split(Replace_Text(Request.Form("slt_selectedplaces")),",")
 
 Deal                 = Replace_Text(Request.Form("Deal"))
 Interview            = Replace_Text(Request.Form("Interview"))
 Providehouse         = Replace_Text(Request.Form("Providehouse"))
 Post                 = Replace_Text(Request.Form("Post"))
 Posts                = Replace_Text(Request.Form("Posts"))
 Develop              = Replace_Text(Request.Form("Develop"))
 Other                = Replace_Text(Request.Form("Other"))
 PerType              = Replace_Text(Request.Form("PerType"))
 JobContent           = Replace_Text(Request.Form("JobContent"))
 For i = 0 to Ubound(WorkWillClass)
  WorkWillClass(i) = Trim(WorkWillClass(i))
 Next
 
 For i = 0 to Ubound(AreaWill)
  AreaWill(i) = Replace(AreaWill(i),"-","")
  AreaWill(i) = Trim(AreaWill(i))
 Next
 
 If Interview = "" Then Interview = 0
 If Providehouse = "" Then Providehouse = 0 
 If Develop<>"" Then Develop = Replace(Develop,Chr(13),"<br>")
 If Other<>"" Then Other = Replace(Other,Chr(13),"<br>")
 If JobContent<>"" Then JobContent = Replace(JobContent,Chr(13),"<br>")
 
 SQL = "Update [pH_Person_Info] Set WorkWill1='"&WorkWill1&"',WorkWill2='"&WorkWill2&"',WorkWill3='"&WorkWill3&"',Deal="&Deal&",Interview="&Interview&",Providehouse="&Providehouse&",Post="&Post&",Posts="&Posts&",Develop='"&Develop&"',Other='"&Other&"',JobContent='"&JobContent&"',PerType="&PerType&",Industry="&Industry&" 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
 
 '//希望的工作地区
 Select Case Ubound(AreaWill)
  Case 0
   Conn.Execute("Update [pH_Person_Info] Set AreaWill1='"&AreaWill(0)&"',AreaWill2=Null,AreaWill3=Null Where Perid='"&Perid&"'")  
   Case 1
   Conn.Execute("Update [pH_Person_Info] Set AreaWill1='"&AreaWill(0)&"',AreaWill2='"&AreaWill(1)&"',AreaWill3=Null Where Perid='"&Perid&"'")
  Case 2
   Conn.Execute("Update [pH_Person_Info] Set AreaWill1='"&AreaWill(0)&"',AreaWill2='"&AreaWill(1)&"',AreaWill3='"&AreaWill(2)&"' Where Perid='"&Perid&"'")
 End Select

 '//更改最后修改时间
 SQL = "Update [pH_Person_Base] Set LastUpdate_Time=getdate() Where Perid='"&Perid&"'"
 Conn.Execute(SQL)
 
 CloseDB
 'Response.redirect "Per_JobWill.asp"
 Prevurl = Request.Form("prevurl")
 Select Case Prevurl
  Case "2":Response.Redirect "Per_JobWill.asp"
  Case "3":Response.Redirect "User_Center.asp"
 End Select
End Sub


 %>
