<!--#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() '//跳转到删除的函数  
 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_Account"
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() '//将数据填充到数组
'//如：Tmp(0,0)表示 用户的姓名
CloseRs
Set Cmd = Nothing
'//功能代码
RealName = Tmp(0,0)
UserType = Cls_Usertype(Tmp(1,0))

 %>
<!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>
<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> 
          <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">
              <form action="?action=submit" name="edit" method="post" onSubmit="return edit_check();">
			  <script language="JavaScript">
			   function edit_check()
			   {
			     if (document.edit.skillclass.value==""){
   					alert("-请选择/输入技能类别-");
  					document.edit.skillclass.focus();
  					return false;
				 }
				 if (document.edit.skillmemo.value==""){
   					alert("-请输入技能描述-");
  					document.edit.skillmemo.focus();
  					return false;
				 }
			   }
			  </script>
                <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="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="13%" height="25" align="right"><STRONG><FONT 
                  color=#ff6600>*</FONT></STRONG> 技能类别：</td>
                              <td width="82%" height="25"> <input name="skillclass" type="text" id="skillclass" maxlength="25" style="width:100px;">
                                <select name="skillclass1" id="skillclass1" onChange="document.edit.skillclass.value=document.edit.skillclass1.options[document.edit.skillclass1.selectedIndex].value">
								<option value="">-选择技能-</option>
                               <option value="综合技能">综合技能</option>
							  <option value="IT技能">IT技能</option>
							  <option value="其他技能">其他技能</option>
                              </select>
								</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> <textarea name="skillmemo" cols="50" rows="12" id="skillmemo" style="width:430px;"><%= Skill_Memo %></textarea></td>
                                  </tr>
                                  <tr>
                                    <td height="25">请详细并有重点地描述您的相关技能，请注明一些与您职业密切相关的关键字</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="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)
 SkillClass          = Replace_Text(Request.Form("SkillClass"))
 SkillMemo           = Replace_Text(Request.Form("SkillMemo"))
 
 If SkillMemo<>"" Then SkillMemo = Replace(SkillMemo,Chr(13),"<br>")
 
 SQL = "Insert Into [pH_Person_Skill] (Perid,SkillClass,SkillMemo) Values ('"&Perid&"','"&SkillClass&"','"&SkillMemo&"')"
 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


 %>
