<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Public/Person_Cookies.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<% 
'地区分站参数
Dim c_City,c_Name
If Session("c_City") = "" Then 
 Response.Redirect "../Index.asp"
 Response.End()
End if
c_City = Session("c_City")
c_Name = Session("c_Name")

Dim Rs,Cmd,Tmp,Action
Dim Perid,UserName,UserType,Language_One,Language_Two,Mandarin,Skill_Memo,Computer,PhotoKeep,PhotoUrl
Action = Request.QueryString("action")
If Action <> "" Then 
 Select Case Action
  Case "submit"
   Call Submit()  '//跳转到保存数据的函数
  Case "keep"
   Call Keep_Submit() '//跳转到屏蔽或者恢复照片的函数
   Case "delphoto"
   Call Del_Submit() '//跳转到删除的函数  
   Case "delskill"
   Call Delskill_Submit() '//跳转到删除的函数   
 End Select
End if

'//判断用户身份
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_Addons"
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照片屏蔽
'//如：Tmp(0,0)表示 用户的姓名
CloseRs
Set Cmd = Nothing
'//功能代码
RealName = Tmp(0,0)
UserType = Cls_Usertype(Tmp(1,0))

Language_One = Tmp(3,0)
Language_Two = Tmp(4,0)
Mandarin = Tmp(7,0)
Computer = Tmp(2,0)
PhotoUrl = Tmp(11,0)
PhotoKeep = Tmp(12,0)
Skill_Memo = Tmp(9,0)
If Skill_Memo<>"" Then Skill_Memo = Replace(Skill_Memo,"<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&" | "&c_Name&"站" %> -- 简历中心 -- 附加信息(专长/技能/照片)</title>
</head>
<script language="JavaScript" src="../js/Person_Addons.js"></script>
<body>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td>
      <!--#include file="../c_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 valign="top"> 
          <td width="175" valign="top"> 
            <!--#include file="../Lefter/Person_Basicinfo.asp" -->
          </td>
          <td width="5">&nbsp;</td>
          <td> 
            <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
              <tr> 
                <td bgcolor="#FFFFFF"> <table width="99%" border="0" cellspacing="0" cellpadding="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"> 
                        <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td width="50%"><b><font color="#000000">个人照片</font></b></td>
                            <td width="50%" align="right"><a href="Per_Photo.asp" target="_blank"><font color="#FF0000"><u>在线拍照</u></font></a></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table>
                  <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td valign="top"><table width="98%" border="0" align="center" cellspacing="0" class="text01">
                          <form name="form" method="post" action="Per_Addons_PhotoUp.asp" enctype="multipart/form-data" >
                            <tr> 
                              <td>请上传您的照片：</td>
                            </tr>
                            <tr> 
                              <td> <input type="hidden" name="filepath" value="../Uploadfiles/PersonFile"> 
                                <input type="hidden" name="act" value="upload"> 
                                <input name="filename" style="font-family: 宋体; font-size: 12px" type="file" size="38"> 
                              </td>
                            </tr>
                            <tr> 
                              <td> <input type="button" name="Submit22" value="删除照片"  onClick="location.href='?action=delphoto';"> 
                                <% If PhotoKeep = 0 Then %>
                                <input type="button" name="Submit2" value="屏蔽照片"  onClick="location.href='?action=keep&keepid=1';"> 
                                <% Else %>
                                <input type="button" name="Submit2" value="恢复照片"  onClick="location.href='?action=keep&keepid=0';"> 
                                <% End if %>
                                <input name="Send2" style="font-family: 宋体; font-size: 12px" type="submit" value="上传照片"> 
                              </td>
                            </tr>
                          </form>
                        </table>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td>&nbsp;</td>
                          </tr>
                          <tr> 
                            <td>上传说明<font color="#666666">：</font></td>
                          </tr>
                          <tr> 
                            <td>所传照片一律为<font face="Verdana">JPG</font>、<font face="Verdana">JPEG</font>、或<font face="Verdana">GIF</font>格式 
                              ;</td>
                          </tr>
                          <tr> 
                            <td><span style="font-family: 宋体; font-size: 12px">相片大小不能超过100K 
                              ; </span></td>
                          </tr>
                          <tr> 
                            <td><span style="font-family: 宋体; font-size: 12px">照片应该处理成大小为135 
                              x 160 像素 .</span></td>
                          </tr>
                        </table></td>
                      <td width="35%" height="170" align="center" valign="top"> 
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td height="4"></td>
                          </tr>
                          <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>
                  </table></td>
              </tr>
            </table>
            <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="edit" method="post" onSubmit="return edit_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"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 语言水平：</td>
                              <td width="82%" height="25" bgcolor="f9f9f9">第一外语： 
                                <select name="language_one" id="language_one" style="width:100px;">
                                  <option  value="0">-请选择-</option>
                                  <option  value="1" <% If Language_One = 1 Then Response.write "Selected" %>>英语</option>
                                  <option  value="2" <% If Language_One = 2 Then Response.write "Selected" %>>日语</option>
                                  <option  value="3" <% If Language_One = 3 Then Response.write "Selected" %>>法语</option>
                                  <option  value="4" <% If Language_One = 4 Then Response.write "Selected" %>>德语</option>
                                  <option  value="5" <% If Language_One = 5 Then Response.write "Selected" %>>阿拉伯语</option>
                                  <option  value="6" <% If Language_One = 6 Then Response.write "Selected" %>>朝鲜语</option>
                                  <option  value="7" <% If Language_One = 7 Then Response.write "Selected" %>>西班牙语</option>
                                  <option  value="8" <% If Language_One = 8 Then Response.write "Selected" %>>俄语</option>
                                  <option  value="9" <% If Language_One = 9 Then Response.write "Selected" %>>意大利语</option>
                                  <option  value="10" <% If Language_One = 10 Then Response.write "Selected" %>>其他语言</option>
                                </select>
                                水平： 
                                <input name="level_one" type="text" id="level_one" size="10" maxlength="10" value="<%= Tmp(5,0) %>"></td>
                            </tr>
                            <tr> 
                              <td width="18%" height="25" align="right">&nbsp;</td>
                              <td height="25">第二外语： 
                                <select name="language_two" id="language_two" style="width:100px;">
                                  <option  value="0">-请选择-</option>
                                  <option  value="1" <% If Language_Two = 1 Then Response.write "Selected" %>>英语</option>
                                  <option  value="2" <% If Language_Two = 2 Then Response.write "Selected" %>>日语</option>
                                  <option  value="3" <% If Language_Two = 3 Then Response.write "Selected" %>>法语</option>
                                  <option  value="4" <% If Language_Two = 4 Then Response.write "Selected" %>>德语</option>
                                  <option  value="5" <% If Language_Two = 5 Then Response.write "Selected" %>>阿拉伯语</option>
                                  <option  value="6" <% If Language_Two = 6 Then Response.write "Selected" %>>朝鲜语</option>
                                  <option  value="7" <% If Language_Two = 7 Then Response.write "Selected" %>>西班牙语</option>
                                  <option  value="8" <% If Language_Two = 8 Then Response.write "Selected" %>>俄语</option>
                                  <option  value="9" <% If Language_Two = 9 Then Response.write "Selected" %>>意大利语</option>
                                  <option  value="10" <% If Language_Two = 10 Then Response.write "Selected" %>>其他语言</option>
                                </select>
                                水平： 
                                <input name="level_two" type="text" id="level_two" size="10" maxlength="10" value="<%= Tmp(6,0) %>"> 
                              </td>
                            </tr>
                            <tr> 
                              <td height="25" align="right">&nbsp;</td>
                              <td height="25">普 通 话： 
                                <select name="mandarin" id="mandarin" style="width:100px;">
                                  <option value="0">-请选择-</option>
                                  <option value="4" <% If Mandarin = 4 Then Response.write "Selected" %>>标准</option>
                                  <option value="3" <% If Mandarin = 3 Then Response.write "Selected" %>>一般</option>
                                  <option value="2" <% If Mandarin = 2 Then Response.write "Selected" %>>较差</option>
                                  <option value="1" <% If Mandarin = 1 Then Response.write "Selected" %>>差</option>
                                </select></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 计算机证书：</td>
                              <td height="25" bgcolor="f9f9f9"> <!--#include file="../Include/Class_Computer.asp" --> </td>
                            </tr>
                            <tr> 
                              <td height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 技能关键字：</td>
                              <td height="25"> <input name="skill_key" type="text" id="skill_key" maxlength="100" value="<%= Tmp(8,0) %>"  style="width:300px;"> 
                                <FONT face=宋体>如：软件工程</FONT></td>
                            </tr>
                            <tr> 
                              <td height="25" align="right" bgcolor="f9f9f9">技能描述：</td>
                              <td height="25" bgcolor="f9f9f9">(请添加您的各项技能描述)</td>
                            </tr>
<% 
SQL = "Select * From [pH_Person_Skill] Where Perid='"&Perid&"'"
Set Re = Conn.Execute(SQL)
If Not Re.eof Then
 %>
                            <tr> 
                              <td height="25" align="right">&nbsp;</td>
                              <td height="25"> <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                                  <tr> 
                                    <td height="2"></td>
                                  </tr>
                                </table>
                                <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#efefef">
							  <% 
							  While Not Re.Eof
							   %>
                                  <tr bgcolor="#f5f5f5"> 
                                    <td height="22" colspan="2"><%= Re("SkillClass") %></td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF"> 
                                    <td><%= Re("SkillMemo") %></td>
                                    <td width="80" align="center" bgcolor="#FFFFFF"><a href="Per_Skill_Edit.asp?Skillid=<%= Re("Ncid") %>">编辑</a> 
                                      <a href="?action=delskill&skillid=<%= Re("Ncid") %>">删除</a></td>
                                  </tr>
								<% 
								 Re.Movenext
								Wend
								
								 %>
                                </table></td>
                            </tr>
<% 
End if
Re.Close
 %>
                            <tr> 
                              <td height="25" align="right">&nbsp;</td>
                              <td height="25"><a href="Per_Skill_Add.asp"><u><font color="#FF0000">新增技能</font></u></a></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="1">-求职意向-</option>
                                  <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"> <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="../c_Include/Footer.asp" -->
    </td>
  </tr>
</table>

</body>
</html>
<% 
Sub Submit()
 Call Check_url()    '防止外部站点提交数据
 '//提交数据
 Perid                = Session("Person")(2)
 Computer             = Replace_Text(Request.Form("Computer"))
 Language_one         = Replace_Text(Request.Form("Language_one"))
 Language_two         = Replace_Text(Request.Form("Language_two"))
 Level_one            = Replace_Text(Request.Form("Level_one"))
 Level_two            = Replace_Text(Request.Form("Level_two"))
 Mandarin             = Replace_Text(Request.Form("Mandarin"))
 Skill_key            = Replace_Text(Request.Form("Skill_key"))
 'Skill_Memo           = Replace_Text(Request.Form("Skill_Memo"))
 'ComputerOther        = Replace_Text(Request.Form("ComputerOther"))
 
 If Skill_Memo<>"" Then Skill_Memo = Replace(Skill_Memo,Chr(13),"<br>")
 
 SQL = "Update [pH_Person_Info] Set  Computer="&Computer&",Language_one="&Language_one&",Language_two="&Language_two&",Level_one='"&Level_one&"',Level_two='"&Level_two&"',Mandarin="&Mandarin&",Skill_key='"&Skill_key&"'  Where Perid='"&Perid&"'"
 Conn.Execute(SQL)

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

Sub Keep_Submit()     '//屏蔽和恢复照片的函数
 'Call Check_url()    '防止外部站点提交数据
 '//提交数据
 Perid                = Session("Person")(2)
 Paramid              = Replace_Text(Request.QueryString("keepid"))
 
 SQL = "Update [pH_Person_Info] Set PhotoKeep="&Paramid&" Where Perid='"&Perid&"'"
 Conn.Execute(SQL)

 '//更改最后修改时间
 SQL = "Update [pH_Person_Base] Set LastUpdate_Time=getdate() Where Perid='"&Perid&"'"
 Conn.Execute(SQL)
 
 CloseDB
 Response.redirect "Per_Addons.asp"
End Sub

Sub Del_Submit()      '//删除照片函数
 '//提交数据
 Perid                = Session("Person")(2)
 Set Rs = Conn.Execute("Select PhotoUrl From [pH_Person_Info] Where Perid='"&Perid&"'")
 If Rs(0) = Null or Rs(0) = "" Then
    CloseRs
    CloseDB
    Response.redirect "Per_Addons.asp"
 Else
     '//删除图片文件
    Set Fso = Server.createobject("Scripting.FileSystemObject")
	If Fso.FileExists(Server.Mappath("../UpLoadFiles/PersonFile/"&Rs(0))) Then
	   Fso.DeleteFile(Server.Mappath("../UpLoadFiles/PersonFile/"&Rs(0)))
	End if
	
	SQL = "Update [pH_Person_Info] Set PhotoUrl=Null Where Perid='"&Perid&"'"
    Conn.Execute(SQL)
	
    '//更改最后修改时间
    SQL = "Update [pH_Person_Base] Set LastUpdate_Time=getdate() Where Perid='"&Perid&"'"
    Conn.Execute(SQL)
 
	CloseRs
    CloseDB
    Response.redirect "Per_Addons.asp"
 End if
End Sub

Sub Delskill_Submit()

 Perid = Session("Person")(2)
 Skillid = Replace_Text(Request("Skillid"))
 Conn.Execute("Delete [pH_Person_Skill] Where Perid='"&Perid&"' And Ncid="&Skillid)
 
 Response.redirect "Per_Addons.asp"
 'Response.End()
End Sub

 %>
